8de29e5c7c8da2fef60ffa8b26d136e0665390da
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-08 Tom Tromey <tromey@adacore.com>
2
3 * win32-low.h (struct win32_target_ops): Use qualified names where
4 needed.
5 * win32-i386-low.c: Add "using namespace".
6 * win32-low.c: Add "using namespace".
7 * win32-arm-low.c: Add "using namespace".
8
9 2020-04-08 Tom Tromey <tromey@adacore.com>
10
11 * win32-low.c (delete_thread_info): Don't call CloseHandle.
12
13 2020-04-08 Tom Tromey <tromey@adacore.com>
14
15 * win32-low.c (win32_require_context, suspend_one_thread): Use
16 windows_thread_info::suspend.
17 (continue_one_thread): Use windows_thread_info::resume.
18 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
19
20 2020-04-08 Tom Tromey <tromey@adacore.com>
21
22 * win32-i386-low.c (update_debug_registers)
23 (i386_prepare_to_resume, i386_thread_added): Update.
24
25 2020-04-08 Tom Tromey <tromey@adacore.com>
26
27 * win32-low.c (child_add_thread): Use new.
28 (delete_thread_info): Use delete.
29
30 2020-04-08 Tom Tromey <tromey@adacore.com>
31
32 * win32-low.h (struct windows_thread_info): Remove.
33
34 2020-04-08 Tom Tromey <tromey@adacore.com>
35
36 * win32-low.h (struct windows_thread_info): Rename from
37 win32_thread_info. Remove typedef.
38 (struct win32_target_ops, win32_require_context): Update.
39 * win32-low.c (win32_get_thread_context)
40 (win32_set_thread_context, win32_prepare_to_resume)
41 (win32_require_context, thread_rec, child_add_thread)
42 (delete_thread_info, continue_one_thread)
43 (child_fetch_inferior_registers, child_store_inferior_registers)
44 (win32_resume, suspend_one_thread, win32_get_tib_address):
45 Update.
46 * win32-i386-low.c (update_debug_registers)
47 (win32_get_current_dr, i386_get_thread_context)
48 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
49 (i386_fetch_inferior_register, i386_store_inferior_register):
50 Update.
51 * win32-arm-low.c (arm_get_thread_context)
52 (arm_fetch_inferior_register, arm_store_inferior_register):
53 Update.
54
55 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
56
57 * linux-low.h (struct linux_target_ops): Remove.
58 (the_low_target): Remove.
59 * linux-x86-low.cc (the_low_target): Remove.
60 * linux-aarch64-low.cc (the_low_target): Ditto.
61 * linux-arm-low.cc (the_low_target): Ditto.
62 * linux-bfin-low.cc (the_low_target): Ditto.
63 * linux-cris-low.cc (the_low_target): Ditto.
64 * linux-crisv32-low.cc (the_low_target): Ditto.
65 * linux-ia64-low.cc (the_low_target): Ditto.
66 * linux-m32r-low.cc (the_low_target): Ditto.
67 * linux-m68k-low.cc (the_low_target): Ditto.
68 * linux-mips-low.cc (the_low_target): Ditto.
69 * linux-nios2-low.cc (the_low_target): Ditto.
70 * linux-ppc-low.cc (the_low_target): Ditto.
71 * linux-riscv-low.cc (the_low_target): Ditto.
72 * linux-s390-low.cc (the_low_target): Ditto.
73 * linux-sh-low.cc (the_low_target): Ditto.
74 * linux-sparc-low.cc (the_low_target): Ditto.
75 * linux-tic6x-low.cc (the_low_target): Ditto.
76 * linux-tile-low.cc (the_low_target): Ditto.
77 * linux-xtensa-low.cc (the_low_target): Ditto.
78
79 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
80
81 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
82 linux target define the op by overriding the declaration in
83 process_stratum_target.
84
85 * linux-low.h (struct linux_target_ops): Remove the op.
86 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
87 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
88 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
89 (x86_get_ipa_tdesc_idx): Turn into...
90 (x86_target::get_ipa_tdesc_idx): ...this.
91 (the_low_target): Remove the op field.
92 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
93 (ppc_get_ipa_tdesc_idx): Turn into...
94 (ppc_target::get_ipa_tdesc_idx): ...this.
95 (the_low_target): Remove the op field.
96 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
97 (s390_get_ipa_tdesc_idx): Turn into...
98 (s390_target::get_ipa_tdesc_idx): ...this.
99 (the_low_target): Remove the op field.
100
101 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
102
103 Turn the 'get_syscall_trapinfo' linux target op into a method
104 of process_stratum_target.
105
106 * linux-low.h (struct linux_target_ops): Remove the op.
107 (class linux_process_target) <get_syscall_trapinfo>
108 <gdb_catch_this_syscall>
109 <low_supports_catch_syscall>
110 <low_get_syscall_trapinfo>: Declare.
111 * linux-low.cc (get_syscall_trapinfo): Turn into...
112 (linux_process_target::get_syscall_trapinfo): ...this.
113 (linux_process_target::low_get_syscall_trapinfo): Define.
114 (gdb_catch_this_syscall_p): Turn into...
115 (linux_process_target::gdb_catch_this_syscall): ...this.
116 (linux_process_target::low_supports_catch_syscall): Define.
117
118 Update the callers below.
119
120 (linux_process_target::wait_1)
121 (linux_process_target::supports_catch_syscall)
122
123 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
124 <low_get_syscall_trapinfo>: Declare.
125 (x86_target::low_supports_catch_syscall): Define.
126 (x86_get_syscall_trapinfo): Turn into...
127 (x86_target::low_get_syscall_trapinfo): ...this.
128 (the_low_target): Remove the op field.
129 * linux-aarch64-low.cc (class aarch64_target)
130 <low_supports_catch_syscall>
131 <low_get_syscall_trapinfo>: Declare.
132 (aarch64_target::low_supports_catch_syscall): Define.
133 (aarch64_get_syscall_trapinfo): Turn into...
134 (aarch64_target::low_get_syscall_trapinfo): ...this.
135 (the_low_target): Remove the op field.
136 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
137 <low_get_syscall_trapinfo>: Declare.
138 (arm_target::low_supports_catch_syscall): Define.
139 (arm_get_syscall_trapinfo): Turn into...
140 (arm_target::low_get_syscall_trapinfo): ...this.
141 (the_low_target): Remove the op field.
142 * linux-ppc-low.cc (the_low_target): Remove the op field.
143 * linux-s390-low.cc (the_low_target): Remove the op field.
144
145 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
146
147 Remove the 'supports_hardware_single_step' linux target op and
148 override the process_stratum_target's op definition in
149 linux_process_target to return true.
150
151 * linux-low.h (struct linux_target_ops): Remove the op.
152 (class linux_process_target) <finish_step_over>
153 <maybe_hw_step>: Declare.
154 * linux-low.cc (can_hardware_single_step): Remove.
155 (maybe_hw_step): Turn into...
156 (linux_process_target::maybe_hw_step): ...this.
157 (finish_step_over): Turn into...
158 (linux_process_target::finish_step_over): ...this.
159 (linux_process_target::supports_hardware_single_step): Update
160 to return true.
161
162 Update the callers below.
163
164 (linux_process_target::single_step)
165 (linux_process_target::resume_one_lwp_throw)
166
167 * linux-arm-low.cc (class arm_target)
168 <supports_hardware_single_step>: Declare.
169 (arm_supports_hardware_single_step): Turn into...
170 (arm_target::supports_hardware_single_step): ...this.
171 (the_low_target): Remove the op field.
172 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
173 (the_low_target): Remove the op field.
174 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
175 Remove.
176 (the_low_target): Remove the op field.
177 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
178 (the_low_target): Remove the op field.
179 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
180 (the_low_target): Remove the op field.
181 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
182 (the_low_target): Remove the op field.
183 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
184 (the_low_target): Remove the op field.
185 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
186 (the_low_target): Remove the op field.
187 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
188 (the_low_target): Remove the op field.
189 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
190 (the_low_target): Remove the op field.
191 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
192 (the_low_target): Remove the op field.
193 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
194 (the_low_target): Remove the op field.
195 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
196 Remove.
197 (the_low_target): Remove the op field.
198
199 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
200
201 Turn the 'supports_range_stepping' linux target op into a method
202 of linux_process_target.
203
204 * linux-low.h (struct linux_target_ops): Remove the op.
205 (class linux_process_target) <low_supports_range_stepping>: Declare.
206 * linux-low.cc (linux_process_target::low_supports_range_stepping):
207 Define.
208 (linux_process_target::supports_range_stepping): Update the call
209 site.
210 * linux-x86-low.cc (class x86_target)
211 <low_supports_range_stepping>: Declare.
212 (x86_supports_range_stepping): Turn into...
213 (x86_target::low_supports_range_stepping): ...this.
214 (the_low_target): Remove the op field.
215 * linux-aarch64-low.cc (class aarch64_target)
216 <low_supports_range_stepping>: Declare.
217 (aarch64_supports_range_stepping): Turn into...
218 (aarch64_target::low_supports_range_stepping): ...this.
219 (the_low_target): Remove the op field.
220 * linux-arm-low.cc (the_low_target): Remove the op field.
221 * linux-bfin-low.cc (the_low_target): Ditto.
222 * linux-crisv32-low.cc (the_low_target): Ditto.
223 * linux-m32r-low.cc (the_low_target): Ditto.
224 * linux-m68k-low.cc (the_low_target): Ditto.
225 * linux-ppc-low.cc (the_low_target): Ditto.
226 * linux-s390-low.cc (the_low_target): Ditto.
227 * linux-sh-low.cc (the_low_target): Ditto.
228 * linux-tic6x-low.cc (the_low_target): Ditto.
229 * linux-tile-low.cc (the_low_target): Ditto.
230 * linux-xtensa-low.cc (the_low_target): Ditto.
231
232 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
233
234 Remove the 'emit_ops' linux target ops and let the concrete
235 linux target define the op by overriding the declaration of
236 process_stratum_target.
237
238 * linux-low.h (struct linux_target_ops): Remove the op.
239 (class linux_process_target) <emit_ops>: Remove.
240 * linux-low.cc (linux_process_target::emit_ops): Remove.
241 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
242 (x86_emit_ops): Turn into...
243 (x86_target::emit_ops): ...this.
244 (the_low_target): Remove the op field.
245 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
246 (aarch64_emit_ops): Turn into...
247 (aarch64_target::emit_ops): ...this.
248 (the_low_target): Remove the op field.
249 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
250 (ppc_emit_ops): Turn into...
251 (ppc_target::emit_ops): ...this.
252 (the_low_target): Remove the op field.
253 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
254 (s390_emit_ops): Turn into...
255 (s390_target::emit_ops): ...this.
256 (the_low_target): Remove the op field.
257 * linux-arm-low.cc (the_low_target): Remove the op field.
258 * linux-bfin-low.cc (the_low_target): Ditto.
259 * linux-crisv32-low.cc (the_low_target): Ditto.
260 * linux-m32r-low.cc (the_low_target): Ditto.
261 * linux-m68k-low.cc (the_low_target): Ditto.
262 * linux-sh-low.cc (the_low_target): Ditto.
263 * linux-tic6x-low.cc (the_low_target): Ditto.
264 * linux-tile-low.cc (the_low_target): Ditto.
265 * linux-xtensa-low.cc (the_low_target): Ditto.
266
267 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
268
269 Remove the 'install_fast_tracepoint_jump_pad' and
270 'get_min_fast_tracepoint_insn_len' linux target ops to let the
271 concrete linux target define the ops by overriding the declarations
272 of process_stratum_target.
273
274 * linux-low.h (struct linux_target_ops): Remove the ops.
275 (class linux_process_target) <supports_fast_tracepoints>
276 <install_fast_tracepoint_jump_pad>
277 <get_min_fast_tracepoint_insn_len>: Remove.
278 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
279 (linux_process_target::install_fast_tracepoint_jump_pad)
280 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
281 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
282 <install_fast_tracepoint_jump_pad>
283 <get_min_fast_tracepoint_insn_len>: Declare.
284 (x86_target::supports_fast_tracepoints): Define.
285 (x86_install_fast_tracepoint_jump_pad): Turn into...
286 (x86_target::install_fast_tracepoint_jump_pad): ...this.
287 (x86_get_min_fast_tracepoint_insn_len): Turn into...
288 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
289 (the_low_target): Remove the op fields.
290 * linux-aarch64-low.cc (class aarch64_target)
291 <supports_fast_tracepoints>
292 <install_fast_tracepoint_jump_pad>
293 <get_min_fast_tracepoint_insn_len>: Declare.
294 (aarch64_target::supports_fast_tracepoints): Define.
295 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
296 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
297 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
298 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
299 (the_low_target): Remove the op fields.
300 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
301 <install_fast_tracepoint_jump_pad>
302 <get_min_fast_tracepoint_insn_len>: Declare.
303 (ppc_target::supports_fast_tracepoints): Define.
304 (ppc_install_fast_tracepoint_jump_pad): Turn into...
305 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
306 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
307 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
308 (the_low_target): Remove the op fields.
309 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
310 <install_fast_tracepoint_jump_pad>
311 <get_min_fast_tracepoint_insn_len>: Declare.
312 (s390_target::supports_fast_tracepoints): Define.
313 (s390_install_fast_tracepoint_jump_pad): Turn into...
314 (s390_target::install_fast_tracepoint_jump_pad): ...this.
315 (s390_get_min_fast_tracepoint_insn_len): Turn into...
316 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
317 (the_low_target): Remove the op fields.
318 * linux-arm-low.cc (the_low_target): Remove the op fields.
319 * linux-bfin-low.cc (the_low_target): Ditto.
320 * linux-crisv32-low.cc (the_low_target): Ditto.
321 * linux-m32r-low.cc (the_low_target): Ditto.
322 * linux-m68k-low.cc (the_low_target): Ditto.
323 * linux-sh-low.cc (the_low_target): Ditto.
324 * linux-tic6x-low.cc (the_low_target): Ditto.
325 * linux-tile-low.cc (the_low_target): Ditto.
326 * linux-xtensa-low.cc (the_low_target): Ditto.
327
328 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
329
330 Turn the 'get_thread_area' linux target op into a method of
331 process_stratum_target.
332
333 * linux-low.h (struct linux_target_ops): Remove the op.
334 (class linux_process_target) <stuck_in_jump_pad>
335 <linux_fast_tracepoint_collecting>
336 <low_get_thread_area>: Declare.
337 * linux-low.cc (supports_fast_tracepoints): Remove.
338 (linux_fast_tracepoint_collecting): Turn into...
339 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
340 (linux_process_target::low_get_thread_area): Define.
341 (stuck_in_jump_pad_callback): Turn into...
342 (linux_process_target::stuck_in_jump_pad): ...this.
343
344 Update the caller below.
345
346 (linux_process_target::stabilize_threads)
347
348 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
349 Declare.
350 (x86_get_thread_area): Turn into...
351 (x86_target::low_get_thread_area): ...this.
352 (the_low_target): Remove the op field.
353 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
354 Declare.
355 (aarch64_get_thread_area): Turn into...
356 (aarch64_target::low_get_thread_area): ...this.
357 (the_low_target): Remove the op field.
358 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
359 Declare.
360 (ppc_get_thread_area): Turn into...
361 (ppc_target::low_get_thread_area): ...this.
362 (the_low_target): Remove the op field.
363 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
364 Declare.
365 (s390_get_thread_area): Turn into...
366 (s390_target::low_get_thread_area): ...this.
367 (the_low_target): Remove the op field.
368 * linux-arm-low.cc (the_low_target): Remove the op field.
369 * linux-bfin-low.cc (the_low_target): Ditto.
370 * linux-crisv32-low.cc (the_low_target): Ditto.
371 * linux-m32r-low.cc (the_low_target): Ditto.
372 * linux-m68k-low.cc (the_low_target): Ditto.
373 * linux-sh-low.cc (the_low_target): Ditto.
374 * linux-tic6x-low.cc (the_low_target): Ditto.
375 * linux-tile-low.cc (the_low_target): Ditto.
376 * linux-xtensa-low.cc (the_low_target): Ditto.
377
378 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
379
380 Remote the 'supports_tracepoints' linux target op and let the
381 concrete linux target define it by overriding the op declared in
382 process_stratum_target.
383
384 * linux-low.h (struct linux_target_ops): Remove the op.
385 (class linux_process_target) <supports_tracepoints>: Remove.
386 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
387 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
388 Declare.
389 (x86_supports_tracepoints): Turn into...
390 (x86_target::supports_tracepoints): ...this.
391 (the_low_target): Remove the op field.
392 * linux-aarch64-low.cc (class aarch64_target)
393 <supports_tracepoints>: Declare.
394 (aarch64_supports_tracepoints): Turn into...
395 (aarch64_target::supports_tracepoints): ...this.
396 (the_low_target): Remove the op field.
397 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
398 Declare.
399 (ppc_supports_tracepoints): Turn into...
400 (ppc_target::supports_tracepoints): ...this.
401 (the_low_target): Remove the op field.
402 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
403 Declare.
404 (s390_supports_tracepoints): Turn into...
405 (s390_target::supports_tracepoints): ...this.
406 (the_low_target): Remove the op field.
407 * linux-arm-low.cc (the_low_target): Remove the op field.
408 * linux-bfin-low.cc (the_low_target): Ditto.
409 * linux-crisv32-low.cc (the_low_target): Ditto.
410 * linux-m32r-low.cc (the_low_target): Ditto.
411 * linux-m68k-low.cc (the_low_target): Ditto.
412 * linux-sh-low.cc (the_low_target): Ditto.
413 * linux-tic6x-low.cc (the_low_target): Ditto.
414 * linux-tile-low.cc (the_low_target): Ditto.
415 * linux-xtensa-low.cc (the_low_target): Ditto.
416
417 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
418
419 Remove the 'process_qsupported' linux target op and let a concrete
420 linux target define the op by overriding the op declaration in
421 process_stratum_target.
422
423 * linux-low.h (struct linux_target_ops): Remove the op.
424 (class linux_process_target) <process_qsupported>: Remove.
425 * linux-low.cc (linux_process_target::process_qsupported): Remove.
426 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
427 (x86_linux_process_qsupported): Turn into...
428 (x86_target::process_qsupported): ...this.
429 (the_low_target): Remove the op field.
430 * linux-aarch64-low.cc (the_low_target): Remove the op
431 field.
432 * linux-arm-low.cc (the_low_target): Ditto.
433 * linux-bfin-low.cc (the_low_target): Ditto.
434 * linux-crisv32-low.cc (the_low_target): Ditto.
435 * linux-m32r-low.cc (the_low_target): Ditto.
436 * linux-m68k-low.cc (the_low_target): Ditto.
437 * linux-ppc-low.cc (the_low_target): Ditto.
438 * linux-s390-low.cc (the_low_target): Ditto.
439 * linux-sh-low.cc (the_low_target): Ditto.
440 * linux-tic6x-low.cc (the_low_target): Ditto.
441 * linux-tile-low.cc (the_low_target): Ditto.
442 * linux-xtensa-low.cc (the_low_target): Ditto.
443
444 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
445
446 Turn the 'prepare_to_resume' linux target op into a method of
447 linux_process_target.
448
449 * linux-low.h (struct linux_target_ops): Remove the op.
450 (class linux_process_target) <low_prepare_to_resume>: Declare.
451 * linux-low.cc (linux_process_target::low_prepare_to_resume):
452 Define.
453
454 Update the callers below:
455
456 (linux_process_target::resume_one_lwp_throw)
457 (linux_process_target::low_prepare_to_resume)
458
459 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
460 Declare.
461 (x86_target::low_prepare_to_resume): Define.
462 (the_low_target): Remove the op field.
463 * linux-aarch64-low.cc (class aarch64_target)
464 <low_prepare_to_resume>: Declare.
465 (aarch64_target::low_prepare_to_resume): Define.
466 (the_low_target): Remove the op field.
467 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
468 Declare.
469 (arm_prepare_to_resume): Turn into...
470 (arm_target::low_prepare_to_resume): ...this.
471 (the_low_target): Remove the op field.
472 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
473 Declare.
474 (mips_linux_prepare_to_resume): Turn into...
475 (mips_target::low_prepare_to_resume): ...this.
476 (the_low_target): Remove the op field.
477 * linux-bfin-low.cc (the_low_target): Remove the op field.
478 * linux-crisv32-low.cc (the_low_target): Ditto.
479 * linux-m32r-low.cc (the_low_target): Ditto.
480 * linux-m68k-low.cc (the_low_target): Ditto.
481 * linux-ppc-low.cc (the_low_target): Ditto.
482 * linux-s390-low.cc (the_low_target): Ditto.
483 * linux-sh-low.cc (the_low_target): Ditto.
484 * linux-tic6x-low.cc (the_low_target): Ditto.
485 * linux-tile-low.cc (the_low_target): Ditto.
486 * linux-xtensa-low.cc (the_low_target): Ditto.
487
488 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
489
490 Turn the 'new_process', 'delete_process', 'new_thread',
491 'delete_thread', and 'new_fork' linux target ops into methods
492 of linux_process_target.
493
494 * linux-low.h (struct linux_target_ops): Remove the ops.
495 (class linux_process_target) <add_linux_process>
496 <add_lwp>
497 <delete_lwp>
498 <attach_lwp>
499 <detach_one_lwp>
500 <check_zombie_leaders>
501 <filter_exit_event>
502 <low_new_process>
503 <low_delete_process>
504 <low_new_thread>
505 <low_delete_thread>
506 <low_new_fork>: Declare.
507 * linux-low.cc (delete_lwp): Turn into...
508 (linux_process_target::delete_lwp): ...this.
509 (linux_process_target::low_delete_thread): Define.
510 (linux_add_process): Turn into...
511 (linux_process_target::add_linux_process): ...this.
512 (linux_process_target::low_new_process): Define.
513 (linux_process_target::low_delete_process): Define.
514 (linux_process_target::low_new_fork): Define.
515 (add_lwp): Turn into...
516 (linux_process_target::add_lwp): ...this.
517 (linux_process_target::low_new_thread): Define.
518 (linux_attach_lwp): Turn into...
519 (linux_process_target::attach_lwp): ...this.
520 (linux_detach_one_lwp): Turn into...
521 (linux_process_target::detach_one_lwp): ...this.
522 (linux_detach_lwp_callback): Remove and inline...
523 (linux_process_target::detach): ...here.
524 (check_zombie_leaders): Turn into...
525 (linux_process_target::check_zombie_leaders): ...this.
526 (filter_exit_event): Turn into...
527 (linux_process_target::filter_exit_event): ...this.
528
529 Update the callers below.
530
531 (linux_process_target::handle_extended_wait)
532 (linux_process_target::create_inferior)
533 (attach_proc_task_lwp_callback)
534 (linux_process_target::attach)
535 (linux_process_target::detach)
536 (linux_process_target::mourn)
537 * thread-db.cc (attach_thread)
538
539 * linux-x86-low.cc (class x86_target) <low_new_process>
540 <low_delete_process>
541 <low_new_thread>
542 <low_delete_thread>
543 <low_new_fork>: Declare.
544 (x86_linux_new_process): Turn into...
545 (x86_target::low_new_process): ...this.
546 (x86_linux_delete_process): Turn into...
547 (x86_target::low_delete_process): ...this.
548 (x86_target::low_new_thread): Define.
549 (x86_target::low_delete_thread): Define.
550 (x86_linux_new_fork): Turn into...
551 (x86_target::low_new_fork): ...this.
552 (the_low_target): Remove the op fields.
553 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
554 <low_delete_process>
555 <low_new_thread>
556 <low_delete_thread>
557 <low_new_fork>: Declare.
558 (aarch64_linux_new_process): Turn into...
559 (aarch64_target::low_new_process): ...this.
560 (aarch64_linux_delete_process): Turn into...
561 (aarch64_target::low_delete_process): ...this.
562 (aarch64_target::low_new_thread): Define.
563 (aarch64_target::low_delete_thread): Define.
564 (aarch64_linux_new_fork): Turn into...
565 (aarch64_target::low_new_fork): ...this.
566 (the_low_target): Remove the op fields.
567 * linux-arm-low.cc (class arm_target) <low_new_process>
568 <low_delete_process>
569 <low_new_thread>
570 <low_delete_thread>
571 <low_new_fork>: Declare.
572 (arm_new_process): Turn into...
573 (arm_target::low_new_process): ...this.
574 (arm_delete_process): Turn into...
575 (arm_target::low_delete_process): ...this.
576 (arm_new_thread): Turn into...
577 (arm_target::low_new_thread): ...this.
578 (arm_delete_thread): Turn into...
579 (arm_target::low_delete_thread): ...this.
580 (arm_new_fork): Turn into...
581 (arm_target::low_new_fork): ...this.
582 (the_low_target): Remove the op fields.
583 * linux-mips-low.cc (class mips_target) <low_new_process>
584 <low_delete_process>
585 <low_new_thread>
586 <low_delete_thread>
587 <low_new_fork>: Declare.
588 (mips_linux_new_process): Turn into...
589 (mips_target::low_new_process): ...this.
590 (mips_linux_delete_process): Turn into...
591 (mips_target::low_delete_process): ...this.
592 (mips_linux_new_thread): Turn into...
593 (mips_target::low_new_thread): ...this.
594 (mips_linux_delete_thread): Turn into...
595 (mips_target::low_delete_thread): ...this.
596 (mips_linux_new_fork): Turn into...
597 (mips_target::low_new_fork): ...this.
598 (the_low_target): Remove the op fields.
599 * linux-bfin-low.cc (the_low_target): Remove the op fields.
600 * linux-crisv32-low.cc (the_low_target): Ditto.
601 * linux-m32r-low.cc (the_low_target): Ditto.
602 * linux-m68k-low.cc (the_low_target): Ditto.
603 * linux-ppc-low.cc (the_low_target): Ditto.
604 * linux-s390-low.cc (the_low_target): Ditto.
605 * linux-sh-low.cc (the_low_target): Ditto.
606 * linux-tic6x-low.cc (the_low_target): Ditto.
607 * linux-tile-low.cc (the_low_target): Ditto.
608 * linux-xtensa-low.cc (the_low_target): Ditto.
609
610 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
611
612 Turn the 'siginfo_fixup' linux target op into a method of
613 linux_process_target.
614
615 * linux-low.h (struct linux_target_ops): Remove the op.
616 (class linux_process_target) <siginfo_fixup>
617 <low_siginfo_fixup>: Declare.
618 * linux-low.cc (siginfo_fixup): Turn into...
619 (linux_process_target::siginfo_fixup): ...this.
620 (linux_process_target::low_siginfo_fixup): Define.
621 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
622 (x86_siginfo_fixup): Turn into...
623 (x86_target::low_siginfo_fixup): ...this.
624 (the_low_target): Remove the op field.
625 * linux-aarch64-low.cc (class aarch64_target):
626 <low_siginfo_fixup>: Declare.
627 (aarch64_linux_siginfo_fixup): Turn into...
628 (aarch64_target::low_siginfo_fixup): ...this.
629 (the_low_target): Remove the op field.
630 * linux-arm-low.cc (the_low_target): Remove the op field.
631 * linux-bfin-low.cc (the_low_target): Ditto.
632 * linux-crisv32-low.cc (the_low_target): Ditto.
633 * linux-m32r-low.cc (the_low_target): Ditto.
634 * linux-m68k-low.cc (the_low_target): Ditto.
635 * linux-mips-low.cc (the_low_target): Ditto.
636 * linux-ppc-low.cc (the_low_target): Ditto.
637 * linux-s390-low.cc (the_low_target): Ditto.
638 * linux-sh-low.cc (the_low_target): Ditto.
639 * linux-tic6x-low.cc (the_low_target): Ditto.
640 * linux-tile-low.cc (the_low_target): Ditto.
641 * linux-xtensa-low.cc (the_low_target): Ditto.
642
643 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
644
645 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
646 linux target ops into methods of linux_process_target.
647
648 * linux-low.h (struct linux_target_ops): Remove the ops.
649 (class linux_process_target) <low_collect_ptrace_register>
650 <low_store_ptrace_register>: Declare.
651 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
652 (linux_process_target::low_supply_ptrace_register): Define.
653
654 Update the callers below.
655
656 (linux_process_target::fetch_register)
657 (linux_process_target::store_register)
658
659 * linux-x86-low.cc (the_low_target): Remove the op fields.
660 * linux-aarch64-low.cc (the_low_target): Ditto.
661 * linux-arm-low.cc (the_low_target): Ditto.
662 * linux-bfin-low.cc (the_low_target): Ditto.
663 * linux-crisv32-low.cc (the_low_target): Ditto.
664 * linux-m32r-low.cc (the_low_target): Ditto.
665 * linux-m68k-low.cc (the_low_target): Ditto.
666 * linux-sh-low.cc (the_low_target): Ditto.
667 * linux-sparc-low.cc (the_low_target): Ditto.
668 * linux-tic6x-low.cc (the_low_target): Ditto.
669 * linux-tile-low.cc (the_low_target): Ditto.
670 * linux-xtensa-low.cc (the_low_target): Ditto.
671 * linux-mips-low.cc (class mips_target)
672 <low_collect_ptrace_register>
673 <low_supply_ptrace_register>: Declare.
674 (mips_collect_ptrace_register): Turn into ...
675 (mips_target::low_collect_ptrace_register): ...this.
676 (mips_supply_ptrace_register): Turn into...
677 (mips_target::low_supply_ptrace_register): ...this.
678 (the_low_target): Remove the op fields.
679 * linux-ppc-low.cc (class ppc_target)
680 <low_collect_ptrace_register>
681 <low_supply_ptrace_register>: Declare.
682 (ppc_collect_ptrace_register): Turn into ...
683 (ppc_target::low_collect_ptrace_register): ...this.
684 (ppc_supply_ptrace_register): Turn into ...
685 (ppc_target::low_supply_ptrace_register): ...this.
686 (ppc_fill_gregset): Update for the calls to
687 low_collect_ptrace_register.
688 (the_low_target): Remove the op fields.
689 * linux-s390-low.cc (class s390_target)
690 <low_collect_ptrace_register>
691 <low_supply_ptrace_register>: Declare.
692 (s390_collect_ptrace_register): Turn into ...
693 (s390_target::low_collect_ptrace_register): ...this.
694 (s390_supply_ptrace_register): Turn into ...
695 (s390_target::low_supply_ptrace_register): ...this.
696 (s390_fill_gregset): Update for the calls to
697 low_collect_ptrace_register.
698 (the_low_target): Remove the op fields.
699
700 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
701
702 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
703 target ops into methods of linux_process_target.
704
705 * linux-low.h (struct linux_target_ops): Remove the ops.
706 (class linux_process_target) <check_stopped_by_watchpoint>
707 <low_stopped_by_watchpoint>
708 <low_stopped_data_address>: Declare.
709 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
710 (linux_process_target::check_stopped_by_watchpoint): ...this.
711 (linux_process_target::low_stopped_by_watchpoint): Define.
712 (linux_process_target::low_stopped_data_address): Define.
713 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
714 <low_stopped_data_address>: Declare.
715 (x86_stopped_by_watchpoint): Turn into...
716 (x86_target::low_stopped_by_watchpoint): ...this.
717 (x86_stopped_data_address): Turn into...
718 (x86_target::low_stopped_data_address): ...this.
719 (the_low_target): Remove the op fields.
720 * linux-aarch64-low.cc (class aarch64_target)
721 <low_stopped_by_watchpoint>
722 <low_stopped_data_address>: Declare.
723 (aarch64_stopped_by_watchpoint): Turn into...
724 (aarch64_target::low_stopped_by_watchpoint): ...this.
725 (aarch64_stopped_data_address): Turn into...
726 (aarch64_target::low_stopped_data_address): ...this.
727 (the_low_target): Remove the op fields.
728 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
729 <low_stopped_data_address>: Declare.
730 (arm_stopped_by_watchpoint): Turn into...
731 (arm_target::low_stopped_by_watchpoint): ...this.
732 (arm_stopped_data_address): Turn into...
733 (arm_target::low_stopped_data_address): ...this.
734 (the_low_target): Remove the op fields.
735 * linux-crisv32-low.cc (class crisv32_target)
736 <low_stopped_by_watchpoint>
737 <low_stopped_data_address>: Declare.
738 (cris_stopped_by_watchpoint): Turn into...
739 (crisv32_target::low_stopped_by_watchpoint): ...this.
740 (cris_stopped_data_address): Turn into...
741 (crisv32_target::low_stopped_data_address): ...this.
742 (the_low_target): Remove the op fields.
743 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
744 <low_stopped_data_address>: Declare.
745 (mips_stopped_by_watchpoint): Turn into...
746 (mips_target::low_stopped_by_watchpoint): ...this.
747 (mips_stopped_data_address): Turn into...
748 (mips_target::low_stopped_data_address): ...this.
749 (the_low_target): Remove the op fields.
750 * linux-bfin-low.cc (the_low_target): Remove the op fields.
751 * linux-m32r-low.cc (the_low_target): Ditto.
752 * linux-m68k-low.cc (the_low_target): Ditto.
753 * linux-ppc-low.cc (the_low_target): Ditto.
754 * linux-s390-low.cc (the_low_target): Ditto.
755 * linux-sh-low.cc (the_low_target): Ditto.
756 * linux-sparc-low.cc (the_low_target): Ditto.
757 * linux-tic6x-low.cc (the_low_target): Ditto.
758 * linux-tile-low.cc (the_low_target): Ditto.
759 * linux-xtensa-low.cc (the_low_target): Ditto.
760
761 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
762
763 Turn the 'insert_point' and 'remove_point' linux target ops into
764 methods of linux_process_target.
765
766 * linux-low.h (struct linux_target_ops): Remove the ops.
767 (class linux_process_target) <low_insert_point>
768 <low_remove_point>: Declare.
769 * linux-low.cc (linux_process_target::low_insert_point)
770 (linux_process_target::low_remove_point): Define.
771 (linux_process_target::insert_point)
772 (linux_process_target::remove_point): Update for calls to
773 low_insert_point and low_remove_point.
774 * linux-x86-low.cc (class x86_target) <low_insert_point>
775 <low_remove_point>: Declare.
776 (x86_insert_point): Turn into...
777 (x86_target::low_insert_point): ...this.
778 (x86_remove_point): Turn into...
779 (x86_target::low_remove_point): ...this.
780 (the_low_target): Remove the op fields.
781 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
782 <low_remove_point>: Declare.
783 (aarch64_insert_point): Turn into...
784 (aarch64_target::low_insert_point): ...this.
785 (aarch64_remove_point): Turn into...
786 (aarch64_target::low_remove_point): ...this.
787 (the_low_target): Remove the op fields.
788 * linux-arm-low.cc (class arm_target) <low_insert_point>
789 <low_remove_point>: Declare.
790 (arm_insert_point): Turn into...
791 (arm_target::low_insert_point): ...this.
792 (arm_remove_point): Turn into...
793 (arm_target::low_remove_point): ...this.
794 (the_low_target): Remove the op fields.
795 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
796 <low_remove_point>: Declare.
797 (crisv32_insert_point): Turn into...
798 (crisv32_target::low_insert_point): ...this.
799 (crisv32_remove_point): Turn into...
800 (crisv32_target::low_remove_point): ...this.
801 (the_low_target): Remove the op fields.
802 * linux-mips-low.cc (class mips_target) <low_insert_point>
803 <low_remove_point>: Declare.
804 (mips_insert_point): Turn into...
805 (mips_target::low_insert_point): ...this.
806 (mips_remove_point): Turn into...
807 (mips_target::low_remove_point): ...this.
808 (the_low_target): Remove the op fields.
809 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
810 <low_remove_point>: Declare.
811 (ppc_insert_point): Turn into...
812 (ppc_target::low_insert_point): ...this.
813 (ppc_remove_point): Turn into...
814 (ppc_target::low_remove_point): ...this.
815 (the_low_target): Remove the op fields.
816 * linux-bfin-low.cc (the_low_target): Remove the op fields.
817 * linux-m32r-low.cc (the_low_target): Ditto.
818 * linux-m68k-low.cc (the_low_target): Ditto.
819 * linux-s390-low.cc (the_low_target): Ditto.
820 * linux-sh-low.cc (the_low_target): Ditto.
821 * linux-sparc-low.cc (the_low_target): Ditto.
822 * linux-tic6x-low.cc (the_low_target): Ditto.
823 * linux-tile-low.cc (the_low_target): Ditto.
824 * linux-xtensa-low.cc (the_low_target): Ditto.
825
826 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
827
828 Remove the 'supports_z_point_type' linux target op and let the
829 concrete linux target define it by overriding the op declared in
830 process_stratum_target.
831
832 * linux-low.cc (linux_process_target::supports_z_point_type):
833 Remove.
834 * linux-low.h (struct linux_target_ops): Remove the op.
835 (class linux_process_target) <supports_z_point_type>: Remove.
836 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
837 Declare.
838 (x86_supports_z_point_type): Turn into...
839 (x86_target::supports_z_point_type): ...this.
840 (the_low_target): Remove the op field.
841 * linux-aarch64-low.cc (class aarch64_target)
842 <supports_z_point_type>: Declare.
843 (aarch64_supports_z_point_type): Turn into...
844 (aarch64_target::supports_z_point_type): ...this.
845 (the_low_target): Remove the op field.
846 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
847 Declare.
848 (arm_supports_z_point_type): Turn into...
849 (arm_target::supports_z_point_type): ...this.
850 (the_low_target): Remove the op field.
851 * linux-crisv32-low.cc (class crisv32_target)
852 <supports_z_point_type>: Declare.
853 (cris_supports_z_point_type): Turn into...
854 (crisv32_target::supports_z_point_type): ...this.
855 (the_low_target): Remove the op field.
856 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
857 Declare.
858 (mips_supports_z_point_type): Turn into...
859 (mips_target::supports_z_point_type): ...this.
860 (the_low_target): Remove the op field.
861 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
862 Declare.
863 (ppc_supports_z_point_type): Turn into...
864 (ppc_target::supports_z_point_type): ...this.
865 (the_low_target): Remove the op field.
866 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
867 Declare.
868 (s390_supports_z_point_type): Turn into...
869 (s390_target::supports_z_point_type): ...this.
870 (the_low_target): Remove the op field.
871 * linux-bfin-low.cc (the_low_target): Remove the op field.
872 * linux-m32r-low.cc (the_low_target): Ditto.
873 * linux-m68k-low.cc (the_low_target): Ditto.
874 * linux-sh-low.cc (the_low_target): Ditto.
875 * linux-sparc-low.cc (the_low_target): Ditto.
876 * linux-tic6x-low.cc (the_low_target): Ditto.
877 * linux-tile-low.cc (the_low_target): Ditto.
878 * linux-xtensa-low.cc (the_low_target): Ditto.
879
880 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
881
882 Turn the 'breakpoint_at' linux target op into a method of
883 linux_process_target.
884
885 * linux-low.h (struct linux_target_ops): Remove the op.
886 (class linux_process_target) <low_breakpoint_at>: Declare.
887
888 Update the callers below:
889
890 * linux-low.cc (linux_process_target::save_stop_reason)
891 (linux_process_target::thread_still_has_status_pending)
892 (linux_process_target::wait_1)
893
894 * linux-x86-low.cc (class x86_target)
895 <low_breakpoint_at>: Declare.
896 (x86_breakpoint_at): Turn into...
897 (x86_target::low_breakpoint_at): ...this.
898 (the_low_target): Remove the op field.
899 * linux-aarch64-low.cc (class aarch64_target)
900 <low_breakpoint_at>: Declare.
901 (aarch64_breakpoint_at): Turn into...
902 (aarch64_target::low_breakpoint_at): ...this.
903 (the_low_target): Remove the op field.
904 * linux-arm-low.cc (class arm_target)
905 <low_breakpoint_at>: Declare.
906 (arm_target::low_breakpoint_at): Define.
907 (the_low_target): Remove the op field.
908 * linux-bfin-low.cc (class bfin_target)
909 <low_breakpoint_at>: Declare.
910 (bfin_breakpoint_at): Turn into...
911 (bfin_target::low_breakpoint_at): ...this.
912 (the_low_target): Remove the op field.
913 * linux-cris-low.cc (class cris_target)
914 <low_breakpoint_at>: Declare.
915 (cris_breakpoint_at): Turn into...
916 (cris_target::low_breakpoint_at): ...this.
917 (the_low_target): Remove the op field.
918 * linux-crisv32-low.cc (class crisv32_target)
919 <low_breakpoint_at>: Declare.
920 (crisv32_breakpoint_at): Turn into...
921 (crisv32_target::low_breakpoint_at): ...this.
922 (the_low_target): Remove the op field.
923 * linux-ia64-low.cc (class ia64_target)
924 <low_breakpoint_at>: Declare.
925 (ia64_target::low_breakpoint_at): Define.
926 * linux-m32r-low.cc (class m32r_target)
927 <low_breakpoint_at>: Declare.
928 (m32r_breakpoint_at): Turn into...
929 (m32r_target::low_breakpoint_at): ...this.
930 (the_low_target): Remove the op field.
931 * linux-m68k-low.cc (class m68k_target)
932 <low_breakpoint_at>: Declare.
933 (m68k_breakpoint_at): Turn into...
934 (m68k_target::low_breakpoint_at): ...this.
935 (the_low_target): Remove the op field.
936 * linux-mips-low.cc (class mips_target)
937 <low_breakpoint_at>: Declare.
938 (mips_breakpoint_at): Turn into...
939 (mips_target::low_breakpoint_at): ...this.
940 (the_low_target): Remove the op field.
941 * linux-nios2-low.cc (class nios2_target)
942 <low_breakpoint_at>: Declare.
943 (nios2_breakpoint_at): Turn into...
944 (nios2_target::low_breakpoint_at): ...this.
945 (the_low_target): Remove the op field.
946 * linux-ppc-low.cc (class ppc_target)
947 <low_breakpoint_at>: Declare.
948 (ppc_breakpoint_at): Turn into...
949 (ppc_target::low_breakpoint_at): ...this.
950 (the_low_target): Remove the op field.
951 * linux-riscv-low.cc (class riscv_target)
952 <low_breakpoint_at>: Declare.
953 (riscv_breakpoint_at): Turn into...
954 (riscv_target::low_breakpoint_at): ...this.
955 (the_low_target): Remove the op field.
956 * linux-s390-low.cc (class s390_target)
957 <low_breakpoint_at>: Declare.
958 (s390_breakpoint_at): Turn into...
959 (s390_target::low_breakpoint_at): ...this.
960 (the_low_target): Remove the op field.
961 * linux-sh-low.cc (class sh_target)
962 <low_breakpoint_at>: Declare.
963 (sh_breakpoint_at): Turn into...
964 (sh_target::low_breakpoint_at): ...this.
965 (the_low_target): Remove the op field.
966 * linux-sparc-low.cc (class sparc_target)
967 <low_breakpoint_at>: Declare.
968 (sparc_breakpoint_at): Turn into...
969 (sparc_target::low_breakpoint_at): ...this.
970 (the_low_target): Remove the op field.
971 * linux-tic6x-low.cc (class tic6x_target)
972 <low_breakpoint_at>: Declare.
973 (tic6x_breakpoint_at): Turn into...
974 (tic6x_target::low_breakpoint_at): ...this.
975 (the_low_target): Remove the op field.
976 * linux-tile-low.cc (class tile_target)
977 <low_breakpoint_at>: Declare.
978 (tile_breakpoint_at): Turn into...
979 (tile_target::low_breakpoint_at): ...this.
980 (the_low_target): Remove the op field.
981 * linux-xtensa-low.cc (class xtensa_target)
982 <low_breakpoint_at>: Declare.
983 (xtensa_breakpoint_at): Turn into...
984 (xtensa_target::low_breakpoint_at): ...this.
985 (the_low_target): Remove the op field.
986
987 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
988
989 Turn the 'decr_pc_after_break' linux_target_ops field into
990 a method of linux_process_target.
991
992 * linux-low.h (struct linux_target_ops)
993 <decr_pc_after_break>: Remove.
994 (class linux_process_target) <low_decr_pc_after_break>: New method
995 declaration.
996 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
997 New method implementation.
998
999 Update the users below.
1000
1001 (linux_process_target::save_stop_reason)
1002 (linux_process_target::wait_1)
1003 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1004 New declaration.
1005 (x86_target::low_decr_pc_after_break): New method implementation.
1006 (the_low_target): Remove the field.
1007 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1008 New declaration.
1009 (bfin_target::low_decr_pc_after_break): New method implementation.
1010 (the_low_target): Remove the field.
1011 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1012 New declaration.
1013 (m68k_target::low_decr_pc_after_break): New method implementation.
1014 (the_low_target): Remove the field.
1015 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1016 New declaration.
1017 (s390_target::low_decr_pc_after_break): New method implementation.
1018 (the_low_target): Remove the field.
1019 * linux-aarch64-low.cc (the_low_target): Remove the field.
1020 * linux-arm-low.cc (the_low_target): Remove the field.
1021 * linux-cris-low.cc (the_low_target): Remove the field.
1022 * linux-crisv32-low.cc (the_low_target): Remove the field.
1023 * linux-m32r-low.cc (the_low_target): Remove the field.
1024 * linux-mips-low.cc (the_low_target): Remove the field.
1025 * linux-nios2-low.cc (the_low_target): Remove the field.
1026 * linux-ppc-low.cc (the_low_target): Remove the field.
1027 * linux-riscv-low.cc (the_low_target): Remove the field.
1028 * linux-sh-low.cc (the_low_target): Remove the field.
1029 * linux-sparc-low.cc (the_low_target): Remove the field.
1030 * linux-tic6x-low.cc (the_low_target): Remove the field.
1031 * linux-tile-low.cc (the_low_target): Remove the field.
1032 * linux-xtensa-low.cc (the_low_target): Remove the field.
1033
1034 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1035
1036 Remove the 'supports_software_single_step' linux target op and let
1037 the concrete linux target define it by overriding the op in
1038 process_stratum_target.
1039 Turn the 'get_next_pcs' linux target op into a method of
1040 linux_process_target.
1041
1042 * linux-low.h (struct linux_target_ops): Remove the ops.
1043 (class linux_process_target) <supports_software_single_step>:
1044 Remove.
1045 <low_get_next_pcs>: Declare.
1046 * linux-low.cc (can_software_single_step): Remove.
1047 (linux_process_target::low_get_next_pcs): Define.
1048 (linux_process_target::supports_software_single_step): Remove.
1049
1050 Update the callers below.
1051
1052 (linux_process_target::handle_extended_wait)
1053 (linux_process_target::wait_1)
1054 (linux_process_target::install_software_single_step_breakpoints)
1055 (linux_process_target::single_step)
1056 (linux_process_target::thread_needs_step_over)
1057 (linux_process_target::proceed_one_lwp)
1058 (linux_process_target::supports_range_stepping)
1059
1060 * linux-x86-low.cc (the_low_target): Remove the op field.
1061 * linux-aarch64-low.cc (the_low_target): Ditto.
1062 * linux-bfin-low.cc (the_low_target): Ditto.
1063 * linux-cris-low.cc (the_low_target): Ditto.
1064 * linux-crisv32-low.cc (the_low_target): Ditto.
1065 * linux-m32r-low.cc (the_low_target): Ditto.
1066 * linux-m68k-low.cc (the_low_target): Ditto.
1067 * linux-mips-low.cc (the_low_target): Ditto.
1068 * linux-nios2-low.cc (the_low_target): Ditto.
1069 * linux-ppc-low.cc (the_low_target): Ditto.
1070 * linux-riscv-low.cc (the_low_target): Ditto.
1071 * linux-s390-low.cc (the_low_target): Ditto.
1072 * linux-sh-low.cc (the_low_target): Ditto.
1073 * linux-sparc-low.cc (the_low_target): Ditto.
1074 * linux-tic6x-low.cc (the_low_target): Ditto.
1075 * linux-tile-low.cc (the_low_target): Ditto.
1076 * linux-xtensa-low.cc (the_low_target): Ditto.
1077 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1078 <supports_software_single_step>: Declare.
1079 (arm_target::supports_software_single_step): Define.
1080 (arm_gdbserver_get_next_pcs): Turn into...
1081 (arm_target::low_get_next_pcs): ...this.
1082 (the_low_target): Remove the op field.
1083
1084 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1085
1086 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1087 the concrete linux target define it by overriding the op
1088 in process_stratum_target.
1089
1090 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1091 Remove.
1092 * linux-low.h (struct linux_target_ops): Remove the op.
1093 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1094 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1095 Declare.
1096 (x86_sw_breakpoint_from_kind): Turn into...
1097 (x86_target::sw_breakpoint_from_kind): ...this.
1098 (the_low_target): Remove the op field.
1099 * linux-aarch64-low.cc (class aarch64_target)
1100 <sw_breakpoint_from_kind>: Declare.
1101 (aarch64_sw_breakpoint_from_kind): Turn into...
1102 (aarch64_target::sw_breakpoint_from_kind): ...this.
1103 (the_low_target): Remove the op field.
1104 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1105 Declare.
1106 (arm_target::sw_breakpoint_from_kind): Define.
1107 (the_low_target): Remove the op field.
1108 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1109 Declare.
1110 (bfin_sw_breakpoint_from_kind): Turn into...
1111 (bfin_target::sw_breakpoint_from_kind): ...this.
1112 (the_low_target): Remove the op field.
1113 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1114 Declare.
1115 (cris_sw_breakpoint_from_kind): Turn into...
1116 (cris_target::sw_breakpoint_from_kind): ...this.
1117 (the_low_target): Remove the op field.
1118 * linux-crisv32-low.cc (class crisv32_target)
1119 <sw_breakpoint_from_kind>: Declare.
1120 (cris_sw_breakpoint_from_kind): Turn into...
1121 (crisv32_target::sw_breakpoint_from_kind): ...this.
1122 (the_low_target): Remove the op field.
1123 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1124 Declare.
1125 (ia64_target::sw_breakpoint_from_kind): Define.
1126 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1127 Declare.
1128 (m32r_sw_breakpoint_from_kind): Turn into...
1129 (m32r_target::sw_breakpoint_from_kind): ...this.
1130 (the_low_target): Remove the op field.
1131 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1132 Declare.
1133 (m68k_sw_breakpoint_from_kind): Turn into...
1134 (m68k_target::sw_breakpoint_from_kind): ...this.
1135 (the_low_target): Remove the op field.
1136 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1137 Declare.
1138 (mips_sw_breakpoint_from_kind): Turn into...
1139 (mips_target::sw_breakpoint_from_kind): ...this.
1140 (the_low_target): Remove the op field.
1141 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1142 Declare.
1143 (nios2_sw_breakpoint_from_kind): Turn into...
1144 (nios2_target::sw_breakpoint_from_kind): ...this.
1145 (the_low_target): Remove the op field.
1146 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1147 Declare.
1148 (ppc_sw_breakpoint_from_kind): Turn into...
1149 (ppc_target::sw_breakpoint_from_kind): ...this.
1150 (the_low_target): Remove the op field.
1151 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1152 Declare.
1153 (riscv_sw_breakpoint_from_kind): Turn into...
1154 (riscv_target::sw_breakpoint_from_kind): ...this.
1155 (the_low_target): Remove the op field.
1156 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1157 Declare.
1158 (s390_sw_breakpoint_from_kind): Turn into...
1159 (s390_target::sw_breakpoint_from_kind): ...this.
1160 (the_low_target): Remove the op field.
1161 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1162 Declare.
1163 (sh_sw_breakpoint_from_kind): Turn into...
1164 (sh_target::sw_breakpoint_from_kind): ...this.
1165 (the_low_target): Remove the op field.
1166 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1167 Declare.
1168 (sparc_sw_breakpoint_from_kind): Turn into...
1169 (sparc_target::sw_breakpoint_from_kind): ...this.
1170 (the_low_target): Remove the op field.
1171 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1172 Declare.
1173 (tic6x_sw_breakpoint_from_kind): Turn into...
1174 (tic6x_target::sw_breakpoint_from_kind): ...this.
1175 (the_low_target): Remove the op field.
1176 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1177 Declare.
1178 (tile_sw_breakpoint_from_kind): Turn into...
1179 (tile_target::sw_breakpoint_from_kind): ...this.
1180 (the_low_target): Remove the op field.
1181 * linux-xtensa-low.cc (class xtensa_target)
1182 <sw_breakpoint_from_kind>: Declare.
1183 (xtensa_sw_breakpoint_from_kind): Turn into...
1184 (xtensa_target::sw_breakpoint_from_kind): ...this.
1185 (the_low_target): Remove the op field.
1186
1187 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1188
1189 Remove the 'breakpoint_kind_from_pc' and
1190 'breakpoint_kind_from_current_state' linux target ops, and let the
1191 concrete linux target define them by overriding the ops of
1192 process_stratum_target.
1193
1194 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1195 Remove.
1196 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1197 * linux-low.h (struct linux_target_ops): Remove ops.
1198 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1199 <breakpoint_kind_from_current_state>: Remove.
1200 * linux-x86-low.cc (the_low_target): Remove the op fields.
1201 * linux-bfin-low.cc (the_low_target): Ditto.
1202 * linux-cris-low.cc (the_low_target): Ditto.
1203 * linux-crisv32-low.cc (the_low_target): Ditto.
1204 * linux-m32r-low.cc (the_low_target): Ditto.
1205 * linux-m68k-low.cc (the_low_target): Ditto.
1206 * linux-mips-low.cc (the_low_target): Ditto.
1207 * linux-nios2-low.cc (the_low_target): Ditto.
1208 * linux-ppc-low.cc (the_low_target): Ditto.
1209 * linux-s390-low.cc (the_low_target): Ditto.
1210 * linux-sh-low.cc (the_low_target): Ditto.
1211 * linux-sparc-low.cc (the_low_target): Ditto.
1212 * linux-tic6x-low.cc (the_low_target): Ditto.
1213 * linux-tile-low.cc (the_low_target): Ditto.
1214 * linux-xtensa-low.cc (the_low_target): Ditto.
1215 * linux-aarch64-low.cc (class aarch64_target)
1216 <breakpoint_kind_from_pc>
1217 <breakpoint_kind_from_current_state>: Declare.
1218 (aarch64_breakpoint_kind_from_pc): Turn into...
1219 (aarch64_target::breakpoint_kind_from_pc): ...this.
1220 (aarch64_breakpoint_kind_from_current_state): Turn into...
1221 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1222 (the_low_target): Remove the op fields.
1223 * linux-arm-low.cc (class arm_target):
1224 <breakpoint_kind_from_pc>
1225 <breakpoint_kind_from_current_state>: Declare.
1226 (arm_target::breakpoint_kind_from_pc): Define.
1227 (arm_target::breakpoint_kind_from_current_state): Define.
1228 (the_low_target): Remove the op fields.
1229 * linux-riscv-low.cc (class riscv_target):
1230 <breakpoint_kind_from_pc>: Declare.
1231 (riscv_breakpoint_kind_from_pc): Turn into...
1232 (riscv_target::breakpoint_kind_from_pc): ...this.
1233 (the_low_target): Remove the op fields.
1234
1235 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1236
1237 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1238 of linux_process_target.
1239
1240 * linux-low.h (struct linux_target_ops): Remove the ops.
1241 (class linux_process_target) <low_supports_breakpoints>
1242 <low_get_pc>
1243 <low_set_pc>: Declare.
1244 * linux-low.cc (supports_breakpoints): Turn into...
1245 (linux_process_target::low_supports_breakpoints): ...this.
1246 (linux_process_target::low_get_pc): Define.
1247 (linux_process_target::low_set_pc): Define.
1248
1249 Update the callers below.
1250
1251 (linux_process_target::get_pc)
1252 (linux_process_target::save_stop_reason)
1253 (linux_process_target::maybe_move_out_of_jump_pad)
1254 (linux_process_target::wait_1)
1255 (linux_process_target::resume_one_lwp_throw)
1256 (linux_process_target::resume)
1257 (linux_process_target::proceed_all_lwps)
1258 (linux_process_target::read_pc)
1259 (linux_process_target::write_pc)
1260
1261 * linux-x86-low.cc (class linux_process_target)
1262 <low_supports_breakpoints>
1263 <low_get_pc>
1264 <low_set_pc>: Declare.
1265 (x86_target::low_supports_breakpoints): Define.
1266 (x86_get_pc): Turn into...
1267 (x86_target::low_get_pc): ...this.
1268 (x86_set_pc): Turn into...
1269 (x86_target::low_set_pc): ...this.
1270 (the_low_target): Remove the op fields.
1271 * linux-arm-low.cc (class arm_target)
1272 <low_supports_breakpoints>
1273 <low_get_pc>
1274 <low_set_pc>: Declare.
1275 (arm_target::low_supports_breakpoints)
1276 (arm_target::low_get_pc)
1277 (arm_target::low_set_pc): Define.
1278 (the_low_target): Remove the op fields.
1279 * linux-bfin-low.cc (class bfin_target)
1280 <low_supports_breakpoints>
1281 <low_get_pc>
1282 <low_set_pc>: Declare.
1283 (bfin_target::low_supports_breakpoints)
1284 (bfin_target::low_get_pc)
1285 (bfin_target::low_set_pc): Define.
1286 (the_low_target): Remove the op fields.
1287 * linux-cris-low.cc (class cris_target)
1288 <low_supports_breakpoints>
1289 <low_get_pc>
1290 <low_set_pc>: Declare.
1291 (cris_target::low_supports_breakpoints)
1292 (cris_target::low_get_pc)
1293 (cris_target::low_set_pc): Define.
1294 (the_low_target): Remove the op fields.
1295 * linux-crisv32-low.cc (class crisv32_target)
1296 <low_supports_breakpoints>
1297 <low_get_pc>
1298 <low_set_pc>: Declare.
1299 (crisv32_target::low_supports_breakpoints)
1300 (crisv32_target::low_get_pc)
1301 (crisv32_target::low_set_pc): Define.
1302 (the_low_target): Remove the op fields.
1303 * linux-m32r-low.cc (class m32r_target)
1304 <low_supports_breakpoints>
1305 <low_get_pc>
1306 <low_set_pc>: Declare.
1307 (m32r_target::low_supports_breakpoints)
1308 (m32r_target::low_get_pc)
1309 (m32r_target::low_set_pc): Define.
1310 (the_low_target): Remove the op fields.
1311 * linux-m68k-low.cc (class m68k_target)
1312 <low_supports_breakpoints>
1313 <low_get_pc>
1314 <low_set_pc>: Declare.
1315 (m68k_target::low_supports_breakpoints)
1316 (m68k_target::low_get_pc)
1317 (m68k_target::low_set_pc): Define.
1318 (the_low_target): Remove the op fields.
1319 * linux-nios2-low.cc (class nios2_target)
1320 <low_supports_breakpoints>
1321 <low_get_pc>
1322 <low_set_pc>: Declare.
1323 (nios2_target::low_supports_breakpoints)
1324 (nios2_target::low_get_pc)
1325 (nios2_target::low_set_pc): Define.
1326 (the_low_target): Remove the op fields.
1327 * linux-sh-low.cc (class sh_target)
1328 <low_supports_breakpoints>
1329 <low_get_pc>
1330 <low_set_pc>: Declare.
1331 (sh_target::low_supports_breakpoints)
1332 (sh_target::low_get_pc)
1333 (sh_target::low_set_pc): Define.
1334 (the_low_target): Remove the op fields.
1335 * linux-xtensa-low.cc (class xtensa_target)
1336 <low_supports_breakpoints>
1337 <low_get_pc>
1338 <low_set_pc>: Declare.
1339 (xtensa_target::low_supports_breakpoints)
1340 (xtensa_target::low_get_pc)
1341 (xtensa_target::low_set_pc): Define.
1342 (the_low_target): Remove the op fields.
1343 * linux-sparc-low.cc (class sparc_target)
1344 <low_supports_breakpoints>
1345 <low_get_pc>: Declare.
1346 (sparc_target::low_supports_breakpoints)
1347 (sparc_target::low_get_pc): Define.
1348 (the_low_target): Remove the op fields.
1349 * linux-tile-low.cc (class tile_target)
1350 <low_supports_breakpoints>
1351 <low_get_pc>
1352 <low_set_pc>: Declare.
1353 (tile_target::low_supports_breakpoints)
1354 (tile_target::low_get_pc)
1355 (tile_target::low_set_pc): Define.
1356 (the_low_target): Remove the op fields.
1357 * linux-aarch64-low.cc (class aarch64_target)
1358 <low_supports_breakpoints>
1359 <low_get_pc>
1360 <low_set_pc>: Declare.
1361 (aarch64_target::low_supports_breakpoints): Define.
1362 (aarch64_get_pc): Turn into...
1363 (aarch64_target::low_get_pc): ...this.
1364 (aarch64_set_pc): Turn into...
1365 (aarch64_target::low_set_pc): ...this.
1366 (the_low_target): Remove the op fields.
1367 * linux-mips-low.cc (class mips_target)
1368 <low_supports_breakpoints>
1369 <low_get_pc>
1370 <low_set_pc>: Declare.
1371 (mips_target::low_supports_breakpoints): Define.
1372 (mips_get_pc): Turn into...
1373 (mips_target::low_get_pc): ...this.
1374 (mips_set_pc): Turn into...
1375 (mips_target::low_set_pc): ...this.
1376 (the_low_target): Remove the op fields.
1377 * linux-ppc-low.cc (class ppc_target)
1378 <low_supports_breakpoints>
1379 <low_get_pc>
1380 <low_set_pc>: Declare.
1381 (ppc_target::low_supports_breakpoints): Define.
1382 (ppc_get_pc): Turn into...
1383 (ppc_target::low_get_pc): ...this.
1384 (ppc_set_pc): Turn into...
1385 (ppc_target::low_set_pc): ...this.
1386 (the_low_target): Remove the op fields.
1387 * linux-riscv-low.cc (class riscv_target)
1388 <low_supports_breakpoints>
1389 <low_get_pc>
1390 <low_set_pc>: Declare.
1391 (riscv_target::low_supports_breakpoints): Define.
1392 (riscv_get_pc): Turn into...
1393 (riscv_target::low_get_pc): ...this.
1394 (riscv_set_pc): Turn into...
1395 (riscv_target::low_set_pc): ...this.
1396 (the_low_target): Remove the op fields.
1397 * linux-s390-low.cc (class s390_target)
1398 <low_supports_breakpoints>
1399 <low_get_pc>
1400 <low_set_pc>: Declare.
1401 (s390_target::low_supports_breakpoints): Define.
1402 (s390_get_pc): Turn into...
1403 (s390_target::low_get_pc): ...this.
1404 (s390_set_pc): Turn into...
1405 (s390_target::low_set_pc): ...this.
1406 (the_low_target): Remove the op fields.
1407 * linux-tic6x-low.cc (class tic6x_target)
1408 <low_supports_breakpoints>
1409 <low_get_pc>
1410 <low_set_pc>: Declare.
1411 (tic6x_target::low_supports_breakpoints): Define.
1412 (tic6x_get_pc): Turn into...
1413 (tic6x_target::low_get_pc): ...this.
1414 (tic6x_set_pc): Turn into...
1415 (tic6x_target::low_set_pc): ...this.
1416 (the_low_target): Remove the op fields.
1417
1418 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1419
1420 Turn some more static methods in linux-low into private methods
1421 of linux_process_target.
1422
1423 * linux-low.cc (get_pc): Turn into...
1424 (linux_process_target::get_pc): ...this.
1425 (save_stop_reason): Turn into...
1426 (linux_process_target::save_stop_reason): ...this.
1427 (thread_still_has_status_pending_p): Turn into...
1428 (linux_process_target::thread_still_has_status_pending): ...this.
1429 (status_pending_p_callback): Turn into...
1430 (linux_process_target::status_pending_p_callback): ...this.
1431 (resume_stopped_resumed_lwps): Turn into...
1432 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1433 (install_software_single_step_breakpoints): Turn into...
1434 (linux_process_target::install_software_single_step_breakpoints):
1435 ...this.
1436 (single_step): Turn into...
1437 (linux_process_target::single_step): ...this.
1438 (linux_resume_one_lwp_throw): Turn into...
1439 (linux_process_target::resume_one_lwp_throw): ...this.
1440 (linux_resume_one_lwp): Turn into...
1441 (linux_process_target::resume_one_lwp): ...this.
1442 (resume_status_pending_p): Turn into...
1443 (linux_process_target::resume_status_pending): ...this.
1444 (need_step_over_p): Turn into...
1445 (linux_process_target::thread_needs_step_over): ...this.
1446 (linux_resume_one_thread): Turn into...
1447 (linux_process_target::resume_one_thread): ...this.
1448 (proceed_one_lwp): Turn into...
1449 (linux_process_target::proceed_one_lwp): ...this.
1450 (unsuspend_and_proceed_one_lwp): Turn into...
1451 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1452
1453 Update the calls/references to the above functions below.
1454
1455 (linux_process_target::handle_extended_wait)
1456 (linux_process_target::filter_event)
1457 (linux_process_target::wait_for_event_filtered)
1458 (linux_process_target::wait_1)
1459 (linux_process_target::move_out_of_jump_pad)
1460 (linux_process_target::start_step_over)
1461 (linux_process_target::resume)
1462 (linux_process_target::proceed_all_lwps)
1463 (regsets_store_inferior_registers)
1464 (linux_process_target::store_register)
1465
1466 * linux-low.h (class linux_process_target)
1467 <get_pc>
1468 <save_stop_reason>
1469 <thread_still_has_status_pending>
1470 <status_pending_p_callback>
1471 <resume_stopped_resumed_lwps>
1472 <install_software_single_step_breakpoints>
1473 <single_step>
1474 <resume_one_lwp_throw>
1475 <resume_one_lwp>
1476 <resume_status_pending>
1477 <thread_needs_step_over>
1478 <resume_one_thread>
1479 <proceed_one_lwp>
1480 <unsuspend_and_proceed_one_lwp>: Declare.
1481
1482 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1483
1484 Turn the 'fetch_register' linux target op into a method of
1485 linux_process_target.
1486
1487 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1488 (class linux_process_target) <low_fetch_register>: Declare.
1489 * linux-x86-low.cc (the_low_target)
1490 * linux-aarch64-low.cc (the_low_target)
1491 * linux-arm-low.cc (the_low_target)
1492 * linux-bfin-low.cc (the_low_target)
1493 * linux-cris-low.cc (the_low_target)
1494 * linux-crisv32-low.cc (the_low_target)
1495 * linux-m32r-low.cc (the_low_target)
1496 * linux-m68k-low.cc (the_low_target)
1497 * linux-nios2-low.cc (the_low_target)
1498 * linux-ppc-low.cc (the_low_target)
1499 * linux-s390-low.cc (the_low_target)
1500 * linux-sh-low.cc (the_low_target)
1501 * linux-sparc-low.cc (the_low_target)
1502 * linux-tic6x-low.cc (the_low_target)
1503 * linux-tile-low.cc (the_low_target)
1504 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1505 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1506 Declare.
1507 (ia64_fetch_register): Turn into...
1508 (ia64_target::low_fetch_register): ...this.
1509 (the_low_target): Remove the op field.
1510 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1511 Declare.
1512 (mips_fetch_register): Turn into...
1513 (mips_target::low_fetch_register): ...this.
1514 (the_low_target): Remove the op field.
1515 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1516 Declare.
1517 (riscv_fetch_register): Turn into...
1518 (riscv_target::low_fetch_register): ...this.
1519 (the_low_target): Remove the op field.
1520
1521 Update the callers below.
1522
1523 * linux-low.cc (linux_process_target::fetch_registers)
1524 (linux_process_target::low_fetch_register)
1525
1526 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1527
1528 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1529 linux target ops into methods of linux_process_target.
1530
1531 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1532 (class linux_process_target) <fetch_register>
1533 <store_register>
1534 <usr_fetch_inferior_registers>
1535 <usr_store_inferior_registers>
1536 <low_cannot_fetch_register>
1537 <low_cannot_fetch_register> Declare.
1538 * linux-low.cc (fetch_register): Turn into...
1539 (linux_process_target::fetch_register): ...this.
1540 (store_register): Turn into ...
1541 (linux_process_target::store_register): ...this.
1542 (usr_fetch_inferior_registers): Turn into...
1543 (linux_process_target::usr_fetch_inferior_registers): ...this.
1544 (usr_store_inferior_registers): Turn into...
1545 (linux_process_target::usr_store_inferior_registers): ...this.
1546 * linux-x86-low.cc (class x86_target)
1547 <low_cannot_fetch_register>
1548 <low_cannot_store_register>: Declare.
1549 (x86_cannot_store_register): Turn into...
1550 (x86_target::low_cannot_store_register): ...this.
1551 (x86_cannot_fetch_register): Turn into...
1552 (x86_target::low_cannot_fetch_register): ...this.
1553 (the_low_target): Remove the target op fields.
1554 * linux-aarch64-low.cc (class aarch64_target)
1555 <low_cannot_fetch_register>
1556 <low_cannot_store_register>: Declare.
1557 (aarch64_target::low_cannot_fetch_register)
1558 (aarch64_target::low_cannot_store_register): Define.
1559 (the_low_target): Remove the op fields.
1560 * linux-arm-low.cc (class arm_target)
1561 <low_cannot_fetch_register>
1562 <low_cannot_store_register>: Declare.
1563 (arm_cannot_fetch_register): Turn into...
1564 (arm_target::low_cannot_fetch_register): ...this.
1565 (arm_cannot_store_register): Turn into...
1566 (arm_target::low_cannot_store_register): ...this.
1567 (the_low_target): Remove the op fields.
1568 * linux-bfin-low.cc (class bfin_target)
1569 <low_cannot_fetch_register>
1570 <low_cannot_store_register>: Declare.
1571 (bfin_cannot_fetch_register): Turn into...
1572 (bfin_target::low_cannot_fetch_register): ...this.
1573 (bfin_cannot_store_register): Turn into...
1574 (bfin_target::low_cannot_store_register): ...this.
1575 (the_low_target): Remove the op fields.
1576 * linux-cris-low.cc (class cris_target)
1577 <low_cannot_fetch_register>
1578 <low_cannot_store_register>: Declare.
1579 (cris_cannot_fetch_register): Turn into...
1580 (cris_target::low_cannot_fetch_register): ...this.
1581 (cris_cannot_store_register): Turn into...
1582 (cris_target::low_cannot_store_register): ...this.
1583 (the_low_target): Remove the op fields.
1584 * linux-crisv32-low.cc (class crisv32_target)
1585 <low_cannot_fetch_register>
1586 <low_cannot_store_register>: Declare.
1587 (crisv32_target::low_cannot_fetch_register)
1588 (crisv32_target::low_cannot_store_register): Define.
1589 (the_low_target): Remove the op fields.
1590 * linux-ia64-low.cc (class ia64_target)
1591 <low_cannot_fetch_register>
1592 <low_cannot_store_register>: Declare.
1593 (ia64_cannot_fetch_register): Turn into...
1594 (ia64_target::low_cannot_fetch_register): ...this.
1595 (ia64_cannot_store_register): Turn into...
1596 (ia64_target::low_cannot_store_register): ...this.
1597 (the_low_target): Remove the op fields.
1598 * linux-m32r-low.cc (class m32r_target)
1599 <low_cannot_fetch_register>
1600 <low_cannot_store_register>: Declare.
1601 (m32r_cannot_fetch_register): Turn into...
1602 (m32r_target::low_cannot_fetch_register): ...this.
1603 (m32r_cannot_store_register): Turn into...
1604 (m32r_target::low_cannot_store_register): ...this.
1605 (the_low_target): Remove the op fields.
1606 * linux-m68k-low.cc (class m68k_target)
1607 <low_cannot_fetch_register>
1608 <low_cannot_store_register>: Declare.
1609 (m68k_cannot_fetch_register): Turn into...
1610 (m68k_target::low_cannot_fetch_register): ...this.
1611 (m68k_cannot_store_register): Turn into...
1612 (m68k_target::low_cannot_store_register): ...this.
1613 (the_low_target): Remove the op fields.
1614 * linux-mips-low.cc (class mips_target)
1615 <low_cannot_fetch_register>
1616 <low_cannot_store_register>: Declare.
1617 (mips_cannot_fetch_register): Turn into...
1618 (mips_target::low_cannot_fetch_register): ...this.
1619 (mips_cannot_store_register): Turn into...
1620 (mips_target::low_cannot_store_register): ...this.
1621 (get_usrregs_info): Inline at the call sites in
1622 low_cannot_fetch_register and low_cannot_store_register,
1623 and remove.
1624 (the_low_target): Remove the op fields.
1625 * linux-nios2-low.cc (class nios2_target)
1626 <low_cannot_fetch_register>
1627 <low_cannot_store_register>: Declare.
1628 (nios2_cannot_fetch_register): Turn into...
1629 (nios2_target::low_cannot_fetch_register): ...this.
1630 (nios2_cannot_store_register): Turn into...
1631 (nios2_target::low_cannot_store_register): ...this.
1632 (the_low_target): Remove the op fields.
1633 * linux-ppc-low.cc (class ppc_target)
1634 <low_cannot_fetch_register>
1635 <low_cannot_store_register>: Declare.
1636 (ppc_cannot_fetch_register): Turn into...
1637 (ppc_target::low_cannot_fetch_register): ...this.
1638 (ppc_cannot_store_register): Turn into...
1639 (ppc_target::low_cannot_store_register): ...this.
1640 (the_low_target): Remove the op fields.
1641 * linux-riscv-low.cc (class riscv_target)
1642 <low_cannot_fetch_register>
1643 <low_cannot_store_register>: Declare.
1644 (riscv_target::low_cannot_fetch_register)
1645 (riscv_target::low_cannot_store_register): Define.
1646 (the_low_target): Remove the op fields.
1647 * linux-s390-low.cc (class s390_target)
1648 <low_cannot_fetch_register>
1649 <low_cannot_store_register>: Declare.
1650 (s390_cannot_fetch_register): Turn into...
1651 (s390_target::low_cannot_fetch_register): ...this.
1652 (s390_cannot_store_register): Turn into...
1653 (s390_target::low_cannot_store_register): ...this.
1654 (the_low_target): Remove the op fields.
1655 * linux-sh-low.cc (class sh_target)
1656 <low_cannot_fetch_register>
1657 <low_cannot_store_register>: Declare.
1658 (sh_cannot_fetch_register): Turn into...
1659 (sh_target::low_cannot_fetch_register): ...this.
1660 (sh_cannot_store_register): Turn into...
1661 (sh_target::low_cannot_store_register): ...this.
1662 (the_low_target): Remove the op fields.
1663 * linux-sparc-low.cc (class sparc_target)
1664 <low_cannot_fetch_register>
1665 <low_cannot_store_register>: Declare.
1666 (sparc_cannot_fetch_register): Turn into...
1667 (sparc_target::low_cannot_fetch_register): ...this.
1668 (sparc_cannot_store_register): Turn into...
1669 (sparc_target::low_cannot_store_register): ...this.
1670 (the_low_target): Remove the op fields.
1671 * linux-tic6x-low.cc (class tic6x_target)
1672 <low_cannot_fetch_register>
1673 <low_cannot_store_register>: Declare.
1674 (tic6x_cannot_fetch_register): Turn into...
1675 (tic6x_target::low_cannot_fetch_register): ...this.
1676 (tic6x_cannot_store_register): Turn into...
1677 (tic6x_target::low_cannot_store_register): ...this.
1678 (the_low_target): Remove the op fields.
1679 * linux-tile-low.cc (class tile_target)
1680 <low_cannot_fetch_register>
1681 <low_cannot_store_register>: Declare.
1682 (tile_cannot_fetch_register): Turn into...
1683 (tile_target::low_cannot_fetch_register): ...this.
1684 (tile_cannot_store_register): Turn into...
1685 (tile_target::low_cannot_store_register): ...this.
1686 (the_low_target): Remove the op fields.
1687 * linux-xtensa-low.cc (class xtensa_target)
1688 <low_cannot_fetch_register>
1689 <low_cannot_store_register>: Declare.
1690 (xtensa_target::low_cannot_fetch_register)
1691 (xtensa_target::low_cannot_store_register): Define.
1692 (the_low_target): Remove the op fields.
1693
1694 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1695
1696 Turn the 'regs_info' linux target op into a method of
1697 linux_process_target.
1698
1699 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1700 (class linux_process_target) <get_regs_info>: Define.
1701
1702 Update the callers below.
1703
1704 * linux-low.cc (linux_process_target::fetch_registers)
1705 (linux_process_target::store_registers)
1706 * proc-service.cc (gregset_info)
1707
1708 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1709 (x86_linux_regs_info): Turn into ...
1710 (x86_target::get_regs_info): ...this.
1711 (the_low_target): Remove the op field.
1712 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1713 Declare.
1714 (aarch64_regs_info): Turn into ...
1715 (aarch64_target::get_regs_info): ...this.
1716 (the_low_target): Remove the op field.
1717 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1718 (arm_regs_info): Turn into ...
1719 (arm_target::get_regs_info): ...this.
1720 (the_low_target): Remove the op field.
1721 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1722 (bfin_regs_info): Turn into ...
1723 (bfin_target::get_regs_info): ...this.
1724 (the_low_target): Remove the op field.
1725 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1726 (cris_regs_info): Turn into ...
1727 (cris_target::get_regs_info): ...this.
1728 (the_low_target): Remove the op field.
1729 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1730 Declare.
1731 (crisv32_regs_info): Turn into ...
1732 (crisv32_target::get_regs_info): ...this.
1733 (the_low_target): Remove the op field.
1734 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1735 (ia64_regs_info): Turn into ...
1736 (ia64_target::get_regs_info): ...this.
1737 (the_low_target): Remove the op field.
1738 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1739 (m32r_regs_info): Turn into ...
1740 (m32r_target::get_regs_info): ...this.
1741 (the_low_target): Remove the op field.
1742 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1743 (m68k_regs_info): Turn into ...
1744 (m68k_target::get_regs_info): ...this.
1745 (the_low_target): Remove the op field.
1746 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1747 (mips_regs_info): Turn into ...
1748 (mips_target::get_regs_info): ...this.
1749 (the_low_target): Remove the op field.
1750 (get_usrregs_info): Update the call to the op.
1751 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1752 (nios2_regs_info): Turn into ...
1753 (nios2_target::get_regs_info): ...this.
1754 (the_low_target): Remove the op field.
1755 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1756 (ppc_regs_info): Turn into ...
1757 (ppc_target::get_regs_info): ...this.
1758 (the_low_target): Remove the op field.
1759 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1760 (riscv_regs_info): Turn into ...
1761 (riscv_target::get_regs_info): ...this.
1762 (the_low_target): Remove the op field.
1763 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1764 (s390_regs_info): Turn into ...
1765 (s390_target::get_regs_info): ...this.
1766 (the_low_target): Remove the op field.
1767 (s390_collect_ptrace_register)
1768 (s390_supply_ptrace_register)
1769 (s390_fill_gregset): Update the call to the op.
1770 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1771 (sh_regs_info): Turn into ...
1772 (sh_target::get_regs_info): ...this.
1773 (the_low_target): Remove the op field.
1774 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1775 (sparc_regs_info): Turn into ...
1776 (sparc_target::get_regs_info): ...this.
1777 (the_low_target): Remove the op field.
1778 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1779 (tic6x_regs_info): Turn into ...
1780 (tic6x_target::get_regs_info): ...this.
1781 (the_low_target): Remove the op field.
1782 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1783 (tile_regs_info): Turn into ...
1784 (tile_target::get_regs_info): ...this.
1785 (the_low_target): Remove the op field.
1786 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1787 Declare.
1788 (xtensa_regs_info): Turn into ...
1789 (xtensa_target::get_regs_info): ...this.
1790 (the_low_target): Remove the op field.
1791
1792 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1793
1794 Turn the 'arch_setup' linux target op into a method of
1795 linux_process_target.
1796
1797 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1798 (class linux_process_target) <arch_setup_thread>
1799 <low_arch_setup>: New declarations.
1800 * linux-low.cc (linux_arch_setup): Delete.
1801 (linux_arch_setup_thread): Turn into...
1802 (linux_process_target::arch_setup_thread): ... this.
1803
1804 Update the callers below.
1805
1806 (linux_process_target::handle_extended_wait)
1807 (linux_process_target::post_create_inferior)
1808 (linux_process_target::filter_event)
1809
1810 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1811 declaration.
1812 (x86_linux_update_xmltarget): Turn into...
1813 (x86_target::update_xmltarget): ...this.
1814 (x86_linux_process_qsupported): Update the call to
1815 x86_linux_update_xmltarget.
1816 (x86_arch_setup): Turn into ...
1817 (x86_target::low_arch_setup): ...this.
1818 (the_low_target): Remove the op field.
1819 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1820 declaration.
1821 (aarch64_arch_setup): Turn into ...
1822 (aarch64_target::low_arch_setup): ...this.
1823 (the_low_target): Remove the op field.
1824 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1825 declaration.
1826 (arm_arch_setup): Turn into ...
1827 (arm_target::low_arch_setup): ...this.
1828 (the_low_target): Remove the op field.
1829 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1830 declaration.
1831 (bfin_arch_setup): Turn into ...
1832 (bfin_target::low_arch_setup): ...this.
1833 (the_low_target): Remove the op field.
1834 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1835 declaration.
1836 (cris_arch_setup): Turn into ...
1837 (cris_target::low_arch_setup): ...this.
1838 (the_low_target): Remove the op field.
1839 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1840 declaration.
1841 (crisv32_arch_setup): Turn into ...
1842 (crisv32_target::low_arch_setup): ...this.
1843 (the_low_target): Remove the op field.
1844 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1845 declaration.
1846 (ia64_arch_setup): Turn into ...
1847 (ia64_target::low_arch_setup): ...this.
1848 (the_low_target): Remove the op field.
1849 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1850 declaration.
1851 (m32r_arch_setup): Turn into ...
1852 (m32r_target::low_arch_setup): ...this.
1853 (the_low_target): Remove the op field.
1854 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1855 declaration.
1856 (m68k_arch_setup): Turn into ...
1857 (m68k_target::low_arch_setup): ...this.
1858 (the_low_target): Remove the op field.
1859 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1860 declaration.
1861 (mips_arch_setup): Turn into ...
1862 (mips_target::low_arch_setup): ...this.
1863 (the_low_target): Remove the op field.
1864 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1865 declaration.
1866 (nios2_arch_setup): Turn into ...
1867 (nios2_target::low_arch_setup): ...this.
1868 (the_low_target): Remove the op field.
1869 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1870 declaration.
1871 (ppc_arch_setup): Turn into ...
1872 (ppc_target::low_arch_setup): ...this.
1873 (the_low_target): Remove the op field.
1874 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1875 declaration.
1876 (riscv_arch_setup): Turn into ...
1877 (riscv_target::low_arch_setup): ...this.
1878 (the_low_target): Remove the op field.
1879 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1880 declaration.
1881 (s390_arch_setup): Turn into ...
1882 (s390_target::low_arch_setup): ...this.
1883 (the_low_target): Remove the op field.
1884 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1885 declaration.
1886 (sh_arch_setup): Turn into ...
1887 (sh_target::low_arch_setup): ...this.
1888 (the_low_target): Remove the op field.
1889 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1890 declaration.
1891 (sparc_arch_setup): Turn into ...
1892 (sparc_target::low_arch_setup): ...this.
1893 (the_low_target): Remove the op field.
1894 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1895 declaration.
1896 (tic6x_arch_setup): Turn into ...
1897 (tic6x_target::low_arch_setup): ...this.
1898 (the_low_target): Remove the op field.
1899 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1900 declaration.
1901 (tile_arch_setup): Turn into ...
1902 (tile_target::low_arch_setup): ...this.
1903 (the_low_target): Remove the op field.
1904 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1905 declaration.
1906 (xtensa_arch_setup): Turn into ...
1907 (xtensa_target::low_arch_setup): ...this.
1908 (the_low_target): Remove the op field.
1909
1910 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1911
1912 * linux-low.h (the_linux_target): New extern declaration.
1913 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1914 'the_target'.
1915 (the_linux_target): Remove.
1916 * linux-x86-low.cc (class x86_target): New class.
1917 (the_x86_target): New static object.
1918 (the_linux_target): Define as pointer to the_x86_target.
1919 * linux-aarch64-low.cc (class aarch64_target): New class.
1920 (the_aarch64_target): New static object.
1921 (the_linux_target): Define as pointer to the_aarch64_target.
1922 * linux-arm-low.cc (class arm_target): New class.
1923 (the_arm_target): New static object.
1924 (the_linux_target): Define as pointer to the_arm_target.
1925 * linux-bfin-low.cc (class bfin_target): New class.
1926 (the_bfin_target): New static object.
1927 (the_linux_target): Define as pointer to the_bfin_target.
1928 * linux-cris-low.cc (class cris_target): New class.
1929 (the_cris_target): New static object.
1930 (the_linux_target): Define as pointer to the_cris_target.
1931 * linux-crisv32-low.cc (class crisv32_target): New class.
1932 (the_crisv32_target): New static object.
1933 (the_linux_target): Define as pointer to the_crisv32_target.
1934 * linux-ia64-low.cc (class ia64_target): New class.
1935 (the_ia64_target): New static object.
1936 (the_linux_target): Define as pointer to the_ia64_target.
1937 * linux-m32r-low.cc (class m32r_target): New class.
1938 (the_m32r_target): New static object.
1939 (the_linux_target): Define as pointer to the_m32r_target.
1940 * linux-m68k-low.cc (class m68k_target): New class.
1941 (the_m68k_target): New static object.
1942 (the_linux_target): Define as pointer to the_m68k_target.
1943 * linux-mips-low.cc (class mips_target): New class.
1944 (the_mips_target): New static object.
1945 (the_linux_target): Define as pointer to the_mips_target.
1946 * linux-nios2-low.cc (class nios2_target): New class.
1947 (the_nios2_target): New static object.
1948 (the_linux_target): Define as pointer to the_nios2_target.
1949 * linux-ppc-low.cc (class ppc_target): New class.
1950 (the_ppc_target): New static object.
1951 (the_linux_target): Define as pointer to the_ppc_target.
1952 * linux-riscv-low.cc (class riscv_target): New class.
1953 (the_riscv_target): New static object.
1954 (the_linux_target): Define as pointer to the_riscv_target.
1955 * linux-s390-low.cc (class s390_target): New class.
1956 (the_s390_target): New static object.
1957 (the_linux_target): Define as pointer to the_s390_target.
1958 * linux-sh-low.cc (class sh_target): New class.
1959 (the_sh_target): New static object.
1960 (the_linux_target): Define as pointer to the_sh_target.
1961 * linux-sparc-low.cc (class sparc_target): New class.
1962 (the_sparc_target): New static object.
1963 (the_linux_target): Define as pointer to the_sparc_target.
1964 * linux-tic6x-low.cc (class tic6x_target): New class.
1965 (the_tic6x_target): New static object.
1966 (the_linux_target): Define as pointer to the_tic6x_target.
1967 * linux-tile-low.cc (class tile_target): New class.
1968 (the_tile_target): New static object.
1969 (the_linux_target): Define as pointer to the_tile_target.
1970 * linux-xtensa-low.cc (class xtensa_target): New class.
1971 (the_xtensa_target): New static object.
1972 (the_linux_target): Define as pointer to the_xtensa_target.
1973
1974 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1975
1976 Turn some static functions in linux-low.cc into private methods of
1977 linux_process_target.
1978
1979 * linux-low.cc (handle_extended_wait): Turn into ...
1980 (linux_process_target::handle_extended_wait): ...this. Call
1981 'mourn' on 'this' object instead of 'the_target'.
1982 (maybe_move_out_of_jump_pad): Turn into...
1983 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1984 (linux_low_filter_event): Turn into...
1985 (linux_process_target::filter_event): ...this.
1986 (linux_wait_for_event_filtered): Turn into...
1987 (linux_process_target::wait_for_event_filtered): ...this.
1988 (linux_wait_for_event): Turn into...
1989 (linux_process_target::wait_for_event): ...this.
1990 (linux_wait_1): Turn into...
1991 (linux_process_target::wait_1): ...this.
1992 (wait_for_sigstop): Turn into...
1993 (linux_process_target::wait_for_sigstop): ...this.
1994 (move_out_of_jump_pad_callback): Turn into...
1995 (linux_process_target::move_out_of_jump_pad): ...this.
1996 (stop_all_lwps): Turn into...
1997 (linux_process_target::stop_all_lwps): ...this.
1998 (start_step_over): Turn into...
1999 (linux_process_target::start_step_over): ...this.
2000 (complete_ongoing_step_over): Turn into...
2001 (linux_process_target::complete_ongoing_step_over): ...this.
2002 (proceed_all_lwps): Turn into...
2003 (linux_process_target::proceed_all_lwps): ...this.
2004 (unstop_all_lwps): Turn into...
2005 (linux_process_target::unstop_all_lwps): ...this.
2006
2007 * linux-low.h (class linux_process_target)
2008 <handle_extended_wait>
2009 <maybe_move_out_of_jump_pad>
2010 filter_event>
2011 <wait_for_event_filtered>
2012 <wait_for_event>
2013 <wait_1>
2014 <wait_for_sigstop>
2015 <move_out_of_jump_pad>
2016 <stop_all_lwps>
2017 <start_step_over>
2018 <complete_ongoing_step_over>
2019 <proceed_all_lwps>
2020 <unstop_all_lwps>: Declare.
2021
2022 Update the callers below.
2023
2024 * linux-low.cc (linux_process_target::attach): Update.
2025 (linux_process_target::stabilize_threads): Ditto.
2026 (linux_process_target::wait): Ditto.
2027
2028 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2029
2030 * linux-low.h (struct linux_target_ops): Update the comment for
2031 'cannot_store_register' to return 0 or 1.
2032 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2033 of 2.
2034
2035 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2036
2037 * config.in: Re-generate.
2038 * configure: Re-generate.
2039
2040 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2041
2042 * regcache.cc (find_register_by_number): Update.
2043 * tdesc.cc (init_target_desc): Likewise.
2044 * tdesc.h (target_desc::reg_defs): Likewise.
2045
2046 2020-03-12 Tom Tromey <tom@tromey.com>
2047
2048 * configure: Rebuild.
2049 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2050 (WIN32APILIBS): New subst.
2051 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2052 gdbsupport files.
2053 (gdbsupport/%.o): Remove target.
2054 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2055 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2056 (WIN32APILIBS): New variable.
2057 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2058 (gdbreplay$(EXEEXT)): Likewise.
2059
2060 2020-03-12 Tom Tromey <tom@tromey.com>
2061
2062 * config.in, configure: Rebuild.
2063 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2064 * acinclude.m4: Include gettext-sister.m4.
2065 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2066 variables.
2067 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2068 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2069
2070 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2071
2072 * acinclude.m4: Update path to selftest.m4.
2073
2074 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2075
2076 * configure.ac: Don't source bfd/development.sh, move
2077 GDB_AC_COMMON higher.
2078 * configure: Re-generate.
2079
2080 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2081
2082 * configure: Re-generate.
2083
2084 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2085
2086 * configure: Re-generate.
2087
2088 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2089
2090 * .dir-locals.el: New file.
2091
2092 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2093
2094 * .gitattributes: New file.
2095
2096 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2097
2098 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2099 reply into an S reply.
2100 * server.cc (disable_packet_T): New global.
2101 (captured_main): Set new global when appropriate.
2102 * server.h (disable_packet_T): Declare.
2103
2104 2020-02-21 Tom Tromey <tom@tromey.com>
2105
2106 * Makefile.in (mostlyclean): New target.
2107
2108 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2109
2110 * target.h (struct process_stratum_target): Remove.
2111 (class process_target): Rename to ...
2112 (class process_stratum_target): ... this.
2113 * linux-low.h (class linux_process_target): Derive from
2114 'process_stratum_target'.
2115 * linux-low.cc (linux_target_ops): Remove.
2116 (initialize_low): Set the_target to the singleton instance of
2117 linux_process_target.
2118 * lynx-low.h (class lynx_process_target): Derive from
2119 'process_stratum_target'.
2120 * lynx-low.cc (lynx_target_ops): Remove.
2121 (initialize_low): Set the_target to the singleton instance of
2122 lynx_process_target.
2123 * nto-low.h (class nto_process_target): Derive from
2124 'process_stratum_target'.
2125 * nto-low.cc (nto_target_ops): Remove.
2126 (initialize_low): Set the_target to the singleton instance of
2127 nto_process_target.
2128 * win32-low.h (class win32_process_target): Derive from
2129 'process_stratum_target'.
2130 * win32-low.cc (win32_target_ops): Remove.
2131 (initialize_low): Set the_target to the singleton instance of
2132 win32_process_target.
2133
2134 Replace 'the_target->pt' with 'the_target' in the uses below.
2135
2136 * hostio.cc (hostio_error)
2137 (handle_setfs)
2138 (handle_open)
2139 (handle_unlink)
2140 (handle_readlink)
2141 * linux-aarch32-low.cc (arm_breakpoint_at)
2142 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2143 * linux-arm-low.cc (arm_sigreturn_next_pc)
2144 (arm_get_hwcap)
2145 (arm_get_syscall_trapinfo)
2146 * linux-cris-low.cc (cris_breakpoint_at)
2147 * linux-crisv32-low.cc (cris_breakpoint_at)
2148 * linux-low.cc (handle_extended_wait)
2149 (linux_wait_1)
2150 (linux_read_memory)
2151 (linux_process_target::breakpoint_kind_from_pc)
2152 (linux_get_auxv)
2153 * linux-m32r-low.cc (m32r_breakpoint_at)
2154 * linux-mips-low.cc (mips_breakpoint_at)
2155 * linux-nios2-low.cc (nios2_breakpoint_at)
2156 * linux-ppc-low.cc (ppc_breakpoint_at)
2157 * linux-s390-low.cc (s390_get_hwcap)
2158 * linux-sh-low.cc (sh_breakpoint_at)
2159 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2160 (sparc_store_gregset_from_stack)
2161 (sparc_breakpoint_at)
2162 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2163 * linux-tile-low.cc (tile_breakpoint_at)
2164 * linux-x86-low.cc (x86_breakpoint_at)
2165 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2166 * mem-break.cc (bp_size)
2167 (bp_opcode)
2168 (insert_memory_breakpoint)
2169 (set_raw_breakpoint_at)
2170 (delete_raw_breakpoint)
2171 (z_type_supported)
2172 (uninsert_raw_breakpoint)
2173 (reinsert_raw_breakpoint)
2174 (validate_inserted_breakpoint)
2175 * regcache.cc (regcache_read_pc)
2176 (regcache_write_pc)
2177 * remote-utils.cc (putpkt_binary_1)
2178 (input_interrupt)
2179 (getpkt)
2180 (prepare_resume_reply)
2181 * server.cc (handle_general_set)
2182 (handle_detach)
2183 (handle_qxfer_auxv)
2184 (handle_qxfer_exec_file)
2185 (handle_qxfer_libraries_svr4)
2186 (handle_qxfer_osdata)
2187 (handle_qxfer_siginfo)
2188 (handle_qxfer_fdpic)
2189 (handle_query)
2190 (resume)
2191 (handle_v_requests)
2192 (queue_stop_reply_callback)
2193 (captured_main)
2194 * target.cc (prepare_to_access_memory)
2195 (done_accessing_memory)
2196 (read_inferior_memory)
2197 (target_write_memory)
2198 (target_stop_and_wait)
2199 (target_wait)
2200 (target_mourn_inferior)
2201 (target_continue_no_signal)
2202 (target_continue)
2203 (target_supports_multi_process)
2204 (kill_inferior)
2205 * target.h
2206 (target_create_inferior)
2207 (target_post_create_inferior)
2208 (myattach)
2209 (target_supports_fork_events)
2210 (target_supports_vfork_events)
2211 (target_supports_exec_events)
2212 (target_handle_new_gdb_connection)
2213 (detach_inferior)
2214 (mythread_alive)
2215 (fetch_inferior_registers)
2216 (store_inferior_registers)
2217 (join_inferior)
2218 (target_supports_non_stop)
2219 (target_async)
2220 (target_process_qsupported)
2221 (target_supports_catch_syscall)
2222 (target_get_ipa_tdesc_idx)
2223 (target_supports_tracepoints)
2224 (target_supports_fast_tracepoints)
2225 (target_get_min_fast_tracepoint_insn_len)
2226 (target_thread_stopped)
2227 (target_pause_all)
2228 (target_unpause_all)
2229 (target_stabilize_threads)
2230 (target_install_fast_tracepoint_jump_pad)
2231 (target_emit_ops)
2232 (target_supports_disable_randomization)
2233 (target_supports_agent)
2234 (target_enable_btrace)
2235 (target_disable_btrace)
2236 (target_read_btrace)
2237 (target_read_btrace_conf)
2238 (target_supports_range_stepping)
2239 (target_supports_stopped_by_sw_breakpoint)
2240 (target_stopped_by_sw_breakpoint)
2241 (target_supports_stopped_by_hw_breakpoint)
2242 (target_supports_hardware_single_step)
2243 (target_stopped_by_hw_breakpoint)
2244 (target_breakpoint_kind_from_pc)
2245 (target_breakpoint_kind_from_current_state)
2246 (target_supports_software_single_step)
2247 (target_core_of_thread)
2248 (target_thread_name)
2249 (target_thread_handle)
2250 * win32-low.cc (do_initial_child_stuff)
2251
2252 Rename target op default definitions listed below.
2253
2254 * target.cc (process_target::post_create_inferior): Rename as ...
2255 (process_stratum_target::post_create_inferior): ... this.
2256 (process_target::prepare_to_access_memory): Rename as ...
2257 (process_stratum_target::prepare_to_access_memory): ... this.
2258 (process_target::done_accessing_memory): Rename as ...
2259 (process_stratum_target::done_accessing_memory): ... this.
2260 (process_target::look_up_symbols): Rename as ...
2261 (process_stratum_target::look_up_symbols): ... this.
2262 (process_target::supports_read_auxv): Rename as ...
2263 (process_stratum_target::supports_read_auxv): ... this.
2264 (process_target::read_auxv): Rename as ...
2265 (process_stratum_target::read_auxv): ... this.
2266 (process_target::supports_z_point_type): Rename as ...
2267 (process_stratum_target::supports_z_point_type): ... this.
2268 (process_target::insert_point): Rename as ...
2269 (process_stratum_target::insert_point): ... this.
2270 (process_target::remove_point): Rename as ...
2271 (process_stratum_target::remove_point): ... this.
2272 (process_target::stopped_by_sw_breakpoint): Rename as ...
2273 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2274 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2275 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2276 (process_target::stopped_by_hw_breakpoint): Rename as ...
2277 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2278 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2279 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2280 (process_target::supports_hardware_single_step): Rename as ...
2281 (process_stratum_target::supports_hardware_single_step): ... this.
2282 (process_target::stopped_by_watchpoint): Rename as ...
2283 (process_stratum_target::stopped_by_watchpoint): ... this.
2284 (process_target::stopped_data_address): Rename as ...
2285 (process_stratum_target::stopped_data_address): ... this.
2286 (process_target::supports_read_offsets): Rename as ...
2287 (process_stratum_target::supports_read_offsets): ... this.
2288 (process_target::read_offsets): Rename as ...
2289 (process_stratum_target::read_offsets): ... this.
2290 (process_target::supports_get_tls_address): Rename as ...
2291 (process_stratum_target::supports_get_tls_address): ... this.
2292 (process_target::get_tls_address): Rename as ...
2293 (process_stratum_target::get_tls_address): ... this.
2294 (process_target::hostio_last_error): Rename as ...
2295 (process_stratum_target::hostio_last_error): ... this.
2296 (process_target::supports_qxfer_osdata): Rename as ...
2297 (process_stratum_target::supports_qxfer_osdata): ... this.
2298 (process_target::qxfer_osdata): Rename as ...
2299 (process_stratum_target::qxfer_osdata): ... this.
2300 (process_target::supports_qxfer_siginfo): Rename as ...
2301 (process_stratum_target::supports_qxfer_siginfo): ... this.
2302 (process_target::qxfer_siginfo): Rename as ...
2303 (process_stratum_target::qxfer_siginfo): ... this.
2304 (process_target::supports_non_stop): Rename as ...
2305 (process_stratum_target::supports_non_stop): ... this.
2306 (process_target::async): Rename as ...
2307 (process_stratum_target::async): ... this.
2308 (process_target::start_non_stop): Rename as ...
2309 (process_stratum_target::start_non_stop): ... this.
2310 (process_target::supports_multi_process): Rename as ...
2311 (process_stratum_target::supports_multi_process): ... this.
2312 (process_target::supports_fork_events): Rename as ...
2313 (process_stratum_target::supports_fork_events): ... this.
2314 (process_target::supports_vfork_events): Rename as ...
2315 (process_stratum_target::supports_vfork_events): ... this.
2316 (process_target::supports_exec_events): Rename as ...
2317 (process_stratum_target::supports_exec_events): ... this.
2318 (process_target::handle_new_gdb_connection): Rename as ...
2319 (process_stratum_target::handle_new_gdb_connection): ... this.
2320 (process_target::handle_monitor_command): Rename as ...
2321 (process_stratum_target::handle_monitor_command): ... this.
2322 (process_target::core_of_thread): Rename as ...
2323 (process_stratum_target::core_of_thread): ... this.
2324 (process_target::supports_read_loadmap): Rename as ...
2325 (process_stratum_target::supports_read_loadmap): ... this.
2326 (process_target::read_loadmap): Rename as ...
2327 (process_stratum_target::read_loadmap): ... this.
2328 (process_target::process_qsupported): Rename as ...
2329 (process_stratum_target::process_qsupported): ... this.
2330 (process_target::supports_tracepoints): Rename as ...
2331 (process_stratum_target::supports_tracepoints): ... this.
2332 (process_target::read_pc): Rename as ...
2333 (process_stratum_target::read_pc): ... this.
2334 (process_target::write_pc): Rename as ...
2335 (process_stratum_target::write_pc): ... this.
2336 (process_target::supports_thread_stopped): Rename as ...
2337 (process_stratum_target::supports_thread_stopped): ... this.
2338 (process_target::thread_stopped): Rename as ...
2339 (process_stratum_target::thread_stopped): ... this.
2340 (process_target::supports_get_tib_address): Rename as ...
2341 (process_stratum_target::supports_get_tib_address): ... this.
2342 (process_target::get_tib_address): Rename as ...
2343 (process_stratum_target::get_tib_address): ... this.
2344 (process_target::pause_all): Rename as ...
2345 (process_stratum_target::pause_all): ... this.
2346 (process_target::unpause_all): Rename as ...
2347 (process_stratum_target::unpause_all): ... this.
2348 (process_target::stabilize_threads): Rename as ...
2349 (process_stratum_target::stabilize_threads): ... this.
2350 (process_target::supports_fast_tracepoints): Rename as ...
2351 (process_stratum_target::supports_fast_tracepoints): ... this.
2352 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2353 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2354 (process_target::emit_ops): Rename as ...
2355 (process_stratum_target::emit_ops): ... this.
2356 (process_target::supports_disable_randomization): Rename as ...
2357 (process_stratum_target::supports_disable_randomization): ... this.
2358 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2359 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2360 (process_target::qxfer_libraries_svr4): Rename as ...
2361 (process_stratum_target::qxfer_libraries_svr4): ... this.
2362 (process_target::supports_agent): Rename as ...
2363 (process_stratum_target::supports_agent): ... this.
2364 (process_target::enable_btrace): Rename as ...
2365 (process_stratum_target::enable_btrace): ... this.
2366 (process_target::disable_btrace): Rename as ...
2367 (process_stratum_target::disable_btrace): ... this.
2368 (process_target::read_btrace): Rename as ...
2369 (process_stratum_target::read_btrace): ... this.
2370 (process_target::read_btrace_conf): Rename as ...
2371 (process_stratum_target::read_btrace_conf): ... this.
2372 (process_target::supports_range_stepping): Rename as ...
2373 (process_stratum_target::supports_range_stepping): ... this.
2374 (process_target::supports_pid_to_exec_file): Rename as ...
2375 (process_stratum_target::supports_pid_to_exec_file): ... this.
2376 (process_target::pid_to_exec_file): Rename as ...
2377 (process_stratum_target::pid_to_exec_file): ... this.
2378 (process_target::supports_multifs): Rename as ...
2379 (process_stratum_target::supports_multifs): ... this.
2380 (process_target::multifs_open): Rename as ...
2381 (process_stratum_target::multifs_open): ... this.
2382 (process_target::multifs_unlink): Rename as ...
2383 (process_stratum_target::multifs_unlink): ... this.
2384 (process_target::multifs_readlink): Rename as ...
2385 (process_stratum_target::multifs_readlink): ... this.
2386 (process_target::breakpoint_kind_from_pc): Rename as ...
2387 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2388 (process_target::breakpoint_kind_from_current_state): Rename as ...
2389 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2390 (process_target::thread_name): Rename as ...
2391 (process_stratum_target::thread_name): ... this.
2392 (process_target::thread_handle): Rename as ...
2393 (process_stratum_target::thread_handle): ... this.
2394 (process_target::supports_software_single_step): Rename as ...
2395 (process_stratum_target::supports_software_single_step): ... this.
2396 (process_target::supports_catch_syscall): Rename as ...
2397 (process_stratum_target::supports_catch_syscall): ... this.
2398 (process_target::get_ipa_tdesc_idx): Rename as ...
2399 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2400
2401 2020-02-20 Pedro Alves <palves@redhat.com>
2402
2403 * target.cc (set_target_ops): Simply copy the given target pointer
2404 instead of creating a copy of the pointed object.
2405
2406 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2407
2408 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2409 of process_target.
2410
2411 * target.h (struct process_stratum_target): Remove the target op.
2412 (class process_target): Add the target op.
2413 (target_get_ipa_tdesc_idx): Update the macro.
2414 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2415
2416 Update the derived classes and callers below.
2417
2418 * linux-low.cc (linux_target_ops): Update.
2419 (linux_get_ipa_tdesc_idx): Turn into ...
2420 (linux_process_target::get_ipa_tdesc_idx): ... this.
2421 * linux-low.h (class linux_process_target): Update.
2422 * lynx-low.cc (lynx_target_ops): Update.
2423 * nto-low.cc (nto_target_ops): Update.
2424 * win32-low.cc (win32_target_ops): Update.
2425
2426 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2427
2428 Turn process_stratum_target's supports_catch_syscall op into a
2429 method of process_target.
2430
2431 * target.h (struct process_stratum_target): Remove the target op.
2432 (class process_target): Add the target op.
2433 (target_supports_catch_syscall): Update the macro.
2434 * target.cc (process_target::supports_catch_syscall): Define.
2435
2436 Update the derived classes and callers below.
2437
2438 * linux-low.cc (linux_target_ops): Update.
2439 (linux_supports_catch_syscall): Turn into ...
2440 (linux_process_target::supports_catch_syscall): ... this.
2441 * linux-low.h (class linux_process_target): Update.
2442 * lynx-low.cc (lynx_target_ops): Update.
2443 * nto-low.cc (nto_target_ops): Update.
2444 * win32-low.cc (win32_target_ops): Update.
2445
2446 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2447
2448 Turn process_stratum_target's supports_software_single_step op
2449 into a method of process_target.
2450
2451 * target.h (struct process_stratum_target): Remove the target op.
2452 (class process_target): Add the target op.
2453 (target_supports_software_single_step): Update the macro.
2454 * target.cc (process_target::supports_software_single_step): Define.
2455
2456 Update the derived classes and callers below.
2457
2458 * linux-low.cc (linux_target_ops): Update.
2459 (linux_supports_software_single_step): Turn into ...
2460 (linux_process_target::supports_software_single_step): ... this.
2461 * linux-low.h (class linux_process_target): Update.
2462 * lynx-low.cc (lynx_target_ops): Update.
2463 * nto-low.cc (nto_target_ops): Update.
2464 * win32-low.cc (win32_target_ops): Update.
2465
2466 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2467
2468 Turn process_stratum_target's thread_name and thread_handle ops
2469 into methods of process_target.
2470
2471 * target.h (struct process_stratum_target): Remove the target ops.
2472 (class process_target): Add the target ops.
2473 (target_thread_name): Update the macro.
2474 (target_thread_handle): Update the macro.
2475 * target.cc (process_target::thread_name): Define.
2476 (process_target::thread_handle): Define.
2477
2478 Update the derived classes and callers below.
2479
2480 * linux-low.cc (linux_target_ops): Update.
2481 (linux_process_target::thread_name): Define.
2482 (linux_process_target::thread_handle): Define.
2483 * linux-low.h (class linux_process_target): Update.
2484 * lynx-low.cc (lynx_target_ops): Update.
2485 * nto-low.cc (nto_target_ops): Update.
2486 * win32-low.cc (win32_target_ops): Update.
2487
2488 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2489
2490 Turn process_stratum_target's breakpoint_kind_from_pc,
2491 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2492 ops into methods of process_target.
2493
2494 * target.h (struct process_stratum_target): Remove the target op.
2495 (class process_target): Add the target op.
2496 (target_breakpoint_kind_from_pc): Update the macro.
2497 (target_breakpoint_kind_from_current_state): Update the macro.
2498 (default_breakpoint_kind_from_pc): Remove declaration.
2499 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2500 (process_target::breakpoint_kind_from_pc): ... this.
2501 (process_target::breakpoint_kind_from_current_state): Define.
2502
2503 Update the derived classes and callers below.
2504
2505 * mem-break.cc (bp_size): Update.
2506 (bp_opcode): Update.
2507 * linux-low.cc (linux_target_ops): Update.
2508 (linux_wait_1): Update.
2509 (linux_breakpoint_kind_from_pc): Turn into ...
2510 (linux_process_target::breakpoint_kind_from_pc): ... this.
2511 (linux_sw_breakpoint_from_kind): Turn into ...
2512 (linux_process_target::sw_breakpoint_from_kind): ... this.
2513 (linux_breakpoint_kind_from_current_state): Turn into ...
2514 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2515 * linux-low.h (class linux_process_target): Update.
2516 * lynx-low.cc (lynx_target_ops): Update.
2517 (lynx_process_target::sw_breakpoint_from_kind): Define.
2518 * lynx-low.h (class lynx_process_target): Update.
2519 * nto-low.cc (nto_target_ops): Update.
2520 (nto_sw_breakpoint_from_kind): Turn into ...
2521 (nto_process_target::sw_breakpoint_from_kind): ... this.
2522 * nto-low.h (class nto_process_target): Update.
2523 * win32-low.cc (win32_target_ops): Update.
2524 (win32_sw_breakpoint_from_kind): Turn into ...
2525 (win32_process_target::sw_breakpoint_from_kind): ... this.
2526 * win32-low.h (class win32_process_target): Update.
2527
2528 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2529
2530 Turn process_stratum_target's multifs_open, multifs_readlink,
2531 multifs_unlink ops into methods of process_target.
2532
2533 * target.h (struct process_stratum_target): Remove the target ops.
2534 (class process_target): Add the target ops. Also add
2535 'supports_multifs'.
2536 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2537 "sys/stat.h".
2538 (process_target::supports_multifs): Define.
2539 (process_target::multifs_open): Define.
2540 (process_target::multifs_readlink): Define.
2541 (process_target::multifs_unlink): Define.
2542
2543 Update the derived classes and callers below.
2544
2545 * hostio.cc (handle_setfs): Update.
2546 (handle_open): Update.
2547 (handle_unlink): Update.
2548 (handle_readlink): Update.
2549 * linux-low.cc (linux_target_ops): Update.
2550 (linux_process_target::supports_multifs): Define.
2551 (linux_process_target::multifs_open): Define.
2552 (linux_process_target::multifs_readlink): Define.
2553 (linux_process_target::multifs_unlink): Define.
2554 * linux-low.h (class linux_process_target): Update.
2555 * lynx-low.cc (lynx_target_ops): Update.
2556 * nto-low.cc (nto_target_ops): Update.
2557 * win32-low.cc (win32_target_ops): Update.
2558
2559 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2560
2561 Turn process_stratum_target's pid_to_exec_file op into a method
2562 of process_target.
2563
2564 * target.h (struct process_stratum_target): Remove the target op.
2565 (class process_target): Add the target op. Also add
2566 'supports_pid_to_exec_file'.
2567 * target.cc (process_target::pid_to_exec_file): Define.
2568 (process_target::supports_pid_to_exec_file): Define.
2569
2570 Update the derived classes and callers below.
2571
2572 * server.cc (handle_qxfer_exec_file): Update.
2573 (handle_query): Update.
2574 * linux-low.cc (linux_target_ops): Update.
2575 (linux_process_target::supports_pid_to_exec_file): Define.
2576 (linux_process_target::pid_to_exec_file): Define.
2577 * linux-low.h (class linux_process_target): Update.
2578 * lynx-low.cc (lynx_target_ops): Update.
2579 * nto-low.cc (nto_target_ops): Update.
2580 * win32-low.cc (win32_target_ops): Update.
2581
2582 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2583
2584 Turn process_stratum_target's supports_range_stepping op into a
2585 method of process_target.
2586
2587 * target.h (struct process_stratum_target): Remove the target op.
2588 (class process_target): Add the target op.
2589 (target_supports_range_stepping): Update the macro.
2590 * target.cc (process_target::supports_range_stepping): Define.
2591
2592 Update the derived classes and callers below.
2593
2594 * linux-low.cc (linux_target_ops): Update.
2595 (linux_supports_range_stepping): Turn into ...
2596 (linux_process_target::supports_range_stepping): ... this.
2597 * linux-low.h (class linux_process_target): Update.
2598 * lynx-low.cc (lynx_target_ops): Update.
2599 * nto-low.cc (nto_target_ops): Update.
2600 * win32-low.cc (win32_target_ops): Update.
2601
2602 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2603
2604 Turn process_stratum_target's btrace-related ops (enable_btrace,
2605 disable_btrace, read_btrace, read_btrace_conf) into methods of
2606 process_target.
2607
2608 * target.h (struct process_stratum_target): Remove the target ops.
2609 (class process_target): Add the target ops.
2610 (target_enable_btrace): Update.
2611 (target_disable_btrace): Update.
2612 (target_read_btrace): Update.
2613 (target_read_btrace_conf): Update.
2614 * target.cc (process_target::enable_btrace): Define.
2615 (process_target::disable_btrace): Define.
2616 (process_target::read_btrace): Define.
2617 (process_target::read_btrace_conf): Define.
2618
2619 Update the derived classes and callers below.
2620
2621 * linux-low.cc (linux_target_ops): Update.
2622 (linux_process_target:enable_btrace): Define as a wrapper around
2623 linux_enable_btrace.
2624 (linux_low_disable_btrace): Turn into ...
2625 (linux_process_target::disable_btrace): ... this.
2626 (linux_low_read_btrace): Turn into ...
2627 (linux_process_target::read_btrace): ... this.
2628 (linux_low_btrace_conf): Turn into ...
2629 (linux_process_target::read_btrace_conf): ... this.
2630 * linux-low.h (class linux_process_target): Update.
2631 * lynx-low.cc (lynx_target_ops): Update.
2632 * nto-low.cc (nto_target_ops): Update.
2633 * win32-low.cc (win32_target_ops): Update.
2634
2635 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2636
2637 Turn process_stratum_target's supports_agent op into a method of
2638 process_target.
2639
2640 * target.h (struct process_stratum_target): Remove the target op.
2641 (class process_target): Add the target op.
2642 (target_supports_agent): Update the macro.
2643 * target.cc (process_target::supports_agent): Define.
2644
2645 Update the derived classes and callers below.
2646
2647 * linux-low.cc (linux_target_ops): Update.
2648 (linux_supports_agent): Turn into ...
2649 (linux_process_target::supports_agent): ... 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 qxfer_libraries_svr4 op into a
2658 method of process_target.
2659
2660 * target.h (struct process_stratum_target): Remove the target op.
2661 (class process_target): Add the target op. Also add
2662 'supports_qxfer_libraries_svr4'.
2663 * target.cc (process_target::qxfer_libraries_svr4): Define.
2664 (process_target::supports_qxfer_libraries_svr4): Define.
2665
2666 Update the derived classes and callers below.
2667
2668 * server.cc (handle_qxfer_libraries_svr4): Update.
2669 (handle_query): Update.
2670 * linux-low.cc (linux_target_ops): Update.
2671 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2672 (linux_qxfer_libraries_svr4): Turn into ...
2673 (linux_process_target::qxfer_libraries_svr4): ... this.
2674 * linux-low.h (class linux_process_target): Update.
2675 * lynx-low.cc (lynx_target_ops): Update.
2676 * nto-low.cc (nto_target_ops): Update.
2677 * win32-low.cc (win32_target_ops): Update.
2678
2679 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2680
2681 Turn process_stratum_target's supports_disable_randomization op
2682 into a method of process_target.
2683
2684 * target.h (struct process_stratum_target): Remove the target op.
2685 (class process_target): Add the target op.
2686 (target_supports_disable_randomization): Update the macro.
2687 * target.cc (process_target::supports_disable_randomization): Define.
2688
2689 Update the derived classes and callers below.
2690
2691 * linux-low.cc (linux_target_ops): Update.
2692 (linux_supports_disable_randomization): Turn into ...
2693 (linux_process_target::supports_disable_randomization): ... this.
2694 * linux-low.h (class linux_process_target): Update.
2695 * lynx-low.cc (lynx_target_ops): Update.
2696 * nto-low.cc (nto_target_ops): Update.
2697 * win32-low.cc (win32_target_ops): Update.
2698
2699 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2700
2701 Turn process_stratum_target's emit_ops op into a method of
2702 process_target.
2703
2704 * target.h (struct process_stratum_target): Remove the target op.
2705 (class process_target): Add the target op.
2706 (target_emit_ops): Update the macro.
2707 * target.cc (process_target::emit_ops): Define.
2708
2709 Update the derived classes and callers below.
2710
2711 * linux-low.cc (linux_target_ops): Update.
2712 (linux_emit_ops): Turn into ...
2713 (linux_process_target::emit_ops): ... this.
2714 * linux-low.h (class linux_process_target): Update.
2715 * lynx-low.cc (lynx_target_ops): Update.
2716 * nto-low.cc (nto_target_ops): Update.
2717 * win32-low.cc (win32_target_ops): Update.
2718
2719 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2720
2721 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2722 and get_min_fast_tracepoint_insn_len ops into methods of
2723 process_target.
2724
2725 * target.h (struct process_stratum_target): Remove the target ops.
2726 (class process_target): Add the target ops. Also add
2727 'supports_fast_tracepoints'.
2728 (target_supports_fast_tracepoints): Update the macro.
2729 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2730 (install_fast_tracepoint_jump_pad): Update and rename the macro
2731 to ...
2732 (target_install_fast_tracepoint_jump_pad): ... this.
2733 * target.cc (process_target::supports_fast_tracepoints): Define.
2734 (process_target::install_fast_tracepoint_jump_pad): Define.
2735 (process_target::get_min_fast_tracepoint_insn_len): Define.
2736
2737 Update the derived classes and callers below.
2738
2739 * tracepoint.cc (install_fast_tracepoint): Update.
2740 * linux-low.cc (linux_target_ops): Update.
2741 (linux_process_target::supports_fast_tracepoints): Define.
2742 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2743 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2744 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2745 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
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 stabilize_threads op into a
2754 method of process_target.
2755
2756 * target.h (struct process_stratum_target): Remove the target op.
2757 (class process_target): Add the target op.
2758 (target_stabilize_threads): Update the macro.
2759 * target.cc (process_target::stabilize_threads): Define.
2760
2761 Update the derived classes and callers below.
2762
2763 * server.cc (handle_status): Update.
2764 * tracepoint.cc (cmd_qtdp): Update.
2765 (cmd_qtstart): Update.
2766 * linux-low.cc (linux_target_ops): Update.
2767 (linux_stabilize_threads): Turn into ...
2768 (linux_process_target::stabilize_threads): ... this.
2769 (linux_wait_1): Update.
2770 * linux-low.h (class linux_process_target): Update.
2771 * lynx-low.cc (lynx_target_ops): Update.
2772 * nto-low.cc (nto_target_ops): Update.
2773 * win32-low.cc (win32_target_ops): Update.
2774
2775 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2776
2777 Turn process_stratum_target's pause_all and unpause_all ops
2778 into methods of process_target.
2779
2780 * target.h (struct process_stratum_target): Remove the target ops.
2781 (class process_target): Add the target ops.
2782 (pause_all): Update the macro and rename to...
2783 (target_pause_all): ... this.
2784 (unpause_all): Update the macro and rename to...
2785 (target_unpause_all): ... this.
2786 * target.cc (process_target::pause_all): Define.
2787 (process_target::unpause_all): Define.
2788
2789 Update the derived classes and callers below.
2790
2791 * server.cc (handle_status): Update.
2792 * tracepoint.cc (clear_installed_tracepoints): Update.
2793 (cmd_qtdp): Update.
2794 (cmd_qtstart): Update.
2795 (stop_tracing): Update.
2796 (cmd_qtstatus): Update.
2797 (upload_fast_traceframes): Update.
2798 (run_inferior_command): Update.
2799 * linux-low.cc (linux_target_ops): Update.
2800 (linux_pause_all): Turn into ...
2801 (linux_process_target::pause_all): ... this.
2802 (linux_unpause_all): Turn into ...
2803 (linux_process_target::unpause_all): ... this.
2804 (linux_process_target::prepare_to_access_memory): Update.
2805 (linux_process_target::done_accessing_memory): Update.
2806 * linux-low.h (class linux_process_target): Update.
2807 * lynx-low.cc (lynx_target_ops): Update.
2808 * nto-low.cc (nto_target_ops): Update.
2809 * win32-low.cc (win32_target_ops): Update.
2810
2811 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2812
2813 Turn process_stratum_target's get_tib_address op into a method of
2814 process_target.
2815
2816 * target.h (struct process_stratum_target): Remove the target op.
2817 (class process_target): Add the target op. Also add
2818 'supports_get_tib_address'.
2819 * target.cc (process_target::get_tib_address): Define.
2820 (process_target::supports_get_tib_address): Define.
2821
2822 Update the derived classes and callers below.
2823
2824 * server.cc (handle_query): Update.
2825 * linux-low.cc (win32_target_ops): Update.
2826 * lynx-low.cc (lynx_target_ops): Update.
2827 * nto-low.cc (nto_target_ops): Update.
2828 * win32-low.cc (win32_target_ops): Update.
2829 (win32_process_target::supports_get_tib_address): Define.
2830 (win32_get_tib_address): Turn into ...
2831 (win32_process_target::get_tib_address): ... this.
2832 * win32-low.h (class win32_process_target): Update.
2833
2834 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2835
2836 Turn process_stratum_target's thread_stopped op into a method of
2837 process_target.
2838
2839 * target.h (struct process_stratum_target): Remove the target op.
2840 (class process_target): Add the target op. Also add
2841 'supports_thread_stopped'.
2842 (target_thread_stopped): Update the macro.
2843 * target.cc (process_target::thread_stopped): Define.
2844 (process_target::supports_thread_stopped): Define.
2845 (prepare_to_access_memory): Update.
2846
2847 Update the derived classes and callers below.
2848
2849 * server.cc (queue_stop_reply_callback): Update.
2850 * linux-low.cc (linux_target_ops): Update.
2851 (linux_process_target::supports_thread_stopped): Define.
2852 (linux_thread_stopped): Turn into ...
2853 (linux_process_target::thread_stopped): ... 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 read_pc and write_pc ops into
2862 methods of process_target.
2863
2864 * target.h (struct process_stratum_target): Remove the target ops.
2865 (class process_target): Add the target ops.
2866 * target.cc (process_target::read_pc): Define.
2867 (process_target::write_pc): Define.
2868
2869 Update the derived classes and callers below.
2870
2871 * regcache.cc (regcache_read_pc): Update.
2872 (regcache_write_pc): Update.
2873 * linux-low.cc (linux_target_ops): Update.
2874 (linux_read_pc): Turn into ...
2875 (linux_process_target::read_pc): ... this.
2876 (linux_write_pc): Turn into ...
2877 (linux_process_target::write_pc): ... this.
2878 * linux-low.h (class linux_process_target): Update.
2879 * lynx-low.cc (lynx_target_ops): Update.
2880 * nto-low.cc (nto_target_ops): Update.
2881 * win32-low.cc (win32_target_ops): Update.
2882
2883 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2884
2885 Turn process_stratum_target's supports_tracepoints op into a
2886 method of process_target.
2887
2888 * target.h (struct process_stratum_target): Remove the target op.
2889 (class process_target): Add the target op.
2890 (target_supports_tracepoints): Update the macro.
2891 * target.cc (process_target::supports_tracepoints): Define.
2892
2893 Update the derived classes and callers below.
2894
2895 * linux-low.cc (linux_target_ops): Update.
2896 (linux_supports_tracepoints): Turn into ...
2897 (linux_process_target::supports_tracepoints): ... this.
2898 * linux-low.h (class linux_process_target): Update.
2899 * lynx-low.cc (lynx_target_ops): Update.
2900 * nto-low.cc (nto_target_ops): Update.
2901 * win32-low.cc (win32_target_ops): Update.
2902
2903 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2904
2905 Turn process_stratum_target's process_qsupported op into a method
2906 of process_target.
2907
2908 * target.h (struct process_stratum_target): Remove the target op.
2909 (class process_target): Add the target op.
2910 (target_process_qsupported): Update the macro.
2911 * target.cc (process_target::process_qsupported): Define.
2912
2913 Update the derived classes and callers below.
2914
2915 * linux-low.cc (linux_target_ops): Update.
2916 (linux_process_qsupported): Turn into ...
2917 (linux_process_target::process_qsupported): ... 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 read_loadmap 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. Also add
2930 'supports_read_loadmap'.
2931 * target.cc (process_target::read_loadmap): Define.
2932 (process_target::supports_read_loadmap): Define.
2933
2934 Update the derived classes and callers below.
2935
2936 * server.cc (handle_qxfer_fdpic): Update.
2937 (handle_query): Update.
2938 * linux-low.cc (linux_target_ops): Update.
2939 (linux_process_target::supports_read_loadmap): Define.
2940 (linux_read_loadmap): Turn into ...
2941 (linux_process_target::read_loadmap): ... this.
2942 * linux-low.h (class linux_process_target): Update.
2943 * lynx-low.cc (lynx_target_ops): Update.
2944 * nto-low.cc (nto_target_ops): Update.
2945 * win32-low.cc (win32_target_ops): Update.
2946
2947 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2948
2949 Turn process_stratum_target's core_of_thread op into a method of
2950 process_target.
2951
2952 * target.h (struct process_stratum_target): Remove the target op.
2953 (class process_target): Add the target op.
2954 (target_core_of_thread): Update the macro.
2955 * target.cc (process_target::core_of_thread): Define.
2956
2957 Update the derived classes and callers below.
2958
2959 * linux-low.cc (linux_target_ops): Update.
2960 (linux_process_target::core_of_thread): Define.
2961 * linux-low.h (class linux_process_target): Update.
2962 * lynx-low.cc (lynx_target_ops): Update.
2963 * nto-low.cc (nto_target_ops): Update.
2964 * win32-low.cc (win32_target_ops): Update.
2965
2966 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2967
2968 Turn process_stratum_target's handle_monitor_command op into a
2969 method of process_target.
2970
2971 * target.h (struct process_stratum_target): Remove the target op.
2972 (class process_target): Add the target op.
2973 (target_handle_monitor_command): Update the macro.
2974 * target.cc (process_target::handle_monitor_command): Define.
2975
2976 Update the derived classes and callers below.
2977
2978 * server.cc (handle_query): Update.
2979 * linux-low.cc (linux_target_ops): Update.
2980 (linux_process_target::handle_monitor_command): Define.
2981 * linux-low.h (class linux_process_target): Update.
2982 * lynx-low.cc (lynx_target_ops): Update.
2983 * nto-low.cc (nto_target_ops): Update.
2984 * win32-low.cc (win32_target_ops): Update.
2985
2986 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2987
2988 Turn process_stratum_target's handle_new_gdb_connection op into a
2989 method of process_target.
2990
2991 * target.h (struct process_stratum_target): Remove the target op.
2992 (class process_target): Add the target op.
2993 (target_handle_new_gdb_connection): Update the macro.
2994 * target.cc (process_target::handle_new_gdb_connection): Define.
2995
2996 Update the derived classes and callers below.
2997
2998 * linux-low.cc (linux_target_ops): Update.
2999 (linux_handle_new_gdb_connection): Turn into ...
3000 (linux_process_target::handle_new_gdb_connection): ... this.
3001 * linux-low.h (class linux_process_target): Update.
3002 * lynx-low.cc (lynx_target_ops): Update.
3003 * nto-low.cc (nto_target_ops): Update.
3004 * win32-low.cc (win32_target_ops): Update.
3005
3006 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3007
3008 Turn process_stratum_target's supports_fork_events,
3009 supports_vfork_events, and supports_exec_events ops into methods
3010 of process_target.
3011
3012 * target.h (struct process_stratum_target): Remove the target ops.
3013 (class process_target): Add the target ops.
3014 (target_supports_fork_events): Update the macro.
3015 (target_supports_vfork_events): Update the macro.
3016 (target_supports_exec_events): Update the macro.
3017 * target.cc (process_target::supports_fork_events): Define.
3018 (process_target::supports_vfork_events): Define.
3019 (process_target::supports_exec_events): Define.
3020
3021 Update the derived classes and callers below.
3022
3023 * linux-low.cc (linux_target_ops): Update.
3024 (linux_supports_fork_events): Turn into ...
3025 (linux_process_target::supports_fork_events): ... this.
3026 (linux_supports_vfork_events): Turn into ...
3027 (linux_process_target::supports_vfork_events): ... this.
3028 (linux_supports_exec_events): Turn into ...
3029 (linux_process_target::supports_exec_events): ... this.
3030 * linux-low.h (class linux_process_target): Update.
3031 * lynx-low.cc (lynx_target_ops): Update.
3032 * nto-low.cc (nto_target_ops): Update.
3033 * win32-low.cc (win32_target_ops): Update.
3034
3035 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3036
3037 Turn process_stratum_target's supports_multi_process op into a
3038 method of process_target.
3039
3040 * target.h (struct process_stratum_target): Remove the target op.
3041 (class process_target): Add the target op.
3042 * target.cc (process_target::supports_multi_process): Define.
3043 (target_supports_multi_process): Update.
3044
3045 Update the derived classes and callers below.
3046
3047 * linux-low.cc (linux_target_ops): Update.
3048 (linux_supports_multi_process): Turn into ...
3049 (linux_process_target::supports_multi_process): ... this.
3050 * linux-low.h (class linux_process_target): Update.
3051 * lynx-low.cc (lynx_target_ops): Update.
3052 * nto-low.cc (nto_target_ops): Update.
3053 * win32-low.cc (win32_target_ops): Update.
3054
3055 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3056
3057 Turn process_stratum_target's supports_non_stop, async, and
3058 start_non_stop ops into methods of process_target.
3059
3060 * target.h (struct process_stratum_target): Remove the target ops.
3061 (class process_target): Add the target ops.
3062 (target_supports_non_stop): Update the macro.
3063 (target_async): Update the macro.
3064 (start_non_stop): Remove declaration.
3065 * target.cc (process_target::supports_non_stop): Define.
3066 (process_target::async): Define.
3067 (process_target::start_non_stop): Define.
3068 (start_non_stop): Remove.
3069
3070 Update the derived classes and callers below.
3071
3072 * server.cc (handle_qxfer_siginfo): Update.
3073 (handle_query): Update.
3074 * linux-low.cc (linux_target_ops): Update.
3075 (linux_supports_non_stop): Turn into ...
3076 (linux_process_target::supports_non_stop): ... this.
3077 (linux_async): Turn into ...
3078 (linux_process_target::async): ... this.
3079 (linux_start_non_stop): Turn into ...
3080 (linux_process_target::start_non_stop): ... this.
3081 * linux-low.h (class linux_process_target): Update.
3082 * lynx-low.cc (lynx_target_ops): Update.
3083 * nto-low.cc (nto_target_ops): Update.
3084 (nto_supports_non_stop): Remove; rely on the default behavior
3085 instead.
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_siginfo 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_siginfo'.
3096 * target.cc (process_target::qxfer_siginfo): Define.
3097 (process_target::supports_qxfer_siginfo): Define.
3098
3099 Update the derived classes and callers below.
3100
3101 * server.cc (handle_qxfer_siginfo): Update.
3102 (handle_query): Update.
3103 * linux-low.cc (linux_target_ops): Update.
3104 (linux_process_target::supports_qxfer_siginfo): Define.
3105 (linux_xfer_siginfo): Turn into ...
3106 (linux_process_target::qxfer_siginfo): ... 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 qxfer_osdata op into a method of
3115 process_target.
3116
3117 * target.h (struct process_stratum_target): Remove the target op.
3118 (class process_target): Add the target op. Also add
3119 'supports_qxfer_osdata'.
3120 * target.cc (process_target::qxfer_osdata): Define.
3121 (process_target::supports_qxfer_osdata): Define.
3122
3123 Update the derived classes and callers below.
3124
3125 * server.cc (handle_qxfer_osdata): Update.
3126 (handle_query): Update.
3127 * linux-low.cc (linux_target_ops): Update.
3128 (linux_process_target::supports_qxfer_osdata): Define.
3129 (linux_qxfer_osdata): Turn into ...
3130 (linux_process_target::qxfer_osdata): ... this.
3131 * linux-low.h (class linux_process_target): Update.
3132 * lynx-low.cc (lynx_target_ops): Update.
3133 * nto-low.cc (nto_target_ops): Update.
3134 * win32-low.cc (win32_target_ops): Update.
3135
3136 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3137
3138 Turn process_stratum_target's hostio_last_error op into a
3139 method of process_target.
3140
3141 * target.h (struct process_stratum_target): Remove the target op.
3142 (class process_target): Add the target op.
3143 * target.cc: Add "hostio.h" to includes.
3144 (process_target::hostio_last_error): Define.
3145
3146 Update the derived classes and callers below.
3147
3148 * hostio.cc (hostio_error): Update.
3149 * linux-low.cc: Remove "hostio.h" from includes.
3150 (linux_target_ops): Update.
3151 * lynx-low.cc (lynx_target_ops): Update.
3152 * nto-low.cc (nto_target_ops): Update.
3153 * win32-low.h (class win32_process_target): Update.
3154 * win32-low.cc (win32_target_ops): Update.
3155 (wince_hostio_last_error): Turn into ...
3156 (win32_process_target::hostio_last_error): ... this.
3157
3158 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3159
3160 Turn process_stratum_target's get_tls_address op into a method of
3161 process_target.
3162
3163 * target.h (struct process_stratum_target): Remove the target op.
3164 (class process_target): Add the target op. Also add
3165 'supports_get_tls_address'.
3166 * target.cc (process_target::get_tls_address): Define.
3167 (process_target::supports_get_tls_address): Define.
3168
3169 Update the derived classes and callers below.
3170
3171 * server.cc (handle_query): Update.
3172 * linux-low.cc (linux_target_ops): Update.
3173 (linux_process_target::supports_get_tls_address): Define.
3174 (linux_process_target::get_tls_address): Define.
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 read_offsets op into a method of
3183 process_target.
3184
3185 * target.h (struct process_stratum_target): Remove the target op.
3186 (class process_target): Add the target op. Also add
3187 'supports_read_offsets'.
3188 * target.cc (process_target::read_offsets): Define.
3189 (process_target::supports_read_offsets): Define.
3190
3191 Update the derived classes and callers below.
3192
3193 * server.cc (handle_query): Update.
3194 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3195 (linux_target_ops): Update.
3196 (linux_process_target::supports_read_offsets): Define.
3197 (linux_read_offsets): Turn into ...
3198 (linux_process_target::read_offsets): ... this.
3199 * linux-low.h (class linux_process_target): Update.
3200 * lynx-low.cc (lynx_target_ops): Update.
3201 * nto-low.cc (nto_target_ops): Update.
3202 * win32-low.cc (win32_target_ops): Update.
3203
3204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3205
3206 Turn process_stratum_target's stopped_by_watchpoint and
3207 stopped_data_address ops into methods of process_target.
3208
3209 * target.h (struct process_stratum_target): Remove the target ops.
3210 (class process_target): Add the target ops.
3211 * target.cc (process_target::stopped_by_watchpoint): Define.
3212 (process_target::stopped_data_address): Define.
3213
3214 Update the derived classes and callers below.
3215
3216 * remote-utils.cc (prepare_resume_reply): Update.
3217 * linux-low.cc (linux_target_ops): Update.
3218 (linux_stopped_by_watchpoint): Turn into ...
3219 (linux_process_target::stopped_by_watchpoint): ... this.
3220 (linux_stopped_data_address): Turn into ...
3221 (linux_process_target::stopped_data_address): ... this.
3222 * linux-low.h (class linux_process_target): Update.
3223 * lynx-low.cc (lynx_target_ops): Update.
3224 * nto-low.cc (nto_target_ops): Update.
3225 (nto_stopped_by_watchpoint): Turn into ...
3226 (nto_process_target::stopped_by_watchpoint): ... this.
3227 (nto_stopped_data_address): Turn into ...
3228 (nto_process_target::stopped_data_address): ... this.
3229 * nto-low.h (class nto_process_target): Update.
3230 * win32-low.cc (win32_target_ops): Update.
3231 (win32_stopped_by_watchpoint): Turn into ...
3232 (win32_process_target::stopped_by_watchpoint): ... this.
3233 (win32_stopped_data_address): Turn into ...
3234 (win32_process_target::stopped_data_address): ... this.
3235 * win32-low.h (class win32_process_target): Update.
3236
3237 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3238
3239 Turn process_stratum_target's supports_hardware_single_step op into
3240 a method of process_target.
3241
3242 * target.h (struct process_stratum_target): Remove the target op.
3243 (class process_target): Add the target op.
3244 (target_supports_hardware_single_step): Update the macro.
3245 (target_can_do_hardware_single_step): Remove declaration.
3246 * target.cc (process_target::supports_hardware_single_step): Define.
3247 (target_can_do_hardware_single_step): Remove.
3248
3249 Update the derived classes and callers below.
3250
3251 * linux-low.h (class linux_process_target): Update.
3252 * linux-low.cc (linux_target_ops): Update.
3253 (linux_supports_hardware_single_step): Turn into ...
3254 (linux_process_target::supports_hardware_single_step): ... this.
3255 * lynx-low.h (class lynx_process_target): Update.
3256 * lynx-low.cc (lynx_target_ops): Update.
3257 (lynx_process_target::supports_hardware_single_step): Define.
3258 * nto-low.h (class nto_process_target): Update.
3259 * nto-low.cc (nto_target_ops): Update.
3260 (nto_process_target::supports_hardware_single_step): Define.
3261 * win32-low.h (class win32_process_target): Update.
3262 * win32-low.cc (win32_target_ops): Update.
3263 (win32_process_target::supports_hardware_single_step): Define.
3264
3265 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3266
3267 Turn process_stratum_target's {supports_}stopped_by_hw_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_hw_breakpoint): Update the macro.
3273 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3274 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3275 (process_target::supports_stopped_by_hw_breakpoint): Define.
3276
3277 Update the derived classes and callers below.
3278
3279 * linux-low.cc (linux_target_ops): Update.
3280 (linux_stopped_by_hw_breakpoint): Turn into ...
3281 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3282 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3283 (linux_process_target::supports_stopped_by_hw_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 {supports_}stopped_by_sw_breakpoint
3292 ops 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_stopped_by_sw_breakpoint): Update the macro.
3297 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3298 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3299 (process_target::supports_stopped_by_sw_breakpoint): Define.
3300
3301 Update the derived classes and callers below.
3302
3303 * linux-low.cc (linux_target_ops): Update.
3304 (linux_stopped_by_sw_breakpoint): Turn into ...
3305 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3306 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3307 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3308 * linux-low.h (class linux_process_target): Update.
3309 * lynx-low.cc (lynx_target_ops): Update.
3310 * nto-low.cc (nto_target_ops): Update.
3311 * win32-low.cc (win32_target_ops): Update.
3312
3313 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3314
3315 Turn process_stratum_target's insert_point and remove_point ops
3316 into methods of process_target.
3317
3318 * target.h (struct process_stratum_target): Remove the target ops.
3319 (class process_target): Add the target ops.
3320 * target.cc (process_target::insert_point): Define.
3321 (process_target::remove_point): Define.
3322
3323 Update the derived classes and callers below.
3324
3325 * mem-break.cc (set_raw_breakpoint_at): Update.
3326 (delete_raw_breakpoint): Update.
3327 (uninsert_raw_breakpoint): Update.
3328 (reinsert_raw_breakpoint): Update.
3329 * linux-low.cc (linux_target_ops): Update.
3330 (linux_insert_point): Turn into ...
3331 (linux_process_target::insert_point): ... this.
3332 (linux_remove_point): Turn into ...
3333 (linux_process_target::remove_point): ... this.
3334 * linux-low.h (class linux_process_target): Update.
3335 * lynx-low.cc (lynx_target_ops): Update.
3336 * nto-low.cc (nto_target_ops): Update.
3337 (nto_insert_point): Turn into ...
3338 (nto_process_target::insert_point): ... this.
3339 (nto_remove_point): Turn into ...
3340 (nto_process_target::remove_point): ... this.
3341 * nto-low.h (class nto_process_target): Update.
3342 * win32-low.cc (win32_target_ops): Update.
3343 (win32_insert_point): Turn into ...
3344 (win32_process_target::insert_point): ... this.
3345 (win32_remove_point): Turn into ...
3346 (win32_process_target::remove_point): ... this.
3347 * win32-low.h (class win32_process_target): Update.
3348
3349 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3350
3351 Turn process_stratum_target's supports_z_point_type op into a
3352 method of process_target.
3353
3354 * target.h (struct process_stratum_target): Remove the target op.
3355 (class process_target): Add the target op.
3356 * target.cc (process_target::supports_z_point_type): Define.
3357
3358 Update the derived classes and callers below.
3359
3360 * mem-break.cc (z_type_supported): Update.
3361 * linux-low.cc (linux_target_ops): Update.
3362 (linux_supports_z_point_type): Turn into ...
3363 (linux_process_target::supports_z_point_type): ... this.
3364 * linux-low.h (class linux_process_target): Update.
3365 * lynx-low.cc (lynx_target_ops): Update.
3366 * nto-low.cc (nto_target_ops): Update.
3367 (nto_supports_z_point_type): Turn into ...
3368 (nto_process_target::supports_z_point_type): ... this.
3369 * nto-low.h (class nto_process_target): Update.
3370 * win32-low.cc (win32_target_ops): Update.
3371 (win32_supports_z_point_type): Turn into ...
3372 (win32_process_target::supports_z_point_type): ... this.
3373 * win32-low.h (class win32_process_target): Update.
3374
3375 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3376
3377 Turn process_stratum_target's read_auxv op into a method of
3378 process_target.
3379
3380 * target.h (class process_stratum_target): Remove the target op.
3381 (struct process_target): Add the target op. Also add
3382 'supports_read_auxv'.
3383 * target.cc (process_target::read_auxv): Define.
3384 (process_target::supports_read_auxv): Define.
3385
3386 Update the derived classes and callers below.
3387
3388 * server.cc (handle_qxfer_auxv): Update.
3389 (handle_query): Update.
3390 * linux-low.cc (linux_target_ops): Update.
3391 (linux_process_target::supports_read_auxv): Define.
3392 (linux_read_auxv): Turn into ...
3393 (linux_process_target::read_auxv): ... this.
3394 * linux-low.h (class linux_process_target): Update.
3395 * lynx-low.cc (lynx_target_ops): Update.
3396 * nto-low.cc (nto_target_ops): Update.
3397 (nto_process_target::supports_read_auxv): Define.
3398 (nto_read_auxv): Turn into ...
3399 (nto_process_target::read_auxv): ... this.
3400 * nto-low.h (class nto_process_target): Update.
3401 * win32-low.cc (win32_target_ops): Update.
3402
3403 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3404
3405 Turn process_stratum_target's request_interrupt op into a method of
3406 process_target.
3407
3408 * target.h (struct process_stratum_target): Remove the target op.
3409 (class process_target): Add the target op.
3410
3411 Update the derived classes and callers below.
3412
3413 * remote-utils.cc (putpkt_binary_1): Update.
3414 (input_interrupt): Update.
3415 (getpkt): Update.
3416 * server.cc (handle_v_requests): Update.
3417 * linux-low.cc (linux_target_ops): Update.
3418 (linux_request_interrupt): Turn into ...
3419 (linux_process_target::request_interrupt): ... this.
3420 * linux-low.h (class linux_process_target): Update.
3421 * lynx-low.cc (lynx_target_ops): Update.
3422 (lynx_request_interrupt): Turn into ...
3423 (lynx_process_target::request_interrupt): ... this.
3424 * lynx-low.h (class lynx_process_target): Update.
3425 * nto-low.cc (nto_target_ops): Update.
3426 (nto_request_interrupt): Turn into ...
3427 (nto_process_target::request_interrupt): ... this.
3428 * nto-low.h (class nto_process_target): Update.
3429 * win32-low.cc (win32_target_ops): Update.
3430 (win32_request_interrupt): Turn into ...
3431 (win32_process_target::request_interrupt): ... this.
3432 * win32-low.h (class win32_process_target): Update.
3433
3434 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3435
3436 Turn process_stratum_target's look_up_symbols op into a method of
3437 process_target.
3438
3439 * target.h (struct process_stratum_target): Remove the target op.
3440 (class process_target): Add the target op.
3441 * target.cc (process_target::look_up_symbols): Define.
3442
3443 Update the derived classes and callers below.
3444
3445 * server.cc (handle_query): Update.
3446 * linux-low.cc (linux_target_ops): Update.
3447 (linux_look_up_symbols): Turn into ...
3448 (linux_process_target::look_up_symbols): ... this.
3449 * linux-low.h (class linux_process_target): Update.
3450 * lynx-low.cc (lynx_target_ops): Update.
3451 * nto-low.cc (nto_target_ops): Update.
3452 * win32-low.cc (win32_target_ops): Update.
3453
3454 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3455
3456 Turn process_stratum_target's read_memory and write_memory
3457 ops into methods of process_target.
3458
3459 * target.h (struct process_stratum_target): Remove the target ops.
3460 (class process_target): Add the target ops.
3461
3462 Update the derived classes and callers below.
3463
3464 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3465 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3466 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3467 (arm_get_syscall_trapinfo): Update.
3468 * linux-cris-low.cc (cris_breakpoint_at): Update.
3469 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3470 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3471 * linux-mips-low.cc (mips_breakpoint_at): Update.
3472 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3473 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3474 * linux-sh-low.cc (sh_breakpoint_at): Update.
3475 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3476 (sparc_store_gregset_from_stack): Update.
3477 (sparc_breakpoint_at): Update.
3478 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3479 * linux-tile-low.cc (tile_breakpoint_at): Update.
3480 * linux-x86-low.cc (x86_breakpoint_at): Update.
3481 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3482 * mem-brea.cc (insert_memory_breakpoint): Update.
3483 (validate_inserted_breakpoint): Update.
3484 * target.cc (read_inferior_memory): Update.
3485 (target_write_memory): Update.
3486 * linux-low.cc (linux_target_ops): Update.
3487 (linux_read_memory): Make a wrapper around the read_memory target
3488 op call.
3489 (linux_process_target::read_memory): Rename from linux_read_memory.
3490 (linux_write_memory): Turn into ...
3491 (linux_process_target::write_memory): ... this.
3492 * linux-low.h (class linux_process_target): Update.
3493 * lynx-low.cc (lynx_target_ops): Update.
3494 (lynx_read_memory): Turn into ...
3495 (lynx_process_target::read_memory): ... this.
3496 (lynx_write_memory): Turn into ...
3497 (lynx_process_target::write_memory): ... this.
3498 * lynx-low.h (class lynx_process_target): Update.
3499 * nto-low.cc (nto_target_ops): Update.
3500 (nto_read_memory): Turn into ...
3501 (nto_process_target::read_memory): ... this.
3502 (nto_write_memory): Turn into ...
3503 (nto_process_target::write_memory): ... this.
3504 * nto-low.h (class nto_process_target): Update.
3505 * win32-low.cc (win32_target_ops): Update.
3506 (win32_read_inferior_memory): Turn into ...
3507 (win32_process_target::read_memory): ... this.
3508 (win32_write_inferior_memory): Turn into ...
3509 (win32_process_target::write_memory): ... this.
3510 * win32-low.h (class win32_process_target): Update.
3511
3512 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3513
3514 Turn process_stratum_target's prepare_to_access_memory and
3515 done_accessing_memory 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 * target.cc (process_target::prepare_to_access_memory): Define.
3520 (process_target::done_accessing_memory): Define.
3521 (prepare_to_access_memory): Update.
3522 (done_accessing_memory): Update.
3523
3524 Update the derived classes and callers below.
3525
3526 * linux-low.cc (linux_target_ops): Update.
3527 (linux_prepare_to_access_memory): Turn into ...
3528 (linux_process_target::prepare_to_access_memory): ... this.
3529 (linux_done_accessing_memory): Turn into ...
3530 (linux_process_target::done_accessing_memory): ... this.
3531 * linux-low.h (class linux_process_target): Update.
3532 * lynx-low.cc (lynx_target_ops): Update.
3533 * nto-low.cc (nto_target_ops): Update.
3534 * win32-low.cc (win32_target_ops): Update.
3535
3536 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3537
3538 Turn process_stratum_target's fetch_registers and store_registers
3539 ops into methods of process_target.
3540
3541 * target.h (struct process_stratum_target): Remove the target ops.
3542 (class process_target): Add the target ops.
3543 (fetch_inferior_registers): Update the macro.
3544 (store_inferior_registers): Update the macro.
3545
3546 Update the derived classes and callers below.
3547
3548 * linux-low.cc (linux_target_ops): Update.
3549 (linux_fetch_registers): Turn into ...
3550 (linux_process_target::fetch_registers): ... this.
3551 (linux_store_registers): Turn into ...
3552 (linux_process_target::store_registers): ... this.
3553 * linux-low.h (class linux_process_target): Update.
3554 * lynx-low.cc (lynx_target_ops): Update.
3555 (lynx_fetch_registers): Turn into ...
3556 (lynx_process_target::fetch_registers): ... this.
3557 (lynx_store_registers): Turn into ...
3558 (lynx_process_target::store_registers): ... this.
3559 * lynx-low.h (class lynx_process_target): Update.
3560 * nto-low.cc (nto_target_ops): Update.
3561 (nto_fetch_registers): Turn into ...
3562 (nto_process_target::fetch_registers): ... this.
3563 (nto_store_registers): Turn into ...
3564 (nto_process_target::store_registers): ... this.
3565 * nto-low.h (class nto_process_target): Update.
3566 * win32-low.cc (win32_target_ops): Update.
3567 (win32_fetch_inferior_registers): Turn into ...
3568 (win32_process_target::fetch_registers): ... this.
3569 (win32_store_inferior_registers): Turn into ...
3570 (win32_process_target::store_registers): ... this.
3571 * win32-low.h (class win32_process_target): Update.
3572
3573 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3574
3575 Turn process_stratum_target's wait op into a method of
3576 process_target.
3577
3578 * target.h (struct process_stratum_target): Remove the target op.
3579 (class process_target): Add the target op.
3580
3581 Update the derived classes and callers below.
3582
3583 * target.cc (target_wait): Update.
3584 * linux-low.cc (linux_target_ops): Update.
3585 (linux_wait): Turn into ...
3586 (linux_process_target::wait): ... this.
3587 * linux-low.h (class linux_process_target): Update.
3588 * lynx-low.cc (lynx_target_ops): Update.
3589 (lynx_wait): Turn into ...
3590 (lynx_process_target::wait): ... this.
3591 * lynx-low.h (class lynx_process_target): Update.
3592 * nto-low.cc (nto_target_ops): Update.
3593 (nto_wait): Turn into ...
3594 (nto_process_target::wait): ... this.
3595 * nto-low.h (class nto_process_target): Update.
3596 * win32-low.cc (win32_target_ops): Update.
3597 (win32_wait): Turn into ...
3598 (win32_process_target::wait): ... this.
3599 (do_initial_child_stuff): Update.
3600 * win32-low.h (class win32_process_target): Update.
3601
3602 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3603
3604 Turn process_stratum_target's resume op into a method of
3605 process_target.
3606
3607 * target.h (struct process_stratum_target): Remove the target op.
3608 (class process_target): Add the target op.
3609
3610 Update the derived classes and callers below.
3611
3612 * server.cc (resume): Update.
3613 * target.cc (target_stop_and_wait): Update.
3614 (target_continue_no_signal): Update.
3615 (target_continue): Update.
3616 * linux-low.cc (linux_target_ops): Update.
3617 (linux_resume): Turn into ...
3618 (linux_process_target::resume): ... this.
3619 * linux-low.h (class linux_process_target): Update.
3620 * lynx-low.cc (lynx_target_ops): Update.
3621 (lynx_resume): Turn into ...
3622 (lynx_process_target::resume): ... this.
3623 * lynx-low.h (class lynx_process_target): Update.
3624 * nto-low.cc (nto_target_ops): Update.
3625 (nto_resume): Turn into ...
3626 (nto_process_target::resume): ... this.
3627 * nto-low.h (class nto_process_target): Update.
3628 * win32-low.cc (win32_target_ops): Update.
3629 (win32_resume): Turn into ...
3630 (win32_process_target::resume): ... this.
3631 (win32_process_target::detach): Update.
3632 (do_initial_child_stuff): Update.
3633 * win32-low.h (class win32_process_target): Update.
3634
3635 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3636
3637 Turn process_stratum_target's thread_alive op into a method of
3638 process_target.
3639
3640 * target.h (struct process_stratum_target): Remove the target op.
3641 (class process_target): Add the target op.
3642 (mythread_alive): Update the macro.
3643
3644 Update the derived classes and callers below.
3645
3646 * linux-low.cc (linux_target_ops): Update.
3647 (linux_thread_alive): Turn into ...
3648 (linux_process_target::thread_alive): ... this.
3649 (wait_for_sigstop): Update.
3650 * linux-low.h (class linux_process_target): Update.
3651 * lynx-low.cc (lynx_target_ops): Update.
3652 (lynx_thread_alive): Turn into ...
3653 (lynx_process_target::thread_alive): ... this.
3654 * lynx-low.h (class lynx_process_target): Update.
3655 * nto-low.cc (nto_target_ops): Update.
3656 (nto_thread_alive): Turn into ...
3657 (nto_process_target::thread_alive): ... this.
3658 * nto-low.h (class nto_process_target): Update.
3659 * win32-low.cc (win32_target_ops): Update.
3660 (win32_thread_alive): Turn into ...
3661 (win32_process_target::thread_alive): ... this.
3662 * win32-low.h (class win32_process_target): Update.
3663
3664 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3665
3666 Turn process_stratum_target's join op into a method of
3667 process_target.
3668
3669 * target.h (struct process_stratum_target): Remove the target op.
3670 (class process_target): Add the target op.
3671 (join_inferior): Update the macro.
3672
3673 Update the derived classes and callers below.
3674
3675 * linux-low.cc (linux_target_ops): Update.
3676 (linux_join): Turn into ...
3677 (linux_process_target::join): ... this.
3678 * linux-low.h (class linux_process_target): Update.
3679 * lynx-low.cc (lynx_target_ops): Update.
3680 (lynx_join): Turn into ...
3681 (lynx_process_target::join): ... this.
3682 * lynx-low.h (class lynx_process_target): Update.
3683 * nto-low.cc (nto_target_ops): Update.
3684 (nto_process_target::join): Define.
3685 * nto-low.h (class nto_process_target): Update.
3686 * win32-low.cc (win32_target_ops): Update.
3687 (win32_join): Turn into ...
3688 (win32_process_target::join): ... this.
3689 * win32-low.h (class win32_process_target): Update.
3690
3691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3692
3693 Turn process_stratum_target's mourn op into a method of
3694 process_target.
3695
3696 * target.h (struct process_stratum_target): Remove the target op.
3697 (class process_target): Add the target op.
3698
3699 Update the derived classes and callers below.
3700
3701 * target.cc (target_mourn_inferior): Update.
3702 * linux-low.cc (linux_target_ops): Update.
3703 (linux_mourn): Turn into ...
3704 (linux_process_target::mourn): ... this.
3705 (handle_extended_wait): Update.
3706 (linux_process_target::kill): Update.
3707 (linux_process_target::detach): Update.
3708 * linux-low.h (class linux_process_target): Update.
3709 * lynx-low.cc (lynx_target_ops): Update.
3710 (lynx_mourn): Turn into ...
3711 (lynx_process_target::mourn): ... this.
3712 * lynx-low.h (class lynx_process_target): Update.
3713 * nto-low.cc (nto_target_ops): Update.
3714 (nto_mourn): Turn into ...
3715 (nto_process_target::mourn): ... this.
3716 * nto-low.h (class nto_process_target): Update.
3717 * win32-low.cc (win32_target_ops): Update.
3718 (win32_mourn): Turn into ...
3719 (win32_process_target::mourn): ... this.
3720 * win32-low.h (class win32_process_target): Update.
3721
3722 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3723
3724 Turn process_stratum_target's detach op into a method of
3725 process_target.
3726
3727 * target.h (struct process_stratum_target): Remove the target op.
3728 (class process_target): Add the target op.
3729 (detach_inferior): Update the macro.
3730
3731 Update the derived classes and callers below.
3732
3733 * linux-low.cc (linux_target_ops): Update.
3734 (linux_detach): Turn into ...
3735 (linux_process_target::detach): ... this.
3736 * linux-low.h (class linux_process_target): Update.
3737 * lynx-low.cc (lynx_target_ops): Update.
3738 (lynx_detach): Turn into ...
3739 (lynx_process_target::detach): ... this.
3740 * lynx-low.h (class lynx_process_target): Update.
3741 * nto-low.cc (nto_target_ops): Update.
3742 (nto_detach): Turn into ...
3743 (nto_process_target::detach): ... this.
3744 * nto-low.h (class nto_process_target): Update.
3745 * win32-low.cc (win32_target_ops): Update.
3746 (win32_detach): Turn into ...
3747 (win32_process_target::detach): ... this.
3748 * win32-low.h (class win32_process_target): Update.
3749
3750 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3751
3752 Turn process_stratum_target's kill op into a method of
3753 process_target.
3754
3755 * target.h (struct process_stratum_target): Remove the target op.
3756 (class process_target): Add the target op.
3757
3758 Update the derived classes and callers below.
3759
3760 * target.cc (kill_inferior): Update.
3761 * linux-low.cc (linux_target_ops): Update.
3762 (linux_kill): Turn into ...
3763 (linux_process_target::kill): ... this.
3764 * linux-low.h (class linux_process_target): Update.
3765 * lynx-low.cc (lynx_target_ops): Update.
3766 (lynx_kill): Turn into ...
3767 (lynx_process_target::kill): ... this.
3768 * lynx-low.h (class lynx_process_target): Update.
3769 * nto-low.cc (nto_target_ops): Update.
3770 (nto_kill): Turn into ...
3771 (nto_process_target::kill): ... this.
3772 * nto-low.h (class nto_process_target): Update.
3773 * win32-low.cc (win32_target_ops): Update.
3774 (win32_kill): Turn into ...
3775 (win32_process_target::kill): ... this.
3776 * win32-low.h (class win32_process_target): Update.
3777
3778 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3779
3780 Turn process_stratum_target's attach op into a method of
3781 process_target.
3782
3783 * target.h (struct process_stratum_target): Remove the target op.
3784 (class process_target): Add the target op.
3785 (myattach): Update the macro.
3786
3787 Update the derived classes and callers below.
3788
3789 * linux-low.cc (linux_target_ops): Update.
3790 (linux_attach): Turn into ...
3791 (linux_process_target::attach): ... this.
3792 * linux-low.h (class linux_process_target): Update.
3793 * lynx-low.cc (lynx_target_ops): Update.
3794 (lynx_attach): Turn into ...
3795 (lynx_process_target::attach): ... this.
3796 * lynx-low.h (class lynx_process_target): Update.
3797 * nto-low.cc (nto_target_ops): Update.
3798 (nto_attach): Turn into ...
3799 (nto_process_target::attach): ... this.
3800 * nto-low.h (class nto_process_target): Update.
3801 * win32-low.cc (win32_target_ops): Update.
3802 (win32_attach): Turn into ...
3803 (win32_process_target::attach): ... this.
3804 * win32-low.h (class win32_process_target): Update.
3805
3806 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3807
3808 Turn process_stratum_target's post_create_inferior op into a method
3809 of process_target.
3810
3811 * target.h (struct process_stratum_target): Remove the target op.
3812 (class process_target): Add the target op.
3813 (target_post_create_inferior): Update the macro.
3814 * target.cc (process_target::post_create_inferior): Define.
3815
3816 Update the derived classes and callers below.
3817
3818 * linux-low.cc (linux_target_ops): Update.
3819 (linux_post_create_inferior): Turn into ...
3820 (linux_process_target::post_create_inferior): ... this.
3821 * linux-low.h (class linux_process_target): Update.
3822 * lynx-low.cc (lynx_target_ops): Update.
3823 * nto-low.cc (nto_target_ops): Update.
3824 * win32-low.cc (win32_target_ops): Update.
3825
3826 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3827
3828 Turn process_stratum_target's create_inferior op into a method of
3829 process_target.
3830
3831 * target.h (struct process_stratum_target): Remove the target op.
3832 (class process_target): Add the target op.
3833 (create_inferior): Rename the macro to ...
3834 (target_create_inferior): ... this.
3835
3836 Update the derived classes and callers below.
3837
3838 * server.cc (handle_v_run): Update.
3839 (captured_main): Update.
3840 (process_serial_event): Update.
3841 * linux-low.cc (linux_target_ops): Update.
3842 (linux_create_inferior): Turn into ...
3843 (linux_process_target::create_inferior): ... this.
3844 * linux-low.h (class linux_process_target): Update.
3845 * lynx-low.cc (lynx_target_ops): Update.
3846 (lynx_create_inferior): Turn into ...
3847 (lynx_process_target::create_inferior): ... this.
3848 * lynx-low.h (class lynx_process_target): Update.
3849 * nto-low.cc (nto_target_ops): Update.
3850 (nto_create_inferior): Turn into ...
3851 (nto_process_target::create_inferior): ... this.
3852 * nto-low.h (class nto_process_target): Update.
3853 * win32-low.cc (win32_target_ops): Update.
3854 (win32_create_inferior): Turn into ...
3855 (win32_process_target::create_inferior): ... this.
3856 * win32-low.h (class win32_process_target): Update.
3857
3858 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3859
3860 * target.h (class process_target): New class definition.
3861 (struct process_stratum_target) <pt>: New field with type
3862 'process_target*'.
3863 * linux-low.h (class linux_process_target): Define as a derived
3864 class of 'process_target'.
3865 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3866 as the 'pt' field.
3867 * lynx-low.h (class lynx_process_target): Define as a derived
3868 class of 'process_target'.
3869 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3870 as the 'pt' field.
3871 * nto-low.h (class nto_process_target): Define as a derived
3872 class of 'process_target'.
3873 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3874 as the 'pt' field.
3875 * win32-low.h (class win32_process_target): Define as a derived
3876 class of 'process_target'.
3877 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3878 as the 'pt' field.
3879
3880 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3881
3882 * configure: Regenerate.
3883
3884 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3885 Andrew Burgess <andrew.burgess@embecosm.com>
3886
3887 * linux-riscv-low.cc: New file.
3888 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3889 and nat/riscv-linux-tdesc.c.
3890 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3891 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3892 Define.
3893
3894 2020-02-14 Tom Tromey <tom@tromey.com>
3895
3896 * acinclude.m4: Don't include acx_configure_dir.m4.
3897 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3898 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3899 (all, install-only, uninstall, clean-info, clean)
3900 (maintainer-clean): Don't recurse.
3901 (subdir_do, all-lib): Remove.
3902 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3903 (GNULIB_H): Remove.
3904 (generated_files): Update.
3905 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3906 * configure: Rebuild.
3907 * configure.ac: Don't configure gnulib or libiberty.
3908 (GNULIB): Update.
3909
3910 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3911
3912 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3913 preparing the command line for CreateProcess.
3914 (win32_create_inferior): Reflect the program name in debugging
3915 output that shows the process and its command line.
3916
3917 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3918
3919 * Makefile.in: Rename source files from .c to .cc.
3920 * %.c: Rename to %.cc.
3921 * configure.ac: Rename server.c to server.cc.
3922 * configure: Re-generate.
3923
3924 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3925
3926 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3927
3928 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3929
3930 * win32-low.c (win32_create_inferior): Set signal_pid.
3931
3932 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3933 Pedro Alves <palves@redhat.com>
3934
3935 Skip building gdbserver in a cross-configuration.
3936 * configure.srv: Set $gdbserver_host depending on whether $target
3937 is $host. Use $gdbserver_host instead of $host.
3938
3939 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3940
3941 * configure: Re-generate.
3942
3943 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3944
3945 * configure: Re-generate.
3946
3947 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3948
3949 * acinclude.m4: Update warning.m4 path.
3950
3951 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3952
3953 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3954 (handle_exception): Set siginfo_er.
3955 (win32_xfer_siginfo): New function.
3956
3957 2020-02-07 Tom Tromey <tom@tromey.com>
3958 Pedro Alves <palves@redhat.com>
3959
3960 * README: Update build documentation.
3961 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3962 host, not target.
3963 * configure.ac: Update paths.
3964 * configure: Rebuild.
3965 * acinclude.m4: Update paths.
3966 * Makefile.in: Update include paths.
3967 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3968 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3969 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3970 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3971 (%-generated.c): Update paths.
3972 * Move entire directory from ../gdb/gdbserver.
3973
3974 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3975
3976 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3977
3978 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3979
3980 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3981 assignment instead of srv_linux_obj.
3982
3983 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3984
3985 * server.c (handle_qxfer_libraries): Write segment-address with
3986 paddress.
3987
3988 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3989
3990 * Makefile.in (install-strip): New target.
3991 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3992 * aclocal.m4: Regenerate.
3993 * configure: Regenerate.
3994 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3995
3996 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3997
3998 * Makefile.in (SFILES): Adjust paths to point to real files.
3999 (OBS): Move waitstatus.o to target/waitstatus.o.
4000 (TAGS): Transform paths appropriately.
4001 (%.o): Rename to...
4002 (nat/%.o): ... this pattern rule.
4003 (%.o): Rename to...
4004 (target/%.o): ... this pattern rule.
4005 * configure.srv: Adjust paths throughout to include nat/ prefix
4006 with the revant files.
4007 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4008 * configure: Regenerate.
4009
4010 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4011
4012 * Makefile.in (TAGS): Remove config files from the recipe.
4013
4014 2020-01-14 Tom Tromey <tom@tromey.com>
4015
4016 * configure: Rebuild.
4017 * configure.ac: Remove any checks that were added to common.m4.
4018 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4019 lib-link.m4.
4020
4021 2020-01-14 Tom Tromey <tom@tromey.com>
4022
4023 * server.h: Include config.h.
4024 * gdbreplay.c: Include config.h.
4025 * configure: Rebuild.
4026 * configure.ac: Don't source common.host.
4027 * acinclude.m4: Update path.
4028 * Makefile.in (INCSUPPORT): New variable.
4029 (INCLUDE_CFLAGS): Add INCSUPPORT.
4030 (SFILES): Update paths.
4031 (version-generated.c): Update path to create-version.sh.
4032 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4033
4034 2020-01-14 Tom Tromey <tom@tromey.com>
4035
4036 * configure.ac (LIBS): Use WIN32APILIBS.
4037 (USE_WIN32API): Don't define.
4038 * configure: Rebuild.
4039
4040 2020-01-14 Tom Tromey <tom@tromey.com>
4041
4042 * configure: Rebuild.
4043
4044 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4045
4046 * Makefile.in (%-generated.c): Remove rule for files from
4047 regformats/i386.
4048
4049 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4050
4051 * configure: Re-generate.
4052
4053 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4054
4055 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4056 Define to static.
4057 * tracepoint.c (stop_tracing, flush_trace_buffer,
4058 about_to_request_buffer_space, get_trace_state_variable_value,
4059 set_trace_state_variable_value, gdb_collect): Add declaration.
4060
4061 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4062
4063 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4064 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4065 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4066 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4067 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4068 static.
4069
4070 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4071
4072 * inferiors.c: Include gdbsupport/common-inferior.h.
4073
4074 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4075
4076 * hostio-errno.c: Include hostio.h.
4077
4078 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4079
4080 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4081 prerequisite.
4082
4083 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4084
4085 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4086 * linux-arm-tdesc.h: Include arch/arm.h.
4087
4088 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4089
4090 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4091
4092 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4093
4094 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4095 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4096
4097 2020-01-10 Pedro Alves <palves@redhat.com>
4098
4099 * fork-child.c (post_fork_inferior): Pass target down to
4100 startup_inferior.
4101 * inferiors.c (switch_to_thread): Add process_stratum_target
4102 parameter.
4103 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4104 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4105 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4106 * remote-utils.c (prepare_resume_reply): Pass the target to
4107 switch_to_thread.
4108 * target.c (the_target): Now a process_stratum_target.
4109 (done_accessing_memory): Pass the target to switch_to_thread.
4110 (set_target_ops): Ajust to use process_stratum_target.
4111 * target.h (struct target_ops): Rename to ...
4112 (struct process_stratum_target): ... this.
4113 (the_target, set_target_ops): Adjust.
4114 (prepare_to_access_memory): Adjust comment.
4115 * win32-low.c (child_xfer_memory): Adjust to use
4116 process_stratum_target.
4117 (win32_target_ops): Now a process_stratum_target.
4118
4119 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4120 Pedro Alves <palves@redhat.com>
4121
4122 * win32-low.c (get_child_debug_event): Extract the fatal exception
4123 from the exit status and convert to the equivalent Posix signal
4124 number.
4125 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4126 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4127
4128 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4129
4130 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4131
4132 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4133
4134 * server.c (gdbserver_version): Change copyright year to 2020.
4135 * gdbreplay.c (gdbreplay_version): Likewise.
4136
4137 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4138
4139 * configure: Regenerate.
4140 * configure.ac: Quote variable arguments of test.
4141
4142 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4143
4144 * Makefile.in: Fix build with GNU Make 3.81
4145
4146 2019-12-16 Tom Tromey <tromey@adacore.com>
4147
4148 * server.c (get_exec_file): Constify result.
4149
4150 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4151
4152 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4153 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4154 * config.in: Regenerate.
4155 * configure: Regenerate.
4156 * configure.ac: Don't check for strerror.
4157 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4158 Call safe_strerror instead of strerror.
4159 * server.h (strerror): Remove this now-unnecessary declaration.
4160 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4161 strerror.
4162 (gdb_agent_helper_thread): Likewise.
4163 * utils.c (perror_with_name): Likewise.
4164
4165 2019-11-26 Tom Tromey <tom@tromey.com>
4166
4167 * configure, config.in: Rebuild.
4168
4169 2019-11-26 Tom Tromey <tom@tromey.com>
4170
4171 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4172 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4173 gdb_sigmask.
4174 * configure, config.in: Rebuild.
4175
4176 2019-11-26 Tom Tromey <tom@tromey.com>
4177
4178 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4179 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4180 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4181 * acinclude.m4: Include ax_pthread.m4.
4182 * config.in, configure: Rebuild.
4183
4184 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4185
4186 * debug.c (debug_set_output): Call safe_strerror instead of
4187 strerror.
4188 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4189 (linux_kill_one_lwp): Likewise.
4190 (linux_detach_one_lwp): Likewise.
4191 (linux_wait_for_event_filtered): Likewise.
4192 (store_register): Likewise.
4193 * lynx-low.c (lynx_attach): Likewise.
4194 * mem-break.c (insert_memory_breakpoint): Likewise.
4195 (remove_memory_breakpoint): Likewise.
4196 (delete_fast_tracepoint_jump): Likewise.
4197 (set_fast_tracepoint_jump): Likewise.
4198 (uninsert_fast_tracepoint_jumps_at): Likewise.
4199 (reinsert_fast_tracepoint_jumps_at): Likewise.
4200 * nto-low.c (nto_xfer_memory): Likewise.
4201 (nto_resume): Likewise.
4202
4203 2019-11-20 Luis Machado <luis.machado@linaro.org>
4204
4205 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4206 instead of register count.
4207 * tdesc.c (tdesc_contains_feature): New function.
4208 * tdesc.h (tdesc_contains_feature): New prototype.
4209
4210 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4211
4212 * Makefile.in: Add safe-strerror.c.
4213 * configure: Regenerate.
4214 * configure.ac: Don't source common.host.
4215
4216 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4217
4218 * config.in: Regenerate.
4219 * configure: Regenerate.
4220
4221 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4222
4223 * ax.c (ax_printf): Handle size_t_arg.
4224
4225 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4226
4227 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4228 * mi/mi-main.c (output_cores): Likewise.
4229 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4230 (linux_xfer_osdata_modules): Likewise.
4231 * remote.c (register_remote_support_xml): Likewise.
4232 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4233 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4234
4235 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4236
4237 * configure: Regenerate.
4238 * configure.ac: Remove check for strerror_r.
4239
4240 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4241
4242 * config.in: Regenerate.
4243 * configure: Regenerate.
4244 * configure.ac: Also check for strerror_r.
4245
4246 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4247
4248 * ax.h (debug_agent): Remove duplicate declaration.
4249
4250 2019-10-26 Tom de Vries <tdevries@suse.de>
4251
4252 * linux-aarch64-low.c: Fix typos in comments.
4253 * linux-arm-low.c: Same.
4254 * linux-low.c: Same.
4255 * linux-ppc-low.c: Same.
4256 * proc-service.c: Same.
4257 * regcache.h: Same.
4258 * server.c: Same.
4259 * tracepoint.c: Same.
4260 * win32-low.c: Same.
4261
4262 2019-10-25 Tom Tromey <tromey@adacore.com>
4263
4264 * utils.c (xstrdup): Remove.
4265
4266 2019-10-23 Tom Tromey <tom@tromey.com>
4267
4268 * configure, config.in: Rebuild.
4269
4270 2019-10-23 Tom Tromey <tom@tromey.com>
4271
4272 * configure: Rebuild.
4273 * acinclude.m4: Use m4_include, not sinclude.
4274
4275 2019-10-17 Tom Tromey <tromey@adacore.com>
4276
4277 * configure: Rebuild.
4278 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4279 in AC_CONFIG_FILES invocation.
4280 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4281 invocation.
4282
4283 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4284
4285 * server.c: Include xml-builtin.h.
4286 (get_xml_features): Don't declare xml_builtins here.
4287
4288 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4289
4290 * Makefile.in: Remove references to vec-ipa.o.
4291
4292 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4293
4294 * Makefile.in: Remove references to vec.c.
4295
4296 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4297
4298 * server.c (server_waiting): Change to bool.
4299 (extended_protocol): Likewise.
4300 (response_needed): Likewise.
4301 (exit_requested): Likewise.
4302 (run_once): Likewise.
4303 (report_no_resumed): Likewise.
4304 (non_stop): Likewise.
4305 (disable_packet_vCont): Likewise.
4306 (disable_packet_Tthread): Likewise.
4307 (disable_packet_qC): Likewise.
4308 (disable_packet_qfThreadInfo): Likewise.
4309 (handle_general_set): Update.
4310 (handle_detach): Update.
4311 (handle_monitor_command): Update.
4312 (handle_query): Update.
4313 (captured_main): Update.
4314 (process_serial_event): Update.
4315 * server.h (server_waiting): Change to bool.
4316 (disable_packet_vCont): Likewise.
4317 (disable_packet_Tthread): Likewise.
4318 (disable_packet_qC): Likewise.
4319 (disable_packet_qfThreadInfo): Likewise.
4320 (run_once): Likewise.
4321 (non_stop): Likewise.
4322 * target.c (target_stop_and_wait): Update.
4323
4324 2019-10-02 Tom Tromey <tromey@adacore.com>
4325
4326 * Makefile.in (SFILES): Add common-inferior.c.
4327 (OBS): Add common-inferior.o.
4328 * server.c (startup_with_shell): Don't define.
4329
4330 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4331
4332 * linux-low.c (linux_low_read_btrace): Update for change to
4333 std::vector.
4334
4335 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4336
4337 * debug.c (debug_threads): Remove comment in favor of the header.
4338 * debug.h (using_threads): Add declaration.
4339 (debug_threads): Add comment.
4340 * linux-aarch64-low.c: Include debug.h and remove declaration of
4341 debug_threads.
4342 * nto-low.c: Likewise.
4343 * remote-utils.c: Likewise.
4344 * thread-db.c: Likewise.
4345
4346 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4347
4348 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4349 and powerpc-cell64l-ipa.o.
4350 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4351 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4352 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4353 (spu*-*-*): Remove.
4354
4355 * spu-low.c: Remove file.
4356
4357 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4358 (parse_spufs_run): Remove.
4359 (ppc_get_pc): Remove Cell/B.E. support.
4360 (ppc_set_pc): Likewise.
4361 (ppc_breakpoint_at): Likewise.
4362 (ppc_arch_setup): Likewise.
4363 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4364 tdesc_powerpc_cell32l.
4365 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4366 or init_registers_powerpc_cell32l.
4367 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4368 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4369 or init_registers_powerpc_cell32l.
4370 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4371 (init_registers_powerpc_cell32l): Remove prototype.
4372 (init_registers_powerpc_cell64l): Likewise.
4373
4374 * target.h (struct target_ops): Remove qxfer_spu member.
4375 * server.c (handle_qxfer_spu): Remove.
4376 (qxfer_packets): Remove entry for "spu".
4377 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4378 * linux-low.c (SPUFS_MAGIC): Remove.
4379 (spu_enumerate_spu_ids): Remove.
4380 (linux_qxfer_spu): Remove.
4381 (linux_target_ops): Remove qxfer_spu member.
4382 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4383 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4384 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4385
4386 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4387
4388 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4389 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4390 * config.in: Regenerate.
4391 * configure: Regenerate.
4392
4393 2019-08-15 Tom Tromey <tromey@adacore.com>
4394
4395 * target.c (target_write_memory): Use gdb::byte_vector.
4396
4397 2019-08-15 Tom Tromey <tromey@adacore.com>
4398
4399 * tracepoint.c (write_inferior_data_pointer)
4400 (write_inferior_integer, write_inferior_int8)
4401 (write_inferior_uinteger, m_tracepoint_action_download)
4402 (r_tracepoint_action_download, x_tracepoint_action_download)
4403 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4404 (download_agent_expr, download_tracepoint_1)
4405 (download_trace_state_variables, upload_fast_traceframes): Update.
4406 * server.c (gdb_write_memory): Update.
4407 * remote-utils.c (relocate_instruction): Update.
4408 * proc-service.c (ps_pdwrite): Update.
4409 * mem-break.c (remove_memory_breakpoint)
4410 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4411 (uninsert_fast_tracepoint_jumps_at)
4412 (reinsert_fast_tracepoint_jumps_at): Update.
4413 * linux-x86-low.c (append_insns)
4414 (i386_install_fast_tracepoint_jump_pad)
4415 (amd64_write_goto_address, i386_write_goto_address): Update.
4416 * linux-s390-low.c (append_insns, s390_write_goto_address):
4417 Update.
4418 * linux-ppc-low.c (ppc_relocate_instruction)
4419 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4420 (ppc_write_goto_address): Update.
4421 * linux-aarch64-low.c (append_insns): Update.
4422 * target.h (struct target_ops): Update.
4423 (write_inferior_memory): Don't declare.
4424 * target.c (target_write_memory): Rename from
4425 write_inferior_memory. Remove old target_write_memory.
4426
4427 2019-08-15 Tom Tromey <tromey@adacore.com>
4428
4429 * target.c (write_inferior_memory): Use std::vector.
4430
4431 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4432
4433 PR build/24886
4434 * configure.ac: Drop enable-libmcheck support.
4435 * configure, config.in: Rebuild.
4436 * acinclude.m4: Don't include it.
4437
4438 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4439
4440 * configure.srv: Remove Arm xml files.
4441
4442 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4443
4444 * configure.srv: Add new files. Remove xml generated files.
4445 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4446 registers.
4447 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4448 * linux-aarch32-tdesc.c: New file.
4449 * linux-aarch32-tdesc.h: New file.
4450 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4451 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4452 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4453 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4454 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4455 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4456 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4457 (arm_read_description): Call arm_linux_read_description.
4458 (initialize_low_arch): Don't init registers.
4459 * linux-arm-tdesc.c: New file.
4460 * linux-arm-tdesc.h: New file.
4461
4462 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4463
4464 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4465 Move counter inside for.
4466 (arm_read_description): Check ptrace earlier.
4467 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4468
4469 2019-07-09 Tom Tromey <tom@tromey.com>
4470
4471 * configure: Rebuild.
4472 * configure.ac: Change common to gdbsupport.
4473 * acinclude.m4: Change common to gdbsupport.
4474 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4475 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4476 common to gdbsupport.
4477 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4478 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4479 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4480 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4481 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4482 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4483 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4484 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4485 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4486 common to gdbsupport.
4487
4488 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4489
4490 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4491 defines.
4492 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4493
4494 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4495
4496 * configure.srv: Remove legacy xml.
4497 * linux-aarch64-low.c (initialize_low_arch): Remove
4498 initialize_low_tdesc call.
4499 * linux-aarch64-tdesc-selftest.c: Remove file.
4500 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4501 * linux-x86-low.c (initialize_low_arch): Remove
4502 initialize_low_tdesc call.
4503 * linux-x86-tdesc-selftest.c: Remove file.
4504 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4505
4506 2019-06-20 Tom de Vries <tdevries@suse.de>
4507
4508 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4509 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4510
4511 2019-06-19 Tom de Vries <tdevries@suse.de>
4512
4513 * debug.h (debug_write): Change return type to ssize_t.
4514 * debug.c (debug_write): Same.
4515
4516 2019-06-14 Tom Tromey <tom@tromey.com>
4517
4518 * configure.ac: Use new path to gnulib.
4519 * configure: Rebuild.
4520 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4521 to gnulib.
4522
4523 2019-06-11 Tom Tromey <tom@tromey.com>
4524
4525 * Makefile.in (SFILES): Add alloc.c.
4526 (OBS): Add alloc.o.
4527 (IPA_OBJS): Add alloc-ipa.o.
4528 (alloc-ipa.o): New target.
4529 (%.o: ../%.c): New pattern rule.
4530
4531 2019-06-10 Tom Tromey <tromey@adacore.com>
4532
4533 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4534 end warning with a newline.
4535 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4536 newline.
4537 * thread-db.c (attach_thread): Don't end warning with a newline.
4538 (thread_db_notice_clone): Likewise.
4539 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4540 newline.
4541 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4542 end warning with a newline.
4543
4544 2019-06-04 Pedro Alves <palves@redhat.com>
4545
4546 * server.c (captured_main): Use make_unique_xstrdup.
4547
4548 2019-06-02 Tom Tromey <tom@tromey.com>
4549
4550 * gdbreplay.c (fromhex): Remove.
4551 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4552
4553 2019-05-29 Tom Tromey <tromey@adacore.com>
4554
4555 * configure: Rebuild.
4556
4557 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4558
4559 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4560 sign extension code on 32-bit builds.
4561
4562 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4563
4564 * remote-utils.c:
4565 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4566
4567 2019-04-19 Tom Tromey <tom@tromey.com>
4568
4569 * server.c (struct vstop_notif): Derive from notif_event.
4570 <base>: Remove.
4571 (queue_stop_reply): Update.
4572 (remove_all_on_match_ptid): Change type. Rewrite.
4573 (discard_queued_stop_replies): Rewrite.
4574 (in_queued_stop_replies_ptid): Change type.
4575 (in_queued_stop_replies): Rewrite.
4576 (notif_stop): Update.
4577 (queue_stop_reply_callback): Update.
4578 (captured_main): Don't call initialize_notif.
4579 (push_stop_notification): Update.
4580 * notif.c (notif_write_event, handle_notif_ack)
4581 (notif_event_enque, notif_push): Update.
4582 (notif_event_xfree, initialize_notif): Remove.
4583 * notif.h (struct notif_event): Include <list>, not
4584 "common/queue.h".
4585 (struct notif_server) <queue>: Now a std::list.
4586 (notif_event_p): Remove typedef.
4587 (initialize_notif): Don't declare.
4588 (struct notif_event): Add virtual destructor.
4589
4590 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4591
4592 * ax.c (ax_vdebug): Call debug_printf.
4593 * debug.c (debug_write): New function.
4594 * debug.h (debug_write): New declaration.
4595 * linux-low.c (sigchld_handler): Call debug_write.
4596
4597 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4598
4599 * debug.c (debug_set_output): New function.
4600 (debug_vprintf): Send output to debug_file.
4601 (debug_flush): Likewise.
4602 * debug.h (debug_set_output): New declaration.
4603 * server.c (handle_monitor_command): Add debug-file option.
4604 (captured_main): Likewise.
4605
4606 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4607
4608 * debug.c (remote_debug): Add definition.
4609 * debug.h (remote_debug): Add declaration.
4610 * hostio.c (remote_debug): Remove declaration.
4611 * remote-utils.c (struct ui_file): Likewise.
4612 (remote_debug): Likewise.
4613 * remote-utils.h (remote_debug): Likewise,
4614 * server.c (remote_debug): Remove definition.
4615
4616 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4617
4618 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4619 when using a 64-bit gdbserver.
4620
4621 2019-04-09 Tom Tromey <tromey@adacore.com>
4622
4623 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4624
4625 2019-04-08 Tom Tromey <tom@tromey.com>
4626
4627 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4628 throw.
4629 (linux_resume_one_lwp): Likewise.
4630
4631 2019-04-08 Tom Tromey <tom@tromey.com>
4632
4633 * gdbreplay.c: Update.
4634 * linux-low.c: Update.
4635 * server.c: Update.
4636
4637 2019-04-08 Tom Tromey <tom@tromey.com>
4638
4639 * server.c: Use C++ exception handling.
4640 * linux-low.c: Use C++ exception handling.
4641 * gdbreplay.c: Use C++ exception handling.
4642
4643 2019-04-08 Tom Tromey <tom@tromey.com>
4644
4645 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4646 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4647 (captured_main, main): Update.
4648 * gdbreplay.c (main): Update.
4649
4650 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4651
4652 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4653 value in argument pointer, return 1 if the entry is found and 0
4654 otherwise. Move comment.
4655 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4656 * linux-low.h (linux_get_auxv): Declare.
4657 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4658
4659 2019-04-05 Tom Tromey <tromey@adacore.com>
4660
4661 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4662 variables.
4663
4664 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4665
4666 * linux-low.c (AT_HWCAP2): Add define if not already included.
4667
4668 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4669
4670 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4671 (aarch64_arch_setup): Call linux_get_hwcap.
4672 * linux-arm-low.c (arm_get_hwcap): Remove function.
4673 (arm_read_description): Call linux_get_hwcap.
4674 * linux-low.c (linux_get_auxv): New function.
4675 (linux_get_hwcap): Likewise.
4676 (linux_get_hwcap2): Likewise.
4677 * linux-low.h (linux_get_hwcap): New declaration.
4678 (linux_get_hwcap2): Likewise.
4679 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4680 (ppc_arch_setup): Call linux_get_hwcap.
4681 * linux-s390-low.c (s390_get_hwcap): Remove function.
4682 (s390_arch_setup): Call linux_get_hwcap.
4683
4684 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4685 Jiong Wang <jiong.wang@arm.com>
4686
4687 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4688 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4689 to fail.
4690 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4691
4692 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4693 Jiong Wang <jiong.wang@arm.com>
4694
4695 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4696 (aarch64_get_hwcap): New function.
4697 (aarch64_arch_setup): Read APIA hwcap.
4698
4699 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4700 Jiong Wang <jiong.wang@arm.com>
4701
4702 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4703 (initialize_low_tracepoint): Likewise.
4704 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4705 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4706 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4707 (aarch64_linux_read_description): Likewise.
4708 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4709
4710 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4711
4712 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4713 i386_create_target_description for 'segments' parameter.
4714 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4715 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4716 * win32-i386-low.c (i386_arch_setup): Likewise.
4717
4718 2019-03-12 Tom Tromey <tromey@adacore.com>
4719
4720 * linux-low.c (iterate_over_lwps): Update.
4721
4722 2019-03-06 Tom Tromey <tom@tromey.com>
4723
4724 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4725 (captured_main): Use SCOPE_EXIT.
4726
4727 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4728
4729 * configure.srv: Use '$enable_unittest' instead of '$development'
4730 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4731 case.
4732
4733 2019-02-27 Tom Tromey <tromey@adacore.com>
4734
4735 * gdbreplay.c (logchar): Handle \r\n.
4736
4737 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4738
4739 * linux-low.c (linux_attach): Add process before lwp.
4740 * server.c (attach_inferior): Check if already attached.
4741
4742 2019-02-07 Tom Tromey <tom@tromey.com>
4743
4744 * x86-tdesc.h: Rename include guard.
4745 * x86-low.h: Add include guard.
4746 * wincecompat.h: Rename include guard.
4747 * win32-low.h: Add include guard.
4748 * utils.h: Rename include guard.
4749 * tracepoint.h: Rename include guard.
4750 * tdesc.h: Rename include guard.
4751 * target.h: Rename include guard.
4752 * server.h: Rename include guard.
4753 * remote-utils.h: Rename include guard.
4754 * regcache.h: Rename include guard.
4755 * nto-low.h: Rename include guard.
4756 * notif.h: Add include guard.
4757 * mem-break.h: Rename include guard.
4758 * lynx-low.h: Add include guard.
4759 * linux-x86-tdesc.h: Add include guard.
4760 * linux-s390-tdesc.h: Add include guard.
4761 * linux-ppc-tdesc-init.h: Add include guard.
4762 * linux-low.h: Add include guard.
4763 * linux-aarch64-tdesc.h: Add include guard.
4764 * linux-aarch32-low.h: Add include guard.
4765 * inferiors.h: Rename include guard.
4766 * i387-fp.h: Rename include guard.
4767 * hostio.h: Rename include guard.
4768 * gdbthread.h: Rename include guard.
4769 * gdb_proc_service.h: Rename include guard.
4770 * event-loop.h: Rename include guard.
4771 * dll.h: Rename include guard.
4772 * debug.h: Rename include guard.
4773 * ax.h: Rename include guard.
4774
4775 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4776
4777 PR gdb/23985
4778 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4779 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4780
4781 2019-01-25 Tom Tromey <tom@tromey.com>
4782
4783 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4784
4785 2019-01-25 Tom Tromey <tom@tromey.com>
4786
4787 * win32-low.c: Fix common/ includes.
4788 * win32-i386-low.c: Fix common/ includes.
4789 * tracepoint.c: Fix common/ includes.
4790 * thread-db.c: Fix common/ includes.
4791 * target.h: Fix common/ includes.
4792 * symbol.c: Fix common/ includes.
4793 * spu-low.c: Fix common/ includes.
4794 * server.h: Fix common/ includes.
4795 * server.c: Fix common/ includes.
4796 * remote-utils.c: Fix common/ includes.
4797 * regcache.h: Fix common/ includes.
4798 * regcache.c: Fix common/ includes.
4799 * nto-x86-low.c: Fix common/ includes.
4800 * notif.h: Fix common/ includes.
4801 * mem-break.h: Fix common/ includes.
4802 * lynx-low.c: Fix common/ includes.
4803 * lynx-i386-low.c: Fix common/ includes.
4804 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4805 * linux-x86-low.c: Fix common/ includes.
4806 * linux-low.c: Fix common/ includes.
4807 * inferiors.h: Fix common/ includes.
4808 * i387-fp.c: Fix common/ includes.
4809 * hostio.c: Fix common/ includes.
4810 * hostio-errno.c: Fix common/ includes.
4811 * gdbthread.h: Fix common/ includes.
4812 * gdbreplay.c: Fix common/ includes.
4813 * fork-child.c: Fix common/ includes.
4814 * event-loop.c: Fix common/ includes.
4815 * ax.c:
4816 (enum gdb_agent_op): Fix common/ includes.
4817
4818 2019-01-21 Tom Tromey <tom@tromey.com>
4819
4820 * tracepoint.c: Fix includes.
4821 * remote-utils.c: Fix includes.
4822 * linux-x86-low.c: Fix includes.
4823
4824 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4825
4826 * gdbreplay.c (gdbreplay_version): Update copyright year in
4827 version message.
4828 * server.c (gdbserver_version): Likewise.
4829
4830 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4831
4832 * linux-low.c (add_lwp): Switch ordering.
4833
4834 2018-11-29 Tom Tromey <tom@tromey.com>
4835
4836 * win32-low.c (win32_join): Take pid, not process.
4837 * target.h (struct target_ops) <join>: Change argument type.
4838 (join_inferior): Change argument name.
4839 * spu-low.c (spu_join): Take pid, not process.
4840 * server.c (handle_detach): Preserve pid before destroying
4841 process.
4842 * lynx-low.c (lynx_join): Take pid, not process.
4843 * linux-low.c (linux_join): Take pid, not process.
4844
4845 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4846
4847 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4848 (aarch64_cannot_fetch_register): Likewise.
4849 (struct linux_target_ops): Update references.
4850
4851 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4852
4853 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4854
4855 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4856
4857 * configure.srv (ipa_ppc_linux_regobj): Add
4858 powerpc-isa207-htm-vsx32l-ipa.o and
4859 powerpc-isa207-htm-vsx64l-ipa.o.
4860 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4861 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4862 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4863 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4864 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4865 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4866 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4867 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4868 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4869 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4870 (init_registers_powerpc_isa207_htm_vsx32l)
4871 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4872 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4873 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4874 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4875 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4876 (ppc_store_tm_ctarregset): New functions.
4877 (ppc_regsets): Add entries for HTM regsets.
4878 (ppc_arch_setup): Set htm in features struct when needed. Set
4879 sizes for the HTM regsets.
4880 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4881 (initialize_low_arch): Call
4882 init_registers_powerpc_isa207_htm_vsx32l and
4883 init_registers_powerpc_isa207_htm_vsx64l.
4884 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4885 PPC_TDESC_ISA207_HTM_VSX.
4886 (initialize_low_tracepoint): Call
4887 init_registers_powerpc_isa207_htm_vsx32l and
4888 init_registers_powerpc_isa207_htm_vsx64l.
4889
4890 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4891
4892 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4893 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4894 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4895 (ppc_store_pmuregset): New functions.
4896 (ppc_regsets): Add entries for ebb and pmu regsets.
4897 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4898 pmu regsets are available. Set sizes for these regsets.
4899
4900 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4901
4902 * configure.srv (ipa_ppc_linux_regobj): Add
4903 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4904 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4905 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4906 rs6000/powerpc-isa207-vsx32l.xml, and
4907 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4908 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4909 <PPC_TDESC_ISA207_VSX>: New enum value.
4910 (init_registers_powerpc_isa207_vsx32l): Declare.
4911 (init_registers_powerpc_isa207_vsx64l): Declare.
4912 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4913 (ppc_store_tarregset): New function.
4914 (ppc_regsets): Add entry for the TAR regset.
4915 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4916 size for the TAR regsets.
4917 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4918 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4919 and init_registers_powerpc_isa207_vsx64l.
4920 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4921 (initialize_low_tracepoint): Call
4922 init_registers_powerpc_isa207_vsx32l and
4923 init_registers_powerpc_isa207_vsx64l.
4924
4925 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4926 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4927
4928 * configure.srv (ipa_ppc_linux_regobj): Add
4929 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4930 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4931 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4932 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4933 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4934 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4935 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4936 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4937 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4938 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4939 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4940 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4941 (ppc_hwcap): Add comment.
4942 (ppc_hwcap2): New global.
4943 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4944 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4945 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4946 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4947 when needed. Set sizes for the the DSCR and PPR regsets.
4948 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4949 (initialize_low_arch): Call
4950 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4951 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4952 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4953 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4954 (initialize_low_tracepoint): Call
4955 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4956 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4957
4958 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4959
4960 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4961
4962 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4963 Simon Marchi <simark@simark.ca>
4964
4965 * acinclude.m4: Include "../selftest.m4".
4966 * configure: Regenerate.
4967 * configure.ac: Use "GDB_AC_SELFTEST".
4968 * configure.srv: Use "$enable_unittests" instead of
4969 "$development" when checking whether unit tests have been
4970 enabled.
4971 * server.c (captured_main): Update message informing that
4972 selftests have been disabled.
4973
4974 2018-10-04 Tom Tromey <tom@tromey.com>
4975
4976 * configure: Rebuild.
4977
4978 2018-10-04 Tom Tromey <tom@tromey.com>
4979
4980 * server.c (handle_status): Rename inner "thread".
4981 (process_serial_event): Declare "res" in 'm' case.
4982 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4983 (iterate_over_lwps): Rename inner "thread".
4984 (linux_qxfer_libraries_svr4): Rename inner "len".
4985 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4986
4987 2018-10-01 Gary Benson <gbenson@redhat.com>
4988
4989 * gdb_proc_service.h: Moved common code to
4990 common/gdb_proc_service.h.
4991
4992 2018-10-01 Gary Benson <gbenson@redhat.com>
4993
4994 * gdb_proc_service.h: Synchronize comments and whitespace with
4995 GDB's version of this file.
4996
4997 2018-09-25 Tom Tromey <tom@tromey.com>
4998
4999 * configure: Rebuild.
5000 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5001
5002 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5003
5004 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5005 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5006 ($(IPA_LIB)): Sort IPA_OBJS.
5007
5008 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5009
5010 * Makefile.in: Remove references to $(ADD_DEPS).
5011
5012 2018-09-16 Tom Tromey <tom@tromey.com>
5013
5014 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5015 variables.
5016 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5017 variables.
5018
5019 2018-09-05 Tom Tromey <tom@tromey.com>
5020
5021 * configure: Rebuild.
5022
5023 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5024
5025 PR build/23399
5026 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5027
5028 2018-08-27 Tom Tromey <tom@tromey.com>
5029
5030 PR build/23087:
5031 * configure: Rebuild.
5032
5033 2018-08-27 Tom Tromey <tom@tromey.com>
5034
5035 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5036 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5037 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5038 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5039 (s390x_emit_stack_adjust): Add casts to unsigned char.
5040
5041 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5042
5043 PR gdb/23374
5044 PR gdb/23375
5045 * server.h (struct client_state) <disable_randomization>:
5046 Initialize to 1.
5047
5048 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5049
5050 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5051 variable.
5052 (mips_supply_ptrace_register): Likewise.
5053
5054 2018-07-22 Tom Tromey <tom@tromey.com>
5055
5056 * configure: Rebuild.
5057
5058 2018-07-22 Tom Tromey <tom@tromey.com>
5059
5060 * win32-low.c (win32_create_inferior): Remove unused variables.
5061 * gdbreplay.c (remote_open): Remove unused variable.
5062 * remote-utils.c (remote_prepare): Remove unused variable.
5063 * x86-tdesc.h (X86_TDESC_H): Define.
5064 (amd64_expedite_regs): Define conditionally.
5065 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5066 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5067 * remote-utils.c (readchar): Remove unused variable.
5068
5069 2018-07-13 Pedro Alves <palves@redhat.com>
5070
5071 * linux-low.c (linux_kill): Change parameter to process_info
5072 pointer instead of pid. Adjust.
5073 * lynx-low.c (lynx_kill): Likewise.
5074 * nto-low.c (nto_kill): Likewise.
5075 * spu-low.c (spu_kill): Likewise.
5076 * win32-low.c (win32_kill): Likewise.
5077 * server.c (handle_v_kill, kill_inferior_callback)
5078 (detach_or_kill_for_exit): Adjust.
5079 * target.c (kill_inferior): Change parameter to process_info
5080 pointer instead of pid. Adjust.
5081 * target.h (struct target_ops) <kill>: Change parameter to
5082 process_info pointer instead of pid. Adjust all implementations
5083 and callers.
5084 (kill_inferior): Likewise.
5085
5086 2018-07-13 Pedro Alves <palves@redhat.com>
5087
5088 * linux-low.c (linux_detach, linux_join): Change parameter to
5089 process_info pointer instead of pid. Adjust.
5090 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5091 * nto-low.c (nto_detach): Likewise.
5092 * spu-low.c (spu_detach, spu_join): Likewise.
5093 * win32-low.c (win32_detach, win32_join): Likewise.
5094 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5095 * target.h (struct target_ops) <detach, join>: Change parameter to
5096 process_info pointer instead of pid. Adjust all implementations
5097 and callers.
5098 (detach_inferior, join_inferior): Rename 'pid' parameter to
5099 'proc'.
5100
5101 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5102 Jan Kratochvil <jan.kratochvil@redhat.com>
5103 Paul Fertser <fercerpav@gmail.com>
5104 Tsutomu Seki <sekiriki@gmail.com>
5105
5106 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5107 (OBS): Add 'common/netstuff.o'.
5108 (GDBREPLAY_OBS): Likewise.
5109 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5110 (remote_open): Implement support for IPv6
5111 connections.
5112 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5113 and 'wspiapi.h'.
5114 (handle_accept_event): Accept connections from IPv6 sources.
5115 (remote_prepare): Handle IPv6-style hostnames; implement
5116 support for IPv6 connections.
5117 (remote_open): Implement support for printing connections from
5118 IPv6 sources.
5119
5120 2018-07-11 Pedro Alves <palves@redhat.com>
5121
5122 PR gdb/23377
5123 * mem-break.c (any_persistent_commands): Add process_info
5124 parameter and use it instead of relying on the current process.
5125 Change return type to bool.
5126 * mem-break.h (any_persistent_commands): Add process_info
5127 parameter and change return type to bool.
5128 * server.c (handle_detach): Remove require_running_or_return call.
5129 Look up the process_info for the process we're about to detach.
5130 If not found, return back error to GDB. Adjust
5131 any_persistent_commands call to pass down a process pointer.
5132
5133 2018-07-11 Pedro Alves <palves@redhat.com>
5134
5135 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5136 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5137 instead of collect_register_by_name.
5138 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5139 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5140
5141 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5142 Pedro Alves <palves@redhat.com>
5143
5144 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5145
5146 2018-07-03 Tom Tromey <tom@tromey.com>
5147
5148 * linux-low.c: Update.
5149 * lynx-low.c: Update.
5150 * mem-break.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 * win32-low.c: Update.
5157
5158 2018-07-03 Tom Tromey <tom@tromey.com>
5159
5160 * server.c: Update.
5161
5162 2018-07-03 Tom Tromey <tom@tromey.com>
5163
5164 * linux-low.c: Update.
5165
5166 2018-07-03 Tom Tromey <tom@tromey.com>
5167
5168 * target.c: Update.
5169
5170 2018-07-03 Tom Tromey <tom@tromey.com>
5171
5172 * linux-low.c: Update.
5173 * linux-mips-low.c: Update.
5174 * lynx-low.c: Update.
5175 * nto-low.c: Update.
5176 * remote-utils.c: Update.
5177 * server.c: Update.
5178 * spu-low.c: Update.
5179 * target.c: Update.
5180 * thread-db.c: Update.
5181
5182 2018-07-03 Tom Tromey <tom@tromey.com>
5183
5184 * linux-low.c: Update.
5185 * linux-mips-low.c: Update.
5186 * lynx-low.c: Update.
5187 * mem-break.c: Update.
5188 * nto-low.c: Update.
5189 * remote-utils.c: Update.
5190 * server.c: Update.
5191 * spu-low.c: Update.
5192 * target.c: Update.
5193 * tracepoint.c: Update.
5194
5195 2018-07-03 Tom Tromey <tom@tromey.com>
5196
5197 * linux-low.c: Update.
5198 * linux-ppc-low.c: Update.
5199 * linux-x86-low.c: Update.
5200 * proc-service.c: Update.
5201 * server.c: Update.
5202 * spu-low.c: Update.
5203 * thread-db.c: Update.
5204 * win32-low.c: Update.
5205
5206 2018-07-03 Tom Tromey <tom@tromey.com>
5207
5208 * linux-low.c: Update.
5209 * lynx-low.c: Update.
5210 * nto-low.c: Update.
5211 * remote-utils.c: Update.
5212 * spu-low.c: Update.
5213 * thread-db.c: Update.
5214 * win32-low.c: Update.
5215
5216 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5217
5218 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5219 parameter in call to 'amd64_create_target_description'.
5220
5221 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5222
5223 * x86-tdesc.h: Remove executable permission flag.
5224
5225 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5226
5227 * configure.ac: Remove AC_PREREQ, add missing quoting.
5228 * configure: Re-generate.
5229 * config.in: Re-generate.
5230 * aclocal.m4: Re-generate.
5231
5232 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5233
5234 * tracepoint.h (current_traceframe): Remove declaration.
5235
5236 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5237
5238 * linux-aarch64-low.c (is_sve_tdesc): New function.
5239 (aarch64_sve_regs_copy_to_regcache): Likewise.
5240 (aarch64_sve_regs_copy_from_regcache): Likewise.
5241 (aarch64_regs_info): Add SVE checks.
5242 (initialize_low_arch): Initialize SVE.
5243
5244 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5245
5246 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5247
5248 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5249
5250 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5251 (initialize_low_tracepoint): Likewise
5252 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5253 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5254 param.
5255 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5256 checks.
5257 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5258
5259 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5260
5261 * server.h (PBUFSIZ): Increase size
5262
5263 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5264
5265 * regcache.c (regcache::raw_compare): New function.
5266 * regcache.h (regcache::raw_compare): New declaration.
5267
5268 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5269
5270 * regcache.c (new_register_cache): Use new.
5271 (free_register_cache): Use delete.
5272 (register_data): Use const.
5273 (supply_register): Move body inside regcache.
5274 (regcache::raw_supply): New override function.
5275 (collect_register): Move body inside regcache.
5276 (regcache::raw_collect): New override function.
5277 (regcache::get_register_status): New override function.
5278 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5279
5280 2018-06-09 Tom Tromey <tom@tromey.com>
5281
5282 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5283 declare queue.
5284 (event_queue): Use std::queue.
5285 (gdb_event_xfree): Remove.
5286 (initialize_event_loop, process_event, wait_for_event): Update.
5287
5288 2018-06-08 Stan Cox <scox@redhat.com>
5289
5290 * win32-low.c (win32_create_inferior): last_ptid and last_status
5291 moved to client_state.
5292
5293 2018-06-08 Pedro Alves <palves@redhat.com>
5294
5295 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5296 common/common-exceptions.o, common/common-utils.o,
5297 common/errors.o, common/print-utils.o and utils.o.
5298 * gdbreplay.c: Include "common-defs.h" instead of the two
5299 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5300 string.h or alloca.h.
5301 (perror_with_name): Delete.
5302 (remote_open): Use xstrdup instead of strdup.
5303 (main): Rename to ...
5304 (captured_main): ... this.
5305 (main): New.
5306
5307 2018-06-08 Tom Tromey <tom@tromey.com>
5308
5309 * linux-low.c (linux_low_read_btrace): Update.
5310
5311 2018-06-04 Stan Cox <scox@redhat.com>
5312
5313 * server.h (struct client_state): New.
5314 * server.c (cont_thread, general_thread, multi_process)
5315 (report_fork_events, report_vfork_events, report_exec_events)
5316 (report_thread_events, swbreak_feature, hwbreak_feature)
5317 (vCont_supported, disable_randomization, pass_signals)
5318 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5319 Moved to client_state.
5320 * remote-utils.c (remote_debug, noack_mode)
5321 (transport_is_reliable): Moved to client_state.
5322 * tracepoint.c (current_traceframe): Moved to client_state.
5323
5324 Update all callers.
5325 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5326 linux-low.c, remote-utils.h, target.c: Use client_state.
5327
5328 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5329
5330 * configure.srv: Add new c/h file.
5331
5332 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5333
5334 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5335 null VQ.
5336
5337 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5338
5339 * gdb.arch/mips-fpregset-core.exp: New test.
5340 * gdb.arch/mips-fpregset-core.c: New test source.
5341
5342 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5343
5344 PR server/23198
5345 * hostio.c (require_int): Do not report overflow for integers
5346 between 0xfffffff and 0x7fffffff.
5347
5348 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5349
5350 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5351 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5352 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5353 functions.
5354 (the_low_target): Wire them.
5355
5356 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5357
5358 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5359 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5360 mode. Call collect_register_by_name with vscr using
5361 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5362 (ppc_store_vrregset): Add and set vscr_offset variable as in
5363 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5364 vscr_offset.
5365
5366 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5367
5368 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5369 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5370 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5371
5372 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5373
5374 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5375 (ppc_store_vsxregset): Likewise.
5376 (ppc_fill_vrregset): Likewise.
5377 (ppc_store_vrregset): Likewise.
5378 (ppc_fill_evrregset): Likewise.
5379 (ppc_store_evrregset): Likewise.
5380 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5381 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5382 needed.
5383
5384 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5385
5386 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5387 wordsize of the inferior. Call ppc_linux_target_wordsize.
5388
5389 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5390
5391 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5392 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5393 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5394 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5395 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5396 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5397 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5398 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5399 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5400 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5401 (tdesc_powerpc_e500l): Remove.
5402 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5403 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5404 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5405 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5406 linux-ppc-tdesc.h.
5407 (ppc_arch_setup): Remove target description matching code. Fill a
5408 ppc_linux_features struct and call ppc_linux_match_description
5409 with it.
5410
5411 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5412
5413 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5414 width of the requested register exceeds the width of the
5415 `ptrace' data type.
5416 (mips_cannot_store_register): Likewise.
5417
5418 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5419
5420 * linux-mips-low.c (mips_fetch_register): New function. Update
5421 preceding comment.
5422 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5423 (the_low_target): Wire `mips_fetch_register'.
5424
5425 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5426
5427 * lynx-i386-low.c (LYNXOS_178): New macro.
5428 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5429 the layout on LynxOS-178.
5430 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5431 handle floating point registers that are not supported by
5432 LynxOS-178.
5433
5434 2018-05-10 Tom Tromey <tom@tromey.com>
5435
5436 * configure: Rebuild.
5437
5438 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5439
5440 PR server/23158:
5441 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5442 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5443 Use it to set the expedite_regs field in the given tdesc.
5444 * x86-tdesc.h: New file.
5445 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5446 Adjust following the addition of the new expedite_regs parameter
5447 to init_target_desc.
5448 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5449 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5450 (i386_linux_read_description, amd64_linux_read_description):
5451 Adjust following the addition of the new expedite_regs parameter
5452 to init_target_desc.
5453 * lynx-i386-low.c: #include "x86-tdesc.h".
5454 (lynx_i386_arch_setup): Adjust following the addition of the new
5455 expedite_regs parameter to init_target_desc.
5456 * nto-x86-low.c: #include "x86-tdesc.h".
5457 (nto_x86_arch_setup): Adjust following the addition of the new
5458 expedite_regs parameter to init_target_desc.
5459 * win32-i386-low.c: #include "x86-tdesc.h".
5460 (i386_arch_setup): Adjust following the addition of the new
5461 expedite_regs parameter to init_target_desc.
5462
5463 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5464
5465 PR server/23158:
5466 * win32-low.c (win32_create_inferior): Add call to my_wait
5467 setting last_status global.
5468
5469 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5470
5471 PR server/23158:
5472 * win32-low.c (create_process): Only call gdb_tilde_expand if
5473 inferior_cwd is not NULL.
5474
5475 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5476
5477 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5478 registers to the cache if their values have changed.
5479 (i387_xsave_to_cache): Provide default values for x87 control
5480 registers when these features are available, but disabled.
5481 * regcache.c (supply_register_by_name_zeroed): New function.
5482 * regcache.h (supply_register_by_name_zeroed): Declare new
5483 function.
5484
5485 2018-05-07 Tom Tromey <tom@tromey.com>
5486
5487 * configure: Rebuild.
5488
5489 2018-05-04 Tom Tromey <tom@tromey.com>
5490
5491 * configure: Rebuild.
5492
5493 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5494 Pedro Alves <palves@redhat.com>
5495
5496 * linux-aarch64-low.c (aarch64_stopped_data_address):
5497 Likewise.
5498
5499 2018-04-27 Tom Tromey <tom@tromey.com>
5500
5501 * configure: Rebuild.
5502
5503 2018-04-23 Tom Tromey <tom@tromey.com>
5504
5505 * configure: Rebuild.
5506
5507 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5508
5509 * Makefile.in (depcomp): Add "..".
5510 (all_deps_files): New and use it.
5511
5512 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5513
5514 * configure.srv (aarch64*-*-linux*): Don't include xml.
5515 (i[34567]86-*-cygwin*): Likewise.
5516 (i[34567]86-*-linux*): Likewise.
5517 (i[34567]86-*-lynxos*): Likewise.
5518 (i[34567]86-*-mingw32ce*): Likewise.
5519 (i[34567]86-*-mingw*): Likewise.
5520 (i[34567]86-*-nto*): Likewise.
5521 (tic6x-*-uclinux): Likewise.
5522 (x86_64-*-linux*): Likewise.
5523 (x86_64-*-mingw*): Likewise.
5524 (x86_64-*-cygwin*): Likewise.
5525
5526 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5527
5528 * tdesc.c: Remove xml parameter.
5529
5530 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5531
5532 * server.c (get_features_xml): Remove cast.
5533 * tdesc.c (void target_desc::accept): Fill in function.
5534 (tdesc_get_features_xml): Remove old xml creation.
5535 (print_xml_feature::visit_pre): Add xml vistor.
5536 * tdesc.h (struct target_desc): Make xmltarget mutable.
5537 (tdesc_get_features_xml): Remove declaration.
5538
5539 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5540
5541 * tdesc.c (tdesc_architecture_name): Add new function.
5542 (tdesc_osabi_name): Likewise.
5543 (tdesc_get_features_xml): Use new functions.
5544
5545 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5546
5547 * tdesc.c (tdesc_create_flags): Remove.
5548 (tdesc_add_flag): Likewise.
5549 (tdesc_named_type): Likewise.
5550 (tdesc_create_union): Likewise.
5551 (tdesc_create_struct): Likewise.
5552 (tdesc_create_vector): Likewise.
5553 (tdesc_add_bitfield): Likewise.
5554 (tdesc_add_field): Likewise.
5555 (tdesc_set_struct_size): Likewise.
5556
5557 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5558
5559 * tdesc.c (~target_desc): Remove implictly deleted items.
5560 (init_target_desc): Iterate all features.
5561 (tdesc_get_features_xml): Use vector.
5562 (tdesc_create_feature): Create feature.
5563 * tdesc.h (tdesc_feature) Remove
5564 (target_desc): Add features.
5565
5566 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5567
5568 * Makefile.in: Add common/tdesc.c
5569 * tdesc.c (init_target_desc): init all reg_defs from register
5570 vector.
5571 (tdesc_create_reg): Create tdesc_reg.
5572 * tdesc.h (tdesc_feature): Add register vector.
5573
5574 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5575
5576 * tdesc.h (struct target_desc) <features>: Change type to
5577 std::vector<std::string>.
5578 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5579 changes.
5580 (tdesc_get_features_xml): Likewise.
5581 (tdesc_create_feature): Likewise.
5582
5583 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5584
5585 * regcache.c (find_register_by_number): Return a ref.
5586 (find_regno): Use references.
5587 (register_size): Likewise.
5588 (register_data): Likewise.
5589 * tdesc.c (target_desc::~target_desc): Remove free calls.
5590 (target_desc::operator==): Use std::vector compare.
5591 (init_target_desc): Use reference.
5592 (tdesc_create_reg): Use reg constructors.
5593 * tdesc.h (struct target_desc): Replace pointer with object.
5594
5595 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5596
5597 * regcache.c (find_register_by_number): Make static.
5598 (find_regno): Use find_register_by_number
5599 * regcache.h (struct reg): Remove declaration.
5600
5601 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5602
5603 * tdesc.c (target_desc::~target_desc): Move to here.
5604 (target_desc::operator==): Likewise.
5605 * tdesc.h (target_desc::~target_desc): Move from here.
5606 (target_desc::operator==): Likewise.
5607
5608 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5609
5610 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5611
5612 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5613
5614 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5615 S390_TDESC_GS.
5616 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5617 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5618 and init_registers_s390_gs_linux64.
5619
5620 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5621
5622 * linux-s390-low.c (s390_fill_gs): Remove function.
5623 (s390_fill_gsbc): Remove function.
5624 (s390_regsets): Set fill functions for the guarded storage regsets
5625 to NULL.
5626
5627 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5628
5629 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5630 the word size. Add comment.
5631 (s390_get_wordsize): New function.
5632 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5633 pswm with it. Instead, use s390_get_wordsize to determine the
5634 word size first and derive the correct tdesc from that directly.
5635
5636 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5637
5638 * Makefile.in: Include silent-rules.mk.
5639 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5640 (COMPILE): Add ECHO_CXX.
5641 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5642 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5643 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5644 (version-generated.c): Add ECHO_GEN.
5645 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5646 (IPAGENT_COMPILE): Add ECHO_CXX.
5647 (%-generated.c): Add ECHO_REGDAT.
5648
5649 2018-03-14 Tom Tromey <tom@tromey.com>
5650
5651 PR cli/14977:
5652 * ax.c (ax_printf): Special case for NULL.
5653
5654 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5655
5656 * linux-low.c (linux_qxfer_libraries_svr4): Use
5657 xml_escape_text_append.
5658
5659 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5660
5661 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5662
5663 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5664
5665 * server.c (handle_general_set): Remove unnecessary xstrdup.
5666
5667 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5668
5669 * server.c (parse_debug_format_options): Adjust to
5670 delim_string_to_char_ptr_vec changes.
5671 * thread-db.c (thread_db_load_search): Adjust to
5672 dirnames_to_char_ptr_vec changes.
5673
5674 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5675
5676 * target.h (target_enable_btrace, target_disable_btrace)
5677 (target_read_btrace, target_read_btrace_conf): Turn macro into
5678 inline function. Throw error if target method is not defined.
5679 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5680 check for btrace target method. Be prepared to handle exceptions
5681 from btrace target methods.
5682
5683 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5684
5685 * server.c (captured_main): Change order of error message printed
5686 when the current working directory cannot be found.
5687
5688 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5689
5690 * server.c: Include "filenames.h" and "pathstuff.h".
5691 (program_name): Delete variable.
5692 (program_path): New anonymous class.
5693 (get_exec_wrapper): Use "program_path" instead of
5694 "program_name".
5695 (handle_v_run): Likewise.
5696 (captured_main): Likewise.
5697 (process_serial_event): Likewise.
5698
5699 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5700
5701 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5702 (OBJS): Add "pathstuff.o".
5703 * server.c (current_directory): New global variable.
5704 (captured_main): Initialize "current_directory".
5705
5706 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5707
5708 * tdesc.c: Use common/tdesc.h.
5709 * tdesc.h: Likewise.
5710
5711 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5712 Simon Marchi <simon.marchi@ericsson.com>
5713
5714 * Makefile.in: Switch order of make rules.
5715
5716 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5717
5718 * Makefile.in: Add common directory in build.
5719 * configure.ac: Add common reference.
5720 * configure: Regenerate.
5721
5722 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5723
5724 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5725 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5726 * spu-low.c (spu_target_ops): Likewise.
5727 * win32-low.c (win32_target_ops): Likewise.
5728 * server.c (supported_btrace_packets): Report packets unconditionally.
5729 * target.h (target_ops) <supports_btrace>: Remove.
5730 (target_supports_btrace): Remove.
5731
5732 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5733
5734 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5735 (handle_btrace_disable): Change return type to void. Use exceptions
5736 to report errors.
5737 (handle_btrace_general_set): Catch exception and copy message to
5738 return message.
5739
5740 2018-02-08 Tom Tromey <tom@tromey.com>
5741
5742 * linux-low.c (install_software_single_step_breakpoints): Use
5743 make_scoped_restore.
5744 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5745 (do_restore_current_thread_cleanup): Remove.
5746 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5747 declare.
5748
5749 2018-02-08 Tom Tromey <tom@tromey.com>
5750
5751 * mem-break.c (set_raw_breakpoint_at): Use
5752 gdb::unique_xmalloc_ptr.
5753
5754 2018-01-30 Pedro Alves <palves@redhat.com>
5755
5756 PR gdb/13211
5757 * target.c (target_terminal::terminal_state): Rename to ...
5758 (target_terminal::m_terminal_state): ... this.
5759
5760 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5761
5762 * linux-low.c (handle_extended_wait): Surround call to
5763 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5764
5765 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5766
5767 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5768 linux_ptrace_attach_fail_reason_string now returning an
5769 std::string.
5770 (linux_attach): Likewise.
5771 * thread-db.c (attach_thread): Likewise.
5772
5773 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5774
5775 PR gdb/21559
5776 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5777 checking for fs_base/gs_base fields in struct user_regs_struct.
5778 * configure: Regenerate.
5779
5780 2018-01-16 Yao Qi <yao.qi@linaro.org>
5781
5782 PR gdb/18749
5783 * linux-low.c (fetch_register): Call supply_register instead of
5784 error.
5785
5786 2018-01-08 Yao Qi <yao.qi@linaro.org>
5787 Simon Marchi <simon.marchi@ericsson.com>
5788
5789 * Makefile.in (OBS): Remove selftest.o.
5790 * configure.ac: Set srv_selftest_objs if $development is true.
5791 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5792 * configure: Re-generated.
5793 * server.c (captured_main): Wrap variable selftest_filter with
5794 GDB_SELF_TEST.
5795
5796 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5797
5798 * server.c (parse_debug_format_options): Return std::string.
5799 (handle_monitor_command, captured_main): Adjust.
5800
5801 2018-01-05 Pedro Alves <palves@redhat.com>
5802
5803 PR gdb/18653
5804 * server.c (captured_main): Pass quiet=false to
5805 save_original_signals_state.
5806
5807 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5808
5809 * gdbreplay.c (gdbreplay_version): Update copyright year in
5810 version message.
5811 * server.c (gdbserver_version): Likewise.
5812
5813 2017-12-08 Tom Tromey <tom@tromey.com>
5814
5815 * ax.c (ax_printf): Update.
5816
5817 2017-12-07 Yao Qi <yao.qi@linaro.org>
5818
5819 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5820 aarch64_linux_read_description.
5821 * linux-amd64-ipa.c (idx2mask): New array.
5822 (get_ipa_tdesc): Move idx2mask out.
5823 (initialize_low_tracepoint): Initialize target descriptions.
5824 * linux-i386-ipa.c (idx2mask): New array.
5825 (get_ipa_tdesc): Move idx2mask out.
5826 (initialize_low_tracepoint): Initialize target descriptions.
5827
5828 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5829
5830 * tdesc.c (struct tdesc_type): Change return type.
5831 (tdesc_add_flag): Change parameter type.
5832 (tdesc_add_bitfield): Likewise.
5833 (tdesc_add_field): Likewise.
5834 (tdesc_set_struct_size): Likewise.
5835
5836 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5837
5838 * regcache.c (registers_to_string): Remove unused variable.
5839
5840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5841
5842 * inferiors.c (for_each_inferior_with_data): Remove.
5843 * inferiors.h (for_each_inferior_with_data): Remove.
5844 * server.c (handle_qxfer_threads_worker): Change parameter type.
5845 (handle_qxfer_threads_proper): Use for_each_thread.
5846
5847 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5848
5849 * inferiors.c (for_each_inferior): Remove.
5850 (clear_inferiors): Use for_each_thread.
5851 * inferiors.h (for_each_inferior): Remove.
5852 * linux-low.c (linux_wait_for_event_filtered): Use
5853 for_each_thread.
5854 (linux_stabilize_threads): Likewise.
5855 * regcache.c (regcache_release): Likewise.
5856 * server.c (gdb_wants_all_threads_stopped): Likewise.
5857 (clear_pending_status_callback): Remove.
5858 (handle_status): Use for_each_thread.
5859 (captured_main): Likewise.
5860 * win32-low.c (child_init_thread_list): Likewise.
5861 (win32_clear_inferiors): Likewise.
5862 (fake_breakpoint_event): Likewise.
5863
5864 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5865
5866 * inferiors.h (find_inferior): Remove.
5867 * inferiors.c (find_inferior): Remove.
5868
5869 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5870
5871 * linux-low.c (resume_status_pending_p): Update comment.
5872 (need_step_over_p): Update comment.
5873
5874 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5875
5876 * linux-low.c (proceed_one_lwp): Return void, change parameter
5877 type.
5878 (unsuspend_and_proceed_one_lwp): Likewise.
5879 (proceed_all_lwps): Use for_each_thread.
5880 (unstop_all_lwps): Likewise.
5881
5882 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5883
5884 * linux-low.c (linux_resume_one_thread): Return void, take
5885 parameter directly.
5886 (linux_resume): Use for_each_thread.
5887
5888 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5889
5890 * linux-low.c (send_sigstop_callback): Return void, change
5891 parameter type. Rename to...
5892 (send_sigstop): ... this.
5893 (suspend_and_send_sigstop_callback): Return void, change parameter
5894 type. Rename to...
5895 (suspend_and_send_sigstop): ... this.
5896 (stop_all_lwps): Use for_each_thread.
5897
5898 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5899
5900 * linux-low.c (lwp_running): Return bool, remove unused
5901 argument.
5902 (linux_stabilize_threads): Use find_thread.
5903
5904 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5905
5906 * linux-low.c (select_singlestep_lwp_callback): Remove.
5907 (count_events_callback): Remove.
5908 (select_event_lwp_callback): Remove.
5909 (select_event_lwp): Use find_thread/for_each_thread.
5910
5911 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5912
5913 * linux-low.c (not_stopped_callback): Return bool, take filter
5914 argument directly.
5915 (linux_wait_for_event_filtered): Use find_thread.
5916 (linux_wait_1): Likewise.
5917
5918 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5919
5920 * linux-low.c (same_lwp): Remove.
5921 (find_lwp_pid): Use find_thread.
5922
5923 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5924
5925 * linux-low.c (delete_lwp_callback): Remove.
5926 (linux_mourn): Use for_each_thread.
5927
5928 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5929
5930 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5931 args parameter, don't check for pid.
5932 (linux_detach): Use for_each_thread.
5933
5934 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5935
5936 * linux-low.c (struct counter): Remove.
5937 (second_thread_of_pid_p): Remove.
5938 (last_thread_of_process_p): Use find_thread.
5939
5940 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5941
5942 * inferiors.c (find_inferior_in_random): Remove.
5943 * inferiors.h (find_inferior_in_random): Remove.
5944 * linux-low.c (status_pending_p_callback): Return bool, accept
5945 parameter ptid directly.
5946 (linux_wait_for_event_filtered): Use find_thread_in_random.
5947 (linux_wait_1): Likewise.
5948
5949 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5950
5951 * inferiors.c (find_inferior_id): Remove.
5952 (find_thread_ptid): Move implemention from find_inferior_id to
5953 here.
5954 * inferiors.h (find_inferior_id): Remove.
5955 * server.c (handle_status): Use find_thread_ptid.
5956 (process_serial_event): Likewise.
5957 * thread-db.c (find_one_thread): Likewise.
5958 (thread_db_thread_handle): Likewise.
5959 * win32-low.c (thread_rec): Likewise.
5960 (child_delete_thread): Likewise.
5961 (win32_thread_alive): Likewise.
5962 (get_child_debug_event): Likewise.
5963
5964 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5965
5966 * linux-mips-low.c (update_watch_registers_callback): Return
5967 void, remove pid_p parameter, don't check for pid.
5968 (mips_insert_point, mips_remove_point): Use for_each_thread.
5969
5970 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5971
5972 * lynx.low (lynx_delete_thread_callback): Remove.
5973 (lynx_mourn): Use for_each_thread.
5974
5975 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5976
5977 * regcache.c (regcache_invalidate_one): Remove.
5978 (regcache_invalidate_pid): use for_each_thread.
5979
5980 2017-11-26 Tom Tromey <tom@tromey.com>
5981
5982 * linux-low.c (linux_create_inferior): Update.
5983
5984 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5985
5986 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5987
5988 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5989
5990 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5991 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5992 * linux-aarch64-tdesc-selftest.c: New file.
5993 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5994
5995 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5996
5997 * configure.srv: Add new file.
5998 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5999 * linux-aarch64-tdesc-selftest.c: New file.
6000 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6001
6002 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6003
6004 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6005 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6006 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6007
6008 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6009
6010 * configure.srv: Add new files.
6011 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6012 aarch64_linux_read_description.
6013 * linux-aarch64-low.c (aarch64_linux_read_description):
6014 Merge with aarch64_arch_setup.
6015 (aarch64_arch_setup): Call aarch64_linux_read_description.
6016 * linux-aarch64-tdesc.c: New file.
6017 * linux-aarch64-tdesc.h: New file.
6018
6019 2017-11-24 Yao Qi <yao.qi@linaro.org>
6020
6021 * configure.srv: Set $srv_regobj for tic6x-linux.
6022 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6023 (tic6x_read_description): Move some code to tic6x_arch_setup.
6024 (tic6x_tdesc_test): New function.
6025 (initialize_low_arch): Call selftests::register_test.
6026
6027 2017-11-22 Yao Qi <yao.qi@linaro.org>
6028
6029 * remote-utils.c (prepare_resume_reply): Use memcpy.
6030
6031 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6032
6033 * linux-low.c (kill_one_lwp_callback): Return void, take
6034 argument directly, don't filter on pid.
6035 (linux_kill): Use for_each_thread.
6036
6037 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6038
6039 * linux-low.c (need_step_over_p): Return bool, remove dummy
6040 argument.
6041 (linux_resume, proceed_all_lwps): Use find_thread.
6042
6043 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6044
6045 * linux-low.c (resume_status_pending_p): Return bool, remove
6046 flag_p argument.
6047 (linux_resume): Use find_thread.
6048
6049 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6050
6051 * linux-low.c (struct thread_resume_array): Remove.
6052 (linux_set_resume_request): Return void, take arguments
6053 directly.
6054 (linux_resume): Use for_each_thread.
6055
6056 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6057
6058 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6059 return bool, remove data argument.
6060 (linux_stabilize_threads): Use find_thread.
6061
6062 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6063
6064 * linux-low.c (unsuspend_one_lwp): Remove.
6065 (unsuspend_all_lwps): Use for_each_thread, inline code from
6066 unsuspend_one_lwp.
6067
6068 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6069
6070 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6071 * linux-low.c (struct iterate_over_lwps_args): Remove.
6072 (iterate_over_lwps_filter): Remove.
6073 (iterate_over_lwps): Use find_thread.
6074
6075 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6076
6077 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6078 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6079 code from reset_lwp_ptrace_options_callback.
6080
6081 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6082
6083 * linux-arm-low.c (struct update_registers_data): Remove.
6084 (update_registers_callback): Return void, take arguments
6085 directly, don't check thread's pid.
6086 (arm_insert_point, arm_remove_point): Use for_each_thread.
6087
6088 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6089
6090 * win32-low.c (continue_one_thread): Return void, take argument
6091 directly.
6092 (child_continue): Use for_each_thread.
6093
6094 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6095
6096 * win32-i386-low.c (update_debug_registers_callback): Rename
6097 to ...
6098 (update_debug_registers): ... this, return void, remove pid_p arg.
6099 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6100
6101 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6102
6103 * inferiors.h (struct process_info): Add constructor, initialize
6104 fields..
6105 <syscalls_to_catch>: Change type to std::vector<int>.
6106 * inferiors.c (add_process): Allocate process_info with new.
6107 (remove_process): Free process_info with delete.
6108 * linux-low.c (handle_extended_wait): Adjust.
6109 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6110 * server.c (handle_general_set): Adjust.
6111
6112 2017-11-16 Pedro Alves <palves@redhat.com>
6113
6114 * remote-utils.c (remote_close): Block SIGIO signals instead of
6115 uninstalling the SIGIO handler.
6116
6117 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6118
6119 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6120
6121 2017-11-16 Yao Qi <yao.qi@linaro.org>
6122
6123 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6124 (tic6x_store_gregset): Likewise.
6125 (tic6x_usrregs_info): Move it up.
6126
6127 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6128
6129 * Makefile.in: Update arch rules.
6130 * configure.srv: Explicitly mark arch/ files.
6131
6132 2017-11-13 Andreas Schwab <schwab@suse.de>
6133
6134 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6135 function.
6136 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6137
6138 2017-11-06 Pedro Alves <palves@redhat.com>
6139
6140 * config.in, configure: Regenerate.
6141
6142 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6143
6144 * target.c (struct thread_search): Remove.
6145 (thread_search_callback): Remove.
6146 (prepare_to_access_memory): Use for_each_thread instead of
6147 find_inferior. Inline code from thread_search_callback.
6148
6149 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6150
6151 * server.c (struct visit_actioned_threads_data): Remove.
6152 (visit_actioned_threads): Change prototype to take arguments
6153 directly.
6154 (resume): Use find_thread instead of find_inferior.
6155
6156 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6157
6158 * server.c (queue_stop_reply_callback): Change prototype, return
6159 void.
6160 (find_status_pending_thread_callback): Remove.
6161 (handle_status): Replace find_inferior with find_thread and
6162 for_each_thread.
6163
6164 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6165
6166 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6167 with REGNO.
6168 (aarch64_store_gregset): Likewise.
6169 (aarch64_fill_fpregset): Likewise.
6170 (aarch64_store_fpregset): Likewise.
6171
6172 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6173
6174 * gdbthread.h (find_thread, for_each_thread): New functions.
6175 * inferiors.c (thread_of_pid): Remove.
6176 (find_any_thread_of_pid): Use find_thread.
6177 * linux-low.c (num_lwps): Use for_each_thread.
6178
6179 2017-10-17 Yao Qi <yao.qi@linaro.org>
6180
6181 * Makefile.in: Remove one rule.
6182 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6183
6184 2017-10-17 Yao Qi <yao.qi@linaro.org>
6185
6186 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6187 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6188
6189 2017-10-17 Yao Qi <yao.qi@linaro.org>
6190
6191 * configure.srv: Rename arm.o with arch/arm.o.
6192
6193 2017-10-17 Yao Qi <yao.qi@linaro.org>
6194
6195 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6196 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6197 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6198 (arch-i386.o, arch-amd64.o): Remove rules.
6199 (arch/%.o): New rule.
6200 Update POSTCOMPILE and COMPILE.pre.
6201 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6202 * configure: Re-generated.
6203 * configure.srv: Replace arch-i386.o with arch/i386.o.
6204 Replace arch-amd64.o with arch/amd64.o.
6205
6206 2017-10-16 Yao Qi <yao.qi@linaro.org>
6207
6208 * configure: Regenerated.
6209
6210 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6211
6212 * inferiors.h: (struct inferior_list): Remove.
6213 (struct inferior_list_entry); Remove.
6214 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6215 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6216 get_first_inferior): Remove.
6217 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6218 find_inferior_id, find_inferior_in_random): Change signature.
6219 * inferiors.c (all_threads): Change type to
6220 std::list<thread_info *>.
6221 (get_thread): Remove macro.
6222 (find_inferior, find_inferior_id): Change signature, implement
6223 using find_thread.
6224 (find_inferior_in_random): Change signature, implement using
6225 find_thread_in_random.
6226 (for_each_inferior, for_each_inferior_with_data): Change
6227 signature, implement using for_each_thread.
6228 (add_inferior_to_list, remove_inferior): Remove.
6229 (add_thread, get_first_thread, thread_of_pid,
6230 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6231 (get_first_inferior, one_inferior_p, clear_inferior_list):
6232 Remove.
6233 (clear_inferiors, get_thread_process): Update.
6234 * gdbthread.h: Include <list>.
6235 (struct thread_info) <entry>: Remove field.
6236 <id>: New field.
6237 (all_threads): Change type to std::list<thread_info *>.
6238 (get_first_inferior): Add doc.
6239 (find_thread, for_each_thread, find_thread_in_random): New
6240 functions.
6241 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6242 * linux-arm-low.c (update_registers_callback): Update.
6243 * linux-low.c (second_thread_of_pid_p): Update.
6244 (kill_one_lwp_callback, linux_detach_lwp_callback,
6245 delete_lwp_callback, status_pending_p_callback, same_lwp,
6246 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6247 iterate_over_lwps, not_stopped_callback,
6248 resume_stopped_resumed_lwps, count_events_callback,
6249 select_singlestep_lwp_callback, select_event_lwp_callback,
6250 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6251 suspend_and_send_sigstop_callback, wait_for_sigstop,
6252 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6253 lwp_running, linux_set_resume_request, resume_status_pending_p,
6254 need_step_over_p, start_step_over, linux_resume_one_thread,
6255 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6256 reset_lwp_ptrace_options_callback): Update.
6257 * linux-mips-low.c (update_watch_registers_callback): Update.
6258 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6259 Update.
6260 (free_register_cache_thread_one): Remove.
6261 (regcache_release): Update.
6262 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6263 handle_qxfer_threads_worker): Update.
6264 (handle_query): Update, use list iterator.
6265 (visit_actioned_threads, handle_pending_status,
6266 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6267 clear_pending_status_callback, set_pending_status_callback,
6268 find_status_pending_thread_callback, handle_status,
6269 process_serial_event): Update.
6270 * target.c (thread_search_callback): Update.
6271 * thread-db.c (thread_db_get_tls_address): Update.
6272 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6273 Update.
6274 * win32-i386-low.c (update_debug_registers_callback): Update.
6275 * win32-low.c (delete_thread_info, child_delete_thread,
6276 continue_one_thread, suspend_one_thread,
6277 get_child_debug_event): Adjust.
6278
6279 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6280
6281 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6282 * inferiors.h: Include <list>.
6283 (struct process_info) <entry>: Remove field.
6284 <pid>: New field.
6285 (pid_of): Change macro to function.
6286 (ptid_of, lwpid_of): Remove macro.
6287 (all_processes): Change type to std::list<process_info *>.
6288 (ALL_PROCESSES): Remove macro.
6289 (for_each_process, find_process): New function.
6290 * inferiors.c (all_processes): Change type to
6291 std::list<process_info *>.
6292 (find_thread_process): Adjust.
6293 (add_process): Likewise.
6294 (remove_process): Likewise.
6295 (find_process_pid): Likewise.
6296 (get_first_process): Likewise.
6297 (started_inferior_callback): Remove.
6298 (have_started_inferiors_p): Adjust.
6299 (attached_inferior_callback): Remove.
6300 (have_attached_inferiors_p): Adjust.
6301 * linux-low.c (check_zombie_leaders): Likewise.
6302 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6303 (x86_linux_update_xmltarget): Adjust.
6304 * server.c (handle_query): Likewise.
6305 (gdb_reattached_process): Remove.
6306 (handle_status): Adjust.
6307 (kill_inferior_callback): Likewise.
6308 (detach_or_kill_inferior): Remove.
6309 (print_started_pid): Likewise.
6310 (print_attached_pid): Likewise.
6311 (detach_or_kill_for_exit): Update.
6312 (process_serial_event): Likewise.
6313 * linux-arm-low.c (arm_new_fork): Likewise.
6314
6315 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6316
6317 * dll.h: Include <list>.
6318 (struct dll_info): Add constructor.
6319 <entry>: Remove field.
6320 (all_dlls): Change type to std::list<dll_info>.
6321 * dll.c: Include <algorithm>.
6322 (get_dll): Remove macro.
6323 (all_dlls): Change type to std::list<dll_info *>.
6324 (free_one_dll): Remove.
6325 (match_dll): Likewise.
6326 (loaded_dll): Adjust.
6327 (unloaded_dll): Adjust to all_dlls type change, use
6328 std::find_if. Inline code from match_dll.
6329 (clear_dlls): Adjust to all_dlls type change.
6330 * server.c (emit_dll_description): Remove.
6331 (handle_qxfer_libraries): Adjust to all_dlls type change,
6332 integrate emit_dll_description's functionality.
6333
6334 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6335
6336 * linux-low.h (struct linux_target_ops) <delete_process>: New
6337 field.
6338 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6339 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6340 (struct linux_target_ops): Add delete_process callback.
6341 * linux-arm-low.c (arm_delete_process): New.
6342 (struct linux_target_ops): Add delete_process callback.
6343 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6344 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6345 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6346 * linux-mips-low.c (mips_linux_delete_process): New.
6347 (struct linux_target_ops): Add delete_process callback.
6348 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6349 * linux-s390-low.c (struct linux_target_ops): Likewise.
6350 * linux-sh-low.c (struct linux_target_ops): Likewise.
6351 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6352 * linux-tile-low.c (struct linux_target_ops): Likewise.
6353 * linux-x86-low.c (x86_linux_delete_process): New.
6354 (struct linux_target_ops): Add delete_process callback.
6355 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6356
6357 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6358
6359 * linux-aarch64-low.c (the_low_target): Add thread delete
6360 callback.
6361 * linux-arm-low.c (arm_delete_thread): New function.
6362 (the_low_target): Add thread delete callback.
6363 * linux-bfin-low.c (the_low_target): Likewise.
6364 * linux-crisv32-low.c (the_low_target): Likewise.
6365 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6366 set.
6367 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6368 field.
6369 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6370 * linux-mips-low.c (mips_linux_delete_thread): New function.
6371 (the_low_target): Add thread delete callback.
6372 * linux-ppc-low.c (the_low_target): Likewise.
6373 * linux-s390-low.c (the_low_target): Likewise.
6374 * linux-sh-low.c (the_low_target): Likewise.
6375 * linux-tic6x-low.c (the_low_target): Likewise.
6376 * linux-tile-low.c (the_low_target): Likewise.
6377 * linux-x86-low.c (the_low_target): Likewise.
6378 * linux-xtensa-low.c (the_low_target): Likewise.
6379
6380 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6381
6382 * win32-low.c: Include "common-inferior.h".
6383
6384 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6385
6386 * inferiors.c (set_inferior_cwd): New function.
6387 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6388 (handle_query): Inform that QSetWorkingDir is supported.
6389 * win32-low.c (create_process): Pass the inferior's cwd to
6390 CreateProcess.
6391
6392 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6393
6394 * inferiors.c (current_inferior_cwd): New global variable.
6395 (get_inferior_cwd): New function.
6396 * inferiors.h (struct process_info) <cwd>: New field.
6397
6398 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6399
6400 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6401 (OBS): Add gdb_tilde_expand.o.
6402
6403 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6406 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6407
6408 2017-09-29 Pedro Alves <palves@redhat.com>
6409
6410 * ax.c (gdb_parse_agent_expr): Constify.
6411 * ax.h (gdb_parse_agent_expr): Constify.
6412 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6413 Constify.
6414 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6415 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6416 * remote-utils.h (read_ptid): Constify.
6417 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6418 (process_point_options, process_serial_event): Constify.
6419 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6420 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6421 (cmd_qtbuffer): Constify.
6422
6423 2017-09-29 Pedro Alves <palves@redhat.com>
6424
6425 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6426 fails.
6427
6428 2017-09-29 Pedro Alves <palves@redhat.com>
6429
6430 * linux-low.c (handle_extended_wait): Pass parent thread instead
6431 of process to thread_db_notice_clone.
6432 * linux-low.h (thread_db_notice_clone): Replace parent process
6433 parameter with parent thread parameter.
6434 * thread-db.c (find_one_thread): Add comment.
6435 (thread_db_notice_clone): Replace parent process parameter with
6436 parent thread parameter. Temporarily switch to the parent thread.
6437
6438 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6439
6440 * gdbthread.h: Include "common-gdbthread.h".
6441 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6442 "if" when validating the ptid.
6443 * remote-utils.c: Include "gdbthread.h".
6444 (prepare_resume_reply): Use "switch_to_thread".
6445 * target.c (done_accessing_memory): Likewise.
6446
6447 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6448
6449 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6450 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6451 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6452 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6453 s390x-gs-linux64-ipa.o to ipa_obj.
6454 * linux-s390-low.c (HWCAP_S390_GS): New define.
6455 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6456 New functions.
6457 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6458 (s390_arch_setup): Check for guarded-storage support and choose
6459 appropriate tdesc.
6460 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6461 init_registers_s390x_gs_linux64.
6462 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6463 enum value.
6464 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6465 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6466
6467 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6468
6469 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6470
6471 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6472
6473 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6474 (thread_db_thread_handle): Declare.
6475 * linux-low.c (linux_target_ops): Initialize thread_handle.
6476 * server.c (handle_qxfer_threads_worker): Add support for
6477 "handle" attribute.
6478 * target.h (struct target_ops): Add new function pointer,
6479 thread_handle.
6480 (target_thread_handle): Define.
6481 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6482 field in lwp.
6483 (thread_db_thread_handle): New function.
6484
6485 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6486
6487 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6488 * linux-low.h (thread_db_notice_clone): Declare.
6489 * thread-db.c (thread_db_notice_clone): New function.
6490
6491 2017-09-21 Pedro Alves <palves@redhat.com>
6492
6493 * server.c (gdb_read_memory, handle_status, process_serial_event)
6494 (handle_serial_event, handle_target_event): Adjust to
6495 set_desired_thread prototype change.
6496 * target.c (set_desired_thread): Remove 'use_general' parameter
6497 and adjust.
6498 * target.h (set_desired_thread): Remove 'use_general' parameter.
6499
6500 2017-09-20 Tom Tromey <tom@tromey.com>
6501
6502 * target.c (target_terminal::terminal_state): Define.
6503 (target_terminal::init): Rename from target_terminal_init.
6504 (target_terminal::inferior): Rename from
6505 target_terminal_inferior.
6506 (target_terminal::ours): Rename from target_terminal_ours.
6507 (target_terminal::ours_for_output, target_terminal::info): New.
6508
6509 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6510
6511 * server.c (accumulate_file_name_length): Remove.
6512 (emit_dll_description): Adjust to std::string change.
6513 (handle_qxfer_libraries): Use std::string to hold document.
6514
6515 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6516
6517 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6518 return type of xml_escape_text.
6519 * server.c (emit_dll_description): Likewise.
6520
6521 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6522
6523 * server.c (captured_main): Accept argument for --selftest.
6524 Update run_tests call.
6525 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6526 when registering selftests.
6527
6528 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6529
6530 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6531 instead of "VEC" for "target_desc.reg_defs".
6532 (regcache_cpy): Likewise.
6533 (registers_to_string): Likewise.
6534 (registers_from_string): Likewise.
6535 (find_regno): Likewise.
6536 (supply_regblock): Likewise.
6537 (regcache_raw_read_unsigned): Likewise.
6538 * tdesc.c (init_target_desc): Likewise.
6539 (tdesc_create_reg): Likewise.
6540 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6541 (struct target_desc) <reg_defs>: Convert to "std::vector".
6542 (target_desc): Do not initialize "reg_defs".
6543 (~target_desc): Update code to use "std::vector" instead of "VEC"
6544 for "target_desc.reg_defs".
6545 (operator==): Likewise.
6546
6547 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6548
6549 * inferiors.h (thread_to_gdb_id): Remove.
6550 * inferiors.c (thread_to_gdb_id): Remove.
6551 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6552 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6553 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6554 Likewise.
6555 * nto-low.c (nto_fetch_registers, nto_store_registers,
6556 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6557
6558 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6559
6560 * inferiors.h (gdb_id_to_thread_id): Remove.
6561 * inferiors.c (gdb_id_to_thread_id): Remove.
6562 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6563 removal. Move pid declaration closer to where it's used.
6564
6565 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6566
6567 * server.c (handle_detach): New function.
6568 (process_serial_event): Move code out, call handle_detach.
6569
6570 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6571
6572 * server.c (require_running): Rename to ...
6573 (require_running_or_return): ... this ...
6574 (require_running_or_break): ... and this.
6575 (handle_query, process_serial_event): Adjust.
6576
6577 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6578
6579 * linux-low.c (linux_set_resume_request): Remove unused
6580 variables.
6581
6582 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6583
6584 * server.c (first_thread_of): Remove.
6585 (process_serial_event): Replace usage of first_thread_of with
6586 find_any_thread_of_pid.
6587 * tracepoint.c (same_process_p): Remove.
6588 (gdb_agent_about_to_close): Replace usage of same_process_p with
6589 find_any_thread_of_pid.
6590 * linux-x86-low.c (same_process_callback): Remove.
6591 (x86_arch_setup_process_callback): Replace usage of
6592 same_process_callback with find_any_thread_of_pid.
6593 * thread-db.c (any_thread_of): Remove.
6594 (switch_to_process): Replace usage of any_thread_of with
6595 find_any_thread_of_pid.
6596 * inferiors.c (thread_pid_matches_callback): Remove.
6597 (find_thread_process): Adjust to use find_any_thread_of_pid.
6598
6599 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6600
6601 * regcache.c (get_thread_regcache): Guard calls to "memset"
6602 with "!VEC_empty".
6603
6604 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6605
6606 * linux-low.c (handle_extended_wait): Use
6607 "allocate_target_description" instead of "XNEW".
6608 * linux-x86-low.c (initialize_low_arch): Likewise.
6609
6610 2017-09-05 Yao Qi <yao.qi@linaro.org>
6611
6612 * configure.srv (srv_i386_regobj): Remove.
6613 (srv_amd64_regobj): Remove.
6614 (srv_regobj): Set it to "" for x86 non-linux targets.
6615 * linux-x86-tdesc.c (i386_linux_read_description):
6616 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6617 (init_registers_i386): Remove the declaration.
6618 (tdesc_i386): Remove the declaration.
6619 (lynx_i386_arch_setup): Call i386_create_target_description.
6620 * nto-x86-low.c: Likewise.
6621 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6622 [!__x86_64__]: include arch/i386.h.
6623 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6624
6625 2017-09-05 Yao Qi <yao.qi@linaro.org>
6626
6627 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6628 i386/amd64-XXX-linux from it.
6629
6630 2017-09-05 Yao Qi <yao.qi@linaro.org>
6631
6632 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6633 false.
6634 (ipa_amd64_linux_regobj): Remove.
6635 (ipa_x32_linux_regobj): Remove.
6636
6637 2017-09-05 Yao Qi <yao.qi@linaro.org>
6638
6639 * Makefile.in (arch-amd64.o): New rule.
6640 * configure.srv: Append arch-amd64.o.
6641 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6642 (get_ipa_tdesc): Call amd64_linux_read_description.
6643 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6644 and init_registers_amd64_XXX.
6645 * linux-x86-low.c (x86_linux_read_description): Call
6646 amd64_linux_read_description.
6647 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6648 (initialize_low_arch): Don't call init_registers_x32_XXX and
6649 init_registers_amd64_XXX.
6650 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6651 and tdesc_amd64_XXX.
6652 [__x86_64__] (amd64_tdesc_test): New function.
6653 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6654 and init_registers_amd64_XXX.
6655 * linux-x86-tdesc.c: Include arch/amd64.h.
6656 (xcr0_to_tdesc_idx): New function.
6657 (i386_linux_read_description): New function.
6658 (amd64_get_ipa_tdesc_idx): New function.
6659 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6660 (amd64_get_ipa_tdesc): Declare.
6661
6662 2017-09-05 Yao Qi <yao.qi@linaro.org>
6663
6664 * configure.srv (srv_i386_linux_xmlfiles): Remove
6665 i386/i386-XXX-linux.xml from it.
6666
6667 2017-09-05 Yao Qi <yao.qi@linaro.org>
6668
6669 * configure.srv: Set srv_i386_linux_regobj empty if $development
6670 is false.
6671 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6672 initialize_low_tdesc.
6673 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6674 with #if initialize_low_tdesc.
6675 * linux-x86-tdesc-selftest.c: New file.
6676 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6677
6678 2017-09-05 Yao Qi <yao.qi@linaro.org>
6679
6680 * Makefile.in (arch-i386.o): New rule.
6681 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6682 (x86_64-*-linux*): Likewise.
6683 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6684 include arch/i386.h.
6685 (i386_linux_read_description): Remove code and call
6686 i386_create_target_description.
6687 * tdesc.c (allocate_target_description): New function.
6688 * tdesc.h (set_tdesc_architecture): Remove declaration.
6689 (set_tdesc_osabi): Likewise.
6690
6691 2017-09-05 Yao Qi <yao.qi@linaro.org>
6692
6693 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6694 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6695 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6696 .xmltarget.
6697 * server.c (get_features_xml): Call tdesc_get_features_xml.
6698 * tdesc.c (set_tdesc_architecture): New function.
6699 (set_tdesc_osabi): New function.
6700 (tdesc_get_features_xml): New function.
6701 (tdesc_create_feature): Add an argument.
6702 * tdesc.h (struct target_desc) <features>: New field.
6703 <arch, osabi>: New field.
6704 (~target_desc): xfree features, arch, and osabi.
6705 (target_desc::oerator==): Don't compare .xmltarget.
6706 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6707 (set_tdesc_osabi): Likewise.
6708 (tdesc_get_features_xml): Likewise.
6709
6710 2017-09-05 Yao Qi <yao.qi@linaro.org>
6711
6712 * linux-x86-tdesc.c: Include selftest.h.
6713 (i386_tdesc_test): New function.
6714 (initialize_low_tdesc): Call selftests::register_test.
6715 * tdesc.h: Include regdef.h.
6716 (target_desc): Override operator == and !=.
6717
6718 2017-09-05 Yao Qi <yao.qi@linaro.org>
6719
6720 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6721 (ipa_obj): Likewise.
6722 * linux-i386-ipa.c: Include common/x86-xstate.h
6723 (get_ipa_tdesc): Call i386_linux_read_description.
6724 (initialize_low_tracepoint): Don't call init_registers_XXX
6725 functions, call initialize_low_tdesc instead.
6726 * linux-x86-low.c (x86_linux_read_description): Call
6727 i386_linux_read_description.
6728 (initialize_low_arch): Don't call init_registers_i386_XXX
6729 functions, call initialize_low_tdesc.
6730 * linux-x86-tdesc.c: New file.
6731 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6732 (i386_get_ipa_tdesc_idx): Declare.
6733 (i386_get_ipa_tdesc): Declare.
6734 (initialize_low_tdesc): Declare.
6735
6736 2017-09-05 Yao Qi <yao.qi@linaro.org>
6737
6738 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6739 instead of 0.
6740
6741 2017-09-05 Yao Qi <yao.qi@linaro.org>
6742
6743 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6744 * regcache.c (get_thread_regcache): Use VEC_length.
6745 (init_register_cache): Likewise.
6746 (regcache_cpy): Likewise.
6747 (registers_to_string): Iterate reg_defs via VEC_iterate.
6748 (find_regno): Likewise.
6749 (find_register_by_number): Use VEC_index.
6750 (register_size): Call find_register_by_number.
6751 (register_data): Call find_register_by_number.
6752 (supply_regblock): Use VEC_length.
6753 (regcache_raw_read_unsigned): Likewise.
6754 * tdesc.c (init_target_desc): Iterate reg_defs via
6755 VEC_iterate.
6756 (default_description): Update initializer.
6757 (copy_target_description): Don't update field num_registers.
6758 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6759 <num_registers>: Remove.
6760
6761 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6762
6763 * Makefile.in (.SECONDARY): Define target.
6764
6765 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6766
6767 * linux-low.c (linux_wait_1): Adjust.
6768 * server.c (queue_stop_reply_callback): Adjust.
6769
6770 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6771
6772 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6773 QEnvironmentUnset and QEnvironmentReset packets.
6774 (handle_query): Inform remote that QEnvironmentHexEncoded,
6775 QEnvironmentUnset and QEnvironmentReset are supported.
6776
6777 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6778
6779 * inferiors.h (inferior_target_data): Rename to ...
6780 (thread_target_data): ... this.
6781 (inferior_regcache_data): Rename to ...
6782 (thread_regcache_data): ... this.
6783 (set_inferior_regcache_data): Rename to ...
6784 (set_thread_regcache_data): ... this.
6785 * inferiors.c (inferior_target_data): Rename to ...
6786 (thread_target_data): ... this.
6787 (inferior_regcache_data): Rename to ...
6788 (thread_regcache_data): ... this.
6789 (set_inferior_regcache_data): Rename to ...
6790 (set_thread_regcache_data): ... this.
6791 (free_one_thread): Update.
6792 * linux-low.h (get_thread_lwp): Update.
6793 * regcache.c (get_thread_regcache): Update.
6794 (regcache_invalidate_thread): Update.
6795 (free_register_cache_thread): Update.
6796 * win32-i386-low.c (update_debug_registers_callback): Update.
6797 (win32_get_current_dr): Update.
6798 * win32-low.c (thread_rec): Update.
6799 (delete_thread_info): Update.
6800 (continue_one_thread): Update.
6801 (suspend_one_thread): Update.
6802
6803 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6804
6805 * inferiors.c (set_inferior_target_data): Remove.
6806 * inferiors.h (set_inferior_target_data): Remove.
6807
6808 2017-08-18 Yao Qi <yao.qi@linaro.org>
6809
6810 * Makefile.in (OBS): Add selftest.o.
6811 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6812 * configure, config.in: Re-generated.
6813 * server.c: Include common/sefltest.h.
6814 (captured_main): Handle option --selftest.
6815
6816 2017-08-09 Yao Qi <yao.qi@linaro.org>
6817
6818 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6819 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6820 i386-avx-mpx.o and i386-mmx.o.
6821 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6822 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6823 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6824 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6825 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6826 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6827 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6828 i386/amd64-avx-mpx.xml.
6829
6830 2017-08-09 Yao Qi <yao.qi@linaro.org>
6831
6832 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6833 and x32-avx-avx512.o.
6834 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6835 i386/x32-avx-avx512.xml.
6836
6837 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6838
6839 * tracepoint.h (enum class fast_tpoint_collect_result): New
6840 enumeration.
6841 (fast_tracepoint_collecting): Change return type to
6842 fast_tpoint_collect_result.
6843 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6844 * linux-low.h: Include tracepoint.h.
6845 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6846 fast_tpoint_collect_result.
6847 * linux-low.c (handle_tracepoints): Adjust.
6848 (linux_fast_tracepoint_collecting): Change return type to
6849 fast_tpoint_collect_result.
6850 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6851 linux_wait_1, stuck_in_jump_pad_callback,
6852 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6853 proceed_one_lwp): Adjust to type change.
6854
6855 2017-07-10 Yao Qi <yao.qi@linaro.org>
6856
6857 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6858
6859 2017-06-29 Yao Qi <yao.qi@linaro.org>
6860
6861 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6862 Remove.
6863 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6864
6865 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6866
6867 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6868
6869 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6870
6871 * linux-low.c (linux_create_inferior): Adjust code to access the
6872 environment information via 'gdb_environ' class.
6873 * lynx-low.c (lynx_create_inferior): Likewise.
6874 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6875 (get_environ): Return a pointer to 'our_environ'.
6876 (captured_main): Initialize 'our_environ'.
6877 * server.h (get_environ): Adjust prototype.
6878 * spu-low.c (spu_create_inferior): Adjust code to access the
6879 environment information via 'gdb_environ' class.
6880
6881 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6882
6883 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6884 usage of "register" keyword.
6885
6886 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6887
6888 * configure: Re-generate.
6889
6890 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6891
6892 * configure: Re-generate.
6893
6894 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6895
6896 * Makefile.in (COMPILE.pre): Add "-x c++".
6897
6898 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6899
6900 * fork-child.c: Conditionally include <signal.h>.
6901
6902 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6903
6904 * server.c (handle_general_set): Handle new packet
6905 "QStartupWithShell".
6906 (handle_query): Add "QStartupWithShell" to the list of supported
6907 packets.
6908 (gdbserver_usage): Add help text explaining the
6909 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6910 options.
6911 (captured_main): Recognize and act upon the presence of the new
6912 CLI options.
6913
6914 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6915 Pedro Alves <palves@redhat.com>
6916
6917 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6918 * configure: Regenerate.
6919 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6920 "fork-inferior.o".
6921 (i[34567]86-*-lynxos*): Likewise.
6922 (spu*-*-*): Likewise.
6923 * fork-child.c: New file.
6924 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6925 and "environ.h".
6926 (linux_ptrace_fun): New function.
6927 (linux_create_inferior): Adjust function prototype to reflect
6928 change on "target.h". Adjust function code to use
6929 "fork_inferior".
6930 (linux_request_interrupt): Delete "signal_pid".
6931 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6932 (lynx_ptrace_fun): New function.
6933 (lynx_create_inferior): Adjust function prototype to reflect
6934 change on "target.h". Adjust function code to use
6935 "fork_inferior".
6936 * nto-low.c (nto_create_inferior): Adjust function prototype and
6937 code to reflect change on "target.h". Update comments.
6938 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6939 "common-terminal.h" and "environ.h".
6940 (terminal_fd): Moved to fork-child.c.
6941 (old_foreground_pgrp): Likewise.
6942 (restore_old_foreground_pgrp): Likewise.
6943 (last_status): Make it global.
6944 (last_ptid): Likewise.
6945 (our_environ): New variable.
6946 (startup_with_shell): Likewise.
6947 (program_name): Likewise.
6948 (program_argv): Rename to...
6949 (program_args): ...this.
6950 (wrapper_argv): New variable.
6951 (start_inferior): Delete function.
6952 (get_exec_wrapper): New function.
6953 (get_exec_file): Likewise.
6954 (get_environ): Likewise.
6955 (prefork_hook): Likewise.
6956 (post_fork_inferior): Likewise.
6957 (postfork_hook): Likewise.
6958 (postfork_child_hook): Likewise.
6959 (handle_v_run): Update code to deal with arguments coming from the
6960 remote host. Update calls from "start_inferior" to
6961 "create_inferior".
6962 (captured_main): Likewise. Initialize environment variable. Call
6963 "have_job_control".
6964 * server.h (post_fork_inferior): New prototype.
6965 (get_environ): Likewise.
6966 (last_status): Declare.
6967 (last_ptid): Likewise.
6968 (signal_pid): Likewise.
6969 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6970 (spu_ptrace_fun): New function.
6971 (spu_create_inferior): Adjust function prototype to reflect change
6972 on "target.h". Adjust function code to use "fork_inferior".
6973 * target.c (target_terminal_init): New function.
6974 (target_terminal_inferior): Likewise.
6975 (target_terminal_ours): Likewise.
6976 * target.h: Include <vector>.
6977 (struct target_ops) <create_inferior>: Update prototype.
6978 (create_inferior): Update macro.
6979 * utils.c (gdb_flush_out_err): New function.
6980 * win32-low.c (win32_create_inferior): Adjust function prototype
6981 and code to reflect change on "target.h".
6982
6983 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6984
6985 * inferiors.c (switch_to_thread): New function.
6986
6987 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6988
6989 * Makefile.in (SFILE): Add "common/job-control.c".
6990 (OBS): Add "job-control.o".
6991
6992 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6993
6994 * Makefile: Remove "@host_makefile_frag@".
6995
6996 2017-05-05 Pedro Alves <palves@redhat.com>
6997
6998 * configure: Regenerate.
6999
7000 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7001
7002 * configure: Regenerate.
7003
7004 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7005
7006 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7007 software_single_step change of return type to
7008 std::vector<CORE_ADDR>.
7009 * linux-low.c (install_software_single_step_breakpoints):
7010 Likewise.
7011 * linux-low.h (install_software_single_step_breakpoints):
7012 Likewise.
7013
7014 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7015
7016 * remote-utils.c: Include "gdb_termios.h" instead of
7017 "terminal.h".
7018 * terminal.h: Delete file.
7019
7020 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7021
7022 * server.c: Include <vector>.
7023 <program_argv, wrapper_argv>: Convert to std::vector.
7024 (start_inferior): Rewrite function to use C++.
7025 (handle_v_run): Likewise. Update code that calculates the argv
7026 based on the vRun packet; use C++.
7027 (captured_main): Likewise.
7028
7029 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7030
7031 * server.c (handle_v_cont): Initialize thread_resume::thread
7032 with null_ptid.
7033
7034 2017-04-05 Pedro Alves <palves@redhat.com>
7035
7036 * configure: Regenerate.
7037
7038 2017-04-05 Pedro Alves <palves@redhat.com>
7039
7040 * gdbreplay.c (sync_error): Constify.
7041 * linux-x86-low.c (push_opcode): Constify.
7042
7043 2017-04-05 Pedro Alves <palves@redhat.com>
7044
7045 * win32-low.c (get_child_debug_event)
7046 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7047 Report TARGET_WAITKIND_SPURIOUS instead.
7048
7049 2017-04-05 Pedro Alves <palves@redhat.com>
7050
7051 * remote-utils.c (remote_prepare, remote_open): Constify.
7052 * remote-utils.h (remote_prepare, remote_open): Constify.
7053 * server.c (captured_main): Constify 'port' handling.
7054
7055 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7056
7057 * Makefile.in (clean): Clear .deps.
7058
7059 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7060
7061 * .gitignore: Remove generated files, replace with wildcard.
7062 * (clean): Replace removal of generated files with wildcard.
7063 (version.c): Replace with...
7064 (version-generated.c): ...this.
7065 (xml-builtin.c): Replace with...
7066 (xml-builtin-generated.c): ...this.
7067 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7068 (%.c: *regformats*): Replace with...
7069 (%-generated.c: *regformats*): ...this.
7070
7071 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7072
7073 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7074 (xtensa_fill_gregset): Call collect_register_by_name for
7075 threadptr register.
7076 (xtensa_store_gregset): Call supply_register_by_name for
7077 threadptr register.
7078
7079 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7080
7081 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7082 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7083 (xtensa_store_gregset): Call supply_register for all registers in
7084 a0_regnum..a0_regnum + C0_NREGS range.
7085
7086 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7087
7088 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7089 (ax-ipa.o: ax.c): Remove.
7090 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7091 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7092 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7093 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7094 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7095
7096 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7097
7098 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7099 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7100 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7101 (errors-ipa.o: ../common/errors.c): Remove.
7102 (format-ipa.o: ../common/format.c): Remove.
7103 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7104
7105 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7106
7107 * Makefile.in (%-ipa.o: %.c): New rule.
7108 (tracepoint-ipa.o: tracepoint.c): Remove.
7109 (utils-ipa.o: utils.c): Remove.
7110 (remote-utils-ipa.o: remote-utils.c): Remove.
7111 (regcache-ipa.o: regcache.c): Remove.
7112 (i386-linux-ipa.o: i386-linux.c): Remove.
7113 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7114 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7115 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7116 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7117 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7118 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7119 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7120 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7121 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7122 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7123 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7124 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7125 (aarch64-ipa.o: aarch64.c): Remove.
7126 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7127 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7128 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7129 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7130 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7131 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7132 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7133 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7134 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7135 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7136 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7137 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7138 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7139 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7140 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7141 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7142 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7143 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7144 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7145 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7146 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7147 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7148 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7149 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7150 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7151 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7152 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7153 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7154 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7155 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7156 (tdesc-ipa.o: tdesc.c): Remove.
7157 (x32-linux-ipa.o: x32-linux.c): Remove.
7158 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7159 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7160
7161 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7162
7163 * Makefile.in (%.o: ../arch/%.c): New rule.
7164 (arm.o: ../arch/arm.c): Remove.
7165 (arm-linux.o: ../arch/arm-linux.c): Remove.
7166 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7167 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7168
7169 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7170
7171 * Makefile.in (%.o: ../nat/%.c): New rule.
7172 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7173 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7174 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7175 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7176 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7177 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7178 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7179 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7180 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7181 (linux-personality.o: ../nat/linux-personality.c): Remove.
7182 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7183 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7184 (x86-linux.o: ../nat/x86-linux.c): Remove.
7185 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7186 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7187
7188 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7189
7190 * Makefile.in (%.o: ../common/%.c): New rule.
7191 (signals.o: ../common/signals.c): Remove.
7192 (print-utils.o: ../common/print-utils.c): Remove.
7193 (rsp-low.o: ../common/rsp-low.c): Remove.
7194 (common-utils.o: ../common/common-utils.c): Remove.
7195 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7196 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7197 (vec.o: ../common/vec.c): Remove.
7198 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7199 (xml-utils.o: ../common/xml-utils.c): Remove.
7200 (ptid.o: ../common/ptid.c): Remove.
7201 (buffer.o: ../common/buffer.c): Remove.
7202 (format.o: ../common/format.c): Remove.
7203 (filestuff.o: ../common/filestuff.c): Remove.
7204 (agent.o: ../common/agent.c): Remove.
7205 (errors.o: ../common/errors.c): Remove.
7206 (environ.o: ../common/environ.c): Remove.
7207 (common-debug.o: ../common/common-debug.c): Remove.
7208 (cleanups.o: ../common/cleanups.c): Remove.
7209 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7210 (fileio.o: ../common/fileio.c): Remove.
7211 (common-regcache.o: ../common/common-regcache.c): Remove.
7212 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7213 (new-op.o: ../common/new-op.c): Remove.
7214 (btrace-common.o: ../common/btrace-common.c): Remove.
7215
7216 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7217
7218 * Makefile.in (%.o: ../target/%.c): New rule.
7219 (waitstatus.o: ../target/waitstatus.c): Remove.
7220
7221 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7222
7223 * Makefile.in
7224 (%.c: ../regformats/%.dat,
7225 (%.c: ../regformats/arm/%.dat,
7226 (%.c: ../regformats/i386/%.dat,
7227 (%.c: ../regformats/rs6000/%.dat): New rules.
7228 (aarch64.c): Remove.
7229 (reg-arm.c): Remove.
7230 (arm-with-iwmmxt.c): Remove.
7231 (arm-with-vfpv2.c): Remove.
7232 (arm-with-vfpv3.c): Remove.
7233 (arm-with-neon.c): Remove.
7234 (reg-bfin.c): Remove.
7235 (reg-cris.c): Remove.
7236 (reg-crisv32.c): Remove.
7237 (i386.c): Remove.
7238 (i386-linux.c): Remove.
7239 (i386-avx.c): Remove.
7240 (i386-avx-linux.c): Remove.
7241 (i386-avx-avx512.c): Remove.
7242 (i386-avx-avx512-linux.c): Remove.
7243 (i386-mpx.c): Remove.
7244 (i386-mpx-linux.c): Remove.
7245 (i386-avx-mpx-avx512-pku.c): Remove.
7246 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7247 (i386-avx-mpx.c): Remove.
7248 (i386-avx-mpx-linux.c): Remove.
7249 (i386-mmx.c): Remove.
7250 (i386-mmx-linux.c): Remove.
7251 (reg-ia64.c): Remove.
7252 (reg-m32r.c): Remove.
7253 (reg-m68k.c): Remove.
7254 (reg-cf.c): Remove.
7255 (mips-linux.c): Remove.
7256 (mips-dsp-linux.c): Remove.
7257 (mips64-linux.c): Remove.
7258 (mips64-dsp-linux.c): Remove.
7259 (nios2-linux.c): Remove.
7260 (powerpc-32.c): Remove.
7261 (powerpc-32l.c): Remove.
7262 (powerpc-altivec32l.c): Remove.
7263 (powerpc-cell32l.c): Remove.
7264 (powerpc-vsx32l.c): Remove.
7265 (powerpc-isa205-32l.c): Remove.
7266 (powerpc-isa205-altivec32l.c): Remove.
7267 (powerpc-isa205-vsx32l.c): Remove.
7268 (powerpc-e500l.c): Remove.
7269 (powerpc-64l.c): Remove.
7270 (powerpc-altivec64l.c): Remove.
7271 (powerpc-cell64l.c): Remove.
7272 (powerpc-vsx64l.c): Remove.
7273 (powerpc-isa205-64l.c): Remove.
7274 (powerpc-isa205-altivec64l.c): Remove.
7275 (powerpc-isa205-vsx64l.c): Remove.
7276 (s390-linux32.c): Remove.
7277 (s390-linux32v1.c): Remove.
7278 (s390-linux32v2.c): Remove.
7279 (s390-linux64.c): Remove.
7280 (s390-linux64v1.c): Remove.
7281 (s390-linux64v2.c): Remove.
7282 (s390-te-linux64.c): Remove.
7283 (s390-vx-linux64.c): Remove.
7284 (s390-tevx-linux64.c): Remove.
7285 (s390x-linux64.c): Remove.
7286 (s390x-linux64v1.c): Remove.
7287 (s390x-linux64v2.c): Remove.
7288 (s390x-te-linux64.c): Remove.
7289 (s390x-vx-linux64.c): Remove.
7290 (s390x-tevx-linux64.c): Remove.
7291 (tic6x-c64xp-linux.c): Remove.
7292 (tic6x-c64x-linux.c): Remove.
7293 (tic6x-c62x-linux.c): Remove.
7294 (reg-sh.c): Remove.
7295 (reg-sparc64.c): Remove.
7296 (reg-spu.c): Remove.
7297 (amd64.c): Remove.
7298 (amd64-linux.c): Remove.
7299 (amd64-avx.c): Remove.
7300 (amd64-avx-linux.c): Remove.
7301 (amd64-avx-avx512.c): Remove.
7302 (amd64-avx-avx512-linux.c): Remove.
7303 (amd64-mpx.c): Remove.
7304 (amd64-mpx-linux.c): Remove.
7305 (amd64-avx-mpx-avx512-pku.c): Remove.
7306 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7307 (amd64-avx-mpx.c): Remove.
7308 (amd64-avx-mpx-linux.c): Remove.
7309 (x32.c): Remove.
7310 (x32-linux.c): Remove.
7311 (x32-avx.c): Remove.
7312 (x32-avx-linux.c): Remove.
7313 (x32-avx-avx512.c): Remove.
7314 (x32-avx-avx512-linux.c): Remove.
7315 (reg-xtensa.c): Remove.
7316 (reg-tilegx.c): Remove.
7317 (reg-tilegx32.c): Remove.
7318
7319 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7320
7321 * Makefile.in (SFILES): Add "common/environ.c".
7322 (OBJS): Add "common/environ.h".
7323
7324 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7325
7326 * configure.ac: Check if the fs_base and gs_base members of
7327 `struct user_regs_struct' exist.
7328 * config.in: Regenerated.
7329 * configure: Likewise.
7330
7331 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7332
7333 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7334 target_read_memory.
7335 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7336 (get_next_pcs_syscall_next_pc): Likewise.
7337
7338 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7339
7340 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7341 * nto-x86-low.c: Likewise.
7342
7343 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7344
7345 * Makefile.in: Include disable-implicit-rules.mk.
7346
7347 2016-11-23 Pedro Alves <palves@redhat.com>
7348
7349 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7350 (debug_vprintf): Use std::chrono::steady_clock instead of
7351 gettimeofday. Use '.' instead of ':'.
7352 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7353 (get_timestamp): Use std::chrono::steady_clock instead of
7354 gettimeofday.
7355
7356 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7357
7358 * Makefile.in: Fix whitespace formatting.
7359
7360 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7361
7362 * Makefile.in (SFILES, OBS): Flatten list and order
7363 alphabetically.
7364
7365 2016-11-23 Pedro Alves <palves@redhat.com>
7366
7367 * event-loop.c (handle_file_event): Use warning.
7368 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7369 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7370 Use warning.
7371
7372 2016-11-23 Pedro Alves <palves@redhat.com>
7373
7374 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7375 output.
7376 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7377 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7378 debug_printf and debug_flush for debug output.
7379 * server.c (handle_general_set): Likewise.
7380 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7381 output.
7382
7383 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7384
7385 * Makefile.in (.c.o): Replace rule with ...
7386 (%.o: %.c): ... this one.
7387
7388 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7389
7390 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7391 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7392 make.
7393 * configure.ac: Remove checks for the make program.
7394 * configure: Re-generate.
7395
7396 2016-10-28 Pedro Alves <palves@redhat.com>
7397
7398 * Makefile.in (CXX_DIALECT): Get from configure.
7399 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7400 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7401 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7402 * config.in: Regenerate.
7403 * configure: Regenerate.
7404
7405 2016-10-27 Yao Qi <yao.qi@linaro.org>
7406
7407 * linux-low.c (linux_supports_range_stepping): Return true if
7408 can_software_single_step return true.
7409
7410 2016-10-27 Yao Qi <yao.qi@linaro.org>
7411
7412 * inferiors.c (find_inferior_in_random): New function.
7413 * inferiors.h (find_inferior_in_random): Declare.
7414 * linux-low.c (linux_wait_for_event_filtered): Call
7415 find_inferior_in_random instead of find_inferior.
7416
7417 2016-10-27 Yao Qi <yao.qi@linaro.org>
7418
7419 * linux-low.c (linux_wait_1): If single-step breakpoints are
7420 inserted, remove them.
7421
7422 2016-10-26 Pedro Alves <palves@redhat.com>
7423
7424 * linux-low.c (handle_extended_wait): Link parent/child fork
7425 threads.
7426 (linux_wait_1): Unlink them.
7427 (linux_set_resume_request): Ignore resume requests for
7428 already-resumed and unhandled fork child threads.
7429 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7430 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7431 New functions.
7432 (handle_v_requests) <vCont>: Don't call require_running.
7433 * server.h (in_queued_stop_replies): New declaration.
7434
7435 2016-10-24 Yao Qi <yao.qi@linaro.org>
7436
7437 PR server/20733
7438 * linux-aarch64-low.c (append_insns): Cast the return value to
7439 'uint32_t *'.
7440
7441 2016-10-10 Yao Qi <yao.qi@linaro.org>
7442
7443 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7444
7445 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7446
7447 * target.c (target_supports_multi_process): New function, moved
7448 from...
7449 * target.h (target_supports_multi_process): ... here. Remove
7450 macro.
7451
7452 2016-10-05 Tom Tromey <tom@tromey.com>
7453
7454 PR remote/20655:
7455 * tracepoint.c (handle_tracepoint_bkpts): Check
7456 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7457
7458 2016-10-05 Yao Qi <yao.qi@linaro.org>
7459
7460 * configure.srv: Update the path of arm-*.xml files.
7461
7462 2016-10-05 Terry Guo <terry.guo@arm.com>
7463 Yao Qi <yao.qi@linaro.org>
7464
7465 * Makefile.in: Adjust the path of rules.
7466 * configure.srv: Update the path of xml files.
7467 * regformats/arm-with-iwmmxt.dat: Regenerated.
7468 * regformats/arm-with-neon.dat: Likewise.
7469 * regformats/arm-with-vfpv2.dat: Likewise.
7470 * regformats/arm-with-vfpv3.dat Likewise.
7471
7472 2016-09-30 Yao Qi <yao.qi@linaro.org>
7473
7474 PR gdbserver/20627
7475 * target.c (target_stop_and_wait): Don't call
7476 target_continue_no_signal, use resume_stop instead.
7477
7478 2016-09-26 Yao Qi <yao.qi@linaro.org>
7479
7480 * linux-low.c (linux_wait_1): Call debug_exit.
7481
7482 2016-09-23 Pedro Alves <palves@redhat.com>
7483
7484 * Makefile.in (SFILES): Add common/new-op.c.
7485 (OBS): Add common/new-op.o.
7486 (new-op.o): New rule.
7487
7488 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7489
7490 * .gitinore: Ignore more files.
7491
7492 2016-09-21 Yao Qi <yao.qi@linaro.org>
7493
7494 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7495 23.
7496
7497 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7498
7499 * server.c (start_inferior): Call target_mourn_inferior instead of
7500 mourn_inferior; pass ptid_t argument to it.
7501 (resume): Likewise.
7502 (handle_target_event): Likewise.
7503 * target.c (target_mourn_inferior): New function.
7504 * target.h (mourn_inferior): Delete macro.
7505
7506 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7507
7508 * linux-low.c (lwp_is_stepping): New function.
7509
7510 2016-09-06 Carl Love <cel@us.ibm.com>
7511
7512 * server.c (start_inferior): Fixed comment, requested comment change
7513 didn't get updated correctly. Removed reference to ptrace () call as
7514 it is only true on Linux systems.
7515
7516 2016-09-06 Carl Love <cel@us.ibm.com>
7517
7518 * server.c (start_inferior): Do not call
7519 function target_post_create_inferior () if the
7520 inferior process has already exited.
7521
7522 2016-09-05 Pedro Alves <palves@redhat.com>
7523
7524 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7525 (COMPILE.pre, CC_LD): Use CXX directly.
7526 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7527 * acinclude.m4: Don't include build-with-cxx.m4.
7528 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7529 * configure: Regenerate.
7530
7531 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7532
7533 PR gdb/19495
7534 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7535 call writing data to own_buf.
7536
7537 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7538
7539 * target.c (mywait): Call target_wait instead of
7540 the_target->wait.
7541 (target_wait): New function.
7542
7543 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7544
7545 * server.c (start_inferior): New variable 'ptid'. Replace calls
7546 to the_target->resume by target_continue{,_no_signal}, depending
7547 on the case.
7548 * target.c (target_stop_and_wait): Call target_continue_no_signal
7549 instead of the_target->resume.
7550 (target_continue): New function.
7551
7552 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7553
7554 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7555
7556 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7557
7558 PR server/20491
7559 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7560 ps_prochandle.
7561 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7562 * linux-arm-low.c (ps_get_thread_area): Likewise.
7563 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7564 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7565 * linux-mips-low.c (ps_get_thread_area): Likewise.
7566 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7567 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7568 * linux-x86-low.c (ps_get_thread_area): Likewise.
7569 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7570
7571 2016-08-19 Pedro Alves <palves@redhat.com>
7572
7573 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7574
7575 2016-08-19 Pedro Alves <palves@redhat.com>
7576
7577 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7578 comment. Use memcpy instead of casting through unsigned long.
7579
7580 2016-08-19 Pedro Alves <palves@redhat.com>
7581
7582 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7583 allocating around 0x80000000.
7584
7585 2016-08-19 Pedro Alves <palves@redhat.com>
7586
7587 PR gdb/20415
7588 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7589 (x32-avx512-linux-ipa.o): New rules.
7590 * configure.ac (x86_64-*-linux*): New x32 check.
7591 * configure.srv (ipa_x32_linux_regobj): New.
7592 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7593 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7594 descriptions.
7595 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7596 descriptions.
7597 * configure: Regenerate.
7598
7599 2016-08-09 Pedro Alves <palves@redhat.com>
7600
7601 PR gdb/18653
7602 * Makefile.in (OBS): Add signals-state-save-restore.o.
7603 (signals-state-save-restore.o): New rule.
7604 * config.in: Regenerate.
7605 * configure: Regenerate.
7606 * linux-low.c: Include "signals-state-save-restore.h".
7607 (linux_create_inferior): Call
7608 restore_original_signals_state.
7609 * server.c: Include "dispositions-save-restore.h".
7610 (captured_main): Call save_original_signals_state.
7611
7612 2016-08-05 Pedro Alves <palves@redhat.com>
7613
7614 * configure: Regenerate.
7615
7616 2016-08-04 Yao Qi <yao.qi@linaro.org>
7617
7618 * linux-low.c (regsets_fetch_inferior_registers): Check
7619 errno is ESRCH or not.
7620
7621 2016-08-02 Yao Qi <yao.qi@linaro.org>
7622
7623 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7624 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7625 (thread_db_load_search): Update.
7626 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7627 td_ta_set_event and td_ta_event_getmsg.
7628
7629 2016-07-26 Pedro Alves <palves@redhat.com>
7630
7631 PR server/20414
7632 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7633 of unsigned long for 64-bit registers and use uint32_t instead of
7634 unsigned int for 32-bit registers.
7635
7636 2016-07-26 Pedro Alves <palves@redhat.com>
7637
7638 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7639 to 'ptrace'.
7640
7641 2016-07-21 Tom Tromey <tom@tromey.com>
7642
7643 * configure: Rebuild.
7644
7645 2016-07-21 Yao Qi <yao.qi@linaro.org>
7646
7647 * mem-break.c (find_gdb_breakpoint): Cast bp to
7648 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7649
7650 2016-07-21 Yao Qi <yao.qi@linaro.org>
7651
7652 * server.c (handle_v_requests): Support s and S actions
7653 if target_supports_software_single_step return true.
7654
7655 2016-07-21 Yao Qi <yao.qi@linaro.org>
7656
7657 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7658 is resume_step, call maybe_hw_step.
7659 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7660 and unstop them.
7661 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7662 breakpoints or not.
7663 (proceed_one_lwp): If resume request is resume_step, install
7664 reinsert breakpoints and call maybe_hw_step.
7665
7666 2016-07-21 Yao Qi <yao.qi@linaro.org>
7667
7668 * linux-low.c (proceed_one_lwp): Declare.
7669 (linux_resume_one_thread): Remove local variable 'step'.
7670 Lift code enqueue signal. Call proceed_one_lwp instead of
7671 linux_resume_one_lwp.
7672
7673 2016-07-21 Yao Qi <yao.qi@linaro.org>
7674
7675 * linux-low.c (linux_resume_one_thread): Call
7676 enqueue_pending_signal.
7677
7678 2016-07-21 Yao Qi <yao.qi@linaro.org>
7679
7680 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7681 * inferiors.c (do_restore_current_thread_cleanup): New function.
7682 (make_cleanup_restore_current_thread): Likewise.
7683 * linux-low.c (install_software_single_step_breakpoints): Call
7684 make_cleanup_restore_current_thread. Switch current_thread to
7685 thread.
7686
7687 2016-07-21 Yao Qi <yao.qi@linaro.org>
7688
7689 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7690 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7691 (clone_one_breakpoint): Likewise.
7692 (delete_reinsert_breakpoints): Change parameter to thread.
7693 Callers updated.
7694 (has_reinsert_breakpoints): Likewise.
7695 (uninsert_reinsert_breakpoints): Likewise.
7696 (reinsert_reinsert_breakpoints): Likewise.
7697 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7698 (delete_reinsert_breakpoints): Likewise.
7699 (reinsert_reinsert_breakpoints): Likewise.
7700 (uninsert_reinsert_breakpoints): Likewise.
7701 (has_reinsert_breakpoints): Likewise.
7702
7703 2016-07-21 Yao Qi <yao.qi@linaro.org>
7704
7705 * inferiors.c (get_thread_process): Make parameter const.
7706 * inferiors.h (get_thread_process): Update declaration.
7707 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7708 Add new parameters child_thread and parent_thread. Callers
7709 updated.
7710 * mem-break.h (clone_all_breakpoints): Update declaration.
7711
7712 2016-07-21 Yao Qi <yao.qi@linaro.org>
7713
7714 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7715 <command_list, handler>: Remove.
7716 (struct gdb_breakpoint): New.
7717 (struct other_breakpoint): New.
7718 (struct reinsert_breakpoint): New.
7719 (is_gdb_breakpoint): New function.
7720 (any_persistent_commands): Update command_list if
7721 is_gdb_breakpoint returns true.
7722 (set_breakpoint): Create breakpoints according to their types.
7723 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7724 (set_gdb_breakpoint_1): Likewise.
7725 (set_gdb_breakpoint): Likewise.
7726 (clear_breakpoint_conditions): Change parameter type to
7727 'struct gdb_breakpoint *'.
7728 (clear_breakpoint_commands): Likewise.
7729 (clear_breakpoint_conditions_and_commands): Likewise.
7730 (add_condition_to_breakpoint): Likewise.
7731 (add_breakpoint_condition): Likewise.
7732 (add_commands_to_breakpoint): Likewise.
7733 (check_breakpoints): Check other_breakpoint.
7734 (clone_one_breakpoint): Clone breakpopint according to its type.
7735 * mem-break.h (struct gdb_breakpoint): Declare.
7736 (set_gdb_breakpoint): Update declaration.
7737 (clear_breakpoint_conditions_and_commands): Likewise.
7738 (add_breakpoint_condition): Likewise.
7739 (add_breakpoint_commands): Likewise.
7740 * server.c (process_point_options): Change parameter type to
7741 'struct gdb_breakpoint *'.
7742
7743 2016-07-21 Yao Qi <yao.qi@linaro.org>
7744
7745 * mem-break.c (set_breakpoint_at): Rename it to ...
7746 (set_breakpoint_type_at): ... it.
7747 (set_breakpoint_at): Call set_breakpoint_type_at.
7748 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7749 * mem-break.h (set_breakpoint_at): Update comments.
7750
7751 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7752
7753 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7754 to buf parameter.
7755 (nios2_store_gregset): Likewise.
7756
7757 2016-07-01 Pedro Alves <palves@redhat.com>
7758 Antoine Tremblay <antoine.tremblay@ericsson.com>
7759
7760 * linux-low.c: Change interface to take the target lwp_info
7761 pointer directly and return void. Handle detaching from a zombie
7762 thread.
7763 (linux_detach_lwp_callback): New function.
7764 (linux_detach): Detach from the leader thread after detaching from
7765 the clone threads.
7766
7767 2016-06-28 Yao Qi <yao.qi@linaro.org>
7768
7769 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7770 for variable new_offset.
7771 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7772 (aarch64_ftrace_insn_reloc_cb): Likewise.
7773 (aarch64_ftrace_insn_reloc_tb): Likewise.
7774 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7775 PRIx64 instead of PRIx32.
7776
7777 2016-06-28 Yao Qi <yao.qi@linaro.org>
7778
7779 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7780 (the_low_target): Install arm_get_syscall_trapinfo.
7781
7782 2016-06-28 Yao Qi <yao.qi@linaro.org>
7783
7784 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7785 function.
7786 (the_low_target): Install aarch64_get_syscall_trapinfo.
7787
7788 2016-06-28 Yao Qi <yao.qi@linaro.org>
7789
7790 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7791 Callers updated.
7792 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7793 Remove parameter sysno.
7794 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7795 sysret.
7796
7797 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7798
7799 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7800 (s390_emit_ne_goto): Likewise.
7801 (s390_emit_lt_goto): Likewise.
7802 (s390_emit_le_goto): Likewise.
7803 (s390_emit_gt_goto): Likewise.
7804 (s390_emit_ge_goto): Likewise.
7805 (s390x_emit_eq_goto): Likewise.
7806 (s390x_emit_ne_goto): Likewise.
7807 (s390x_emit_lt_goto): Likewise.
7808 (s390x_emit_le_goto): Likewise.
7809 (s390x_emit_gt_goto): Likewise.
7810 (s390x_emit_ge_goto): Likewise.
7811 (s390_emit_ops_impl): Mark variable static.
7812 (s390x_emit_ops): Likewise.
7813
7814 2016-06-17 Yao Qi <yao.qi@linaro.org>
7815
7816 * linux-low.c (handle_extended_wait): Call
7817 uninsert_reinsert_breakpoints for the parent process. Remove
7818 reinsert breakpoints from the child process. Reinsert them to
7819 the parent process when vfork is done.
7820 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7821 (reinsert_reinsert_breakpoints): New function.
7822 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7823 (reinsert_reinsert_breakpoints): Declare.
7824
7825 2016-06-17 Yao Qi <yao.qi@linaro.org>
7826
7827 * linux-low.c (handle_extended_wait): If the parent is doing
7828 step-over, remove the reinsert breakpoints from the forked child.
7829
7830 2016-06-17 Yao Qi <yao.qi@linaro.org>
7831
7832 * linux-low.c (unsuspend_all_lwps): Declare.
7833 (linux_low_filter_event): If thread exited, call finish_step_over.
7834 If step-over is finished, unsuspend other threads.
7835
7836 2016-06-17 Yao Qi <yao.qi@linaro.org>
7837
7838 * linux-low.c (linux_resume_one_lwp_throw): Assert
7839 has_reinsert_breakpoints returns false.
7840 * mem-break.c (delete_disabled_breakpoints): Assert
7841 bp type isn't reinsert_breakpoint.
7842
7843 2016-06-17 Yao Qi <yao.qi@linaro.org>
7844
7845 * linux-low.c (maybe_hw_step): New function.
7846 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7847 (finish_step_over): Switch current_thread to lwp temporarily,
7848 and assert has_reinsert_breakpoints returns true.
7849 (proceed_one_lwp): Call maybe_hw_step.
7850 * mem-break.c (has_reinsert_breakpoints): New function.
7851 * mem-break.h (has_reinsert_breakpoints): Declare.
7852
7853 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7854
7855 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7856
7857 2016-05-17 Yao Qi <yao.qi@linaro.org>
7858
7859 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7860 instead of find_inferior.
7861
7862 2016-05-05 Yao Qi <yao.qi@linaro.org>
7863
7864 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7865 Initialize res to zero.
7866
7867 2016-05-05 Yao Qi <yao.qi@linaro.org>
7868
7869 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7870 to uint32_t.
7871
7872 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7873
7874 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7875 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7876 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7877
7878 2016-04-28 Par Olsson <par.olsson@windriver.com>
7879 Simon Marchi <simon.marchi@ericsson.com>
7880
7881 * tracepoint.c (write_inferior_int8): New function.
7882 (cmd_qtenable_disable): Write enable flag using
7883 write_inferior_int8.
7884
7885 2016-04-25 Yao Qi <yao.qi@linaro.org>
7886
7887 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7888 (need_step_over_p): Return zero if the LWP has pending signals
7889 can be delivered on software single step target.
7890
7891 2016-04-25 Yao Qi <yao.qi@linaro.org>
7892
7893 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7894 return instead of error.
7895
7896 2016-04-22 Yao Qi <yao.qi@linaro.org>
7897
7898 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7899 to 23.
7900
7901 2016-04-22 Yao Qi <yao.qi@linaro.org>
7902
7903 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7904 signal when stepping over breakpoint with software single
7905 step.
7906
7907 2016-04-21 Pedro Alves <palves@redhat.com>
7908
7909 * linux-s390-low.c (s390_collect_ptrace_register)
7910 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7911 add casts.
7912 (s390_check_regset): Use void * instead of gdb_byte *.
7913
7914 2016-04-20 Pedro Alves <palves@redhat.com>
7915
7916 * configure: Renegerate.
7917
7918 2016-04-20 Yao Qi <yao.qi@linaro.org>
7919
7920 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7921 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7922 number 16.
7923 (arm_store_gregset): Likewise.
7924
7925 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7926
7927 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7928 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7929 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7930 (amd64-avx-mpx-linux.c): New rules.
7931 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7932 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7933 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7934 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7935 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7936 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7937 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7938 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7939 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7940 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7941 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7942 * linux-x86-low.c (x86_linux_read_description): Add case for
7943 X86_XSTATE_AVX_MPX_MASK.
7944 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7945 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7946 init_registers_i386_avx_mpx_linux.
7947 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7948 (initialize_low_tracepoint): Call
7949 init_registers_i386_avx_mpx_linux.
7950 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7951 (initialize_low_tracepoint): Call
7952 init_registers_amd64_avx_mpx_linux.
7953 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7954 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7955 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7956 declarations.
7957
7958 2016-04-18 Pedro Alves <palves@redhat.com>
7959
7960 * configure: Regenerate.
7961
7962 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7963
7964 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7965 (aarch64_emit_sub): Likewise.
7966
7967 2016-04-12 Pedro Alves <palves@redhat.com>
7968
7969 * utils.c (prepare_to_throw_exception): Delete.
7970
7971 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7972
7973 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7974
7975 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7976
7977 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7978
7979 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7980
7981 * linux-aarch64-ipa.c: Add <elf.h> include.
7982 * linux-ppc-ipa.c: Add <elf.h> include.
7983 * linux-s390-ipa.c: Add <elf.h> include.
7984
7985 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7986
7987 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7988 (get_raw_reg_ptr): Likewise.
7989 (get_trace_state_variable_value_ptr): Likewise.
7990 (set_trace_state_variable_value_ptr): Likewise.
7991 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7992 char *.
7993
7994 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7995 Marcin Kościelnicki <koriakin@0x04.net>
7996
7997 PR/17221
7998 * linux-ppc-low.c (emit_insns): New function.
7999 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8000 (ppc_emit_prologue): New function.
8001 (ppc_emit_epilogue): New function.
8002 (ppc_emit_add): New function.
8003 (ppc_emit_sub): New function.
8004 (ppc_emit_mul): New function.
8005 (ppc_emit_lsh): New function.
8006 (ppc_emit_rsh_signed): New function.
8007 (ppc_emit_rsh_unsigned): New function.
8008 (ppc_emit_ext): New function.
8009 (ppc_emit_zero_ext): New function.
8010 (ppc_emit_log_not): New function.
8011 (ppc_emit_bit_and): New function.
8012 (ppc_emit_bit_or): New function.
8013 (ppc_emit_bit_xor): New function.
8014 (ppc_emit_bit_not): New function.
8015 (ppc_emit_equal): New function.
8016 (ppc_emit_less_signed): New function.
8017 (ppc_emit_less_unsigned): New function.
8018 (ppc_emit_ref): New function.
8019 (ppc_emit_const): New function.
8020 (ppc_emit_reg): New function.
8021 (ppc_emit_pop): New function.
8022 (ppc_emit_stack_flush): New function.
8023 (ppc_emit_swap): New function.
8024 (ppc_emit_stack_adjust): New function.
8025 (ppc_emit_call): New function.
8026 (ppc_emit_int_call_1): New function.
8027 (ppc_emit_void_call_2): New function.
8028 (ppc_emit_if_goto): New function.
8029 (ppc_emit_goto): New function.
8030 (ppc_emit_eq_goto): New function.
8031 (ppc_emit_ne_goto): New function.
8032 (ppc_emit_lt_goto): New function.
8033 (ppc_emit_le_goto): New function.
8034 (ppc_emit_gt_goto): New function.
8035 (ppc_emit_ge_goto): New function.
8036 (ppc_write_goto_address): New function.
8037 (ppc_emit_ops_impl): New static variable.
8038 (ppc64v1_emit_prologue): New function.
8039 (ppc64v2_emit_prologue): New function.
8040 (ppc64_emit_epilogue): New function.
8041 (ppc64_emit_add): New function.
8042 (ppc64_emit_sub): New function.
8043 (ppc64_emit_mul): New function.
8044 (ppc64_emit_lsh): New function.
8045 (ppc64_emit_rsh_signed): New function.
8046 (ppc64_emit_rsh_unsigned): New function.
8047 (ppc64_emit_ext): New function.
8048 (ppc64_emit_zero_ext): New function.
8049 (ppc64_emit_log_not): New function.
8050 (ppc64_emit_bit_and): New function.
8051 (ppc64_emit_bit_or): New function.
8052 (ppc64_emit_bit_xor): New function.
8053 (ppc64_emit_bit_not): New function.
8054 (ppc64_emit_equal): New function.
8055 (ppc64_emit_less_signed): New function.
8056 (ppc64_emit_less_unsigned): New function.
8057 (ppc64_emit_ref): New function.
8058 (ppc64_emit_const): New function.
8059 (ppc64v1_emit_reg): New function.
8060 (ppc64v2_emit_reg): New function.
8061 (ppc64_emit_pop): New function.
8062 (ppc64_emit_stack_flush): New function.
8063 (ppc64_emit_swap): New function.
8064 (ppc64v1_emit_call): New function.
8065 (ppc64v2_emit_call): New function.
8066 (ppc64v1_emit_int_call_1): New function.
8067 (ppc64v2_emit_int_call_1): New function.
8068 (ppc64v1_emit_void_call_2): New function.
8069 (ppc64v2_emit_void_call_2): New function.
8070 (ppc64_emit_if_goto): New function.
8071 (ppc64_emit_eq_goto): New function.
8072 (ppc64_emit_ne_goto): New function.
8073 (ppc64_emit_lt_goto): New function.
8074 (ppc64_emit_le_goto): New function.
8075 (ppc64_emit_gt_goto): New function.
8076 (ppc64_emit_ge_goto): New function.
8077 (ppc64v1_emit_ops_impl): New static variable.
8078 (ppc64v2_emit_ops_impl): New static variable.
8079 (ppc_emit_ops): New function.
8080 (linux_low_target): Wire in ppc_emit_ops.
8081
8082 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8083 Marcin Kościelnicki <koriakin@0x04.net>
8084
8085 PR/17221
8086 * Makefile.in: Add powerpc-*-ipa.o
8087 * configure.srv: Add ipa_obj for powerpc*-linux.
8088 * linux-ppc-ipa.c: New file.
8089 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8090 includes.
8091 (PPC_FIELD): New macro.
8092 (PPC_SEXT): New macro.
8093 (PPC_OP6): New macro.
8094 (PPC_BO): New macro.
8095 (PPC_LI): New macro.
8096 (PPC_BD): New macro.
8097 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8098 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8099 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8100 (ppc_get_thread_area): New function.
8101 (is_elfv2_inferior): New function.
8102 (gen_ds_form): New function.
8103 (GEN_STD): New macro.
8104 (GEN_STDU): New macro.
8105 (GEN_LD): New macro.
8106 (GEN_LDU): New macro.
8107 (gen_d_form): New function.
8108 (GEN_ADDI): New macro.
8109 (GEN_ADDIS): New macro.
8110 (GEN_LI): New macro.
8111 (GEN_LIS): New macro.
8112 (GEN_ORI): New macro.
8113 (GEN_ORIS): New macro.
8114 (GEN_LWZ): New macro.
8115 (GEN_STW): New macro.
8116 (GEN_STWU): New macro.
8117 (gen_xfx_form): New function.
8118 (GEN_MFSPR): New macro.
8119 (GEN_MTSPR): New macro.
8120 (GEN_MFCR): New macro.
8121 (GEN_MTCR): New macro.
8122 (GEN_SYNC): New macro.
8123 (GEN_LWSYNC): New macro.
8124 (gen_x_form): New function.
8125 (GEN_OR): New macro.
8126 (GEN_MR): New macro.
8127 (GEN_LWARX): New macro.
8128 (GEN_STWCX): New macro.
8129 (GEN_CMPW): New macro.
8130 (gen_md_form): New function.
8131 (GEN_RLDICL): New macro.
8132 (GEN_RLDICR): New macro.
8133 (gen_i_form): New function.
8134 (GEN_B): New macro.
8135 (GEN_BL): New macro.
8136 (gen_b_form): New function.
8137 (GEN_BNE): New macro.
8138 (GEN_LOAD): New macro.
8139 (GEN_STORE): New macro.
8140 (gen_limm): New function.
8141 (gen_atomic_xchg): New function.
8142 (gen_call): New function.
8143 (ppc_relocate_instruction): New function.
8144 (ppc_install_fast_tracepoint_jump_pad): New function.
8145 (ppc_get_min_fast_tracepoint_insn_len): New function.
8146 (ppc_get_ipa_tdesc_idx): New function.
8147 (the_low_target): Wire in the new functions.
8148 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8149 tdescs.
8150 * linux-ppc-tdesc.h: New file.
8151
8152 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8153
8154 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8155 (alloc_jump_pad_buffer): New function.
8156 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8157 (alloc_jump_pad_buffer): New function.
8158 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8159 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8160 (alloc_jump_pad_buffer): New function.
8161 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8162 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8163 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8164 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8165
8166 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8167
8168 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8169 * linux-amd64-ipa.c: Likewise.
8170 * linux-i386-ipa.c: Likewise.
8171 * linux-s390-ipa.c: Likewise.
8172 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8173 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8174 set_trace_state_variable_value_ptr.
8175 (struct ipa_sym_addresses): Likewise.
8176 (symbol_list): Likewise.
8177 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8178 accessing gdb_collect directly.
8179 (gdb_collect_ptr_type): New typedef.
8180 (get_raw_reg_ptr_type): New typedef.
8181 (get_trace_state_variable_value_ptr_type): New typedef.
8182 (set_trace_state_variable_value_ptr_type): New typedef.
8183 (gdb_collect_ptr): New global.
8184 (get_raw_reg_ptr): New global.
8185 (get_trace_state_variable_value_ptr): New global.
8186 (set_trace_state_variable_value_ptr): New global.
8187 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8188 accessing get_raw_reg directly.
8189 (get_get_tsv_func_addr): Likewise for
8190 get_trace_state_variable_value_ptr.
8191 (get_set_tsv_func_addr): Likewise for
8192 set_trace_state_variable_value_ptr.
8193 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8194
8195 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8196
8197 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8198
8199 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8200
8201 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8202 packets.
8203 (relocate_instruction): Remove own_buf.
8204 * server.c (own_buf): Make global.
8205 (handle_v_requests): Make global.
8206 * server.h (own_buf): New declaration.
8207 (handle_v_requests): New prototype.
8208
8209 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8210
8211 PR 18377
8212 * linux-s390-low.c (add_insns): New function.
8213 (s390_emit_prologue): New function.
8214 (s390_emit_epilogue): New function.
8215 (s390_emit_add): New function.
8216 (s390_emit_sub): New function.
8217 (s390_emit_mul): New function.
8218 (s390_emit_lsh): New function.
8219 (s390_emit_rsh_signed): New function.
8220 (s390_emit_rsh_unsigned): New function.
8221 (s390_emit_ext): New function.
8222 (s390_emit_log_not): New function.
8223 (s390_emit_bit_and): New function.
8224 (s390_emit_bit_or): New function.
8225 (s390_emit_bit_xor): New function.
8226 (s390_emit_bit_not): New function.
8227 (s390_emit_equal): New function.
8228 (s390_emit_less_signed): New function.
8229 (s390_emit_less_unsigned): New function.
8230 (s390_emit_ref): New function.
8231 (s390_emit_if_goto): New function.
8232 (s390_emit_goto): New function.
8233 (s390_write_goto_address): New function.
8234 (s390_emit_litpool): New function.
8235 (s390_emit_const): New function.
8236 (s390_emit_call): New function.
8237 (s390_emit_reg): New function.
8238 (s390_emit_pop): New function.
8239 (s390_emit_stack_flush): New function.
8240 (s390_emit_zero_ext): New function.
8241 (s390_emit_swap): New function.
8242 (s390_emit_stack_adjust): New function.
8243 (s390_emit_set_r2): New function.
8244 (s390_emit_int_call_1): New function.
8245 (s390_emit_void_call_2): New function.
8246 (s390_emit_eq_goto): New function.
8247 (s390_emit_ne_goto): New function.
8248 (s390_emit_lt_goto): New function.
8249 (s390_emit_le_goto): New function.
8250 (s390_emit_gt_goto): New function.
8251 (s390_emit_ge_goto): New function.
8252 (s390x_emit_prologue): New function.
8253 (s390x_emit_epilogue): New function.
8254 (s390x_emit_add): New function.
8255 (s390x_emit_sub): New function.
8256 (s390x_emit_mul): New function.
8257 (s390x_emit_lsh): New function.
8258 (s390x_emit_rsh_signed): New function.
8259 (s390x_emit_rsh_unsigned): New function.
8260 (s390x_emit_ext): New function.
8261 (s390x_emit_log_not): New function.
8262 (s390x_emit_bit_and): New function.
8263 (s390x_emit_bit_or): New function.
8264 (s390x_emit_bit_xor): New function.
8265 (s390x_emit_bit_not): New function.
8266 (s390x_emit_equal): New function.
8267 (s390x_emit_less_signed): New function.
8268 (s390x_emit_less_unsigned): New function.
8269 (s390x_emit_ref): New function.
8270 (s390x_emit_if_goto): New function.
8271 (s390x_emit_const): New function.
8272 (s390x_emit_call): New function.
8273 (s390x_emit_reg): New function.
8274 (s390x_emit_pop): New function.
8275 (s390x_emit_stack_flush): New function.
8276 (s390x_emit_zero_ext): New function.
8277 (s390x_emit_swap): New function.
8278 (s390x_emit_stack_adjust): New function.
8279 (s390x_emit_int_call_1): New function.
8280 (s390x_emit_void_call_2): New function.
8281 (s390x_emit_eq_goto): New function.
8282 (s390x_emit_ne_goto): New function.
8283 (s390x_emit_lt_goto): New function.
8284 (s390x_emit_le_goto): New function.
8285 (s390x_emit_gt_goto): New function.
8286 (s390x_emit_ge_goto): New function.
8287 (s390_emit_ops): New function.
8288 (struct linux_target_ops): Fill in emit_ops hook.
8289
8290 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8291
8292 PR 18377
8293 * Makefile.in: Add s390 IPA files.
8294 * configure.srv: Build IPA for s390.
8295 * linux-s390-ipa.c: New file.
8296 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8297 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8298 (tdesc_s390_linux32): Likewise.
8299 (init_registers_s390_linux32v1): Likewise.
8300 (tdesc_s390_linux32v1): Likewise.
8301 (init_registers_s390_linux32v2): Likewise.
8302 (tdesc_s390_linux32v2): Likewise.
8303 (init_registers_s390_linux64): Likewise.
8304 (tdesc_s390_linux64): Likewise.
8305 (init_registers_s390_linux64v1): Likewise.
8306 (tdesc_s390_linux64v1): Likewise.
8307 (init_registers_s390_linux64v2): Likewise.
8308 (tdesc_s390_linux64v2): Likewise.
8309 (init_registers_s390_te_linux64): Likewise.
8310 (tdesc_s390_te_linux64): Likewise.
8311 (init_registers_s390_vx_linux64): Likewise.
8312 (tdesc_s390_vx_linux64): Likewise.
8313 (init_registers_s390_tevx_linux64): Likewise.
8314 (tdesc_s390_tevx_linux64): Likewise.
8315 (init_registers_s390x_linux64): Likewise.
8316 (tdesc_s390x_linux64): Likewise.
8317 (init_registers_s390x_linux64v1): Likewise.
8318 (tdesc_s390x_linux64v1): Likewise.
8319 (init_registers_s390x_linux64v2): Likewise.
8320 (tdesc_s390x_linux64v2): Likewise.
8321 (init_registers_s390x_te_linux64): Likewise.
8322 (tdesc_s390x_te_linux64): Likewise.
8323 (init_registers_s390x_vx_linux64): Likewise.
8324 (tdesc_s390x_vx_linux64): Likewise.
8325 (init_registers_s390x_tevx_linux64): Likewise.
8326 (tdesc_s390x_tevx_linux64): Likewise.
8327 (have_hwcap_s390_vx): New static variable.
8328 (s390_arch_setup): Fill have_hwcap_s390_vx.
8329 (s390_get_thread_area): New function.
8330 (s390_ft_entry_gpr_esa): New const.
8331 (s390_ft_entry_gpr_zarch): New const.
8332 (s390_ft_entry_misc): New const.
8333 (s390_ft_entry_fr): New const.
8334 (s390_ft_entry_vr): New const.
8335 (s390_ft_main_31): New const.
8336 (s390_ft_main_64): New const.
8337 (s390_ft_exit_fr): New const.
8338 (s390_ft_exit_vr): New const.
8339 (s390_ft_exit_misc): New const.
8340 (s390_ft_exit_gpr_esa): New const.
8341 (s390_ft_exit_gpr_zarch): New const.
8342 (append_insns): New function.
8343 (s390_relocate_instruction): New function.
8344 (s390_install_fast_tracepoint_jump_pad): New function.
8345 (s390_get_min_fast_tracepoint_insn_len): New function.
8346 (s390_get_ipa_tdesc_idx): New function.
8347 (struct linux_target_ops): Wire in the above functions.
8348 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8349 * linux-s390-tdesc.h: New file.
8350
8351 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8352
8353 * linux-s390-low.c (s390_supports_tracepoints): New function.
8354 (struct linux_target_ops): Fill supports_tracepoints hook.
8355
8356 2016-03-18 Yao Qi <yao.qi@linaro.org>
8357
8358 * linux-low.c (lwp_signal_can_be_delivered): New function.
8359 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8360
8361 2016-03-18 Yao Qi <yao.qi@linaro.org>
8362
8363 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8364 0 if signal is enqueued. Remove 'signal' from one debugging
8365 message. Move one debugging message to some lines below.
8366 Remove code setting 'signal' to 0.
8367
8368 2016-03-18 Yao Qi <yao.qi@linaro.org>
8369
8370 * linux-low.c (linux_low_filter_event): Remove redundant
8371 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8372
8373 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8374
8375 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8376 (struct linux_target_ops): Wire in the above.
8377
8378 2016-03-03 Yao Qi <yao.qi@linaro.org>
8379
8380 * linux-low.c: Update comments to start_step_over.
8381
8382 2016-03-03 Yao Qi <yao.qi@linaro.org>
8383
8384 PR server/19736
8385 * linux-low.c (handle_extended_wait): Set child suspended
8386 if event_lwp->bp_reinsert isn't zero.
8387
8388 2016-03-02 Yao Qi <yao.qi@linaro.org>
8389
8390 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8391 enqueue_pending_signal.
8392
8393 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8394
8395 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8396 is actually loaded.
8397
8398 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8399
8400 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8401 (s390_regmap_3264) [!__s390x__]: New global.
8402 (s390_collect_ptrace_register): Skip map entries containing -1.
8403 (s390_supply_ptrace_register): Ditto.
8404 (s390_fill_gprs_high): New function.
8405 (s390_store_gprs_high): New function.
8406 (s390_regsets): Add NT_S390_HIGH_GPRS.
8407 (s390_get_hwcap): Enable on 31-bit.
8408 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8409 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8410 Detect NT_S390_HIGH_GPRS.
8411 (s390_usrregs_info_3264): Enable on 31-bit.
8412 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8413 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8414
8415 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8416
8417 PR gdb/13808
8418 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8419 * configure.srv: Ditto.
8420 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8421 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8422 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8423 (init_registers_amd64_linux): Remove prototype.
8424 (tdesc_amd64_linux): Remove declaration.
8425 (get_ipa_tdesc): New function.
8426 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8427 initialize remaining tdescs.
8428 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8429 (init_registers_i386_linux): Remove prototype.
8430 (tdesc_i386_linux): Remove declaration.
8431 (get_ipa_tdesc): New function.
8432 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8433 initialize remaining tdescs.
8434 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8435 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8436 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8437 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8438 (x86_get_ipa_tdesc_idx): New function.
8439 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8440 * linux-x86-tdesc.h: New file.
8441 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8442 (target_get_ipa_tdesc_idx): New macro.
8443 * tracepoint.c (ipa_tdesc_idx): New macro.
8444 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8445 (symbol_list): Add ipa_tdesc_idx.
8446 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8447 (ipa_tdesc): Remove.
8448 (ipa_tdesc_idx): New variable.
8449 (get_context_regcache): Use get_ipa_tdesc.
8450 (gdb_collect): Ditto.
8451 (gdb_probe): Ditto.
8452 * tracepoint.h (get_ipa_tdesc): New prototype.
8453 (ipa_tdesc): Remove.
8454
8455 2016-02-24 Pedro Alves <palves@redhat.com>
8456
8457 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8458 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8459 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8460 Factor out common code between the USE_SIGTRAP_SIGINFO and
8461 !USE_SIGTRAP_SIGINFO blocks.
8462 (linux_low_filter_event): Call save_stop_reason instead of
8463 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8464 Update comments.
8465 (linux_wait_1): Update comments.
8466
8467 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8468
8469 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8470 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8471 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8472 ppc_insert_point, ppc_remove_point.
8473
8474 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8475
8476 * linux-s390-low.c (s390_supports_z_point_type): New function.
8477 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8478
8479 2016-02-16 Yao Qi <yao.qi@linaro.org>
8480
8481 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8482 PC. Get pc from regcache_read_pc.
8483
8484 2016-02-12 Yao Qi <yao.qi@linaro.org>
8485
8486 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8487 or linux_get_pc_32bit.
8488 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8489
8490 2016-02-12 Yao Qi <yao.qi@linaro.org>
8491
8492 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8493 arm_linux_get_next_pcs_fixup.
8494
8495 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8496
8497 * tracepoint.c (x_tracepoint_action_download): Change
8498 write_inferior_data_ptr to write_inferior_data_pointer.
8499 (cmd_qtstart): Likewise.
8500 (write_inferior_data_ptr): Remove.
8501 (download_agent_expr): Change write_inferior_data_ptr to
8502 write_inferior_data_pointer.
8503 (download_tracepoint_1): Likewise.
8504 (download_tracepoint): Likewise.
8505 (download_trace_state_variables): Likewise.
8506
8507 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8508 Marcin Kościelnicki <koriakin@0x04.net>
8509
8510 * tracepoint.c (struct tracepoint_action_ops): Remove.
8511 (struct tracepoint_action): Remove ops.
8512 (m_tracepoint_action_download, r_tracepoint_action_download)
8513 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8514 size and offset accordingly.
8515 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8516 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8517 (tracepoint_action_send, tracepoint_action_download): New functions.
8518 Helpers for trace action handlers.
8519 (add_tracepoint_action): Remove setup actions ops.
8520 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8521
8522 2016-02-10 Yao Qi <yao.qi@linaro.org>
8523
8524 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8525
8526 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8527
8528 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8529 to AC_OUTPUT.
8530 * configure: Regenerate.
8531
8532 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8533
8534 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8535 void * to gdb_byte *.
8536 * linux-low.c (siginfo_fixup): Likewise.
8537 (linux_xfer_siginfo): Likewise.
8538 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8539 Likewise.
8540 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8541
8542 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8543
8544 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8545 to srv_tgtobj.
8546 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8547 to srv_tgtobj.
8548 * linux-x86-low.c [__x86_64__]: Include
8549 "nat/amd64-linux-siginfo.h".
8550 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8551 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8552 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8553 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8554 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8555 (cpt_si_fd, si_timerid, si_overrun): Move from
8556 nat/amd64-linux-siginfo.c.
8557 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8558
8559 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8560
8561 * server.c (skip_to_semicolon): Remove.
8562 (process_point_options): Use strchrnul instead of
8563 skip_to_semicolon.
8564
8565 2016-01-26 Yao Qi <yao.qi@linaro.org>
8566
8567 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8568 * linux-low.c (install_software_single_step_breakpoints): Don't
8569 call regcache_read_pc.
8570 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8571 argument pc.
8572
8573 2016-01-26 Yao Qi <yao.qi@linaro.org>
8574
8575 * linux-low.c (install_software_single_step_breakpoints): Call
8576 regcache_read_pc instead of get_pc.
8577
8578 2016-01-26 Yao Qi <yao.qi@linaro.org>
8579
8580 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8581 (unblock_async_io): Rename to ...
8582 (block_unblock_async_io): ... it. New function.
8583 (enable_async_io): Don't install SIGIO handler. Unblock it
8584 instead.
8585 (disable_async_io): Don't ignore SIGIO. Block it instead.
8586 (initialize_async_io): Install SIGIO handler. Don't call
8587 unblock_async_io.
8588
8589 2016-01-26 Yao Qi <yao.qi@linaro.org>
8590
8591 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8592 first character is '\003', call *the_target->request_interrupt.
8593
8594 2016-01-25 Yao Qi <yao.qi@linaro.org>
8595
8596 * remote-utils.c (new_thread_notify): Remove.
8597 (dead_thread_notify): Likewise.
8598 * remote-utils.h (new_thread_notify): Remove declaration.
8599 (dead_thread_notify): Likewise.
8600
8601 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8602
8603 * gdb.trace/pending.exp: Fix expected message on continue.
8604
8605 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8606
8607 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8608 it works properly on big-endian machines where sizeof (CORE_ADDR)
8609 != sizeof (void *).
8610
8611 2016-01-21 Pedro Alves <palves@redhat.com>
8612
8613 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8614 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8615 * configure: Regenerate.
8616
8617 2016-01-21 Yao Qi <yao.qi@linaro.org>
8618
8619 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8620 is_thumb and set it according to CPSR saved on the stack.
8621 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8622 arm_sigreturn_next_pc.
8623
8624 2016-01-18 Yao Qi <yao.qi@linaro.org>
8625
8626 * linux-low.c (linux_set_pc_64bit): New function.
8627 (linux_get_pc_64bit): New function.
8628 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8629 Declare.
8630 * linux-sparc-low.c (debug_threads): Remove declaration.
8631 (sparc_get_pc): Remove.
8632 (the_low_target): Use linux_get_pc_64bit instead of
8633 sparc_get_pc.
8634 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8635 (the_low_target): Use linux_get_pc_64bit and
8636 linux_set_pc_64bit.
8637
8638 2016-01-18 Yao Qi <yao.qi@linaro.org>
8639
8640 * linux-arm-low.c (debug_threads): Remove declaration.
8641 (arm_get_pc, arm_set_pc): Remove.
8642 (the_low_target): Use linux_get_pc_32bit and
8643 linux_set_pc_32bit.
8644 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8645 (the_low_target): Use linux_get_pc_32bit and
8646 linux_set_pc_32bit.
8647 * linux-cris-low.c (debug_threads): Remove declaration.
8648 (cris_get_pc, cris_set_pc,): Remove.
8649 (the_low_target): Use linux_get_pc_32bit and
8650 linux_set_pc_32bit.
8651 * linux-crisv32-low.c (debug_threads): Remove declaration.
8652 (cris_get_pc, cris_set_pc): Remove.
8653 (the_low_target): Use linux_get_pc_32bit and
8654 linux_set_pc_32bit.
8655 * linux-low.c: Include inttypes.h.
8656 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8657 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8658 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8659 (the_low_target): Use linux_get_pc_32bit and
8660 linux_set_pc_32bit.
8661 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8662 (the_low_target): Use linux_get_pc_32bit and
8663 linux_set_pc_32bit.
8664 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8665 (the_low_target): Use linux_get_pc_32bit and
8666 linux_set_pc_32bit.
8667 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8668 (the_low_target): Use linux_get_pc_32bit and
8669 linux_set_pc_32bit.
8670 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8671 (the_low_target): Use linux_get_pc_32bit and
8672 linux_set_pc_32bit.
8673
8674 2016-01-18 Gary Benson <gbenson@redhat.com>
8675
8676 * configure.ac (AC_FUNC_FORK): New check.
8677 * config.in: Regenerate.
8678 * configure: Likewise.
8679
8680 2016-01-14 Yao Qi <yao.qi@linaro.org>
8681
8682 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8683 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8684 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8685 arm_get_next_pcs_ctor.
8686
8687 2016-01-12 Josh Stone <jistone@redhat.com>
8688 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8689
8690 * inferiors.h: Include "gdb_vecs.h".
8691 (struct process_info): Add syscalls_to_catch.
8692 * inferiors.c (remove_process): Free syscalls_to_catch.
8693 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8694 syscall_return stops.
8695 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8696 * server.c (handle_general_set): Handle QCatchSyscalls.
8697 (handle_query): Report support for QCatchSyscalls.
8698 * target.h (struct target_ops): Add supports_catch_syscall.
8699 (target_supports_catch_syscall): New macro.
8700 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8701 (struct lwp_info): Add syscall_state.
8702 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8703 Maintain syscall_state and syscalls_to_catch across exec.
8704 (get_syscall_trapinfo): New function, proxy to the_low_target.
8705 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8706 (linux_low_filter_event): Toggle syscall_state entry/return for
8707 syscall traps, and set it ignored for all others.
8708 (gdb_catching_syscalls_p): New function.
8709 (gdb_catch_this_syscall_p): New function.
8710 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8711 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8712 (linux_supports_catch_syscall): New function.
8713 (linux_target_ops): Install it.
8714 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8715 (the_low_target): Install it.
8716
8717 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8718
8719 * acinclude.m4: Include new ../warning.m4 file.
8720 * configure: Regenerated.
8721 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8722
8723 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8724
8725 * ax.c (is_goto_target): Mark static.
8726 * linux-low.c (register_addr): Likewise.
8727 (linux_fetch_registers, linux_store_registers): Likewise.
8728 * mem-break.c (any_persistent_commands): Fix old prototype.
8729 (add_commands_to_breakpoint): Mark static.
8730 * regcache.c (find_register_by_name): Delete unused func.
8731 * remote-utils.c (hex_or_minus_one): Mark static.
8732 * server.c (monitor_show_help): Mark static.
8733 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8734 handle_v_requests): Likewise.
8735
8736 2016-01-12 Pedro Alves <palves@redhat.com>
8737
8738 Remove use of the registered trademark symbol throughout.
8739
8740 2016-01-08 Yao Qi <yao.qi@linaro.org>
8741
8742 * remote-utils.c (getpkt): If c is '\003', call target hook
8743 request_interrupt.
8744
8745 2016-01-06 Yao Qi <yao.qi@linaro.org>
8746
8747 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8748 linux-aarch32-low.c.
8749 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8750 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8751 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8752 (thumb2_breakpoint): Declare.
8753 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8754 linux-aarch32-low.h.
8755 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8756 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8757 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8758
8759 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8760
8761 * gdbreplay.c (gdbreplay_version): Change copyright year in
8762 version message.
8763 * server.c (gdbserver_version): Likewise.
8764
8765 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8766
8767 * server.c (crc32_table): Delete.
8768 (crc32): Use libiberty's xcrc32 function.
8769
8770 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8771
8772 * lynx-low.c (lynx_delete_thread_callback): New function.
8773 (lynx_mourn): Properly delete our process and all of its
8774 threads. Remove call to clear_inferiors.
8775
8776 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8777
8778 * target.c (thread_search_callback): Add check that
8779 the thread_stopped target callback is not NULL before
8780 calling it.
8781
8782 2015-12-21 Yao Qi <yao.qi@linaro.org>
8783
8784 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8785 arm breakpoint.
8786
8787 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8788
8789 * server.c (handle_query): Call target_supports_software_single_step.
8790
8791 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8792
8793 * linux-low.c (single_step): New function.
8794 (linux_resume_one_lwp_throw): Call single_step.
8795 (start_step_over): Likewise.
8796
8797 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8798
8799 * Makefile.in (SFILES): Append arch/arm-linux.c,
8800 arch/arm-get-next-pcs.c.
8801 (arm-linux.o): New rule.
8802 (arm-get-next-pcs.o): New rule.
8803 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8804 arm-linux.o.
8805 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8806 to linux-aarch32-low.c.
8807 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8808 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8809 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8810 (thumb2_breakpoint_len): Likewise.
8811 (arm_is_thumb_mode): Make non-static.
8812 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8813 from linux-aarch32-low.c.
8814 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8815 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8816 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8817 (thumb2_breakpoint_len): Likewise.
8818 (arm_is_thumb_mode): New declaration.
8819 * linux-arm-low.c: Include arch/arm-linux.h
8820 aarch/arm-get-next-pcs.h, sys/syscall.h.
8821 (get_next_pcs_ops): New struct.
8822 (get_next_pcs_addr_bits_remove): New function.
8823 (get_next_pcs_is_thumb): New function.
8824 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8825 (arm_sigreturn_next_pc): Likewise.
8826 (get_next_pcs_syscall_next_pc): Likewise.
8827 (arm_gdbserver_get_next_pcs): Likewise.
8828 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8829 Initialize.
8830 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8831 * server.h: Include gdb_vecs.h.
8832
8833 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8834
8835 * Makefile.in (SFILES): Append common/common-regcache.c.
8836 (OBS): Append common-regcache.o.
8837 (common-regcache.o): New rule.
8838 * regcache.c (init_register_cache): Initialize cache to
8839 REG_UNAVAILABLE.
8840 (regcache_raw_read_unsigned): New function.
8841 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8842 register_status enum.
8843
8844 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8845
8846 * linux-aarch64-low.c (the_low_targets): Rename
8847 breakpoint_reinsert_addr to get_next_pcs.
8848 * linux-arm-low.c (the_low_targets): Likewise.
8849 * linux-bfin-low.c (the_low_targets): Likewise.
8850 * linux-cris-low.c (the_low_targets): Likewise.
8851 * linux-crisv32-low.c (the_low_targets): Likewise.
8852 * linux-low.c (can_software_single_step): Likewise.
8853 (install_software_single_step_breakpoints): New function.
8854 (start_step_over): Use install_software_single_step_breakpoints.
8855 * linux-low.h: New CORE_ADDR vector.
8856 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8857 get_next_pcs.
8858 * linux-mips-low.c (the_low_targets): Likewise.
8859 * linux-nios2-low.c (the_low_targets): Likewise.
8860 * linux-sparc-low.c (the_low_targets): Likewise.
8861
8862 2015-12-17 Pedro Alves <palves@redhat.com>
8863
8864 * linux-low.c (linux_kill_one_lwp): Remove references to
8865 LinuxThreads.
8866 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8867 to 'kill'.
8868 (linux_init_signals): Delete.
8869 (initialize_low): Adjust.
8870 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8871
8872 2015-12-16 Pedro Alves <palves@redhat.com>
8873
8874 * configure.ac (compiler warning flags): When testing a
8875 -Wno-foo option, check whether -Wfoo works instead.
8876 * configure: Regenerate.
8877
8878 2015-12-11 Don Breazeal <donb@codesourcery.com>
8879
8880 * server.c (process_serial_event): Don't exit from gdbserver
8881 in remote mode if there are still active inferiors.
8882
8883 2015-12-11 Yao Qi <yao.qi@linaro.org>
8884
8885 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8886 arm_breakpoint_at if the process is 32-bit.
8887
8888 2015-12-11 Yao Qi <yao.qi@linaro.org>
8889
8890 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8891 arm breakpoint.
8892
8893 2015-12-07 Yao Qi <yao.qi@linaro.org>
8894
8895 * configure.srv: Append arm.o to srv_tgtobj for
8896 aarch64*-*-linux* target.
8897 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8898 from linux-arm-low.c.
8899 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8900 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8901 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8902 (thumb2_breakpoint_len): Likewise.
8903 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8904 (arm_breakpoint_kinds): Likewise.
8905 (arm_breakpoint_kind_from_pc): Likewise.
8906 (arm_sw_breakpoint_from_kind): Likewise.
8907 (arm_breakpoint_kind_from_current_state): Likewise.
8908 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8909 (arm_sw_breakpoint_from_kind): Declare.
8910 (arm_breakpoint_kind_from_current_state): Declare.
8911 (arm_breakpoint_at): Declare.
8912 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8913 arm_sw_breakpoint_from_kind if process is 32-bit.
8914 (aarch64_breakpoint_kind_from_pc): New function.
8915 (aarch64_breakpoint_kind_from_current_state): New function.
8916 (the_low_target): Initialize fields breakpoint_kind_from_pc
8917 and breakpoint_kind_from_current_state.
8918 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8919 linux-aarch32-low.c.
8920 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8921 (arm_breakpoint, arm_breakpoint_len): Likewise.
8922 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8923 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8924 (arm_is_thumb_mode): Likewise.
8925 (arm_breakpoint_at): Likewise.
8926 (arm_breakpoint_kind_from_pc): Likewise.
8927 (arm_sw_breakpoint_from_kind): Likewise.
8928 (arm_breakpoint_kind_from_current_state): Likewise.
8929
8930 Revert:
8931 2015-08-04 Yao Qi <yao.qi@linaro.org>
8932
8933 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8934 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8935 * server.c (extended_protocol): Remove "static".
8936 * server.h (extended_protocol): Declare it.
8937
8938 2015-12-04 Josh Stone <jistone@redhat.com>
8939
8940 * target.h (struct target_ops) <arch_setup>: Rename to ...
8941 (struct target_ops) <post_create_inferior>: ... this.
8942 (target_arch_setup): Rename to ...
8943 (target_post_create_inferior): ... this, calling post_create_inferior.
8944 * server.c (start_inferior): Update target_arch_setup calls to
8945 target_post_create_inferior.
8946 * linux-low.c (linux_low_ptrace_options): Forward declare.
8947 (linux_arch_setup): Update its comment for general use.
8948 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8949 (struct linux_target_ops): Use linux_post_create_inferior.
8950 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8951 to post_create_inferior.
8952 * nto-low.c (struct nto_target_ops): Likewise.
8953 * spu-low.c (struct spu_target_ops): Likewise.
8954 * win32-low.c (struct win32_target_ops): Likewise.
8955
8956 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8957
8958 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8959
8960 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8961
8962 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8963 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8964 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8965 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8966 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8967 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8968 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8969 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8970 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8971 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8972 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8973 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8974
8975 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8976
8977 * linux-low.c (linux_look_up_symbols): Don't call
8978 linux_supports_traceclone.
8979 * linux-low.h (thread_db_init): Remove use_events argument.
8980 * thread-db.c (thread_db_use_event): Remove global variable.
8981 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8982 (struct thread_db) <td_create_bp>: Remove field.
8983 (thread_db_create_event): Remove function.
8984 (thread_db_enable_reporting): Likewise.
8985 (find_one_thread): Don't check for thread_db_use_events.
8986 (attach_thread): Likewise.
8987 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8988 (try_thread_db_load_1): Don't check for thread_db_use_events.
8989 (thread_db_init): Remove use_events argument and thread events
8990 handling.
8991 (remove_thread_event_breakpoints): Remove function.
8992 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8993
8994 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8995
8996 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8997 New function.
8998 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8999 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9000 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9001 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9002 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9003 Initialize.
9004 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9005 New function.
9006 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9007 * linux-low.c (can_hardware_single_step): Use
9008 supports_hardware_single_step.
9009 (can_software_single_step): New function.
9010 (start_step_over): Call can_software_single_step.
9011 (linux_supports_hardware_single_step): New function.
9012 (struct target_ops) <supports_software_single_step>: Initialize.
9013 * linux-low.h (struct linux_target_ops)
9014 <supports_hardware_single_step>: Initialize.
9015 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9016 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9017 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9018 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9019 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9020 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9021 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9022 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9023 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9024 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9025 Initialize.
9026 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9027 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9028 Initialize.
9029 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9030 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9031 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9032 New function.
9033 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9034 * target.h (struct target_ops): <supports_software_single_step>:
9035 New field.
9036 (target_supports_software_single_step): New macro.
9037
9038 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9039
9040 * linux-low.c (linux_wait_1): Fix pc advance condition.
9041 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9042 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9043
9044 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9045
9046 * linux-arm-low.c (arm_is_thumb_mode): New function.
9047 (arm_breakpoint_at): Use arm_is_thumb_mode.
9048 (arm_breakpoint_kind_from_current_state): New function.
9049 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9050 Initialize.
9051 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9052 (linux_breakpoint_kind_from_current_state): New function.
9053 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9054 * linux-low.h (struct linux_target_ops)
9055 <breakpoint_kind_from_current_state>: New field.
9056 * target.h (struct target_ops): Likewise.
9057 (target_breakpoint_kind_from_current_state): New macro.
9058
9059 2015-11-30 Pedro Alves <palves@redhat.com>
9060
9061 * linux-low.c (linux_resume): Wake up the event loop before
9062 returning.
9063
9064 2015-11-30 Pedro Alves <palves@redhat.com>
9065
9066 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9067 check.
9068 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9069 to -1.
9070 * target.c (struct thread_search): New structure.
9071 (thread_search_callback): New function.
9072 (prev_general_thread): New global.
9073 (prepare_to_access_memory, done_accessing_memory): New functions.
9074 * target.h (prepare_to_access_memory, done_accessing_memory):
9075 Replace macros with function declarations.
9076
9077 2015-11-30 Pedro Alves <palves@redhat.com>
9078
9079 PR 14618
9080 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9081 report TARGET_WAITKIND_NO_RESUMED.
9082 * remote-utils.c (prepare_resume_reply): Handle
9083 TARGET_WAITKIND_NO_RESUMED.
9084 * server.c (report_no_resumed): New global.
9085 (handle_query) <qSupported>: Handle "no-resumed+". Report
9086 "no-resumed+" support.
9087 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9088 return error if the client doesn't support no-resumed events.
9089 (push_stop_notification): New function.
9090 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9091 events if the client supports them.
9092
9093 2015-11-30 Pedro Alves <palves@redhat.com>
9094
9095 * linux-low.c (thread_still_has_status_pending_p): Don't check
9096 vCont;t here.
9097 (lwp_resumed): New function.
9098 (status_pending_p_callback): Return early if the LWP is not
9099 supposed to be resumed.
9100
9101 2015-11-30 Pedro Alves <palves@redhat.com>
9102
9103 * linux-low.c (handle_extended_wait): Assert that the LWP's
9104 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9105 thread create events, leave the new child's status pending.
9106 (linux_low_filter_event): If GDB wants to hear about thread exit
9107 events, leave the LWP marked dead and don't delete it.
9108 (linux_wait_for_event_filtered): Don't check for thread exit.
9109 (filter_exit_event): New function.
9110 (linux_wait_1): Use it, when returning an exit event.
9111 (linux_resume_one_lwp_throw): Assert that the LWP's
9112 waitstatus is TARGET_WAITKIND_IGNORE.
9113 * remote-utils.c (prepare_resume_reply): Handle
9114 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9115 * server.c (report_thread_events): New global.
9116 (handle_general_set): Handle QThreadEvents.
9117 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9118 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9119 TARGET_WAITKIND_THREAD_EXITED.
9120 * server.h (report_thread_events): Declare.
9121
9122 2015-11-30 Pedro Alves <palves@redhat.com>
9123
9124 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9125 the thread's last_resume_kind was resume_stop.
9126
9127 2015-11-30 Pedro Alves <palves@redhat.com>
9128
9129 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9130 before returning.
9131
9132 2015-11-30 Pedro Alves <palves@redhat.com>
9133
9134 * server.c (handle_v_requests): Handle vCtrlC.
9135
9136 2015-11-30 Pedro Alves <palves@redhat.com>
9137
9138 * gdbthread.h (find_any_thread_of_pid): Declare.
9139 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9140 functions.
9141 * server.c (handle_query): If current_thread is NULL, look for
9142 another thread of the selected process.
9143
9144 2015-11-26 Daniel Colascione <dancol@dancol.org>
9145 Simon Marchi <simon.marchi@ericsson.com>
9146
9147 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9148 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9149 name in reply.
9150 * target.h (struct target_ops) <thread_name>: New field.
9151 (target_thread_name): New macro.
9152
9153 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9154
9155 * regcache.h (regcache_invalidate_pid): Add declaration.
9156 * regcache.c (regcache_invalidate_pid): New function, extracted
9157 from regcache_invalidate.
9158 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9159 Add trivial documentation comment.
9160 * lynx-low.c: Use regcache_invalidate_pid instead of
9161 regcache_invalidate.
9162
9163 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9164
9165 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9166 and Elf64_auxv_t if the target is Android.
9167
9168 2015-11-22 Doug Evans <xdje42@gmail.com>
9169
9170 * target.h: #include <sys/types.h>.
9171
9172 2015-11-19 Pedro Alves <palves@redhat.com>
9173
9174 * linux-low.c (linux_process_qsupported): Change prototype.
9175 Adjust.
9176 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9177 Change prototype.
9178 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9179 and adjust to loop over all features.
9180 * server.c (handle_query) <qSupported>: Adjust to call
9181 target_process_qsupported once, passing it a vector of unprocessed
9182 features.
9183 * target.h (struct target_ops) <process_qsupported>: Change
9184 prototype.
9185 (target_process_qsupported): Adjust.
9186
9187 2015-11-19 Pedro Alves <palves@redhat.com>
9188
9189 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9190 mode.
9191 * configure: Regenerate.
9192
9193 2015-11-19 Pedro Alves <palves@redhat.com>
9194
9195 * configure: Regenerate.
9196
9197 2015-11-19 Yao Qi <yao.qi@linaro.org>
9198
9199 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9200 type to uint32_t.
9201
9202 2015-11-19 Yao Qi <yao.qi@linaro.org>
9203
9204 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9205 (struct aarch64_operand): Move enum out.
9206
9207 2015-11-19 Yao Qi <yao.qi@linaro.org>
9208
9209 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9210 struct user_fpsimd_state *.
9211 (aarch64_store_fpregset): Likewise.
9212
9213 2015-11-19 Yao Qi <yao.qi@linaro.org>
9214
9215 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9216 struct user_pt_regs *.
9217 (aarch64_store_gregset): Likewise.
9218
9219 2015-11-18 Pedro Alves <palves@redhat.com>
9220
9221 * Makefile.in (all_object_files): Add $IPA_OBJS.
9222
9223 2015-11-17 Pedro Alves <palves@redhat.com>
9224
9225 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9226 GDB_SIGNAL_0 and gdb_signal_to_string.
9227
9228 2015-11-17 Pedro Alves <palves@redhat.com>
9229
9230 * win32-low.c (handle_output_debug_string): Remove parameter.
9231 (win32_kill): Remove our_status local and adjust call to
9232 handle_output_debug_string.
9233 (get_child_debug_event): Adjust call to
9234 handle_output_debug_string.
9235
9236 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9237
9238 * linux-mips-low.c (mips_fill_gregset): Add cast.
9239 (mips_store_gregset): Likewise.
9240 (mips_fill_fpregset): Likewise.
9241 (mips_store_fpregset): Likewise.
9242
9243 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9244
9245 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9246 priv.
9247
9248 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9249
9250 * linux-mips-low.c (mips_linux_new_thread): Change type of
9251 watch_type to enum target_hw_bp_type.
9252
9253 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9254
9255 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9256 Change return type to arm_hwbp_type.
9257
9258 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9259
9260 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9261 (arm_store_gregset): Likewise.
9262 * linux-arm-low.c (arm_get_hwcap): Likewise.
9263 (arm_read_description): Likewise.
9264
9265 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9266
9267 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9268
9269 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9270
9271 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9272 (ppc_fill_vsxregset): Likewise.
9273 (ppc_store_vsxregset): Likewise.
9274 (ppc_fill_vrregset): Likewise.
9275 (ppc_store_vrregset): Likewise.
9276 (ppc_fill_evrregset): Likewise.
9277 (ppc_store_evrregset): Likewise.
9278
9279 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9280
9281 * linux-ppc-low.c (ppc_usrregs_info): Remove
9282 forward-declaration.
9283 (ppc_arch_setup): Move lower in file.
9284
9285 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9286
9287 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9288 (ps_pdwrite): Likewise.
9289
9290 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9291
9292 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9293 to after assert checks.
9294
9295 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9296
9297 * proc-service.c (ps_pdread): Add/adjust casts.
9298 (ps_pdwrite): Add/adjust casts.
9299
9300 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9301
9302 * server.c (handle_search_memory_1): Cast return value of
9303 memmem.
9304
9305 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9306
9307 * server.c (write_qxfer_response): Change type of data to
9308 gdb_byte *.
9309
9310 2015-10-29 Pedro Alves <palves@redhat.com>
9311
9312 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9313
9314 2015-10-29 Pedro Alves <palves@redhat.com>
9315
9316 * tracepoint.c (clear_installed_tracepoints): Add casts.
9317
9318 2015-10-29 Pedro Alves <palves@redhat.com>
9319
9320 * server.c (handle_v_cont, process_serial_event): Add enum
9321 gdb_signal casts to signal parsing code.
9322
9323 2015-10-29 Pedro Alves <palves@redhat.com>
9324
9325 * linux-low.h (NULL_REGSET): Define.
9326 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9327 * linux-arm-low.c (arm_regsets): Likewise.
9328 * linux-crisv32-low.c (cris_regsets): Likewise.
9329 * linux-m68k-low.c (m68k_regsets): Likewise.
9330 * linux-mips-low.c (mips_regsets): Likewise.
9331 * linux-nios2-low.c (nios2_regsets): Likewise.
9332 * linux-ppc-low.c (ppc_regsets): Likewise.
9333 * linux-s390-low.c (s390_regsets): Likewise.
9334 * linux-sh-low.c (sh_regsets): Likewise.
9335 * linux-sparc-low.c (sparc_regsets): Likewise.
9336 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9337 * linux-tile-low.c (tile_regsets): Likewise.
9338 * linux-x86-low.c (x86_regsets): Likewise.
9339 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9340
9341 2015-10-29 Pedro Alves <palves@redhat.com>
9342
9343 * linux-low.h (NULL_REGSET): Define.
9344 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9345 * linux-arm-low.c (arm_regsets): Likewise.
9346 * linux-crisv32-low.c (cris_regsets): Likewise.
9347 * linux-m68k-low.c (m68k_regsets): Likewise.
9348 * linux-mips-low.c (mips_regsets): Likewise.
9349 * linux-nios2-low.c (nios2_regsets): Likewise.
9350 * linux-ppc-low.c (ppc_regsets): Likewise.
9351 * linux-s390-low.c (s390_regsets): Likewise.
9352 * linux-sh-low.c (sh_regsets): Likewise.
9353 * linux-sparc-low.c (sparc_regsets): Likewise.
9354 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9355 * linux-tile-low.c (tile_regsets): Likewise.
9356 * linux-x86-low.c (x86_regsets): Likewise.
9357 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9358
9359 2015-10-26 Doug Evans <dje@google.com>
9360
9361 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9362
9363 2015-10-26 Doug Evans <dje@google.com>
9364
9365 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9366
9367 2015-10-26 Doug Evans <dje@google.com>
9368
9369 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9370 for debug_printf.
9371 (attach_thread, find_new_threads_callback): Ditto.
9372
9373 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9374
9375 * mem-break.h (set_breakpoint_data): Remove.
9376
9377 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9378
9379 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9380 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9381 (initialize_low): Remove set_breakpoint_data call.
9382 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9383 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9384 (initialize_low): Remove set_breakpoint_data call.
9385 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9386 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9387 (initialize_low): Remove set_breakpoint_data call.
9388
9389 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9390
9391 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9392 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9393 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9394 * target.h (target_breakpoint_kind_from_pc): New macro.
9395
9396 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9397
9398 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9399 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9400 the default breakpoint kind.
9401
9402 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9403
9404 * linux-arm-low.c (arm_supports_z_point_type): Add software
9405 breakpoint support.
9406
9407 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9408
9409 * linux-arm-low.c: Refactor breakpoint definitions.
9410 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9411 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9412
9413 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9414
9415 * Makefile.in: Add arm.c/o.
9416 * configure.srv: Likewise.
9417 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9418 (arm_breakpoint_kind_from_pc): New function.
9419 (arm_sw_breakpoint_from_kind): Return proper kind.
9420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9421
9422 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9423
9424 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9425 removal.
9426 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9427 (struct raw_breakpoint) <size>: Remove.
9428 (struct raw_breakpoint) <kind>: Add.
9429 (bp_size): New function.
9430 (bp_opcode): Likewise.
9431 (find_raw_breakpoint_at): Adjust for kind.
9432 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9433 (remove_memory_breakpoint): Adjust for kind call bp_size.
9434 (set_raw_breakpoint_at): Adjust for kind.
9435 (set_breakpoint): Likewise.
9436 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9437 (delete_raw_breakpoint): Adjust for kind.
9438 (delete_breakpoint): Likewise.
9439 (find_gdb_breakpoint): Likewise.
9440 (set_gdb_breakpoint_1): Likewise.
9441 (set_gdb_breakpoint): Likewise.
9442 (delete_gdb_breakpoint_1): Likewise.
9443 (delete_gdb_breakpoint): Likewise.
9444 (uninsert_raw_breakpoint): Likewise.
9445 (reinsert_raw_breakpoint): Likewise.
9446 (set_breakpoint_data): Remove.
9447 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9448 (check_mem_read): Adjust for kind call bp_size.
9449 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9450 (clone_one_breakpoint): Adjust for kind.
9451 * mem-break.h (set_gdb_breakpoint): Likewise.
9452 (delete_gdb_breakpoint): Likewise.
9453 * server.c (process_serial_event): Likewise.
9454
9455 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9456
9457 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9458 (struct linux_target_ops) <breakpoint>: Remove.
9459 (struct linux_target_ops) <breakpoint_len>: Remove.
9460 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9462 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9463 (arm_sw_breakpoint_from_kind): New function.
9464 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9465 (struct linux_target_ops) <breakpoint>: Remove.
9466 (struct linux_target_ops) <breakpoint_len>: Remove.
9467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9469 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9470 (struct linux_target_ops) <breakpoint>: Remove.
9471 (struct linux_target_ops) <breakpoint_len>: Remove.
9472 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9473 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9474 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9475 (struct linux_target_ops) <breakpoint>: Remove.
9476 (struct linux_target_ops) <breakpoint_len>: Remove.
9477 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9478 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9479 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9480 and sw_breakpoint_from_kind to increment the pc.
9481 (linux_breakpoint_kind_from_pc): New function.
9482 (linux_sw_breakpoint_from_kind): New function.
9483 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9484 (initialize_low): Call breakpoint_kind_from_pc and
9485 sw_breakpoint_from_kind to replace breakpoint_data/len.
9486 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9487 New field.
9488 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9489 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9490 (struct linux_target_ops) <breakpoint>: Remove.
9491 (struct linux_target_ops) <breakpoint_len>: Remove.
9492 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9493 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9494 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9495 (struct linux_target_ops) <breakpoint>: Remove.
9496 (struct linux_target_ops) <breakpoint_len>: Remove.
9497 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9498 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9499 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9500 (struct linux_target_ops) <breakpoint>: Remove.
9501 (struct linux_target_ops) <breakpoint_len>: Remove.
9502 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9503 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9504 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9505 (struct linux_target_ops) <breakpoint>: Remove.
9506 (struct linux_target_ops) <breakpoint_len>: Remove.
9507 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9508 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9509 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9510 (struct linux_target_ops) <breakpoint>: Remove.
9511 (struct linux_target_ops) <breakpoint_len>: Remove.
9512 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9513 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9514 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9515 (struct linux_target_ops) <breakpoint>: Remove.
9516 (struct linux_target_ops) <breakpoint_len>: Remove.
9517 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9518 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9519 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9520 (struct linux_target_ops) <breakpoint>: Remove.
9521 (struct linux_target_ops) <breakpoint_len>: Remove.
9522 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9523 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9524 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9525 (struct linux_target_ops) <breakpoint>: Remove.
9526 (struct linux_target_ops) <breakpoint_len>: Remove.
9527 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9528 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9529 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9530 (struct linux_target_ops) <breakpoint>: Remove.
9531 (struct linux_target_ops) <breakpoint_len>: Remove.
9532 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9533 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9534 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9535 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9536 (struct linux_target_ops) <breakpoint>: Remove.
9537 (struct linux_target_ops) <breakpoint_len>: Remove.
9538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9539 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9540 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9541 (struct linux_target_ops) <breakpoint>: Remove.
9542 (struct linux_target_ops) <breakpoint_len>: Remove.
9543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9545
9546 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9547
9548 * linux-cris-low.c (cris_get_pc): Remove void arg.
9549
9550 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9551
9552 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9553 variable name.
9554
9555 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9556
9557 * inferiors.c (thread_pid_matches_callback): New function.
9558 (find_thread_process): New function.
9559 (remove_thread): Reset current_thread.
9560 (remove_process): Assert threads have been removed first.
9561
9562 2015-10-15 Yao Qi <yao.qi@linaro.org>
9563
9564 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9565 if it is 3.
9566 (aarch64_remove_point): Likewise.
9567 * regcache.c (regcache_register_size): New function.
9568
9569 2015-10-12 Yao Qi <yao.qi@linaro.org>
9570
9571 * linux-aarch64-low.c: Update all callers as emit_load_store
9572 is renamed to aarch64_emit_load_store.
9573
9574 2015-10-12 Yao Qi <yao.qi@linaro.org>
9575
9576 * linux-aarch64-low.c: Update all callers of function renaming
9577 from emit_insn to aarch64_emit_insn.
9578
9579 2015-10-12 Yao Qi <yao.qi@linaro.org>
9580
9581 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9582 arch/aarch64-insn.h.
9583 (struct aarch64_memory_operand): Likewise.
9584 (ENCODE): Likewise.
9585 (emit_insn): Move to arch/aarch64-insn.c.
9586 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9587 (emit_load_store): Move to arch/aarch64-insn.c.
9588 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9589 (can_encode_int32): Remove.
9590
9591 2015-10-12 Yao Qi <yao.qi@linaro.org>
9592
9593 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9594 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9595 (aarch64_relocate_instruction): Likewise.
9596 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9597 (struct aarch64_insn_visitor): Likewise.
9598
9599 2015-10-12 Yao Qi <yao.qi@linaro.org>
9600
9601 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9602 (struct aarch64_insn_visitor): New.
9603 (struct aarch64_insn_relocation_data): New.
9604 (aarch64_ftrace_insn_reloc_b): New function.
9605 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9606 (aarch64_ftrace_insn_reloc_cb): Likewise.
9607 (aarch64_ftrace_insn_reloc_tb): Likewise.
9608 (aarch64_ftrace_insn_reloc_adr): Likewise.
9609 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9610 (aarch64_ftrace_insn_reloc_others): Likewise.
9611 (visitor): New.
9612 (aarch64_relocate_instruction): Use visitor.
9613
9614 2015-10-12 Yao Qi <yao.qi@linaro.org>
9615
9616 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9617 int. Add argument buf.
9618 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9619 aarch64_relocate_instruction.
9620
9621 2015-10-12 Yao Qi <yao.qi@linaro.org>
9622
9623 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9624 argument insn. Remove local variable insn. Don't call
9625 target_read_uint32.
9626 (aarch64_install_fast_tracepoint_jump_pad): Call
9627 target_read_uint32.
9628
9629 2015-09-30 Yao Qi <yao.qi@linaro.org>
9630
9631 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9632 (emit_load_store_pair): Likewise.
9633
9634 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9635
9636 * dll.c (match_dll): Add cast(s).
9637 (unloaded_dll): Likewise.
9638 * linux-low.c (second_thread_of_pid_p): Likewise.
9639 (delete_lwp_callback): Likewise.
9640 (count_events_callback): Likewise.
9641 (select_event_lwp_callback): Likewise.
9642 (linux_set_resume_request): Likewise.
9643 * server.c (accumulate_file_name_length): Likewise.
9644 (emit_dll_description): Likewise.
9645 (handle_qxfer_threads_worker): Likewise.
9646 (visit_actioned_threads): Likewise.
9647 * thread-db.c (any_thread_of): Likewise.
9648 * tracepoint.c (same_process_p): Likewise.
9649 (match_blocktype): Likewise.
9650 (build_traceframe_info_xml): Likewise.
9651
9652 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9653
9654 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9655 assignment.
9656 (gdb_unparse_agent_expr): Likewise.
9657 * hostio.c (require_data): Likewise.
9658 (handle_pread): Likewise.
9659 * linux-low.c (disable_regset): Likewise.
9660 (fetch_register): Likewise.
9661 (store_register): Likewise.
9662 (get_dynamic): Likewise.
9663 (linux_qxfer_libraries_svr4): Likewise.
9664 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9665 (set_fast_tracepoint_jump): Likewise.
9666 (uninsert_fast_tracepoint_jumps_at): Likewise.
9667 (reinsert_fast_tracepoint_jumps_at): Likewise.
9668 (validate_inserted_breakpoint): Likewise.
9669 (clone_agent_expr): Likewise.
9670 * regcache.c (init_register_cache): Likewise.
9671 * remote-utils.c (putpkt_binary_1): Likewise.
9672 (decode_M_packet): Likewise.
9673 (decode_X_packet): Likewise.
9674 (look_up_one_symbol): Likewise.
9675 (relocate_instruction): Likewise.
9676 (monitor_output): Likewise.
9677 * server.c (handle_search_memory): Likewise.
9678 (handle_qxfer_exec_file): Likewise.
9679 (handle_qxfer_libraries): Likewise.
9680 (handle_qxfer): Likewise.
9681 (handle_query): Likewise.
9682 (handle_v_cont): Likewise.
9683 (handle_v_run): Likewise.
9684 (captured_main): Likewise.
9685 * target.c (write_inferior_memory): Likewise.
9686 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9687 * tracepoint.c (init_trace_buffer): Likewise.
9688 (add_tracepoint_action): Likewise.
9689 (add_traceframe): Likewise.
9690 (add_traceframe_block): Likewise.
9691 (cmd_qtdpsrc): Likewise.
9692 (cmd_qtdv): Likewise.
9693 (cmd_qtstatus): Likewise.
9694 (response_source): Likewise.
9695 (response_tsv): Likewise.
9696 (cmd_qtnotes): Likewise.
9697 (gdb_collect): Likewise.
9698 (initialize_tracepoint): Likewise.
9699
9700 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9701
9702 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9703 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9704 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9705 <NOP>: New.
9706 (enum aarch64_condition_codes): New enum.
9707 (w0): New static global.
9708 (fp): Likewise.
9709 (lr): Likewise.
9710 (struct aarch64_memory_operand) <type>: New
9711 MEMORY_OPERAND_POSTINDEX type.
9712 (postindex_memory_operand): New helper function.
9713 (emit_ret): New function.
9714 (emit_load_store_pair): New function, factored out of emit_stp
9715 with support for MEMORY_OPERAND_POSTINDEX.
9716 (emit_stp): Rewrite using emit_load_store_pair.
9717 (emit_ldp): New function.
9718 (emit_load_store): Likewise.
9719 (emit_ldr): Mention post-index instruction in comment.
9720 (emit_ldrh): New function.
9721 (emit_ldrb): New function.
9722 (emit_ldrsw): Mention post-index instruction in comment.
9723 (emit_str): Likewise.
9724 (emit_subs): New function.
9725 (emit_cmp): Likewise.
9726 (emit_and): Likewise.
9727 (emit_orr): Likewise.
9728 (emit_orn): Likewise.
9729 (emit_eor): Likewise.
9730 (emit_mvn): Likewise.
9731 (emit_lslv): Likewise.
9732 (emit_lsrv): Likewise.
9733 (emit_asrv): Likewise.
9734 (emit_mul): Likewise.
9735 (emit_sbfm): Likewise.
9736 (emit_sbfx): Likewise.
9737 (emit_ubfm): Likewise.
9738 (emit_ubfx): Likewise.
9739 (emit_csinc): Likewise.
9740 (emit_cset): Likewise.
9741 (emit_nop): Likewise.
9742 (emit_ops_insns): New helper function.
9743 (emit_pop): Likewise.
9744 (emit_push): Likewise.
9745 (aarch64_emit_prologue): New function.
9746 (aarch64_emit_epilogue): Likewise.
9747 (aarch64_emit_add): Likewise.
9748 (aarch64_emit_sub): Likewise.
9749 (aarch64_emit_mul): Likewise.
9750 (aarch64_emit_lsh): Likewise.
9751 (aarch64_emit_rsh_signed): Likewise.
9752 (aarch64_emit_rsh_unsigned): Likewise.
9753 (aarch64_emit_ext): Likewise.
9754 (aarch64_emit_log_not): Likewise.
9755 (aarch64_emit_bit_and): Likewise.
9756 (aarch64_emit_bit_or): Likewise.
9757 (aarch64_emit_bit_xor): Likewise.
9758 (aarch64_emit_bit_not): Likewise.
9759 (aarch64_emit_equal): Likewise.
9760 (aarch64_emit_less_signed): Likewise.
9761 (aarch64_emit_less_unsigned): Likewise.
9762 (aarch64_emit_ref): Likewise.
9763 (aarch64_emit_if_goto): Likewise.
9764 (aarch64_emit_goto): Likewise.
9765 (aarch64_write_goto_address): Likewise.
9766 (aarch64_emit_const): Likewise.
9767 (aarch64_emit_call): Likewise.
9768 (aarch64_emit_reg): Likewise.
9769 (aarch64_emit_pop): Likewise.
9770 (aarch64_emit_stack_flush): Likewise.
9771 (aarch64_emit_zero_ext): Likewise.
9772 (aarch64_emit_swap): Likewise.
9773 (aarch64_emit_stack_adjust): Likewise.
9774 (aarch64_emit_int_call_1): Likewise.
9775 (aarch64_emit_void_call_2): Likewise.
9776 (aarch64_emit_eq_goto): Likewise.
9777 (aarch64_emit_ne_goto): Likewise.
9778 (aarch64_emit_lt_goto): Likewise.
9779 (aarch64_emit_le_goto): Likewise.
9780 (aarch64_emit_gt_goto): Likewise.
9781 (aarch64_emit_ge_got): Likewise.
9782 (aarch64_emit_ops_impl): New static global variable.
9783 (aarch64_emit_ops): New target function, return
9784 &aarch64_emit_ops_impl.
9785 (struct linux_target_ops): Install it.
9786
9787 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9788
9789 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9790 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9791 aarch64-ipa.o.
9792 * linux-aarch64-ipa.c: New file.
9793 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9794 and endian.h.
9795 (aarch64_get_thread_area): New target method.
9796 (extract_signed_bitfield): New helper function.
9797 (aarch64_decode_ldr_literal): New function.
9798 (enum aarch64_opcodes): New enum.
9799 (struct aarch64_register): New struct.
9800 (struct aarch64_operand): New struct.
9801 (x0): New static global.
9802 (x1): Likewise.
9803 (x2): Likewise.
9804 (x3): Likewise.
9805 (x4): Likewise.
9806 (w2): Likewise.
9807 (ip0): Likewise.
9808 (sp): Likewise.
9809 (xzr): Likewise.
9810 (aarch64_register): New helper function.
9811 (register_operand): Likewise.
9812 (immediate_operand): Likewise.
9813 (struct aarch64_memory_operand): New struct.
9814 (offset_memory_operand): New helper function.
9815 (preindex_memory_operand): Likewise.
9816 (enum aarch64_system_control_registers): New enum.
9817 (ENCODE): New macro.
9818 (emit_insn): New helper function.
9819 (emit_b): New function.
9820 (emit_bcond): Likewise.
9821 (emit_cb): Likewise.
9822 (emit_tb): Likewise.
9823 (emit_blr): Likewise.
9824 (emit_stp): Likewise.
9825 (emit_ldp_q_offset): Likewise.
9826 (emit_stp_q_offset): Likewise.
9827 (emit_load_store): Likewise.
9828 (emit_ldr): Likewise.
9829 (emit_ldrsw): Likewise.
9830 (emit_str): Likewise.
9831 (emit_ldaxr): Likewise.
9832 (emit_stxr): Likewise.
9833 (emit_stlr): Likewise.
9834 (emit_data_processing_reg): Likewise.
9835 (emit_data_processing): Likewise.
9836 (emit_add): Likewise.
9837 (emit_sub): Likewise.
9838 (emit_mov): Likewise.
9839 (emit_movk): Likewise.
9840 (emit_mov_addr): Likewise.
9841 (emit_mrs): Likewise.
9842 (emit_msr): Likewise.
9843 (emit_sevl): Likewise.
9844 (emit_wfe): Likewise.
9845 (append_insns): Likewise.
9846 (can_encode_int32_in): New helper function.
9847 (aarch64_relocate_instruction): New function.
9848 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9849 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9850 (struct linux_target_ops): Install aarch64_get_thread_area,
9851 aarch64_install_fast_tracepoint_jump_pad and
9852 aarch64_get_min_fast_tracepoint_insn_len.
9853
9854 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9855
9856 * Makefile.in (aarch64-insn.o): New rule.
9857 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9858
9859 2015-09-21 Yao Qi <yao.qi@linaro.org>
9860
9861 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9862
9863 2015-09-21 Yao Qi <yao.qi@linaro.org>
9864
9865 * tracepoint.c (max_jump_pad_size): Remove.
9866
9867 2015-09-18 Yao Qi <yao.qi@linaro.org>
9868
9869 * linux-aarch64-low.c: Don't include sys/uio.h.
9870 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9871
9872 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9873
9874 * tracepoint.c (eval_result_type): Change prototype.
9875 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9876
9877 2015-09-15 Pedro Alves <palves@redhat.com>
9878
9879 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9880 Check whether to report exec events instead of checking whether
9881 multiprocess is enabled.
9882
9883 2015-09-15 Pedro Alves <palves@redhat.com>
9884
9885 PR remote/18965
9886 * remote-utils.c (prepare_resume_reply): Merge
9887 TARGET_WAITKIND_VFORK_DONE switch case with the
9888 TARGET_WAITKIND_FORKED case.
9889
9890 2015-09-15 Yao Qi <yao.qi@linaro.org>
9891
9892 * server.c (handle_query): Check string comparison using
9893 "else if" instead of "if".
9894
9895 2015-09-15 Yao Qi <yao.qi@linaro.org>
9896
9897 * server.c (vCont_supported): New global variable.
9898 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9899 matches. Append ";vContSupported+" to own_buf.
9900 (handle_v_requests): Append ";s;S" to own_buf if target supports
9901 hardware single step or vCont_supported is false.
9902 (capture_main): Set vCont_supported to zero.
9903
9904 2015-09-15 Yao Qi <yao.qi@linaro.org>
9905
9906 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9907 it to ...
9908 (linux_supports_hardware_single_step): ... New function.
9909 (linux_target_ops): Update.
9910 * lynx-low.c (lynx_target_ops): Set field
9911 supports_hardware_single_step to target_can_do_hardware_single_step.
9912 * nto-low.c (nto_target_ops): Likewise.
9913 * spu-low.c (spu_target_ops): Likewise.
9914 * win32-low.c (win32_target_ops): Likewise.
9915 * target.c (target_can_do_hardware_single_step): New function.
9916 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9917 Remove. <supports_hardware_single_step>: New field.
9918 (target_supports_conditional_breakpoints): Remove.
9919 (target_supports_hardware_single_step): New macro.
9920 (target_can_do_hardware_single_step): Declare.
9921 * server.c (handle_query): Use target_supports_hardware_single_step
9922 instead of target_supports_conditional_breakpoints.
9923
9924 2015-09-15 Yao Qi <yao.qi@linaro.org>
9925
9926 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9927 function.
9928 (struct linux_target_ops the_low_target): Install
9929 aarch64_linux_siginfo_fixup.
9930
9931 2015-09-11 Don Breazeal <donb@codesourcery.com>
9932 Luis Machado <lgustavo@codesourcery.com>
9933
9934 * linux-low.c (linux_mourn): Static declaration.
9935 (linux_arch_setup): Move in front of
9936 handle_extended_wait.
9937 (linux_arch_setup_thread): New function.
9938 (handle_extended_wait): Handle exec events. Call
9939 linux_arch_setup_thread. Make event_lwp argument a
9940 pointer-to-a-pointer.
9941 (check_zombie_leaders): Do not check stopped threads.
9942 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9943 (linux_low_filter_event): Add lwp and thread for exec'ing
9944 non-leader thread if leader thread has been deleted.
9945 Refactor code into linux_arch_setup_thread and call it.
9946 Pass child lwp pointer by reference to handle_extended_wait.
9947 (linux_wait_for_event_filtered): Update comment.
9948 (linux_wait_1): Prevent clobbering exec event status.
9949 (linux_supports_exec_events): New function.
9950 (linux_target_ops) <supports_exec_events>: Initialize new member.
9951 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9952 new member.
9953 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9954 * server.c (report_exec_events): New global variable.
9955 (handle_query): Handle qSupported query for exec-events feature.
9956 (captured_main): Initialize report_exec_events.
9957 * server.h (report_exec_events): Declare new global variable.
9958 * target.h (struct target_ops) <supports_exec_events>: New
9959 member.
9960 (target_supports_exec_events): New macro.
9961 * win32-low.c (win32_target_ops) <supports_exec_events>:
9962 Initialize new member.
9963
9964 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9965
9966 * linux-low.c (linux_low_enable_btrace): Remove.
9967 (linux_target_ops): Replace linux_low_enable_btrace with
9968 linux_enable_btrace.
9969
9970 2015-09-03 Yao Qi <yao.qi@linaro.org>
9971
9972 * linux-aarch64-low.c (aarch64_insert_point): Call
9973 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9974 returns true.
9975
9976 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9977
9978 * linux-low.c (check_stopped_by_breakpoint): Use
9979 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9980
9981 2015-08-27 Pedro Alves <palves@redhat.com>
9982
9983 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9984
9985 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9986
9987 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9988 the XNEW-family equivalent.
9989 (compile_bytecodes): Likewise.
9990 * dll.c (loaded_dll): Likewise.
9991 * event-loop.c (append_callback_event): Likewise.
9992 (create_file_handler): Likewise.
9993 (create_file_event): Likewise.
9994 * hostio.c (handle_open): Likewise.
9995 * inferiors.c (add_thread): Likewise.
9996 (add_process): Likewise.
9997 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9998 * linux-arm-low.c (arm_new_process): Likewise.
9999 (arm_new_thread): Likewise.
10000 * linux-low.c (add_to_pid_list): Likewise.
10001 (linux_add_process): Likewise.
10002 (handle_extended_wait): Likewise.
10003 (add_lwp): Likewise.
10004 (enqueue_one_deferred_signal): Likewise.
10005 (enqueue_pending_signal): Likewise.
10006 (linux_resume_one_lwp_throw): Likewise.
10007 (linux_resume_one_thread): Likewise.
10008 (linux_read_memory): Likewise.
10009 (linux_write_memory): Likewise.
10010 * linux-mips-low.c (mips_linux_new_process): Likewise.
10011 (mips_linux_new_thread): Likewise.
10012 (mips_add_watchpoint): Likewise.
10013 * linux-x86-low.c (initialize_low_arch): Likewise.
10014 * lynx-low.c (lynx_add_process): Likewise.
10015 * mem-break.c (set_raw_breakpoint_at): Likewise.
10016 (set_breakpoint): Likewise.
10017 (add_condition_to_breakpoint): Likewise.
10018 (add_commands_to_breakpoint): Likewise.
10019 (clone_agent_expr): Likewise.
10020 (clone_one_breakpoint): Likewise.
10021 * regcache.c (new_register_cache): Likewise.
10022 * remote-utils.c (look_up_one_symbol): Likewise.
10023 * server.c (queue_stop_reply): Likewise.
10024 (start_inferior): Likewise.
10025 (queue_stop_reply_callback): Likewise.
10026 (handle_target_event): Likewise.
10027 * spu-low.c (fetch_ppc_memory): Likewise.
10028 (store_ppc_memory): Likewise.
10029 * target.c (set_target_ops): Likewise.
10030 * thread-db.c (thread_db_load_search): Likewise.
10031 (try_thread_db_load_1): Likewise.
10032 * tracepoint.c (add_tracepoint): Likewise.
10033 (add_tracepoint_action): Likewise.
10034 (create_trace_state_variable): Likewise.
10035 (cmd_qtdpsrc): Likewise.
10036 (cmd_qtro): Likewise.
10037 (add_while_stepping_state): Likewise.
10038 * win32-low.c (child_add_thread): Likewise.
10039 (get_image_name): Likewise.
10040
10041 2015-08-25 Yao Qi <yao.qi@linaro.org>
10042
10043 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10044
10045 2015-08-25 Yao Qi <yao.qi@linaro.org>
10046
10047 * Makefile.in (aarch64-linux.o): New rule.
10048 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10049 srv_tgtobj.
10050 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10051 (aarch64_init_debug_reg_state): Make it extern.
10052 (aarch64_linux_prepare_to_resume): Remove.
10053
10054 2015-08-25 Yao Qi <yao.qi@linaro.org>
10055
10056 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10057 lwp_arch_private_info and ptid_of_lwp.
10058
10059 2015-08-25 Yao Qi <yao.qi@linaro.org>
10060
10061 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10062 Find proc_info by find_process_pid. All callers updated.
10063
10064 2015-08-25 Yao Qi <yao.qi@linaro.org>
10065
10066 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10067 Remove.
10068 (debug_reg_change_callback): Remove.
10069 (aarch64_notify_debug_reg_change): Remove.
10070
10071 2015-08-25 Yao Qi <yao.qi@linaro.org>
10072
10073 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10074 Call current_lwp_ptid.
10075
10076 2015-08-25 Yao Qi <yao.qi@linaro.org>
10077
10078 * linux-aarch64-low.c (debug_reg_change_callback): Use
10079 debug_printf.
10080
10081 2015-08-25 Yao Qi <yao.qi@linaro.org>
10082
10083 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10084
10085 2015-08-25 Yao Qi <yao.qi@linaro.org>
10086
10087 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10088
10089 2015-08-25 Yao Qi <yao.qi@linaro.org>
10090
10091 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10092 the code.
10093
10094 2015-08-25 Yao Qi <yao.qi@linaro.org>
10095
10096 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10097 Remove.
10098 (debug_reg_change_callback): Remove argument entry and add argument
10099 lwp. Remove local variable thread. Don't print thread id in the
10100 debugging output. Don't check whether pid of thread equals to pid.
10101 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10102 iterate_over_lwps instead find_inferior.
10103
10104 2015-08-24 Pedro Alves <palves@redhat.com>
10105
10106 * inferiors.c (get_first_process): New function.
10107 * inferiors.h (get_first_process): New declaration.
10108 * remote-utils.c (read_ptid): Default to the first process in the
10109 list, instead of to the current thread's process.
10110
10111 2015-08-24 Pedro Alves <palves@redhat.com>
10112
10113 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10114 * event-loop.c: Likewise.
10115 * remote-utils.c: Likewise.
10116 * tracepoint.c: Likewise.
10117
10118 2015-08-24 Pedro Alves <palves@redhat.com>
10119
10120 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10121 ptid_get_lwp.
10122
10123 2015-08-21 Pedro Alves <palves@redhat.com>
10124
10125 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10126 instead of literal 1.
10127
10128 2015-08-21 Pedro Alves <palves@redhat.com>
10129
10130 * tdesc.c (default_description): Explicitly zero-initialize.
10131
10132 2015-08-21 Pedro Alves <palves@redhat.com>
10133
10134 PR gdb/18749
10135 * inferiors.c (remove_thread): Discard any pending stop reply for
10136 this thread.
10137 * server.c (remove_all_on_match_pid): Rename to ...
10138 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10139 instead of a pid.
10140 (discard_queued_stop_replies): Change parameter to a ptid. Now
10141 extern.
10142 (handle_v_kill, kill_inferior_callback, captured_main)
10143 (process_serial_event): Adjust.
10144 * server.h (discard_queued_stop_replies): Declare.
10145
10146 2015-08-21 Pedro Alves <palves@redhat.com>
10147
10148 * linux-low.c (wait_for_sigstop): Always switch to no thread
10149 selected if the previously current thread dies.
10150 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10151 process instead of the current thread's.
10152 * remote-utils.c (input_interrupt): Don't check if there's no
10153 current thread.
10154 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10155 current thread to the general thread fails, error out.
10156 (handle_qxfer_auxv, handle_qxfer_libraries)
10157 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10158 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10159 (handle_query): Check if there's a thread selected instead of
10160 checking whether there's any thread in the thread list.
10161 (handle_qxfer_threads, handle_qxfer_btrace)
10162 (handle_qxfer_btrace_conf): Don't error out early if there's no
10163 thread in the thread list.
10164 (handle_v_cont, myresume): Don't set the current thread to the
10165 continue thread.
10166 (process_serial_event) <Hg handling>: Also set thread_id if the
10167 previous general thread is still alive.
10168 (process_serial_event) <g/G handling>: If setting the current
10169 thread to the general thread fails, error out.
10170 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10171 thread's lwp instead of the current thread's.
10172 * target.c (set_desired_thread): If the desired thread was not
10173 found, leave the current thread pointing to NULL. Return an int
10174 (boolean) indicating success.
10175 * target.h (set_desired_thread): Change return type to int.
10176
10177 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10178
10179 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10180 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10181 #includes.
10182 (ps_get_thread_area): New function.
10183
10184 2015-08-19 Gary Benson <gbenson@redhat.com>
10185
10186 * hostio.c (handle_pread): Do not attempt to read more data
10187 than hostio_reply_with_data can fit in a packet.
10188
10189 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10190
10191 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10192
10193 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10194
10195 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10196
10197 2015-08-06 Pedro Alves <palves@redhat.com>
10198
10199 * tracepoint.c (expr_eval_result): Now an int.
10200
10201 2015-08-06 Pedro Alves <palves@redhat.com>
10202
10203 * gdbthread.h (struct regcache): Forward declare.
10204 (struct thread_info) <regcache_data>: Now a struct regcache
10205 pointer.
10206 * inferiors.c (inferior_regcache_data)
10207 (set_inferior_regcache_data): Now work with struct regcache
10208 pointers.
10209 * inferiors.h (struct regcache): Forward declare.
10210 (inferior_regcache_data, set_inferior_regcache_data): Now work
10211 with struct regcache pointers.
10212 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10213 (free_register_cache_thread): Remove struct regcache pointer
10214 casts.
10215
10216 2015-08-06 Pedro Alves <palves@redhat.com>
10217
10218 * server.c (captured_main): On error, print the exception message
10219 to stderr, and if run_once is set, throw a quit.
10220
10221 2015-08-06 Pedro Alves <palves@redhat.com>
10222
10223 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10224 the current thread.
10225
10226 2015-08-06 Pedro Alves <palves@redhat.com>
10227
10228 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10229 reading beyond the passed in buffer length.
10230
10231 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10232
10233 * tracepoint.c (symbol_list) <required>: Remove.
10234
10235 2015-08-06 Pedro Alves <palves@redhat.com>
10236
10237 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10238 count if stopping and suspending threads.
10239 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10240 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10241 (linux_detach): Complete an ongoing step-over.
10242 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10243 throughout.
10244 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10245 (linux_wait_1): If passing a signal to the inferior after
10246 finishing a step-over, unsuspend and re-resume all lwps. If we
10247 see a single-step event but the thread should be continuing, don't
10248 pass the trap to gdb.
10249 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10250 internal_error instead of gdb_assert.
10251 (enqueue_pending_signal): New function.
10252 (check_ptrace_stopped_lwp_gone): Add debug output.
10253 (start_step_over): Use internal_error instead of gdb_assert.
10254 (complete_ongoing_step_over): New function.
10255 (linux_resume_one_thread): Don't resume a suspended thread.
10256 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10257 it stepping.
10258
10259 2015-08-06 Pedro Alves <palves@redhat.com>
10260
10261 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10262 (linux_thread_alive): Use lwp_is_marked_dead.
10263 (extended_event_reported): Delete.
10264 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10265 instead of extended_event_reported.
10266 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10267 as well.
10268 (lwp_is_marked_dead): New function.
10269 (lwp_running): Use lwp_is_marked_dead.
10270 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10271 comment.
10272
10273 2015-08-06 Pedro Alves <palves@redhat.com>
10274
10275 * linux-low.c (linux_wait_1): Move fork event output out of the
10276 !report_to_gdb check. Pass event_child->waitstatus to
10277 target_waitstatus_to_string instead of ourstatus.
10278
10279 2015-08-04 Yao Qi <yao.qi@linaro.org>
10280
10281 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10282 if current_thread is 32 bit.
10283
10284 2015-08-04 Yao Qi <yao.qi@linaro.org>
10285
10286 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10287 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10288 * server.c (extended_protocol): Remove "static".
10289 * server.h (extended_protocol): Declare it.
10290
10291 2015-08-04 Yao Qi <yao.qi@linaro.org>
10292
10293 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10294 both aarch64 and aarch32.
10295 (aarch64_set_pc): Likewise.
10296
10297 2015-08-04 Yao Qi <yao.qi@linaro.org>
10298
10299 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10300 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10301 arm-with-neon.xml to srv_xmlfiles.
10302 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10303 (is_64bit_tdesc): New function.
10304 (aarch64_linux_read_description): New function.
10305 (aarch64_arch_setup): Call aarch64_linux_read_description.
10306 (regs_info): Rename to regs_info_aarch64.
10307 (aarch64_regs_info): Return right regs_info.
10308 (initialize_low_arch): Call initialize_low_arch_aarch32.
10309
10310 2015-08-04 Yao Qi <yao.qi@linaro.org>
10311
10312 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10313 * linux-aarch32-low.c: New file.
10314 * linux-aarch32-low.h: New file.
10315 * linux-arm-low.c (arm_fill_gregset): Move it to
10316 linux-aarch32-low.c.
10317 (arm_store_gregset): Likewise.
10318 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10319 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10320 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10321 (regs_info): Rename to regs_info_arm.
10322 (arm_regs_info): Return regs_info_aarch32 if
10323 have_ptrace_getregset is 1 and target description is
10324 arm_with_neon or arm_with_vfpv3.
10325 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10326 Call initialize_low_arch_aarch32 instead.
10327
10328 2015-08-04 Yao Qi <yao.qi@linaro.org>
10329
10330 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10331 * linux-low.c: ... here.
10332 * linux-low.h (have_ptrace_getregset): Declare it.
10333
10334 2015-08-04 Pedro Alves <palves@redhat.com>
10335
10336 * thread-db.c (struct thread_db): Use new typedefs.
10337 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10338 CHK calls.
10339 (disable_thread_event_reporting): Cast result of dlsym to
10340 destination function pointer type.
10341 (thread_db_mourn): Use td_ta_delete_ftype.
10342
10343 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10344
10345 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10346 arch variant.
10347 (CDX_BREAKPOINT): Define for R2.
10348 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10349 (the_low_target): Add comments.
10350
10351 2015-07-30 Yao Qi <yao.qi@linaro.org>
10352
10353 * linux-arm-low.c (arm_hwcap): Remove it.
10354 (arm_read_description): New local variable arm_hwcap. Don't
10355 set arm_hwcap to zero.
10356
10357 2015-07-30 Yao Qi <yao.qi@linaro.org>
10358
10359 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10360 Use regcache->tdesc instead.
10361 (arm_store_wmmxregset): Likewise.
10362 (arm_fill_vfpregset): Likewise.
10363 (arm_store_vfpregset): Likewise.
10364
10365 2015-07-30 Yao Qi <yao.qi@linaro.org>
10366
10367 * linux-arm-low.c: Include arch/arm.h.
10368 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10369 (arm_store_gregset): Likewise.
10370
10371 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10372
10373 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10374 ptrace's 4th parameter.
10375
10376 2015-07-27 Yao Qi <yao.qi@linaro.org>
10377
10378 * configure.srv (case aarch64*-*-linux*): Don't set
10379 srv_linux_usrregs.
10380
10381 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10382
10383 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10384 sys/ptrace.h.
10385 * linux-arm-low.c: Likewise.
10386 * linux-cris-low.c: Likewise.
10387 * linux-crisv32-low.c: Likewise.
10388 * linux-low.c: Likewise.
10389 * linux-m68k-low.c: Likewise.
10390 * linux-mips-low.c: Likewise.
10391 * linux-nios2-low.c: Likewise.
10392 * linux-s390-low.c: Likewise.
10393 * linux-sparc-low.c: Likewise.
10394 * linux-tic6x-low.c: Likewise.
10395 * linux-tile-low.c: Likewise.
10396 * linux-x86-low.c: Likewise.
10397
10398 2015-07-24 Pedro Alves <palves@redhat.com>
10399
10400 * config.in: Regenerate.
10401 * configure: Regenerate.
10402
10403 2015-07-24 Pedro Alves <palves@redhat.com>
10404
10405 * acinclude.m4: Include ../ptrace.m4.
10406 * configure.ac: Call GDB_AC_PTRACE.
10407 * config.in, configure: Regenerate.
10408
10409 2015-07-24 Yao Qi <yao.qi@linaro.org>
10410
10411 * linux-low.c (linux_create_inferior): Remove setting to
10412 proc->priv->new_inferior.
10413 (linux_attach): Likewise.
10414 (linux_low_filter_event): Likewise.
10415 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10416
10417 2015-07-24 Yao Qi <yao.qi@linaro.org>
10418
10419 * linux-low.c (linux_arch_setup): New function.
10420 (linux_low_filter_event): If proc->tdesc is NULL and
10421 proc->attached is true, call the_low_target.arch_setup.
10422 Otherwise, keep status pending, and return.
10423 (linux_resume_one_lwp_throw): Don't call get_pc if
10424 thread->while_stepping isn't NULL. Don't call
10425 get_thread_regcache if proc->tdesc is NULL.
10426 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10427 (linux_target_ops): Install arch_setup.
10428 * server.c (start_inferior): Call the_target->arch_setup.
10429 * target.h (struct target_ops) <arch_setup>: New field.
10430 (target_arch_setup): New marco.
10431 * lynx-low.c (lynx_target_ops): Update.
10432 * nto-low.c (nto_target_ops): Update.
10433 * spu-low.c (spu_target_ops): Update.
10434 * win32-low.c (win32_target_ops): Update.
10435
10436 2015-07-24 Yao Qi <yao.qi@linaro.org>
10437
10438 * linux-low.c (linux_add_process): Don't set
10439 proc->priv->new_inferior.
10440 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10441 (linux_attach): Likewise.
10442
10443 2015-07-24 Yao Qi <yao.qi@linaro.org>
10444
10445 * server.c (start_inferior): Code refactor.
10446
10447 2015-07-24 Yao Qi <yao.qi@linaro.org>
10448
10449 * server.c (process_serial_event): Set general_thread.
10450
10451 2015-07-21 Yao Qi <yao.qi@linaro.org>
10452
10453 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10454 aarch64_linux_get_debug_reg_capacity.
10455
10456 2015-07-17 Yao Qi <yao.qi@linaro.org>
10457
10458 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10459 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10460 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10461 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10462 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10463 (AARCH64_HWP_ALIGNMENT): Likewise.
10464 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10465 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10466 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10467 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10468 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10469 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10470 (struct aarch64_debug_reg_state): Likewise.
10471 (struct arch_lwp_info): Likewise.
10472 (aarch64_align_watchpoint): Likewise.
10473 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10474 (aarch64_watchpoint_length): Likewise.
10475 (aarch64_point_encode_ctrl_reg): Likewise
10476 (aarch64_point_is_aligned): Likewise.
10477 (aarch64_align_watchpoint): Likewise.
10478 (aarch64_linux_set_debug_regs):
10479 (aarch64_dr_state_insert_one_point): Likewise.
10480 (aarch64_dr_state_remove_one_point): Likewise.
10481 (aarch64_handle_breakpoint): Likewise.
10482 (aarch64_handle_aligned_watchpoint): Likewise.
10483 (aarch64_handle_unaligned_watchpoint): Likewise.
10484 (aarch64_handle_watchpoint): Likewise.
10485
10486 2015-07-17 Yao Qi <yao.qi@linaro.org>
10487
10488 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10489 and don't aarch64_get_debug_reg_state. All callers update.
10490 (aarch64_handle_aligned_watchpoint): Likewise.
10491 (aarch64_handle_unaligned_watchpoint): Likewise.
10492 (aarch64_handle_watchpoint): Likewise.
10493 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10494 (aarch64_remove_point): Likewise.
10495
10496 2015-07-17 Yao Qi <yao.qi@linaro.org>
10497
10498 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10499 debug_printf.
10500 (aarch64_handle_unaligned_watchpoint): Likewise.
10501
10502 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10503
10504 Revert the previous 3 commits:
10505 Move gdb_regex* to common/
10506 Move linux_find_memory_regions_full & co.
10507 gdbserver build-id attribute generator
10508
10509 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10510 Jan Kratochvil <jan.kratochvil@redhat.com>
10511
10512 gdbserver build-id attribute generator.
10513 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10514 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10515 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10516 (find_phdr): New.
10517 (get_dynamic): Use find_pdhr to traverse program headers.
10518 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10519 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10520 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10521 (get_hex_build_id): New.
10522 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10523 to reply XML document.
10524
10525 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10526 Jan Kratochvil <jan.kratochvil@redhat.com>
10527
10528 * target.c: Include target/target-utils.h and fcntl.h.
10529 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10530 (target_fileio_read_stralloc): New functions.
10531
10532 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10533
10534 * Makefile.in (OBS): Add gdb_regex.o.
10535 (gdb_regex.o): New.
10536 * config.in: Rebuilt.
10537 * configure: Rebuilt.
10538
10539 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10540 Jan Kratochvil <jan.kratochvil@redhat.com>
10541
10542 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10543 * Makefile.in (OBS): Add target-utils.o.
10544 (linux-maps.o, target-utils.o): New.
10545 * configure.srv (srv_linux_obj): Add linux-maps.o.
10546
10547 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10548
10549 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10550 function, return 1.
10551 (the_low_target): Install it.
10552
10553 2015-07-14 Pedro Alves <palves@redhat.com>
10554
10555 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10556 Instead, ignore ECHILD, and throw an error for other errnos.
10557
10558 2015-07-10 Pedro Alves <palves@redhat.com>
10559
10560 * event-loop.c (struct callback_event) <data>: Change type to
10561 gdb_client_data instance instead of gdb_client_data pointer.
10562 (append_callback_event): Adjust.
10563
10564 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10565
10566 * linux-aarch64-low.c: Add comments for each linux_target_ops
10567 method. Remove comments already covered in target_ops and
10568 linux_target_ops definitions.
10569 (the_low_target): Add comments for each unimplemented method.
10570
10571 2015-07-09 Yao Qi <yao.qi@linaro.org>
10572
10573 * linux-aarch64-low.c (aarch64_regmap): Remove.
10574 (aarch64_usrregs_info): Remove.
10575 (regs_info): Set field usrregs to NULL.
10576
10577 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10578
10579 * linux-low.c: Include "rsp-low.h"
10580 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10581 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10582 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10583 (handle_btrace_enable_pt): New.
10584 (handle_btrace_general_set): Support "pt".
10585 (handle_btrace_conf_general_set): Support "pt:size".
10586
10587 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10588
10589 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10590 Z_PACKET_SW_BP.
10591
10592 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10593
10594 * linux-aarch64-low.c: Remove comment about endianness.
10595 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10596 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10597 memcmp.
10598
10599 2015-06-24 Gary Benson <gbenson@redhat.com>
10600
10601 * linux-i386-ipa.c (stdint.h): Do not include.
10602 * lynx-i386-low.c (stdint.h): Likewise.
10603 * lynx-ppc-low.c (stdint.h): Likewise.
10604 * mem-break.c (stdint.h): Likewise.
10605 * thread-db.c (stdint.h): Likewise.
10606 * tracepoint.c (stdint.h): Likewise.
10607 * win32-low.c (stdint.h): Likewise.
10608
10609 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10610
10611 * server.c (write_qxfer_response): Update call to
10612 remote_escape_output.
10613
10614 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10615 Jan Kratochvil <jan.kratochvil@redhat.com>
10616
10617 Merge multiple hex conversions.
10618 * gdbreplay.c (tohex): Rename to 'fromhex'.
10619 (logchar): Use fromhex.
10620
10621 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10622
10623 * server.c (handle_qxfer_libraries): Set `version' attribute for
10624 <library-list>.
10625
10626 2015-06-10 Gary Benson <gbenson@redhat.com>
10627
10628 * target.h (struct target_ops) <multifs_open>: New field.
10629 <multifs_unlink>: Likewise.
10630 <multifs_readlink>: Likewise.
10631 * linux-low.c (nat/linux-namespaces.h): New include.
10632 (linux_target_ops): Initialize the_target->multifs_open,
10633 the_target->multifs_unlink and the_target->multifs_readlink.
10634 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10635 * hostio.c (hostio_fs_pid): New static variable.
10636 (hostio_handle_new_gdb_connection): New function.
10637 (handle_setfs): Likewise.
10638 (handle_open): Use the_target->multifs_open as appropriate.
10639 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10640 (handle_readlink): Use the_target->multifs_readlink as
10641 appropriate.
10642 (handle_vFile): Handle vFile:setfs packets.
10643 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10644 after target_handle_new_gdb_connection.
10645
10646 2015-06-10 Gary Benson <gbenson@redhat.com>
10647
10648 * configure.ac (AC_CHECK_FUNCS): Add setns.
10649 * config.in: Regenerate.
10650 * configure: Likewise.
10651 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10652 (linux-namespaces.o): New rule.
10653 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10654
10655 2015-06-09 Gary Benson <gbenson@redhat.com>
10656
10657 * hostio.c (handle_open): Process mode argument with
10658 fileio_to_host_mode.
10659
10660 2015-06-01 Yao Qi <yao.qi@linaro.org>
10661
10662 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10663 * linux-x86-low.c: Likewise.
10664
10665 2015-05-28 Don Breazeal <donb@codesourcery.com>
10666
10667 * linux-low.c (handle_extended_wait): Initialize
10668 thread_info.last_resume_kind for new fork children.
10669
10670 2015-05-15 Pedro Alves <palves@redhat.com>
10671
10672 * target.h (target_handle_new_gdb_connection): Rewrite using if
10673 wrapped in do/while.
10674
10675 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10676
10677 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10678 * configure, config.in: Regenerate.
10679 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10680 Declare typedef.
10681
10682 2015-05-12 Don Breazeal <donb@codesourcery.com>
10683
10684 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10685 PTRACE_EVENT_VFORK_DONE.
10686 (linux_low_ptrace_options, extended_event_reported): Add vfork
10687 events.
10688 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10689 and "vforkdone" for RSP 'T' Stop Reply Packet.
10690 * server.h (report_vfork_events): Declare
10691 global variable.
10692
10693 2015-05-12 Don Breazeal <donb@codesourcery.com>
10694
10695 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10696 (the_low_target) <new_fork>: Initialize new member.
10697 * linux-arm-low.c (arm_new_fork): New function.
10698 (the_low_target) <new_fork>: Initialize new member.
10699 * linux-low.c (handle_extended_wait): Call new target function
10700 new_fork.
10701 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10702 * linux-mips-low.c (mips_add_watchpoint): New function
10703 extracted from mips_insert_point.
10704 (the_low_target) <new_fork>: Initialize new member.
10705 (mips_linux_new_fork): New function.
10706 (mips_insert_point): Call mips_add_watchpoint.
10707 * linux-x86-low.c (x86_linux_new_fork): New function.
10708 (the_low_target) <new_fork>: Initialize new member.
10709
10710 2015-05-12 Don Breazeal <donb@codesourcery.com>
10711
10712 * linux-low.c (handle_extended_wait): Implement return value,
10713 rename argument 'event_child' to 'event_lwp', handle
10714 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10715 (linux_low_ptrace_options): New function.
10716 (linux_low_filter_event): Call linux_low_ptrace_options,
10717 use different argument fo linux_enable_event_reporting,
10718 use return value from handle_extended_wait.
10719 (extended_event_reported): New function.
10720 (linux_wait_1): Call extended_event_reported and set
10721 status to report fork events.
10722 (linux_write_memory): Add pid to debug message.
10723 (reset_lwp_ptrace_options_callback): New function.
10724 (linux_handle_new_gdb_connection): New function.
10725 (linux_target_ops): Initialize new structure member.
10726 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10727 * lynx-low.c: Initialize new structure member.
10728 * remote-utils.c (prepare_resume_reply): Implement stop reason
10729 "fork" for "T" stop message.
10730 * server.c (handle_query): Call handle_new_gdb_connection.
10731 * server.h (report_fork_events): Declare global flag.
10732 * target.h (struct target_ops) <handle_new_gdb_connection>:
10733 New member.
10734 (target_handle_new_gdb_connection): New macro.
10735 * win32-low.c: Initialize new structure member.
10736
10737 2015-05-12 Don Breazeal <donb@codesourcery.com>
10738
10739 * mem-break.c (APPEND_TO_LIST): Define macro.
10740 (clone_agent_expr): New function.
10741 (clone_one_breakpoint): New function.
10742 (clone_all_breakpoints): New function.
10743 * mem-break.h: Declare new functions.
10744
10745 2015-05-12 Don Breazeal <donb@codesourcery.com>
10746
10747 * linux-low.c (linux_supports_fork_events): New function.
10748 (linux_supports_vfork_events): New function.
10749 (linux_target_ops): Initialize new structure members.
10750 (initialize_low): Call linux_check_ptrace_features.
10751 * lynx-low.c (lynx_target_ops): Initialize new structure
10752 members.
10753 * server.c (report_fork_events, report_vfork_events):
10754 New global flags.
10755 (handle_query): Add new features to qSupported packet and
10756 response.
10757 (captured_main): Initialize new global variables.
10758 * target.h (struct target_ops) <supports_fork_events>:
10759 New member.
10760 <supports_vfork_events>: New member.
10761 (target_supports_fork_events): New macro.
10762 (target_supports_vfork_events): New macro.
10763 * win32-low.c (win32_target_ops): Initialize new structure
10764 members.
10765
10766 2015-05-12 Gary Benson <gbenson@redhat.com>
10767
10768 * server.c (handle_qxfer_exec_file): Use current process
10769 if annex is empty.
10770
10771 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10772
10773 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10774 Remove HAVE_PTRACE_GETREGS conditionals.
10775 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10776 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10777
10778 2015-05-08 Yao Qi <yao.qi@linaro.org>
10779
10780 * linux-low.c (linux_supports_conditional_breakpoints): New
10781 function.
10782 (linux_target_ops): Install new target method.
10783 * lynx-low.c (lynx_target_ops): Install NULL hook for
10784 supports_conditional_breakpoints.
10785 * nto-low.c (nto_target_ops): Likewise.
10786 * spu-low.c (spu_target_ops): Likewise.
10787 * win32-low.c (win32_target_ops): Likewise.
10788 * server.c (handle_query): Check
10789 target_supports_conditional_breakpoints.
10790 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10791 New field.
10792 (target_supports_conditional_breakpoints): New macro.
10793
10794 2015-05-06 Pedro Alves <palves@redhat.com>
10795
10796 PR server/18081
10797 * server.c (start_inferior): If the process exits, mourn it.
10798
10799 2015-04-21 Gary Benson <gbenson@redhat.com>
10800
10801 * hostio.c (fileio_open_flags_to_host): Factored out to
10802 fileio_to_host_openflags in common/fileio.c. Single use
10803 updated.
10804
10805 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10806
10807 * linux-xtensa-low.c (xtensa_fill_gregset)
10808 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10809 XCHAL_HAVE_LOOP.
10810
10811 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10812
10813 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10814 (regs_info): Replace usrregs pointer with NULL.
10815
10816 2015-04-17 Gary Benson <gbenson@redhat.com>
10817
10818 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10819 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10820 * server.c (handle_qxfer_exec_file): New function.
10821 (qxfer_packets): Add exec-file entry.
10822 (handle_query): Report qXfer:exec-file:read as supported packet.
10823
10824 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10825
10826 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10827
10828 2015-04-09 Gary Benson <gbenson@redhat.com>
10829
10830 * hostio-errno.c (errno_to_fileio_error): Remove function.
10831 Update caller to use remote_fileio_to_fio_error.
10832
10833 2015-04-09 Yao Qi <yao.qi@linaro.org>
10834
10835 * linux-low.c (linux_insert_point): Call
10836 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10837 (linux_remove_point): Call remove_memory_breakpoint if type is
10838 raw_bkpt_type_sw.
10839 * linux-x86-low.c (x86_insert_point): Don't call
10840 insert_memory_breakpoint.
10841 (x86_remove_point): Don't call remove_memory_breakpoint.
10842
10843 2015-04-01 Pedro Alves <palves@redhat.com>
10844 Cleber Rosa <crosa@redhat.com>
10845
10846 * server.c (gdbserver_usage): Reorganize and extend the usage
10847 message.
10848
10849 2015-03-24 Pedro Alves <palves@redhat.com>
10850
10851 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10852 output. Also dump TRAP_TRACE.
10853 (linux_low_filter_event): In debug output, distinguish a
10854 resume_stop SIGSTOP from a delayed SIGSTOP.
10855
10856 2015-03-24 Gary Benson <gbenson@redhat.com>
10857
10858 * linux-x86-low.c (x86_linux_new_thread): Moved to
10859 nat/x86-linux.c.
10860 (x86_linux_prepare_to_resume): Likewise.
10861
10862 2015-03-24 Gary Benson <gbenson@redhat.com>
10863
10864 * Makefile.in (x86-linux-dregs.o): New rule.
10865 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10866 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10867 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10868 (x86_linux_dr_get): Likewise.
10869 (x86_linux_dr_set): Likewise.
10870 (update_debug_registers_callback): Likewise.
10871 (x86_linux_dr_set_addr): Likewise.
10872 (x86_linux_dr_get_addr): Likewise.
10873 (x86_linux_dr_set_control): Likewise.
10874 (x86_linux_dr_get_control): Likewise.
10875 (x86_linux_dr_get_status): Likewise.
10876 (x86_linux_update_debug_registers): Likewise.
10877
10878 2015-03-24 Gary Benson <gbenson@redhat.com>
10879
10880 * linux-x86-low.c (x86_linux_update_debug_registers):
10881 New function, factored out from...
10882 (x86_linux_prepare_to_resume): ...this.
10883
10884 2015-03-24 Gary Benson <gbenson@redhat.com>
10885
10886 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10887 (x86_linux_dr_set): Likewise.
10888 (update_debug_registers_callback): Likewise.
10889 (x86_linux_dr_set_addr): Likewise.
10890 (x86_linux_dr_get_addr): Likewise.
10891 (x86_linux_dr_set_control): Likewise.
10892 (x86_linux_dr_get_control): Likewise.
10893 (x86_linux_dr_get_status): Likewise.
10894 (x86_linux_prepare_to_resume): Likewise.
10895
10896 2015-03-24 Gary Benson <gbenson@redhat.com>
10897
10898 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10899 Use perror_with_name. Pass string through gettext.
10900 (x86_linux_dr_set): Likewise.
10901
10902 2015-03-24 Gary Benson <gbenson@redhat.com>
10903
10904 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10905 (x86_linux_dr_set_addr): ...this.
10906 (x86_dr_low_get_addr): Rename to...
10907 (x86_linux_dr_get_addr): ...this.
10908 (x86_dr_low_set_control): Rename to...
10909 (x86_linux_dr_set_control): ...this.
10910 (x86_dr_low_get_control): Rename to...
10911 (x86_linux_dr_get_control): ...this.
10912 (x86_dr_low_get_status): Rename to...
10913 (x86_linux_dr_get_status): ...this.
10914 (x86_dr_low): Update with new function names.
10915
10916 2015-03-24 Gary Benson <gbenson@redhat.com>
10917
10918 * Makefile.in (x86-linux.o): New rule.
10919 * configure.srv: Add x86-linux.o to relevant targets.
10920 * linux-low.c (lwp_set_arch_private_info): New function.
10921 (lwp_arch_private_info): Likewise.
10922 * linux-x86-low.c: Include nat/x86-linux.h.
10923 (arch_lwp_info): Removed structure.
10924 (update_debug_registers_callback):
10925 Use lwp_set_debug_registers_changed.
10926 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10927 and lwp_set_debug_registers_changed.
10928 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10929
10930 2015-03-24 Gary Benson <gbenson@redhat.com>
10931
10932 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10933 * linux-arm-low.c (arm_new_thread): Likewise.
10934 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10935 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10936 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10937 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10938
10939 2015-03-24 Gary Benson <gbenson@redhat.com>
10940
10941 * linux-low.c (ptid_of_lwp): New function.
10942 (lwp_is_stopped): Likewise.
10943 (lwp_stop_reason): Likewise.
10944 * linux-x86-low.c (update_debug_registers_callback):
10945 Use lwp_is_stopped.
10946 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10947 lwp_stop_reason.
10948
10949 2015-03-24 Gary Benson <gbenson@redhat.com>
10950
10951 * linux-low.h (linux_stop_lwp): Remove declaration.
10952
10953 2015-03-24 Gary Benson <gbenson@redhat.com>
10954
10955 * linux-low.h: Include nat/linux-nat.h.
10956 * linux-low.c (iterate_over_lwps_args): New structure.
10957 (iterate_over_lwps_filter): New function.
10958 (iterate_over_lwps): Likewise.
10959 * linux-x86-low.c (update_debug_registers_callback):
10960 Update signature to what iterate_over_lwps expects.
10961 Remove PID check that iterate_over_lwps now performs.
10962 (x86_dr_low_set_addr): Use iterate_over_lwps.
10963 (x86_dr_low_set_control): Likewise.
10964
10965 2015-03-24 Gary Benson <gbenson@redhat.com>
10966
10967 * linux-x86-low.c (x86_debug_reg_state): New function.
10968 (x86_linux_prepare_to_resume): Use the above.
10969
10970 2015-03-24 Gary Benson <gbenson@redhat.com>
10971
10972 * linux-low.c (current_lwp_ptid): New function.
10973 * linux-x86-low.c: Include nat/linux-nat.h.
10974 (x86_dr_low_get_addr): Use current_lwp_ptid.
10975 (x86_dr_low_get_control): Likewise.
10976 (x86_dr_low_get_status): Likewise.
10977
10978 2015-03-20 Pedro Alves <palves@redhat.com>
10979
10980 * tracepoint.c (cmd_qtstatus): Make "str" const.
10981
10982 2015-03-20 Pedro Alves <palves@redhat.com>
10983
10984 * server.c (handle_general_set): Make "req_str" const.
10985
10986 2015-03-19 Pedro Alves <palves@redhat.com>
10987
10988 * linux-low.c (linux_resume_one_lwp): Rename to ...
10989 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10990 instead call perror_with_name.
10991 (check_ptrace_stopped_lwp_gone): New function.
10992 (linux_resume_one_lwp): Reimplement as wrapper around
10993 linux_resume_one_lwp_throw that swallows errors if the LWP is
10994 gone.
10995
10996 2015-03-19 Pedro Alves <palves@redhat.com>
10997
10998 * linux-low.c (count_events_callback, select_event_lwp_callback):
10999 No longer check whether the thread has resume_stop as last resume
11000 kind.
11001
11002 2015-03-19 Pedro Alves <palves@redhat.com>
11003
11004 * linux-low.c (count_events_callback, select_event_lwp_callback):
11005 Use the lwp's status_pending_p field, not the thread's.
11006
11007 2015-03-19 Pedro Alves <palves@redhat.com>
11008
11009 * linux-low.c (select_event_lwp_callback): Update comments to
11010 no longer mention SIGTRAP.
11011
11012 2015-03-18 Gary Benson <gbenson@redhat.com>
11013
11014 * server.c (handle_query): Do not report vFile:fstat as supported.
11015
11016 2015-03-11 Gary Benson <gbenson@redhat.com>
11017
11018 * hostio.c (sys/types.h): New include.
11019 (sys/stat.h): Likewise.
11020 (common-remote-fileio.h): Likewise.
11021 (handle_fstat): New function.
11022 (handle_vFile): Handle vFile:fstat packets.
11023
11024 2015-03-11 Gary Benson <gbenson@redhat.com>
11025
11026 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11027 struct stat.st_blocks and struct stat.st_blksize.
11028 * configure: Regenerate.
11029 * config.in: Likewise.
11030 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11031 (OBS): Add common-remote-fileio.o.
11032 (common-remote-fileio.o): New rule.
11033
11034 2015-03-09 Pedro Alves <palves@redhat.com>
11035
11036 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11037 'struct sockaddr' pointer in 'accept' call.
11038
11039 2015-03-09 Pedro Alves <palves@redhat.com>
11040
11041 Revert:
11042 2015-03-07 Pedro Alves <palves@redhat.com>
11043 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11044 or <winsock2.h> here. Instead include "gdb_socket.h".
11045 (remote_open): Use union gdb_sockaddr_u.
11046 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11047 or <winsock2.h> here. Instead include "gdb_socket.h".
11048 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11049 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11050 or <sys/un.h>.
11051 (init_named_socket, gdb_agent_helper_thread): Use union
11052 gdb_sockaddr_u.
11053
11054 2015-03-07 Pedro Alves <palves@redhat.com>
11055
11056 * configure.ac (build_warnings): Move
11057 -Wdeclaration-after-statement to the C-specific set.
11058 * configure: Regenerate.
11059
11060 2015-03-07 Pedro Alves <palves@redhat.com>
11061
11062 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11063 or <winsock2.h> here. Instead include "gdb_socket.h".
11064 (remote_open): Use union gdb_sockaddr_u.
11065 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11066 or <winsock2.h> here. Instead include "gdb_socket.h".
11067 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11068 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11069 or <sys/un.h>.
11070 (init_named_socket, gdb_agent_helper_thread): Use union
11071 gdb_sockaddr_u.
11072
11073 2015-03-07 Pedro Alves <palves@redhat.com>
11074
11075 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11076 instead.
11077
11078 2015-03-06 Yao Qi <yao.qi@linaro.org>
11079
11080 * linux-aarch64-low.c (aarch64_insert_point): Use
11081 show_debug_regs as a boolean.
11082 (aarch64_remove_point): Likewise.
11083
11084 2015-03-05 Pedro Alves <palves@redhat.com>
11085
11086 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11087 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11088 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11089 * nto-low.c (nto_target_ops): Likewise.
11090 * spu-low.c (spu_target_ops): Likewise.
11091 * win32-low.c (win32_target_ops): Likewise.
11092
11093 2015-03-04 Pedro Alves <palves@redhat.com>
11094
11095 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11096 Decide whether a breakpoint triggered based on the SIGTRAP's
11097 siginfo.si_code.
11098 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11099 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11100 (linux_low_filter_event): Check for breakpoints before checking
11101 watchpoints.
11102 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11103 siginfo.si_code.
11104 (linux_stopped_by_sw_breakpoint)
11105 (linux_supports_stopped_by_sw_breakpoint)
11106 (linux_stopped_by_hw_breakpoint)
11107 (linux_supports_stopped_by_hw_breakpoint): New functions.
11108 (linux_target_ops): Install new target methods.
11109
11110 2015-03-04 Pedro Alves <palves@redhat.com>
11111
11112 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11113 * server.c (swbreak_feature, hwbreak_feature): New globals.
11114 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11115 (captured_main): Clear swbreak_feature and hwbreak_feature.
11116 * server.h (swbreak_feature, hwbreak_feature): Declare.
11117 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11118 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11119 supports_stopped_by_hw_breakpoint>: New fields.
11120 (target_supports_stopped_by_sw_breakpoint)
11121 (target_stopped_by_sw_breakpoint)
11122 (target_supports_stopped_by_hw_breakpoint)
11123 (target_stopped_by_hw_breakpoint): Declare.
11124
11125 2015-03-04 Pedro Alves <palves@redhat.com>
11126
11127 enum lwp_stop_reason -> enum target_stop_reason
11128 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11129 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11130 (linux_wait_1, stuck_in_jump_pad_callback)
11131 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11132 (linux_stopped_by_watchpoint):
11133 * linux-low.h (enum lwp_stop_reason): Delete.
11134 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11135 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11136
11137 2015-03-04 Yao Qi <yao.qi@linaro.org>
11138
11139 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11140
11141 2015-03-03 Gary Benson <gbenson@redhat.com>
11142
11143 * hostio.c (handle_vFile): Fix prefix lengths.
11144
11145 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11146
11147 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11148 ptr_bits.
11149
11150 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11151
11152 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11153 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11154 (clean): Add "rm -f" for above C files.
11155 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11156 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11157 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11158 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11159 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11160 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11161 (init_registers_s390x_vx_linux64)
11162 (init_registers_s390x_tevx_linux64)
11163 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11164 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11165 declarations.
11166 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11167 (s390_store_vxrs_high): New functions.
11168 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11169 NT_S390_VXRS_HIGH.
11170 (s390_arch_setup): Add logic for selecting one of the new target
11171 descriptions. Activate the new vector regsets if applicable.
11172 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11173 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11174 and init_registers_s390x_tevx_linux64.
11175
11176 2015-03-01 Pedro Alves <palves@redhat.com>
11177
11178 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11179 parameter.
11180
11181 2015-02-27 Pedro Alves <palves@redhat.com>
11182
11183 * linux-x86-low.c (u_debugreg_offset): New function.
11184 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11185
11186 2015-02-27 Pedro Alves <palves@redhat.com>
11187
11188 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11189 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11190 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11191 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11192 (ps_lsetfpregs, ps_getpid)
11193 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11194 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11195 (ps_lsetxregs, ps_plog): Declare.
11196
11197 2015-02-27 Pedro Alves <palves@redhat.com>
11198
11199 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11200 IP_AGENT_EXPORT_FUNC.
11201 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11202 IP_AGENT_EXPORT_FUNC.
11203 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11204 (IP_AGENT_EXPORT): Delete.
11205 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11206 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11207 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11208 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11209 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11210 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11211 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11212 (traceframe_read_count, traceframe_write_count)
11213 (traceframes_created, trace_state_variables, get_raw_reg)
11214 (get_trace_state_variable_value, set_trace_state_variable_value)
11215 (ust_loaded, helper_thread_id, cmd_buf): Use
11216 IPA_SYM_EXPORTED_NAME.
11217 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11218 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11219 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11220 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11221 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11222 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11223 EXTERN_C_PUSH/EXTERN_C_POP.
11224 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11225 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11226 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11227 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11228 (traceframe_write_count, traceframe_read_count)
11229 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11230 (about_to_request_buffer_space, get_trace_state_variable_value)
11231 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11232 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11233 EXTERN_C_PUSH/EXTERN_C_POP.
11234 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11235 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11236 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11237 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11238 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11239 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11240 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11241 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11242 Define.
11243 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11244 (IP_AGENT_EXPORT_VAR_DECL): Define.
11245 (tracing): Declare.
11246 (gdb_agent_get_raw_reg): Declare.
11247
11248 2015-02-27 Tom Tromey <tromey@redhat.com>
11249 Pedro Alves <palves@redhat.com>
11250
11251 Rename symbols whose names are reserved C++ keywords throughout.
11252
11253 2015-02-27 Pedro Alves <palves@redhat.com>
11254
11255 * Makefile.in (COMPILER): New, get it from autoconf.
11256 (CXX): Get from autoconf instead.
11257 (COMPILE.pre): Use COMPILER.
11258 (CC-LD): Rename to ...
11259 (CC_LD): ... this. Use COMPILER.
11260 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11261 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11262 * acinclude.m4: Include build-with-cxx.m4.
11263 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11264 Disable -Werror by default if building in C++ mode.
11265 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11266 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11267 the C++ compiler. Save/restore CXXFLAGS too.
11268 * configure: Regenerate.
11269
11270 2015-02-27 Pedro Alves <palves@redhat.com>
11271
11272 * acinclude.m4: Include libiberty.m4.
11273 * configure.ac: Call libiberty_INIT.
11274 * config.in, configure: Regenerate.
11275
11276 2015-02-26 Pedro Alves <palves@redhat.com>
11277
11278 * linux-low.c (linux_wait_1): When incrementing the PC past a
11279 program breakpoint always use the_low_target.breakpoint_len as
11280 increment, rather than the maximum between that and
11281 the_low_target.decr_pc_after_break.
11282
11283 2015-02-23 Pedro Alves <palves@redhat.com>
11284
11285 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11286 thread was doing a step-over; always adjust the PC if
11287 we stepped over a permanent breakpoint.
11288 (linux_wait_1): If we stepped over breakpoint that was on top of a
11289 permanent breakpoint, manually advance the PC past it.
11290
11291 2015-02-23 Pedro Alves <palves@redhat.com>
11292
11293 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11294 modes.
11295 (x86_fill_gregset, x86_store_gregset): Use it when handling
11296 $orig_eax.
11297
11298 2015-02-20 Pedro Alves <palves@redhat.com>
11299
11300 * thread-db.c: Include "nat/linux-procfs.h".
11301 (thread_db_init): Skip listing new threads if the kernel supports
11302 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11303
11304 2015-02-20 Pedro Alves <palves@redhat.com>
11305
11306 * linux-low.c (status_pending_p_callback): Use ptid_match.
11307
11308 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11309
11310 PR breakpoints/16812
11311 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11312 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11313 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11314
11315 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11316
11317 PR breakpoints/15956
11318 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11319
11320 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11321
11322 * linux-low.c (linux_low_btrace_conf): Print size.
11323 * server.c (handle_btrace_conf_general_set): New.
11324 (hanle_general_set): Call handle_btrace_conf_general_set.
11325 (handle_query): Report Qbtrace-conf:bts:size as supported.
11326
11327 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11328
11329 * linux-low.c (linux_low_enable_btrace): Update parameters.
11330 (linux_low_btrace_conf): New.
11331 (linux_target_ops)<to_btrace_conf>: Initialize.
11332 * server.c (current_btrace_conf): New.
11333 (handle_btrace_enable): Rename to ...
11334 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11335 to target_enable_btrace. Update comment. Update users.
11336 (handle_qxfer_btrace_conf): New.
11337 (qxfer_packets): Add btrace-conf entry.
11338 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11339 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11340 (target_ops)<read_btrace_conf>: New.
11341 (target_enable_btrace): Update parameters.
11342 (target_read_btrace_conf): New.
11343
11344 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11345
11346 * server.c (handle_btrace_general_set): Remove call to
11347 target_supports_btrace.
11348 (supported_btrace_packets): New.
11349 (handle_query): Call supported_btrace_packets.
11350 * target.h: include btrace-common.h.
11351 (btrace_target_info): Removed.
11352 (supports_btrace, target_supports_btrace): Update parameters.
11353
11354 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11355
11356 * Makefile.in (SFILES): Add common/btrace-common.c.
11357 (OBS): Add common/btrace-common.o.
11358 (btrace-common.o): Add build rules.
11359 * linux-low: Include btrace-common.h.
11360 (linux_low_read_btrace): Use struct btrace_data. Call
11361 btrace_data_init and btrace_data_fini.
11362
11363 2015-02-06 Pedro Alves <palves@redhat.com>
11364
11365 * thread-db.c (find_new_threads_callback): Add debug output.
11366
11367 2015-02-04 Pedro Alves <palves@redhat.com>
11368
11369 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11370 (resume_stopped_resumed_lwps): New function.
11371 (linux_wait_for_event_filtered): Use it.
11372
11373 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11374
11375 * Makefile.in (SFILES): Add linux-personality.c.
11376 (linux-personality.o): New rule.
11377 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11378 list of objects to be built.
11379 * linux-low.c: Include nat/linux-personality.h.
11380 (linux_create_inferior): Remove code to disable address space
11381 randomization (moved to ../nat/linux-personality.c). Create
11382 cleanup to disable address space randomization.
11383
11384 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11385
11386 * Makefile.in (posix-strerror.o): New rule.
11387 (mingw-strerror.o): Likewise.
11388 * configure: Regenerated.
11389 * configure.ac: Source file ../common/common.host. Initialize new
11390 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11391
11392 2015-01-14 Yao Qi <yao@codesourcery.com>
11393
11394 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11395 (ppc-linux.o): New rule.
11396 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11397 * configure.ac: AC_CHECK_FUNCS(getauxval).
11398 * config.in: Re-generated.
11399 * configure: Re-generated.
11400 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11401 ppc64_64bit_inferior_p
11402
11403 2015-01-14 Yao Qi <yao@codesourcery.com>
11404
11405 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11406 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11407 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11408 (PT_ORIG_R3, PT_TRAP): Likewise.
11409 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11410 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11411 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11412
11413 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11414
11415 * i387-fp.c (i387_cache_to_xsave): In look over
11416 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11417 zmmh_low_space field by use of zmmh_high_space.
11418
11419 2015-01-09 Pedro Alves <palves@redhat.com>
11420
11421 * linux-low.c (step_over_bkpt): Move higher up in the file.
11422 (handle_extended_wait): Don't store the stop_pc here.
11423 (get_stop_pc): Adjust comments and rename to ...
11424 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11425 stopped for a software breakpoint or hardware breakpoint.
11426 (thread_still_has_status_pending_p): New function.
11427 (status_pending_p_callback): Use
11428 thread_still_has_status_pending_p. If the event is no longer
11429 interesting, resume the LWP.
11430 (handle_tracepoints): Add assert.
11431 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11432 (wstatus_maybe_breakpoint): New function.
11433 (cancel_breakpoint): Delete function.
11434 (check_stopped_by_watchpoint): New function, factored out from
11435 linux_low_filter_event.
11436 (lp_status_maybe_breakpoint): Delete function.
11437 (linux_low_filter_event): Remove filter_ptid argument.
11438 Leave thread group exits pending here. Store the LWP's stop PC.
11439 Always leave events pending.
11440 (linux_wait_for_event_filtered): Pull all events out of the
11441 kernel, and leave them all pending.
11442 (count_events_callback, select_event_lwp_callback): Consider all
11443 events.
11444 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11445 (select_event_lwp): Only give preference to the stepping LWP in
11446 all-stop mode. Adjust comments.
11447 (ignore_event): New function.
11448 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11449 references to cancel_breakpoints. Adjust to renames. Also give
11450 equal priority to all LWPs that have had events in non-stop mode.
11451 If reporting a software breakpoint event, unadjust the LWP's PC.
11452 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11453 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11454 Adjust.
11455 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11456 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11457 (linux_stopped_by_watchpoint): Adjust.
11458 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11459 * linux-low.h (enum lwp_stop_reason): New.
11460 (struct lwp_info) <stop_pc>: Adjust comment.
11461 <stopped_by_watchpoint>: Delete field.
11462 <stop_reason>: New field.
11463 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11464 * mem-break.c (software_breakpoint_inserted_here)
11465 (hardware_breakpoint_inserted_here): New function.
11466 * mem-break.h (software_breakpoint_inserted_here)
11467 (hardware_breakpoint_inserted_here): Declare.
11468 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11469 (cancel_breakpoints): Delete.
11470 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11471 (upload_fast_traceframes): Remove references to
11472 cancel_breakpoints.
11473
11474 2015-01-09 Pedro Alves <palves@redhat.com>
11475
11476 * thread-db.c (find_new_threads_callback): Ignore thread if the
11477 kernel thread ID is -1.
11478
11479 2015-01-09 Pedro Alves <palves@redhat.com>
11480
11481 * linux-low.c (linux_attach_fail_reason_string): Move to
11482 nat/linux-ptrace.c, and rename.
11483 (linux_attach_lwp): Update comment.
11484 (attach_proc_task_lwp_callback): New function.
11485 (linux_attach): Adjust to rename and use
11486 linux_proc_attach_tgid_threads.
11487 (linux_attach_fail_reason_string): Delete declaration.
11488
11489 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11490
11491 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11492 * server.c (gdbserver_version): Likewise.
11493
11494 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11495
11496 * remote-utils.c: Include ctype.h.
11497 (input_interrupt): Explicitly handle the case when the char
11498 received is the NUL byte. Improve the printing of non-ASCII
11499 characters.
11500
11501 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11502
11503 * linux-low.c (linux_low_filter_event): Update call to
11504 linux_enable_event_reporting following the addition of
11505 a new parameter to that function.
11506
11507 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11508
11509 PR server/17457
11510 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11511 (AARCH64_FPCR_REGNO): Likewise.
11512 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11513 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11514 (aarch64_store_fpregset): Likewise.
11515
11516 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11517
11518 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11519 Remove FIXME comment about assumption about N.
11520
11521 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11522
11523 * configure.ac: If large-file support is disabled in GDBserver,
11524 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11525 * configure: Regenerate.
11526
11527 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11528
11529 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11530 warning upon ENODATA from ptrace.
11531 * linux-s390-low.c (s390_store_tdb): New.
11532 (s390_regsets): Add regset for NT_S390_TDB.
11533
11534 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11535
11536 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11537 without a fill_function.
11538 * linux-s390-low.c (s390_fill_last_break): Remove.
11539 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11540 (s390_arch_setup): Use regset's size instead of fill_function for
11541 loop end condition.
11542
11543 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11544
11545 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11546 the regset's store function when ptrace returned an error.
11547 * regcache.c (get_thread_regcache): Invalidate register cache
11548 before fetching inferior's registers.
11549
11550 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11551
11552 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11553 while-loop as for-loop.
11554 (regsets_store_inferior_registers): Likewise.
11555
11556 2014-11-28 Yao Qi <yao@codesourcery.com>
11557
11558 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11559 * config.in, configure: Re-generate.
11560 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11561 is defined.
11562
11563 2014-11-21 Yao Qi <yao@codesourcery.com>
11564
11565 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11566 (AC_CHECK_HEADERS): Remove malloc.h.
11567 * configure: Re-generated.
11568 * config.in: Re-generated.
11569 * server.h: Don't include alloca.h and malloc.h.
11570 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11571 Don't include malloc.h.
11572
11573 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11574
11575 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11576 corresponding ERRNO check in same block.
11577
11578 2014-11-12 Pedro Alves <palves@redhat.com>
11579
11580 * server.c (cont_thread): Update comment.
11581 (start_inferior, attach_inferior): No longer clear cont_thread.
11582 (handle_v_cont): No longer set cont_thread.
11583 (captured_main): Clear cont_thread each time a GDB connects.
11584
11585 2014-11-12 Pedro Alves <palves@redhat.com>
11586
11587 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11588 thread, and don't resume all threads if the Hc thread has exited.
11589
11590 2014-11-12 Pedro Alves <palves@redhat.com>
11591
11592 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11593 the process group instead of to a specific LWP.
11594
11595 2014-10-15 Pedro Alves <palves@redhat.com>
11596
11597 PR server/17487
11598 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11599 parameter.
11600 (arm_set_thread_context): Delete.
11601 (the_low_target): Adjust.
11602 * win32-i386-low.c (debug_registers_changed)
11603 (debug_registers_used): Delete.
11604 (update_debug_registers_callback): New function.
11605 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11606 needing to update their debug registers.
11607 (win32_get_current_dr): New function.
11608 (x86_dr_low_get_addr, x86_dr_low_get_control)
11609 (x86_dr_low_get_status): Fetch the debug register from the thread
11610 record's context.
11611 (i386_initial_stuff): Adjust.
11612 (i386_get_thread_context): Remove current_event parameter. Don't
11613 clear debug_registers_changed nor copy DR values to
11614 debug_reg_state.
11615 (i386_set_thread_context): Delete.
11616 (i386_prepare_to_resume): New function.
11617 (i386_thread_added): Mark the thread as needing to update irs
11618 debug registers.
11619 (the_low_target): Remove i386_set_thread_context and install
11620 i386_prepare_to_resume.
11621 * win32-low.c (win32_get_thread_context): Adjust.
11622 (win32_set_thread_context): Use SetThreadContext
11623 directly.
11624 (win32_prepare_to_resume): New function.
11625 (win32_require_context): New function, factored out from ...
11626 (thread_rec): ... this.
11627 (continue_one_thread): Call win32_prepare_to_resume on each thread
11628 we're about to continue.
11629 (win32_resume): Call win32_prepare_to_resume on the event thread.
11630 * win32-low.h (struct win32_thread_info)
11631 <debug_registers_changed>: New field.
11632 (struct win32_target_ops): Change prototype of set_thread_context,
11633 delete set_thread_context and add prepare_to_resume.
11634 (win32_require_context): New declaration.
11635
11636 2014-10-08 Gary Benson <gbenson@redhat.com>
11637
11638 * server.h: Do not include common-exceptions.h.
11639
11640 2014-10-08 Gary Benson <gbenson@redhat.com>
11641
11642 * server.h: Do not include cleanups.h.
11643
11644 2014-09-30 James Hogan <james.hogan@imgtec.com>
11645
11646 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11647 mips64-dsp-linux.c.
11648
11649 2014-09-23 Yao Qi <yao@codesourcery.com>
11650
11651 * linux-low.c (lp_status_maybe_breakpoint): New function.
11652 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11653 (count_events_callback): Likewise.
11654 (select_event_lwp_callback): Likewise.
11655 (cancel_breakpoints_callback): Likewise.
11656
11657 2014-09-19 Don Breazeal <donb@codesourcery.com>
11658
11659 * linux-low.c (handle_extended_wait): Call
11660 linux_ptrace_get_extended_event.
11661 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11662 linux_is_extended_waitstatus.
11663
11664 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11665
11666 * Makefile.in (CPPFLAGS): Define.
11667 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11668 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11669
11670 2014-09-16 Gary Benson <gbenson@redhat.com>
11671
11672 * inferiors.h (current_inferior): Renamed as...
11673 (current_thread): New variable. All uses updated.
11674 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11675 (maybe_move_out_of_jump_pad): Likewise.
11676 (cancel_breakpoint): Likewise.
11677 (linux_low_filter_event): Likewise.
11678 (wait_for_sigstop): Likewise.
11679 (linux_resume_one_lwp): Likewise.
11680 (need_step_over_p): Likewise.
11681 (start_step_over): Likewise.
11682 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11683 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11684 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11685 and save_inferior as saved_thread.
11686 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11687 saved_thread.
11688 (regcache_invalidate_thread): Likewise.
11689 * remote-utils.c (prepare_resume_reply): Likewise.
11690 * thread-db.c (thread_db_get_tls_address): Likewise.
11691 (disable_thread_event_reporting): Likewise.
11692 (remove_thread_event_breakpoints): Likewise.
11693 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11694 as saved_thread.
11695 * target.h (set_desired_inferior): Renamed as...
11696 (set_desired_thread): New declaration. All uses updated.
11697 * server.c (myresume): Updated comment to reference thread instead
11698 of inferior.
11699 (handle_serial_event): Likewise.
11700 (handle_target_event): Likewise.
11701
11702 2014-09-12 Tom Tromey <tromey@redhat.com>
11703 Gary Benson <gbenson@redhat.com>
11704
11705 * regcache.h: Include common-regcache.h.
11706 (regcache_read_pc): Don't declare.
11707 * regcache.c (get_thread_regcache_for_ptid): New function.
11708
11709 2014-09-11 Tom Tromey <tromey@redhat.com>
11710 Gary Benson <gbenson@redhat.com>
11711
11712 * symbol.c: New file.
11713 * Makefile.in (SFILES): Add symbol.c.
11714 (OBS): Add symbol.o.
11715
11716 2014-09-11 Gary Benson <gbenson@redhat.com>
11717
11718 * target.c (target_stop_ptid, target_continue_ptid): New
11719 functions.
11720
11721 2014-09-11 Tom Tromey <tromey@redhat.com>
11722 Gary Benson <gbenson@redhat.com>
11723
11724 * target.h: Include target/target.h.
11725 * target.c (target_read_memory, target_read_uint32)
11726 (target_write_memory): New functions.
11727
11728 2014-09-11 Gary Benson <gbenson@redhat.com>
11729
11730 * server.h (debug_hw_points): Don't declare.
11731 * server.c (debug_hw_points): Don't define. Replace all uses
11732 with show_debug_regs.
11733 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11734 all uses with show_debug_regs.
11735
11736 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11737
11738 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11739 endianness into account.
11740 (ppc_supply_ptrace_register): Likewise.
11741
11742 2014-09-03 James Hogan <james.hogan@imgtec.com>
11743
11744 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11745 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11746
11747 2014-09-03 Gary Benson <gbenson@redhat.com>
11748
11749 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11750 ALL_DEBUG_ADDRESS_REGISTERS.
11751
11752 2014-09-02 Gary Benson <gbenson@redhat.com>
11753
11754 * i386-low.h: Renamed as...
11755 * x86-low.h: New file. All type, function and variable name
11756 prefixes changed from "i386_" to "x86_". All references updated.
11757 * i386-low.c: Renamed as...
11758 * x86-low.c: New file. All type, function and variable name
11759 prefixes changed from "i386_" to "x86_". All references updated.
11760
11761 2014-09-02 Gary Benson <gbenson@redhat.com>
11762
11763 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11764 (x86_linux_new_thread): Likewise.
11765
11766 2014-08-29 Gary Benson <gbenson@redhat.com>
11767
11768 * server.h (setjmp.h): Do not include.
11769 (toplevel): Do not declare.
11770 (common-exceptions.h): Include.
11771 (cleanups.h): Likewise.
11772 * server.c (toplevel): Do not define.
11773 (exit_code): New static global.
11774 (detach_or_kill_for_exit_cleanup): New function.
11775 (main): New function. Original main renamed to...
11776 (captured_main): New function.
11777 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11778
11779 2014-08-29 Gary Benson <gbenson@redhat.com>
11780
11781 * Makefile.in (SFILES): Add common/common-exceptions.c.
11782 (OBS): Add common-exceptions.o.
11783 (common-exceptions.o): New rule.
11784 * utils.c (prepare_to_throw_exception): New function.
11785
11786 2014-08-29 Gary Benson <gbenson@redhat.com>
11787
11788 * config.in: Regenerate.
11789 * configure: Likewise.
11790
11791 2014-08-29 Gary Benson <gbenson@redhat.com>
11792
11793 * Makefile.in (SFILES): Add common/cleanups.c.
11794 (OBS): cleanups.o.
11795 (cleanups.o): New rule.
11796
11797 2014-08-29 Gary Benson <gbenson@redhat.com>
11798
11799 * utils.c (internal_vwarning): New function.
11800
11801 2014-08-28 Gary Benson <gbenson@redhat.com>
11802
11803 * utils.h (fatal): Remove declaration.
11804 * utils.c (fatal): Remove function.
11805
11806 2014-08-28 Gary Benson <gbenson@redhat.com>
11807
11808 * tracepoint.c (gdb_agent_init): Replace fatal with
11809 perror_with_name.
11810 (initialize_tracepoint): Likewise.
11811
11812 2014-08-28 Gary Benson <gbenson@redhat.com>
11813
11814 * remote-utils.c (remote_prepare): Replace fatal with error.
11815
11816 2014-08-28 Gary Benson <gbenson@redhat.com>
11817
11818 * linux-low.c (linux_async): Replace fatal with warning.
11819 Tidy up and return.
11820 (linux_start_non_stop): Return -1 if linux_async failed.
11821
11822 2014-08-28 Gary Benson <gbenson@redhat.com>
11823
11824 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11825 gdb_assert.
11826 (i386_dr_low_get_addr): Remove vague comment.
11827 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11828 gdb_assert.
11829
11830 2014-08-28 Gary Benson <gbenson@redhat.com>
11831
11832 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11833 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11834 internal_error.
11835 (linux_resume_one_lwp): Likewise.
11836 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11837 gdb_assert.
11838 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11839 with internal_error.
11840 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11841 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11842 (find_register_by_name): Replace fatal with internal_error.
11843 (find_regno): Likewise.
11844 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11845 * thread-db.c (thread_db_create_event): Likewise.
11846 (thread_db_load_search): Likewise.
11847 (try_thread_db_load_1): Likewise.
11848 * tracepoint.c (get_jump_space_head): Replace fatal with
11849 internal_error.
11850 (claim_trampoline_space): Likewise.
11851 (have_fast_tracepoint_trampoline_buffer): Likewise.
11852 (cmd_qtstart): Likewise.
11853 (stop_tracing): Likewise.
11854 (fast_tracepoint_collecting): Likewise.
11855 (target_malloc): Likewise.
11856 (download_tracepoint): Likewise.
11857 (download_trace_state_variables): Replace check with gdb_assert.
11858 (upload_fast_traceframes): Replace fatal with internal_error.
11859
11860 2014-08-19 Tom Tromey <tromey@redhat.com>
11861 Gary Benson <gbenson@redhat.com>
11862
11863 * Makefile.in (SFILES): Add common/common-debug.c.
11864 (OBS): Add common-debug.o.
11865 (common-debug.o): New rule.
11866 * debug.h (debug_printf): Don't declare.
11867 * debug.c (debug_printf): Renamed and rewritten as...
11868 (debug_vprintf): New function.
11869
11870 2014-08-19 Gary Benson <gbenson@redhat.com>
11871
11872 * utils.h: Do not include print-utils.h.
11873
11874 2014-08-19 Tom Tromey <tromey@redhat.com>
11875 Gary Benson <gbenson@redhat.com>
11876
11877 * server.h: Add static assertion.
11878 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11879
11880 2014-08-19 Tom Tromey <tromey@redhat.com>
11881 Gary Benson <gbenson@redhat.com>
11882
11883 * Makefile.in (SFILES): Add common/errors.c.
11884 (OBS): Add errors.o.
11885 (IPA_OBS): Add errors-ipa.o.
11886 (errors.o): New rule.
11887 (errors-ipa.o): Likewise.
11888 * utils.h (perror_with_name, error, warning): Don't declare.
11889 * utils.c (warning): Renamed and rewritten as...
11890 (vwarning): New function.
11891 (error): Renamed and rewritten as...
11892 (verror): New function.
11893 (internal_error): Renamed and rewritten as...
11894 (internal_verror): New function.
11895
11896 2014-08-07 Gary Benson <gbenson@redhat.com>
11897
11898 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11899 * configure: Regenerate.
11900 * config.in: Likewise.
11901 * server.h: Do not include errno.h.
11902 * event-loop.c: Likewise.
11903 * hostio-errno.c: Likewise.
11904 * linux-low.c: Likewise.
11905 * remote-utils.c: Likewise.
11906 * spu-low.c: Likewise.
11907 * utils.c: Likewise.
11908 * gdbreplay.c: Unconditionally include errno.h.
11909
11910 2014-08-07 Gary Benson <gbenson@redhat.com>
11911
11912 * server.h: Do not include string.h.
11913 * event-loop.c: Likewise.
11914 * linux-low.c: Likewise.
11915 * regcache.c: Likewise.
11916 * remote-utils.c: Likewise.
11917 * spu-low.c: Likewise.
11918 * utils.c: Likewise.
11919
11920 2014-08-07 Gary Benson <gbenson@redhat.com>
11921
11922 * server.h: Do not include gdb_assert.h.
11923
11924 2014-08-07 Gary Benson <gbenson@redhat.com>
11925
11926 * server.h: Do not include common-utils.h.
11927
11928 2014-08-07 Gary Benson <gbenson@redhat.com>
11929
11930 * server.h: Do not include ptid.h.
11931 * notif.h: Likewise.
11932
11933 2014-08-07 Gary Benson <gbenson@redhat.com>
11934
11935 * server.h: Do not include gdb_locale.h.
11936
11937 2014-08-07 Gary Benson <gbenson@redhat.com>
11938
11939 * server.h: Do not include gdb/signals.h.
11940 * win32-low.c: Likewise.
11941
11942 2014-08-07 Gary Benson <gbenson@redhat.com>
11943
11944 * server.h: Do not include pathmax.h.
11945
11946 2014-08-07 Gary Benson <gbenson@redhat.com>
11947
11948 * server.h: Do not include libiberty.h.
11949 * linux-bfin-low.c: Likewise.
11950
11951 2014-08-07 Gary Benson <gbenson@redhat.com>
11952
11953 * server.h: Do not include ansidecl.h.
11954
11955 2014-08-07 Gary Benson <gbenson@redhat.com>
11956
11957 * linux-x86-low.c: Do not include stddef.h.
11958 * lynx-ppc-low.c: Likewise.
11959 * tracepoint.c: Likewise.
11960
11961 2014-08-07 Gary Benson <gbenson@redhat.com>
11962
11963 * server.h: Do not include stdarg.h.
11964 * nto-low.c: Likewise.
11965
11966 2014-08-07 Gary Benson <gbenson@redhat.com>
11967
11968 * server.h: Do not include stdlib.h.
11969 * inferiors.c: Likewise.
11970 * linux-low.c: Likewise.
11971 * regcache.c: Likewise.
11972 * spu-low.c: Likewise.
11973 * tracepoint.c: Likewise.
11974 * utils.c: Likewise.
11975
11976 2014-08-07 Gary Benson <gbenson@redhat.com>
11977
11978 * server.h: Do not include stdio.h.
11979 * linux-low.c: Likewise.
11980 * remote-utils.c: Likewise.
11981 * spu-low.c: Likewise.
11982 * utils.c: Likewise.
11983 * wincecompat.c: Likewise.
11984
11985 2014-08-06 Gary Benson <gbenson@redhat.com>
11986
11987 * regcache.c (init_register_cache): Move conditionals inside if.
11988
11989 2014-08-06 Gary Benson <gbenson@redhat.com>
11990
11991 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11992
11993 2014-07-31 Gary Benson <gbenson@redhat.com>
11994
11995 * ax.h: Do not include server.h.
11996 * gdbthread.h: Likewise.
11997 * lynx-low.h: Likewise.
11998 * notif.h: Likewise.
11999
12000 2014-07-30 Gary Benson <gbenson@redhat.com>
12001
12002 * server.h: Include common-defs.h.
12003 Do not include config.h or build-gnulib-gdbserver/config.h.
12004
12005 2014-07-30 Gary Benson <gbenson@redhat.com>
12006
12007 * hostio-errno.c: Move server.h to top of includes list.
12008 * inferiors.c: Likewise.
12009 * linux-x86-low.c: Likewise.
12010 * notif.c: Include server.h.
12011
12012 2014-07-24 Tom Tromey <tromey@redhat.com>
12013 Gary Benson <gbenson@redhat.com>
12014
12015 * server.h (CORE_ADDR): Now unsigned.
12016
12017 2014-07-16 Pedro Alves <palves@redhat.com>
12018
12019 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12020
12021 2014-07-15 Pedro Alves <palves@redhat.com>
12022
12023 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12024 copy.
12025
12026 2014-07-11 Pedro Alves <palves@redhat.com>
12027
12028 * linux-low.c (kill_wait_lwp): New function, based on
12029 kill_one_lwp_callback, but use my_waitpid directly.
12030 (kill_one_lwp_callback, linux_kill): Use it.
12031
12032 2014-06-23 Pedro Alves <palves@redhat.com>
12033
12034 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12035 before setting DR0..DR3.
12036
12037 2014-06-20 Gary Benson <gbenson@redhat.com>
12038
12039 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12040 * configure: Regenerated.
12041 * config.in: Likewise.
12042
12043 2014-06-20 Gary Benson <gbenson@redhat.com>
12044
12045 * Makefile.in (SFILES): Update locations for files moved
12046 from common to nat.
12047 (object file files): Reordered.
12048
12049 2014-06-20 Gary Benson <gbenson@redhat.com>
12050
12051 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12052 (i386_dr_low_set_addr): Likewise.
12053 (i386_dr_low_get_addr): Likewise.
12054 (i386_dr_low_can_set_control): Likewise.
12055 (i386_dr_low_set_control): Likewise.
12056 (i386_dr_low_get_control): Likewise.
12057 (i386_dr_low_get_status): Likewise.
12058 (i386_get_debug_register_length): Likewise.
12059 * linux-x86-low.c (i386_dr_low_set_addr):
12060 Changed signature. Made static.
12061 (i386_dr_low_get_addr): Likewise.
12062 (i386_dr_low_set_control): Likewise.
12063 (i386_dr_low_get_control): Likewise.
12064 (i386_dr_low_get_status): Likewise.
12065 (i386_dr_low): New global variable.
12066 * win32-i386-low.c (i386_dr_low_set_addr):
12067 Changed signature. Made static.
12068 (i386_dr_low_get_addr): Likewise.
12069 (i386_dr_low_set_control): Likewise.
12070 (i386_dr_low_get_control): Likewise.
12071 (i386_dr_low_get_status): Likewise.
12072 (i386_dr_low): New global variable.
12073
12074 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12075
12076 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12077 * Makefile.in (AR, AR_FLAGS): Define.
12078 * configure: Regenerate.
12079
12080 2014-06-19 Gary Benson <gbenson@redhat.com>
12081
12082 * Makefile.in (i386-dregs.o): New rule.
12083 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12084 * i386-low.c (target.h): Remove include.
12085 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12086 (DR_CONTROL_SHIFT): Likewise.
12087 (DR_CONTROL_SIZE): Likewise.
12088 (DR_RW_EXECUTE): Likewise.
12089 (DR_RW_WRITE): Likewise.
12090 (DR_RW_READ): Likewise.
12091 (DR_RW_IORW): Likewise.
12092 (DR_LEN_1): Likewise.
12093 (DR_LEN_2): Likewise.
12094 (DR_LEN_4): Likewise.
12095 (DR_LEN_8): Likewise.
12096 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12097 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12098 (DR_ENABLE_SIZE): Likewise.
12099 (DR_LOCAL_SLOWDOWN): Likewise.
12100 (DR_GLOBAL_SLOWDOWN): Likewise.
12101 (DR_CONTROL_RESERVED): Likewise.
12102 (I386_DR_CONTROL_MASK): Likewise.
12103 (I386_DR_VACANT): Likewise.
12104 (I386_DR_LOCAL_ENABLE): Likewise.
12105 (I386_DR_GLOBAL_ENABLE): Likewise.
12106 (I386_DR_DISABLE): Likewise.
12107 (I386_DR_SET_RW_LEN): Likewise.
12108 (I386_DR_GET_RW_LEN): Likewise.
12109 (I386_DR_WATCH_HIT): Likewise.
12110 (i386_wp_op_t): Likewise.
12111 (i386_show_dr): Likewise.
12112 (i386_length_and_rw_bits): Likewise.
12113 (i386_insert_aligned_watchpoint): Likewise.
12114 (i386_remove_aligned_watchpoint): Likewise.
12115 (i386_handle_nonaligned_watchpoint): Likewise.
12116 i386_update_inferior_debug_regs(): Likewise.
12117 (i386_dr_insert_watchpoint): Likewise.
12118 (i386_dr_remove_watchpoint): Likewise.
12119 (i386_dr_region_ok_for_watchpoint): Likewise.
12120 (i386_dr_stopped_data_address): Likewise.
12121 (i386_dr_stopped_by_watchpoint): Likewise.
12122
12123 2014-06-19 Gary Benson <gbenson@redhat.com>
12124
12125 * i386-low.c (i386_dr_show): Renamed to
12126 i386_show_dr and made static. All uses updated.
12127 (i386_dr_length_and_rw_bits): Renamed to
12128 i386_length_and_rw_bits and made static.
12129 All uses updated.
12130 (i386_dr_insert_aligned_watchpoint): Renamed to
12131 i386_insert_aligned_watchpoint and made static.
12132 All uses updated.
12133 (i386_dr_remove_aligned_watchpoint): Renamed to
12134 i386_remove_aligned_watchpoint and made static.
12135 All uses updated.
12136 (i386_dr_update_inferior_debug_regs): Renamed to
12137 i386_update_inferior_debug_regs and made static.
12138 All uses updated.
12139
12140 2014-06-18 Gary Benson <gbenson@redhat.com>
12141
12142 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12143 (i386_dr_low_can_set_control): Likewise.
12144 (i386_get_debug_register_length): Likewise.
12145 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12146 (i386_dr_low_can_set_control): Likewise.
12147 (i386_get_debug_register_length): Likewise.
12148
12149 2014-06-17 Gary Benson <gbenson@redhat.com>
12150
12151 * i386-low.h (i386-dregs.h): New include.
12152 (DR_FIRSTADDR): Now in i386-dregs.h.
12153 (DR_LASTADDR): Likewise.
12154 (DR_NADDR): Likewise.
12155 (DR_STATUS): Likewise.
12156 (DR_CONTROL): Likewise.
12157 (i386_debug_reg_state): Likewise.
12158 (i386_dr_insert_watchpoint): Likewise.
12159 (i386_dr_remove_watchpoint): Likewise.
12160 (i386_dr_region_ok_for_watchpoint): Likewise.
12161 (i386_dr_stopped_data_address): Likewise.
12162 (i386_dr_stopped_by_watchpoint): Likewise.
12163 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12164
12165 2014-06-18 Gary Benson <gbenson@redhat.com>
12166
12167 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12168 i386_dr_insert_watchpoint.
12169 (i386_low_remove_watchpoint): Renamed to
12170 i386_dr_remove_watchpoint.
12171 (i386_low_region_ok_for_watchpoint): Renamed to
12172 i386_dr_region_ok_for_watchpoint.
12173 (i386_low_stopped_data_address): Renamed to
12174 i386_dr_stopped_data_address.
12175 (i386_low_stopped_by_watchpoint): Renamed to
12176 i386_dr_stopped_by_watchpoint.
12177 * i386-low.c (i386_show_dr): Renamed to
12178 i386_dr_show and made nonstatic. All uses updated.
12179 (i386_length_and_rw_bits): Renamed to
12180 i386_dr_length_and_rw_bits and made nonstatic.
12181 All uses updated.
12182 (i386_insert_aligned_watchpoint): Renamed to
12183 i386_dr_insert_aligned_watchpoint and made nonstatic.
12184 All uses updated.
12185 (i386_remove_aligned_watchpoint): Renamed to
12186 i386_dr_remove_aligned_watchpoint and made nonstatic.
12187 All uses updated.
12188 (i386_update_inferior_debug_regs): Renamed to
12189 i386_dr_update_inferior_debug_regs and made nonstatic.
12190 All uses updated.
12191 (i386_low_insert_watchpoint): Renamed to
12192 i386_dr_insert_watchpoint. All uses updated.
12193 (i386_low_remove_watchpoint): Renamed to
12194 i386_dr_remove_watchpoint. All uses updated.
12195 (i386_low_region_ok_for_watchpoint): Renamed to
12196 i386_dr_region_ok_for_watchpoint. All uses updated.
12197 (i386_low_stopped_data_address): Renamed to
12198 i386_dr_stopped_data_address. All uses updated.
12199 (i386_low_stopped_by_watchpoint): Renamed to
12200 i386_dr_stopped_by_watchpoint. All uses updated.
12201
12202 2014-06-18 Gary Benson <gbenson@redhat.com>
12203
12204 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12205 (i386_dr_low_can_set_control): Likewise.
12206 (i386_insert_aligned_watchpoint): New check.
12207
12208 2014-06-18 Gary Benson <gbenson@redhat.com>
12209
12210 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12211 Renamed to state.
12212
12213 2014-06-18 Gary Benson <gbenson@redhat.com>
12214
12215 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12216 instead of fatal and error.
12217 (i386_handle_nonaligned_watchpoint): Likewise.
12218
12219 2014-06-18 Gary Benson <gbenson@redhat.com>
12220
12221 * i386-low.c (i386_get_debug_register_length): New macro.
12222 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12223 (i386_show_dr): Use debug_printf instead of fprintf. Use
12224 phex to format values.
12225
12226 2014-06-18 Gary Benson <gbenson@redhat.com>
12227
12228 * i386-low.h: Comment changes.
12229 * i386-low.c: Likewise.
12230
12231 2014-06-18 Gary Benson <gbenson@redhat.com>
12232
12233 * i386-low.c: Whitespace changes.
12234
12235 2014-06-12 Tom Tromey <tromey@redhat.com>
12236
12237 * utils.c (freeargv): Remove.
12238
12239 2014-06-12 Tom Tromey <tromey@redhat.com>
12240
12241 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12242 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12243 (parse_debug_format_options): Likewise.
12244 (gdbserver_usage): Likewise.
12245 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12246 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12247 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12248 against libiberty.
12249 ($(LIBGNU)): Depend on libiberty.
12250 (all-lib): Recurse into all subdirs.
12251 (install-only): Invoke "install" target in subdirs.
12252 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12253 targets.
12254 * configure: Rebuild.
12255 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12256 for vasprintf, vsnprintf, or gettimeofday.
12257 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12258 srv_tgtobj.
12259
12260 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12261
12262 * development.sh: Delete.
12263 * Makefile.in (config.status): Adjust dependency on development.sh.
12264 * configure.ac: Adjust development.sh source call.
12265 * configure: Regenerate.
12266
12267 2014-06-02 Pedro Alves <palves@redhat.com>
12268
12269 * ax.c (gdb_free_agent_expr): New function.
12270 * ax.h (gdb_free_agent_expr): New declaration.
12271 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12272 list.
12273 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12274 static.
12275 (clear_breakpoint_conditions_and_commands): New function.
12276 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12277 (clear_breakpoint_conditions_and_commands): New declaration.
12278
12279 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12280
12281 * linux-aarch64-low.c (asm/ptrace.h): Include.
12282
12283 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12284
12285 Fix TLS access for -static -pthread.
12286 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12287 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12288 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12289
12290 2014-05-20 Pedro Alves <palves@redhat.com>
12291
12292 * linux-aarch64-low.c (aarch64_insert_point)
12293 (aarch64_remove_point): No longer check whether the type is
12294 supported here. Adjust to new interface.
12295 (the_low_target): Install aarch64_supports_z_point_type as
12296 supports_z_point_type method.
12297 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12298 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12299 instead of a Z packet char. Adjust.
12300 (arm_supports_z_point_type): New function.
12301 (arm_insert_point, arm_remove_point): Adjust to new interface.
12302 (the_low_target): Install arm_supports_z_point_type.
12303 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12304 (cris_insert_point, cris_remove_point): Adjust to new interface.
12305 Don't check whether the type is supported here.
12306 (the_low_target): Install cris_supports_z_point_type.
12307 * linux-low.c (linux_supports_z_point_type): New function.
12308 (linux_insert_point, linux_remove_point): Adjust to new interface.
12309 * linux-low.h (struct linux_target_ops) <insert_point,
12310 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12311 raw_breakpoint pointer parameter.
12312 <supports_z_point_type>: New method.
12313 * linux-mips-low.c (mips_supports_z_point_type): New function.
12314 (mips_insert_point, mips_remove_point): Adjust to new interface.
12315 Use mips_supports_z_point_type.
12316 (the_low_target): Install mips_supports_z_point_type.
12317 * linux-ppc-low.c (the_low_target): Install NULL as
12318 supports_z_point_type method.
12319 * linux-s390-low.c (the_low_target): Install NULL as
12320 supports_z_point_type method.
12321 * linux-sparc-low.c (the_low_target): Install NULL as
12322 supports_z_point_type method.
12323 * linux-x86-low.c (x86_supports_z_point_type): New function.
12324 (x86_insert_point): Adjust to new insert_point interface. Use
12325 insert_memory_breakpoint. Adjust to new
12326 i386_low_insert_watchpoint interface.
12327 (x86_remove_point): Adjust to remove_point interface. Use
12328 remove_memory_breakpoint. Adjust to new
12329 i386_low_remove_watchpoint interface.
12330 (the_low_target): Install x86_supports_z_point_type.
12331 * lynx-low.c (lynx_target_ops): Install NULL as
12332 supports_z_point_type callback.
12333 * nto-low.c (nto_supports_z_point_type): New.
12334 (nto_insert_point, nto_remove_point): Adjust to new interface.
12335 (nto_target_ops): Install nto_supports_z_point_type.
12336 * mem-break.c: Adjust intro comment.
12337 (struct raw_breakpoint) <raw_type, size>: New fields.
12338 <inserted>: Update comment.
12339 <shlib_disabled>: Delete field.
12340 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12341 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12342 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12343 (raw_bkpt_type_to_target_hw_bp_type): New function.
12344 (find_enabled_raw_code_breakpoint_at): New function.
12345 (find_raw_breakpoint_at): New type and size parameters. Use them.
12346 (insert_memory_breakpoint): New function, based off
12347 set_raw_breakpoint_at.
12348 (remove_memory_breakpoint): New function.
12349 (set_raw_breakpoint_at): Reimplement.
12350 (set_breakpoint): New, based on set_breakpoint_at.
12351 (set_breakpoint_at): Reimplement.
12352 (delete_raw_breakpoint): Go through the_target->remove_point
12353 instead of assuming memory breakpoints.
12354 (find_gdb_breakpoint_at): Delete.
12355 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12356 (find_gdb_breakpoint): New function.
12357 (set_gdb_breakpoint_at): Delete.
12358 (z_type_supported): New function.
12359 (set_gdb_breakpoint_1): New function, loosely based off
12360 set_gdb_breakpoint_at.
12361 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12362 (delete_gdb_breakpoint_at): Delete.
12363 (delete_gdb_breakpoint_1): New function, loosely based off
12364 delete_gdb_breakpoint_at.
12365 (delete_gdb_breakpoint): New function.
12366 (clear_gdb_breakpoint_conditions): Rename to ...
12367 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12368 breakpoint.
12369 (add_condition_to_breakpoint): Make static.
12370 (add_breakpoint_condition): Take a struct breakpoint pointer
12371 instead of an address. Adjust.
12372 (gdb_condition_true_at_breakpoint): Rename to ...
12373 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12374 z_type parameter.
12375 (gdb_condition_true_at_breakpoint): Reimplement.
12376 (add_breakpoint_commands): Take a struct breakpoint pointer
12377 instead of an address. Adjust.
12378 (gdb_no_commands_at_breakpoint): Rename to ...
12379 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12380 parameter. Return true if no breakpoint was found. Change debug
12381 output.
12382 (gdb_no_commands_at_breakpoint): Reimplement.
12383 (run_breakpoint_commands): Rename to ...
12384 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12385 and change return type to boolean.
12386 (run_breakpoint_commands): New function.
12387 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12388 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12389 breakpoint. Go through the_target->remove_point instead of
12390 assuming memory breakpoint.
12391 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12392 software and hardware breakpoints.
12393 (reinsert_raw_breakpoint): Go through the_target->insert_point
12394 instead of assuming memory breakpoint.
12395 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12396 software and hardware breakpoints.
12397 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12398 Check both software and hardware breakpoints.
12399 (validate_inserted_breakpoint): Assert the breakpoint is a
12400 software breakpoint. Set the inserted flag to -1 instead of
12401 setting shlib_disabled.
12402 (delete_disabled_breakpoints): Adjust.
12403 (validate_breakpoints): Only validate software breakpoints.
12404 Adjust to inserted flag change.
12405 (check_mem_read, check_mem_write): Skip breakpoint types other
12406 than software breakpoints. Adjust to inserted flag change.
12407 * mem-break.h (enum raw_bkpt_type): New enum.
12408 (raw_breakpoint, struct process_info): Forward declare.
12409 (Z_packet_to_target_hw_bp_type): Delete declaration.
12410 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12411 (set_gdb_breakpoint, delete_gdb_breakpoint)
12412 (clear_breakpoint_conditions): New declarations.
12413 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12414 (breakpoint_inserted_here): Update comment.
12415 (add_breakpoint_condition, add_breakpoint_commands): Replace
12416 address parameter with a breakpoint pointer parameter.
12417 (gdb_breakpoint_here): Update comment.
12418 (delete_gdb_breakpoint_at): Delete.
12419 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12420 * server.c (process_point_options): Take a struct breakpoint
12421 pointer instead of an address. Adjust.
12422 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12423 delete_gdb_breakpoint.
12424 * spu-low.c (spu_target_ops): Install NULL as
12425 supports_z_point_type method.
12426 * target.h: Include mem-break.h.
12427 (struct target_ops) <prepare_to_access_memory>: Update comment.
12428 <supports_z_point_type>: New field.
12429 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12430 instead of a char. Also take a raw breakpoint pointer.
12431 * win32-arm-low.c (the_low_target): Install NULL as
12432 supports_z_point_type.
12433 * win32-i386-low.c (i386_supports_z_point_type): New function.
12434 (i386_insert_point, i386_remove_point): Adjust to new interface.
12435 (the_low_target): Install i386_supports_z_point_type.
12436 * win32-low.c (win32_supports_z_point_type): New function.
12437 (win32_insert_point, win32_remove_point): Adjust to new interface.
12438 (win32_target_ops): Install win32_supports_z_point_type.
12439 * win32-low.h (struct win32_target_ops):
12440 <supports_z_point_type>: New method.
12441 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12442 instead of a char. Also take a raw breakpoint pointer.
12443
12444 2014-05-20 Pedro Alves <palves@redhat.com>
12445
12446 * mem-break.h: Include break-common.h.
12447 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12448 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12449 (Z_packet_to_target_hw_bp_type): New declaration.
12450 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12451 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12452 (Z_PACKET_ACCESS_WP): Delete macros.
12453 (Z_packet_to_hw_type): Delete function.
12454 * i386-low.h: Don't include break-common.h here.
12455 (Z_packet_to_hw_type): Delete declaration.
12456 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12457 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12458 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12459 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12460 * linux-aarch64-low.c: Don't include break-common.h here.
12461 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12462 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12463 (Z_packet_to_target_hw_bp_type): Delete function.
12464 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12465 function.
12466 (mips_insert_point, mips_remove_point): Use
12467 Z_packet_to_target_hw_bp_type.
12468
12469 2014-05-20 Pedro Alves <palves@redhat.com>
12470
12471 * linux-aarch64-low.c: Include break-common.h.
12472 (enum target_point_type): Delete.
12473 (Z_packet_to_point_type): Rename to ...
12474 (Z_packet_to_target_hw_bp_type): ... this, and return a
12475 target_hw_bp_type instead.
12476 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12477 instead of an enum target_point_type.
12478 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12479 breakpoint type.
12480 (aarch64_dr_state_insert_one_point)
12481 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12482 (aarch64_handle_aligned_watchpoint)
12483 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12484 Take an enum target_hw_bp_type instead of an enum
12485 target_point_type.
12486 (aarch64_supports_z_point_type): New function.
12487 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12488 use Z_packet_to_target_hw_bp_type.
12489
12490 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12491
12492 * configure.ac: Only use -Werror by default when DEVELOPMENT
12493 is true.
12494 * configure: Regenerate.
12495
12496 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12497
12498 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12499 * linux-x86-low.c (X86_64_USER_REGS): New.
12500 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12501
12502 2014-04-28 Yao Qi <yao@codesourcery.com>
12503
12504 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12505 name.
12506
12507 2014-04-25 Pedro Alves <palves@redhat.com>
12508
12509 PR server/16255
12510 * linux-low.c (linux_attach_fail_reason_string): New function.
12511 (linux_attach_lwp): Delete.
12512 (linux_attach_lwp_1): Rename to ...
12513 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12514 argument. Remove "initial" parameter. Return int instead of
12515 void. Don't error or warn here.
12516 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12517 failure to attach to the tgid. Call warning when failing to
12518 attach to an lwp.
12519 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12520 argument. Remove "initial" parameter. Return int instead of
12521 void. Don't error or warn here.
12522 (linux_attach_fail_reason_string): New declaration.
12523 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12524 interface change. Use linux_attach_fail_reason_string.
12525
12526 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12527 Walfred Tedeschi <walfred.tedeschi@intel.com>
12528
12529 * Makefile.in: Added rules to handle new files
12530 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12531 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12532 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12533 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12534 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12535 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12536 x32-avx512-linux.o.
12537 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12538 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12539 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12540 i386/x32-avx512.xml.
12541 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12542 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12543 i386/x32-avx512-linux.xml.
12544 * i387-fp.c (num_avx512_k_registers): New constant for number
12545 of K registers.
12546 (num_avx512_zmmh_low_registers): New constant for number of
12547 lower ZMM registers (0-15).
12548 (num_avx512_zmmh_high_registers): New constant for number of
12549 higher ZMM registers (16-31).
12550 (num_avx512_ymmh_registers): New contant for number of higher
12551 YMM registers (ymm16-31 added by avx521 on x86_64).
12552 (num_avx512_xmm_registers): New constant for number of higher
12553 XMM registers (xmm16-31 added by AVX512 on x86_64).
12554 (struct i387_xsave): Add space for AVX512 registers.
12555 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12556 Add code to handle AVX512 registers.
12557 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12558 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12559 prototypei from generated file.
12560 (tdesc_amd64_avx512_linux): Likewise.
12561 (init_registers_x32_avx512_linux): Likewise.
12562 (tdesc_x32_avx512_linux): Likewise.
12563 (init_registers_i386_avx512_linux): Likewise.
12564 (tdesc_i386_avx512_linux): Likewise.
12565 (x86_64_regmap): Add AVX512 registers.
12566 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12567 mask.
12568 (initialize_low_arch): Add code to initialize AVX512 registers.
12569
12570 2014-04-23 Pedro Alves <palves@redhat.com>
12571
12572 * mem-break.c (find_gdb_breakpoint_at): Make static.
12573 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12574
12575 2014-04-23 Pedro Alves <palves@redhat.com>
12576
12577 * i386-low.c: Don't include break-common.h here.
12578 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12579 prototype to take target_hw_bp_type as argument instead of a Z
12580 packet char.
12581 * i386-low.h: Include break-common.h here.
12582 (Z_packet_to_hw_type): Declare.
12583 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12584 prototypes.
12585 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12586 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12587 (x86_remove_point): Convert the packet number to a
12588 target_hw_bp_type before calling i386_low_remove_watchpoint.
12589 * win32-i386-low.c (i386_insert_point): Convert the packet number
12590 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12591 (i386_remove_point): Convert the packet number to a
12592 target_hw_bp_type before calling i386_low_remove_watchpoint.
12593
12594 2014-04-23 Pedro Alves <palves@redhat.com>
12595
12596 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12597
12598 2014-04-10 Pedro Alves <palves@redhat.com>
12599
12600 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12601 Check if the condition or command is NULL before checking if the
12602 breakpoint is known. On success, return true.
12603 * mem-break.h (add_breakpoint_condition): Document return.
12604 (add_breakpoint_commands): Add describing comment.
12605 * server.c (skip_to_semicolon): New function.
12606 (process_point_options): Use it.
12607
12608 2014-04-09 Pedro Alves <palves@redhat.com>
12609
12610 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12611 to lwpid_of.
12612
12613 2014-02-27 Pedro Alves <palves@redhat.com>
12614
12615 PR 12702
12616 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12617 macros.
12618 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12619 output.
12620 (last_thread_of_process_p): Take a PID argument instead of a
12621 thread pointer.
12622 (linux_wait_for_lwp): Delete.
12623 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12624 functions.
12625 (linux_low_filter_event): New function, party factored out from
12626 linux_wait_for_event.
12627 (linux_wait_for_event): Rename to ...
12628 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12629 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12630 sigsuspend. Check for zombie leaders.
12631 (linux_wait_for_event): Reimplement as wrapper around
12632 linux_wait_for_event_filtered.
12633 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12634 a normal or signal exit is seen, it's the whole process exiting.
12635 (wait_for_sigstop): No longer a for_each_inferior callback.
12636 Rewrite on top of linux_wait_for_event_filtered.
12637 (stop_all_lwps): Call wait_for_sigstop directly.
12638 * server.c (resume, handle_target_event): Handle
12639 TARGET_WAITKIND_NO_RESUMED.
12640
12641 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12642
12643 * win32-low.c (psapi_get_dll_name,
12644 * win32_CreateToolhelp32Snapshot): Delete.
12645 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12646 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12647 Delete.
12648 (handle_load_dll): Add function description.
12649 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12650
12651 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12652
12653 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12654 Add comment.
12655 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12656 base address when calling win32_add_one_solib.
12657 (handle_load_dll): Delete local variable load_addr.
12658 Remove 0x1000 offset applied to DLL base address when calling
12659 win32_add_one_solib.
12660 (handle_unload_dll): Add comment.
12661
12662 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12663
12664 * win32-low.c (win32_add_all_dlls): Renames
12665 win32_ensure_ntdll_loaded. Rewrite function documentation.
12666 Adjust implementation to always load all DLLs.
12667 Add 0x1000 offset to DLL base address when calling
12668 win32_add_one_solib.
12669 (child_initialization_done): New static global.
12670 (do_initial_child_stuff): Set child_initialization_done to
12671 zero during child initialization, and 1 after. Replace call
12672 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12673 Add comment.
12674 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12675 (handle_unload_dll): Add function documentation.
12676 (get_child_debug_event): Ignore load and unload DLL events
12677 during child initialization.
12678
12679 2014-02-20 Doug Evans <dje@google.com>
12680
12681 Remove global all_lwps.
12682 * inferiors.h (ptid_of): Move here from linux-low.h.
12683 (pid_of, lwpid_of): Ditto.
12684 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12685 parameter is a struct thread_info * now.
12686 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12687 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12688 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12689 directly.
12690 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12691 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12692 * linux-arm-low.c (update_registers_callback): Update, "entry"
12693 parameter is a struct thread_info * now.
12694 Fetch lwpid from current_inferior directly.
12695 (arm_insert_point): Pass &all_threads to find_inferior instead of
12696 &all_lwps.
12697 (arm_remove_point): Ditto.
12698 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12699 (arm_prepare_to_resume): Fetch pid from thread.
12700 (arm_read_description): Fetch lwpid from current_inferior directly.
12701 * linux-low.c (all_lwps): Delete.
12702 (delete_lwp): Delete call to remove_inferior.
12703 (handle_extended_wait): Fetch lwpid from thread.
12704 (add_lwp): Don't set lwp->entry.id. Remove call to
12705 add_inferior_to_list.
12706 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12707 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12708 (kill_one_lwp_callback): Ditto.
12709 (linux_kill): Don't dereference NULL pointer.
12710 Fetch ptid,lwpid from thread.
12711 (get_detach_signal): Fetch ptid from thread.
12712 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12713 Simplify call to regcache_invalidate_thread.
12714 (delete_lwp_callback): Update, "entry" parameter is a
12715 struct thread_info * now. Fetch pid from thread.
12716 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12717 (status_pending_p_callback): Update, "entry" parameter is a
12718 struct thread_info * now. Fetch ptid from thread.
12719 (find_lwp_pid): Update, "entry" parameter is a
12720 struct thread_info * now.
12721 (linux_wait_for_lwp): Fetch pid from thread.
12722 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12723 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12724 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12725 (dequeue_one_deferred_signal): Ditto.
12726 (cancel_breakpoint): Fetch ptid from current_inferior.
12727 (linux_wait_for_event): Pass &all_threads to find_inferior,
12728 not &all_lwps. Fetch ptid, lwpid from thread.
12729 (count_events_callback): Update, "entry" parameter is a
12730 struct thread_info * now.
12731 (select_singlestep_lwp_callback): Ditto.
12732 (select_event_lwp_callback): Ditto.
12733 (cancel_breakpoints_callback): Ditto.
12734 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12735 not &all_lwps.
12736 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12737 (unsuspend_one_lwp): Update, "entry" parameter is a
12738 struct thread_info * now.
12739 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12740 not &all_lwps.
12741 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12742 Fetch lwpid from thread, not lwp.
12743 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12744 Pass &all_threads to find_inferior, not &all_lwps.
12745 (send_sigstop): Fetch lwpid from thread, not lwp.
12746 (send_sigstop_callback): Update, "entry" parameter is a
12747 struct thread_info * now.
12748 (suspend_and_send_sigstop_callback): Ditto.
12749 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12750 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12751 struct thread_info * now.
12752 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12753 from thread, lwp.
12754 (lwp_running): Update, "entry" parameter is a
12755 struct thread_info * now.
12756 (stop_all_lwps): Fetch ptid from thread.
12757 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12758 (linux_resume_one_lwp): Fetch lwpid from thread.
12759 (linux_set_resume_request): Update, "entry" parameter is a
12760 struct thread_info * now. Fetch pid, lwpid from thread.
12761 (resume_status_pending_p): Update, "entry" parameter is a
12762 struct thread_info * now.
12763 (need_step_over_p): Ditto. Fetch lwpid from thread.
12764 (start_step_over): Fetch lwpid from thread.
12765 (linux_resume_one_thread): Update, "entry" parameter is a
12766 struct thread_info * now. Fetch lwpid from thread.
12767 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12768 (proceed_one_lwp): Update, "entry" parameter is a
12769 struct thread_info * now. Fetch lwpid from thread.
12770 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12771 struct thread_info * now.
12772 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12773 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12774 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12775 directly.
12776 (regsets_store_inferior_registers): Ditto.
12777 (fetch_register, store_register): Ditto.
12778 (linux_read_memory, linux_write_memory): Ditto.
12779 (linux_request_interrupt): Ditto.
12780 (linux_read_auxv): Ditto.
12781 (linux_xfer_siginfo): Ditto.
12782 (linux_qxfer_spu): Ditto.
12783 (linux_qxfer_libraries_svr4): Ditto.
12784 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12785 moved to inferiors.h.
12786 (get_lwp): Delete.
12787 (get_thread_lwp): Update.
12788 (struct lwp_info): Delete member "entry". Simplify comment for
12789 member "thread".
12790 (all_lwps): Delete.
12791 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12792 current_inferior directly.
12793 (update_watch_registers_callback): Update, "entry" parameter is a
12794 struct thread_info * now. Fetch pid from thread.
12795 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12796 (mips_insert_point): Fetch lwpid from current_inferior.
12797 Pass &all_threads to find_inferior, not &all_lwps.
12798 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12799 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12800 directly.
12801 (mips_stopped_data_address): Ditto.
12802 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12803 directly.
12804 * linux-tile-low.c (tile_arch_setup): Ditto.
12805 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12806 (update_debug_registers_callback): Update, "entry" parameter is a
12807 struct thread_info * now. Fetch pid from thread.
12808 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12809 Pass &all_threads to find_inferior, not &all_lwps.
12810 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12811 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12812 Pass &all_threads to find_inferior, not &all_lwps.
12813 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12814 (i386_dr_low_get_status): Ditto.
12815 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12816 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12817 (x86_linux_read_description): Ditto.
12818 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12819
12820 2014-02-20 Doug Evans <dje@google.com>
12821
12822 * inferiors.c (get_first_inferior): Fix buglet.
12823
12824 2014-02-19 Doug Evans <dje@google.com>
12825
12826 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12827 * inferiors.c (add_thread): Change result type to struct thread_info *.
12828 All callers updated.
12829 (add_lwp): Call add_thread here instead of in callers.
12830 All callers updated.
12831 * linux-low.h (get_lwp_thread): Rewrite.
12832 (struct lwp_info): New member "thread".
12833
12834 2014-02-19 Doug Evans <dje@google.com>
12835
12836 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12837 All callers updated.
12838
12839 2014-02-19 Doug Evans <dje@google.com>
12840
12841 * inferiors.c (add_thread): Fix whitespace.
12842
12843 2014-02-19 Doug Evans <dje@google.com>
12844
12845 * dll.c (clear_dlls): Replace accessing list implemention details
12846 with API function.
12847 * gdbthread.h (get_first_thread): Declare.
12848 * inferiors.c (for_each_inferior_with_data): New function.
12849 (get_first_thread): New function.
12850 (find_thread_ptid): Simplify.
12851 (get_first_inferior): New function.
12852 (clear_list): Delete.
12853 (one_inferior_p): New function.
12854 (clear_inferior_list): New function.
12855 (clear_inferiors): Update.
12856 * inferiors.h (for_each_inferior_with_data): Declare.
12857 (clear_inferior_list): Declare.
12858 (one_inferior_p): Declare.
12859 (get_first_inferior): Declare.
12860 * linux-low.c (linux_wait_for_event): Replace accessing list
12861 implemention details with API function.
12862 * server.c (target_running): Ditto.
12863 (accumulate_file_name_length): New function.
12864 (emit_dll_description): New function.
12865 (handle_qxfer_libraries): Replace accessing list implemention
12866 details with API function.
12867 (handle_qxfer_threads_worker): New function.
12868 (handle_qxfer_threads_proper): Replace accessing list implemention
12869 details with API function.
12870 (handle_query): Ditto.
12871 (visit_actioned_threads_callback_ftype): New typedef.
12872 (visit_actioned_threads_data): New struct.
12873 (visit_actioned_threads): Rewrite to be find_inferior callback.
12874 (resume): Call find_inferior.
12875 (handle_status): Replace accessing list implemention
12876 details with API function.
12877 (process_serial_event): Replace accessing list implemention details
12878 with API function.
12879 * target.c (set_desired_inferior): Replace accessing list implemention
12880 details with API function.
12881 * tracepoint.c (same_process_p): New function.
12882 (gdb_agent_about_to_close): Replace accessing list implemention
12883 details with API function.
12884 * win32-low.c (child_delete_thread): Replace accessing list
12885 implemention details with API function.
12886 (match_dll_by_basename): New function.
12887 (dll_is_loaded_by_basename): New function.
12888 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12889 details call to dll_is_loaded_by_basename.
12890
12891 2014-02-19 Doug Evans <dje@google.com>
12892
12893 * dll.h (struct dll_info): Add comment.
12894 * gdbthread.h (struct thread_info): Add comment.
12895 (current_ptid): Simplify.
12896 * inferiors.c (add_process): Update.
12897 (remove_process): Update.
12898 * inferiors.h (struct process_info): Rename member "head" to "entry".
12899 * linux-low.c (delete_lwp): Update.
12900 (add_lwp): Update.
12901 (last_thread_of_process_p): Update.
12902 (kill_one_lwp_callback, linux_kill): Update.
12903 (status_pending_p_callback): Update.
12904 (wait_for_sigstop): Update. Simplify read of ptid.
12905 (start_step_over): Update.
12906 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12907 (get_lwp_thread): Update.
12908 (struct lwp_info): Rename member "head" to "entry".
12909 * regcache.h (inferior_list_entry): Delete.
12910 * server.c (kill_inferior_callback): Update.
12911 (detach_or_kill_inferior_callback): Update.
12912 (print_started_pid): Update.
12913 (print_attached_pid): Update.
12914 (process_serial_event): Simplify read of ptid.
12915 * thread-db.c (thread_db_create_event): Update.
12916 (thread_db_get_tls_address): Update.
12917 * win32-low.c (current_inferior_ptid): Simplify.
12918
12919 2014-02-19 Tom Tromey <tromey@redhat.com>
12920
12921 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12922 argument.
12923 (target_supports_btrace): Update.
12924
12925 2014-02-14 Yao Qi <yao@codesourcery.com>
12926
12927 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12928 (rsp-low-ipa.o): New target.
12929
12930 2014-02-12 Tom Tromey <tromey@redhat.com>
12931
12932 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12933 convert_ascii_to_int.
12934 * regcache.c (registers_to_string): Likewise.
12935 * remote-utils.c (decode_M_packet): Likewise.
12936 * server.c (process_serial_event): Likewise.
12937
12938 2014-02-12 Tom Tromey <tromey@redhat.com>
12939
12940 * server.c (handle_query, handle_v_run): Use hex2bin, not
12941 unhexify.
12942 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12943
12944 2014-02-12 Tom Tromey <tromey@redhat.com>
12945
12946 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12947 convert_int_to_ascii.
12948 * regcache.c (registers_to_string, collect_register_as_string):
12949 Likewise.
12950 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12951 Likewise.
12952 * server.c (process_serial_event): Likewise.
12953 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12954 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12955
12956 2014-02-12 Tom Tromey <tromey@redhat.com>
12957
12958 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12959 bin2hex, not hexify.
12960 * tracepoint.c (cmd_qtstatus): Likewise.
12961
12962 2014-02-12 Tom Tromey <tromey@redhat.com>
12963
12964 * remote-utils.c (monitor_output): Pass explicit length to
12965 hexify.
12966
12967 2014-02-12 Tom Tromey <tromey@redhat.com>
12968
12969 * tracepoint.c: Include rsp-low.h.
12970 * server.c: Include rsp-low.h.
12971 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12972 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12973 declare.
12974 * remote-utils.c: Include rsp-low.h.
12975 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12976 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12977 (convert_int_to_ascii, convert_ascii_to_int): Move to
12978 common/rsp-low.c.
12979 * regcache.c: Include rsp-low.h.
12980 * ax.c: Include rsp-low.h.
12981 * Makefile.in (SFILES): Add common/rsp-low.c.
12982 (OBS): Add rsp-low.o.
12983 (rsp-low.o): New target.
12984
12985 2014-02-12 Tom Tromey <tromey@redhat.com>
12986
12987 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12988 Include print-utils.h.
12989 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12990 (plongest, thirty_two, phex_nz): Remove.
12991 * Makefile.in (SFILES): Add common/print-utils.c.
12992 (OBS): Add print-utils.o.
12993 (print-utils-ipa.o): New target.
12994 (print-utils.o): New target.
12995 (IPA_OBJS): Add print-utils-ipa.o.
12996
12997 2014-02-06 Tom Tromey <tromey@redhat.com>
12998
12999 * Makefile.in (SFILES): Fix indentation.
13000
13001 2014-02-05 Doug Evans <dje@google.com>
13002
13003 * linux-low.c (linux_wait_for_event): Improve comment.
13004 (linux_wait_1): Keep current_inferior in sync with event_child.
13005
13006 2014-01-22 Doug Evans <dje@google.com>
13007
13008 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13009
13010 2014-01-22 Doug Evans <dje@google.com>
13011
13012 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13013 * configure: Regenerate.
13014 * config.in: Regenerate.
13015 * Makefile.in (SFILES): Add debug.c.
13016 (OBS): Add debug.o.
13017 * debug.c: New file.
13018 * debug.h: New file.
13019 * linux-aarch64-low.c (*): Update all debugging printfs to use
13020 debug_printf instead of fprintf.
13021 * linux-arm-low.c (*): Ditto.
13022 * linux-cris-low.c (*): Ditto.
13023 * linux-crisv32-low.c (*): Ditto.
13024 * linux-m32r-low.c (*): Ditto.
13025 * linux-sparc-low.c (*): Ditto.
13026 * linux-x86.c (*): Ditto.
13027 * linux-low.c (*): Ditto.
13028 (linux_wait_1): Add calls to debug_enter, debug_exit.
13029 (linux_wait): Remove redundant debugging printf.
13030 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13031 (linux_resume, unstop_all_lwps): Ditto.
13032 * mem-break.c (*): Update all debugging printfs to use
13033 debug_printf instead of fprintf.
13034 * remote-utils.c (*): Ditto.
13035 * thread-db.c (*): Ditto.
13036 * server.c #include <ctype.h>, "gdb_vecs.h".
13037 (debug_threads): Moved to debug.c.
13038 (*): Update all debugging printfs to use debug_printf instead of
13039 fprintf.
13040 (start_inferior): Replace call to fflush with call to debug_flush.
13041 (monitor_show_help): Mention set debug-format.
13042 (parse_debug_format_options): New function.
13043 (handle_monitor_command): Handle "monitor set debug-format".
13044 (gdbserver_usage): Mention --debug-format.
13045 (main): Parse --debug-format.
13046 * server.h (debug_threads): Declaration moved to debug.h.
13047 #include "debug.h".
13048 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13049 trace_debug_1 that uses debug_printf.
13050 (tracepoint_look_up_symbols): Update all debugging printfs to use
13051 debug_printf instead of fprintf.
13052
13053 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13054
13055 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13056 sys/ptrace.h.
13057
13058 2014-01-17 Pedro Alves <palves@redhat.com>
13059
13060 PR build/16445
13061 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13062 defined after including gdb_proc_service.h.
13063
13064 2014-01-16 Doug Evans <dje@google.com>
13065
13066 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13067 (match_dll): Use it.
13068
13069 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13070
13071 * target.h (target_ops) <read_btrace>: Change parameters and
13072 return type to allow error reporting.
13073 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13074 trace reading errors on.
13075 * linux-low.c (linux_low_read_btrace): Pass trace reading
13076 errors on.
13077 (linux_low_disable_btrace): New.
13078
13079 2014-01-15 Doug Evans <dje@google.com>
13080
13081 * inferiors.c (thread_id_to_gdb_id): Delete.
13082 * inferiors.h (thread_id_to_gdb_id): Delete.
13083
13084 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13085
13086 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13087 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13088 versions.
13089
13090 2014-01-08 Pedro Alves <palves@redhat.com>
13091
13092 * server.c (handle_status): Don't discard previous queued stop
13093 replies or thread's pending status here.
13094 (main) <disconnection>: Do it here instead.
13095
13096 2014-01-08 Pedro Alves <palves@redhat.com>
13097
13098 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13099 * server.c (visit_actioned_threads, handle_pending_status): New
13100 function.
13101 (handle_v_cont): Factor out parts to ...
13102 (resume): ... this new function. If in all-stop, and a thread
13103 being resumed has a pending status, report it without actually
13104 resuming.
13105 (myresume): Adjust to use the new 'resume' function.
13106 (clear_pending_status_callback, set_pending_status_callback)
13107 (find_status_pending_thread_callback): New functions.
13108 (handle_status): Handle the case of multiple threads having
13109 interesting statuses to report. Report threads' real last signal
13110 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13111 with an interesting thread to report the status for, instead of
13112 always reporting the status of the first thread.
13113
13114 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13115
13116 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13117 * gdbreplay.c (gdbreplay_version): Likewise.
13118
13119 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13120
13121 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13122 iov.iov_len with the real length in use.
13123
13124 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13125
13126 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13127 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13128 for all targets that use win32-low.c.
13129 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13130 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13131
13132 2013-12-13 Pedro Alves <palves@redhat.com>
13133
13134 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13135 if equal to TARGET_WAITKIND_LOADED.
13136 * win32-low.c (cached_status): New static global.
13137 (win32_wait): Add declaration.
13138 (do_initial_child_stuff): Flush all initial pending debug events
13139 up to the initial breakpoint.
13140 (win32_wait): If CACHED_STATUS was set, return that instead
13141 of doing a real wait. Remove the code resuming the execution
13142 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13143 during the initial phase. Also remove the code changing
13144 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13145 TARGET_WAITKIND_STOPPED.
13146
13147 2013-12-11 Yao Qi <yao@codesourcery.com>
13148
13149 * notif.c (handle_notif_ack): Return 0 if no notification
13150 matches.
13151
13152 2013-11-20 Doug Evans <dje@google.com>
13153
13154 * linux-low.c (linux_set_resume_request): Fix comment.
13155
13156 2013-11-20 Doug Evans <dje@google.com>
13157
13158 * linux-low.c (resume_status_pending_p): Tweak comment.
13159
13160 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13161
13162 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13163 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13164 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13165 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13166 (srv_amd64_regobj): Add amd64-mpx.o.
13167 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13168 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13169 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13170 * i387-fp.c (num_pl_bnd_register) Added constant.
13171 (num_pl_bnd_cfg_registers) Added constant.
13172 (struct i387_xsave) Added reserved area and MPX fields.
13173 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13174 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13175 function.
13176 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13177 (init_registers_amd64_mpx_linux): Declare new function.
13178 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13179 (x86_64_regmap): Add MPX registers.
13180 (x86_linux_read_description): Add MPX case.
13181 (initialize_low_arch): Initialize MPX targets.
13182
13183 2013-11-18 Tom Tromey <tromey@redhat.com>
13184
13185 * configure: Rebuild.
13186 * configure.ac: Don't check for stdlib.h.
13187 * gdbreplay.c: Unconditionally include stdlib.h.
13188
13189 2013-11-18 Tom Tromey <tromey@redhat.com>
13190
13191 * config.in: Rebuild.
13192 * configure: Rebuild.
13193 * configure.ac: Don't use AC_HEADER_DIRENT.
13194
13195 2013-11-18 Tom Tromey <tromey@redhat.com>
13196
13197 * server.h: Don't check HAVE_STRING_H.
13198 * gdbreplay.c: Don't check HAVE_STRING_H.
13199 * configure: Rebuild.
13200
13201 2013-11-18 Tom Tromey <tromey@redhat.com>
13202
13203 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13204 LIBGNU.
13205
13206 2013-11-08 Tom Tromey <tromey@redhat.com>
13207
13208 * configure, config.in: Rebuild.
13209 * configure.ac: Remove unused configury.
13210
13211 2013-11-08 Tom Tromey <tromey@redhat.com>
13212
13213 * acinclude.m4: Include common.m4, codeset.m4.
13214 * configure, config.in: Rebuild.
13215 * configure.ac: Use GDB_AC_COMMON.
13216
13217 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13218
13219 * linux-s390-low.c (HWCAP_S390_TE): New define.
13220 (s390_arch_setup): Consider the TE field in the HWCAP for
13221 determining 'have_regset_tdb'.
13222
13223 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13224
13225 PR gdb/16014
13226 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13227 call to sizeof.
13228
13229 2013-10-02 Pedro Alves <palves@redhat.com>
13230
13231 * server.c (process_serial_event): Don't output "GDBserver
13232 exiting" if GDB is connected through stdio.
13233 * target.c (mywait): Likewise, be silent if GDB is connected
13234 through stdio.
13235
13236 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13237
13238 * lynx-low.c (lynx_add_threads_after_attach): New function.
13239 (lynx_attach): Remove call to add_thread. Add call to
13240 lynx_add_threads_after_attach instead.
13241
13242 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13243
13244 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13245 * config.in, configure: Regenerated.
13246
13247 2013-09-18 Yao Qi <yao@codesourcery.com>
13248
13249 PR server/15959
13250 * server.c (start_inferior): Clear 'resume_info'.
13251
13252 2013-09-16 Jiong Wang <jiwang@tilera.com>
13253
13254 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13255 for each register.
13256
13257 2013-09-16 Jiong Wang <jiwang@tilera.com>
13258
13259 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13260 linux-tile-low.o to srv_tgtobj.
13261
13262 2013-09-16 Will Newton <will.newton@linaro.org>
13263
13264 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13265 out regs.
13266
13267 2013-09-06 Pedro Alves <palves@redhat.com>
13268
13269 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13270 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13271 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13272 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13273 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13274 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13275
13276 2013-09-06 Pedro Alves <palves@redhat.com>
13277
13278 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13279 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13280
13281 2013-09-06 Pedro Alves <palves@redhat.com>
13282
13283 * linux-amd64-ipa.c: Include tracepoint.h.
13284 * linux-i386-ipa.c: Include tracepoint.h.
13285
13286 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13287
13288 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13289 (ps_get_thread_area): New function.
13290
13291 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13292
13293 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13294 (initialize_low_arch): Call init_registers_crisv32 rather than
13295 init_register_crisv32.
13296
13297 2013-09-05 Pedro Alves <palves@redhat.com>
13298
13299 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13300 to ...
13301 * hostio.h: ... this new file.
13302 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13303 win32-low.c: Include hostio.h.
13304
13305 2013-09-05 Pedro Alves <palves@redhat.com>
13306
13307 * server.h (gdb_client_data, handler_func, callback_handler_func)
13308 (delete_file_handler, add_file_handler, append_callback_event)
13309 (delete_callback_event, start_event_loop, initialize_event_loop):
13310 Move to event-loop.h and include it.
13311 * event-loop.h: New file.
13312
13313 2013-09-05 Pedro Alves <palves@redhat.com>
13314
13315 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13316 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13317 (loaded_dll, unloaded_dll): Move to ...
13318 * dll.h: ... this new file.
13319 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13320
13321 2013-09-05 Pedro Alves <palves@redhat.com>
13322
13323 * server.h (current_process, get_thread_process, all_processes)
13324 (add_inferior_to_list, for_each_inferior, current_inferior)
13325 (remove_inferior, add_process, remove_process, find_process_pid)
13326 (have_started_inferiors_p, have_attached_inferiors_p)
13327 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13328 (clear_inferiors, find_inferior, find_inferior_id)
13329 (inferior_target_data, set_inferior_target_data)
13330 (inferior_regcache_data, set_inferior_regcache_data): Move to
13331 inferiors.h, and include it.
13332 * inferiors.h: New file.
13333
13334 2013-09-05 Pedro Alves <palves@redhat.com>
13335
13336 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13337 Move ...
13338 * ax.h: ... here.
13339
13340 2013-09-05 Pedro Alves <palves@redhat.com>
13341
13342 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13343 tracepoint.h.
13344 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13345 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13346 (handle_tracepoint_general_set, handle_tracepoint_query)
13347 (tracepoint_finished_step, tracepoint_was_hit)
13348 (release_while_stepping_state_list, current_traceframe)
13349 (in_readonly_region, traceframe_read_mem)
13350 (fetch_traceframe_registers, traceframe_read_sdata)
13351 (traceframe_read_info, struct fast_tpoint_collect_status)
13352 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13353 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13354 (supply_fast_tracepoint_registers)
13355 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13356 (ipa_tdesc, claim_trampoline_space)
13357 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13358 (agent_mem_read, agent_get_trace_state_variable_value)
13359 (agent_set_trace_state_variable_value, agent_tsv_read)
13360 (agent_mem_read_string, get_raw_reg_func_addr)
13361 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13362 * tracepoint.h: ... this new file.
13363
13364 2013-09-05 Pedro Alves <palves@redhat.com>
13365
13366 * server.h (perror_with_name, error, fatal, warning, paddress)
13367 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13368 include it.
13369 * utils.h: New file.
13370
13371 2013-09-05 Pedro Alves <palves@redhat.com>
13372
13373 * server.h (remote_debug, noack_mode, transport_is_reliable)
13374 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13375 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13376 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13377 (write_enn, initialize_async_io, enable_async_io)
13378 (disable_async_io, check_remote_input_interrupt_request)
13379 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13380 (dead_thread_notify, prepare_resume_reply)
13381 (decode_address_to_semicolon, decode_address, decode_m_packet)
13382 (decode_M_packet, decode_X_packet, decode_xfer_write)
13383 (decode_search_memory_packet, unhexify, hexify)
13384 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13385 (look_up_one_symbol, relocate_instruction)
13386 (monitor_output): Move to remote-utils.h, and include it.
13387 * remote-utils.h: New file.
13388
13389 2013-09-05 Pedro Alves <palves@redhat.com>
13390
13391 * server.h (_): Delete.
13392
13393 2013-09-02 Pedro Alves <palves@redhat.com>
13394
13395 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13396 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13397 allocated.
13398 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13399
13400 2013-09-02 Pierre Muller <muller@sourceware.org>
13401
13402 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13403 or WriteProcessMemory complete successfully and handle
13404 ERROR_PARTIAL_COPY error.
13405
13406 2013-09-02 Pedro Alves <palves@redhat.com>
13407
13408 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13409 error instead of EIO.
13410
13411 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13412
13413 PR server/15604
13414 * linux-low.c: Include filestuff.h.
13415 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13416 * lynx-low.c: Include filestuff.h.
13417 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13418 * server.c: Include filestuff.h.
13419 (main): Call notice_open_fds.
13420 * spu-low.c: Include filestuff.h.
13421 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13422
13423 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13424
13425 * Makefile.in: Explain why ../target and ../nat are not
13426 listed as include file search paths.
13427 (linux-waitpid.o): New object file rule.
13428 * configure.srv (srv_native_linux_obj): New variable.
13429 Replace all occurrences of linux native object files with
13430 $srv_native_linux_obj.
13431 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13432 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13433 (linux_enable_event_reporting): Remove declaration.
13434 (my_waitpid): Moved to common/linux-waitpid.c.
13435 (linux_wait_for_event): Pass ptid when calling
13436 linux_enable_event_reporting.
13437 (linux_supports_tracefork_flag): Remove.
13438 (linux_enable_event_reporting): Likewise.
13439 (linux_tracefork_grandchild): Remove.
13440 (STACK_SIZE): Moved to common/linux-ptrace.c.
13441 (linux_tracefork_child): Remove.
13442 (linux_test_for_tracefork): Remove.
13443 (linux_look_up_symbols): Call linux_supports_traceclone.
13444 (initialize_low): Remove call to linux_test_for_tracefork.
13445 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13446 common/linux-ptrace.h.
13447 (PTRACE_TYPE_ARG4): Likewise.
13448 Include linux-ptrace.h.
13449
13450 2013-08-21 Pedro Alves <palves@redhat.com>
13451
13452 * config.in: Renegerate.
13453
13454 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13455
13456 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13457 (SFILES): Remove $(srcdir)/common/target-common.c and
13458 add $(srcdir)/target/waitstatus.c.
13459 (OBS): Remove target-common.o and add waitstatus.o.
13460 (server_h): Remove $(srcdir)/../common/target-common.h and
13461 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13462 and $(srcdir)/../target/waitstatus.h.
13463 (target-common.o): Remove.
13464 (waitstatus.o): New target object file.
13465 * target.h: Do not include target-common.h and
13466 include target/resume.h, target/wait.h and
13467 target/waitstatus.h.
13468
13469 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13470
13471 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13472 to PTRACE_TYPE_ARG3.
13473 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13474 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13475 PTRACE_TYPE_ARG4.
13476 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13477 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13478
13479 2013-07-27 Jie Zhang <jie@codesourcery.com>
13480 Daniel Jacobowitz <dan@codesourcery.com>
13481 Yao Qi <yao@codesourcery.com>
13482
13483 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13484 (mips-linux-watch.o): New rule.
13485 (mips_linux_watch_h): New variable.
13486 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13487 srv_tgtobj.
13488 * linux-mips-low.c: Include mips-linux-watch.h.
13489 (struct arch_process_info, struct arch_lwp_info): New.
13490 (update_watch_registers_callback): New function.
13491 (mips_linux_new_process, mips_linux_new_thread) New functions.
13492 (mips_linux_prepare_to_resume, mips_insert_point): New
13493 functions.
13494 (mips_remove_point, mips_stopped_by_watchpoint): New
13495 functions.
13496 (rsp_bp_type_to_target_hw_bp_type): New function.
13497 (mips_stopped_data_address): New function.
13498 (the_low_target): Add watchpoint support functions.
13499
13500 2013-07-27 Yao Qi <yao@codesourcery.com>
13501
13502 * i386-low.c: Include break-common.h.
13503 (enum target_hw_bp_type): Remove.
13504
13505 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13506
13507 * Makefile.in (SFILES): /common/target-common.c.
13508 (OBS): Add target-common.o.
13509 (server_h): Add $(srcdir)/../common/target-common.h.
13510 (target-common.o): New target.
13511 * server.c (queue_stop_reply_callback): Free
13512 status string after use.
13513 * target.c (target_waitstatus_to_string): Remove.
13514 * target.h: Include target-common.h.
13515 (resume_kind): Likewise.
13516 (target_waitkind): Likewise.
13517 (target_waitstatus): Likewise.
13518 (TARGET_WNOHANG): Likewise.
13519
13520 2013-07-04 Yao Qi <yao@codesourcery.com>
13521
13522 * Makefile.in (host_alias): Use @host_noncanonical@.
13523 (target_alias): Use @target_noncanonical@.
13524 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13525 ACX_NONCANONICAL_HOST.
13526 * configure: Regenerated.
13527
13528 Revert:
13529 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13530
13531 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13532 * configure: Rebuild.
13533 * Makefile.in (version_host, version_target): Get from configure.
13534 (version.c): Use $(version_host) and $(version_target).
13535
13536 2013-07-03 Pedro Alves <palves@redhat.com>
13537
13538 * Makefile.in (config.status): Depend on development.sh.
13539 * acinclude.m4: Include libmcheck.m4.
13540 * configure: Regenerate.
13541
13542 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13543
13544 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13545 attribute inside the parentheses.
13546 (winapi_DebugSetProcessKillOnExit): Ditto.
13547 (winapi_DebugBreakProcess): Ditto.
13548 (winapi_GenerateConsoleCtrlEvent): Ditto.
13549
13550 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13551
13552 * notif.h (notif_event): Add a dummy member to avoid compiler
13553 errors.
13554
13555 2013-07-01 Pedro Alves <palves@redhat.com>
13556
13557 * hostio.c (HOSTIO_PATH_MAX): Define.
13558 (require_filename, handle_open, handle_unlink, handle_readlink):
13559 Use it.
13560
13561 2013-07-01 Pedro Alves <palves@redhat.com>
13562
13563 * server.h: Include "pathmax.h".
13564 * linux-low.c: Don't include sys/param.h.
13565 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13566 MAXPATHLEN.
13567 * win32-low.c: Don't include sys/param.h.
13568 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13569
13570 2013-07-01 Pedro Alves <palves@redhat.com>
13571
13572 * event-loop.c: Don't check HAVE_UNISTD_H before including
13573 <unistd.h>.
13574 * gdbreplay.c: Likewise.
13575 * remote-utils.c: Likewise.
13576 * server.c: Likewise.
13577 * configure.ac: Don't check for unistd.h.
13578 * configure: Regenerate.
13579
13580 2013-06-28 Tom Tromey <tromey@redhat.com>
13581
13582 * Makefile.in (version.c): Use version.in, not
13583 common/version.in.
13584
13585 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13586
13587 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13588 * configure: Rebuild.
13589 * Makefile.in (version_host, version_target): Get from configure.
13590 (version.c): Use $(version_host) and $(version_target).
13591
13592 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13593
13594 Fix trace-status to output user name without trailing colon.
13595 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13596
13597 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13598
13599 Fix trace-status to output proper start-time and stop-time.
13600 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13601 output start time and stop time in hex as gdb expects.
13602
13603 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13604
13605 * tracepoint.c (build_traceframe_info_xml): Output trace state
13606 variables present in the trace buffer.
13607
13608 2013-06-24 Tom Tromey <tromey@redhat.com>
13609
13610 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13611 create-version.sh.
13612 (version.o): Remove.
13613 * gdbreplay.c: Include version.h.
13614 (version, host_name): Don't declare.
13615 * server.h: Include version.h.
13616 (version, host_name): Don't declare.
13617
13618 2013-06-12 Pedro Alves <palves@redhat.com>
13619
13620 * linux-x86-low.c (linux_is_elf64): Delete global.
13621 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13622 with local linux_pid_exe_is_elf_64_file use.
13623
13624 2013-06-11 Pedro Alves <palves@redhat.com>
13625
13626 * linux-low.c (regset_disabled, disable_regset): New functions.
13627 (regsets_fetch_inferior_registers)
13628 (regsets_store_inferior_registers): Use them.
13629 (initialize_regsets_info); Don't allocate the disabled_regsets
13630 array here.
13631 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13632 comment.
13633
13634 2013-06-11 Pedro Alves <palves@redhat.com>
13635
13636 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13637 xmalloc.
13638
13639 2013-06-11 Pedro Alves <palves@redhat.com>
13640
13641 * linux-x86-low.c (initialize_low_arch): Call
13642 init_registers_x32_avx_linux.
13643
13644 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13645
13646 Fix compatibility with Android Bionic.
13647 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13648 it is not empty.
13649
13650 2013-06-07 Pedro Alves <palves@redhat.com>
13651
13652 PR server/14823
13653 * Makefile.in (OBS): Add tdesc.o.
13654 (IPA_OBJS): Add tdesc-ipa.o.
13655 (tdesc-ipa.o): New rule.
13656 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13657 interface.
13658 * linux-low.c (new_inferior): Delete.
13659 (disabled_regsets, num_regsets): Delete.
13660 (linux_add_process): Adjust to set the new per-process
13661 new_inferior flag.
13662 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13663 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13664 was a stop. When calling arch_setup, switch the current inferior
13665 to the thread that got an event.
13666 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13667 (regsets_fetch_inferior_registers)
13668 (regsets_store_inferior_registers): New regsets_info parameter.
13669 Adjust to use it.
13670 (linux_register_in_regsets): New regs_info parameter. Adjust to
13671 use it.
13672 (register_addr, fetch_register, store_register): New usrregs_info
13673 parameter. Adjust to use it.
13674 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13675 parameter regs_info. Adjust to use it.
13676 (linux_fetch_registers): Get the current inferior's regs_info, and
13677 adjust to use it.
13678 (linux_store_registers): Ditto.
13679 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13680 (initialize_low): Don't initialize the target_regsets here. Call
13681 initialize_low_arch.
13682 * linux-low.h (target_regsets): Delete declaration.
13683 (struct regsets_info): New.
13684 (struct usrregs_info): New.
13685 (struct regs_info): New.
13686 (struct process_info_private) <new_inferior>: New field.
13687 (struct linux_target_ops): Delete the num_regs, regmap, and
13688 regset_bitmap fields. New field regs_info.
13689 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13690 * i387-fp.c (num_xmm_registers): Delete.
13691 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13692 calls to new interface.
13693 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13694 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13695 Infer the number of xmm registers from the regcache's target
13696 description.
13697 * i387-fp.h (num_xmm_registers): Delete.
13698 * inferiors.c (add_thread): Don't install the thread's regcache
13699 here.
13700 * proc-service.c (gregset_info): Fetch the current inferior's
13701 regs_info. Adjust to use it.
13702 * regcache.c: Include tdesc.h.
13703 (register_bytes, reg_defs, num_registers)
13704 (gdbserver_expedite_regs): Delete.
13705 (get_thread_regcache): If the thread doesn't have a regcache yet,
13706 create one, instead of aborting gdbserver.
13707 (regcache_invalidate_one): Rename to ...
13708 (regcache_invalidate_thread): ... this.
13709 (regcache_invalidate_one): New.
13710 (regcache_invalidate): Only invalidate registers of the current
13711 process.
13712 (init_register_cache): Add target_desc parameter, and use it.
13713 (new_register_cache): Ditto. Assert the target description has a
13714 non zero registers_size.
13715 (regcache_cpy): Add assertions. Adjust.
13716 (realloc_register_cache, set_register_cache): Delete.
13717 (registers_to_string, registers_from_string): Adjust.
13718 (find_register_by_name, find_regno, find_register_by_number)
13719 (register_cache_size): Add target_desc parameter, and use it.
13720 (free_register_cache_thread, free_register_cache_thread_one)
13721 (regcache_release, register_cache_size): New.
13722 (register_size): Add target_desc parameter, and use it.
13723 (register_data, supply_register, supply_register_zeroed)
13724 (supply_regblock, supply_register_by_name, collect_register)
13725 (collect_register_as_string, collect_register_by_name): Adjust.
13726 * regcache.h (struct target_desc): Forward declare.
13727 (struct regcache) <tdesc>: New field.
13728 (init_register_cache, new_register_cache): Add target_desc
13729 parameter.
13730 (regcache_invalidate_thread): Declare.
13731 (regcache_invalidate_one): Delete declaration.
13732 (regcache_release): Declare.
13733 (find_register_by_number, register_cache_size, register_size)
13734 (find_regno): Add target_desc parameter.
13735 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13736 declarations.
13737 * remote-utils.c: Include tdesc.h.
13738 (outreg, prepare_resume_reply): Adjust.
13739 * server.c: Include tdesc.h.
13740 (gdbserver_xmltarget): Delete declaration.
13741 (get_features_xml, process_serial_event): Adjust.
13742 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13743 declare.
13744 (struct process_info) <tdesc>: New field.
13745 (ipa_tdesc): Declare.
13746 * tdesc.c: New file.
13747 * tdesc.h: New file.
13748 * tracepoint.c: Include tdesc.h.
13749 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13750 (get_context_regcache): Adjust to pass ipa_tdesc down.
13751 (do_action_at_tracepoint): Adjust to get the register cache size
13752 from the context regcache's description.
13753 (traceframe_walk_blocks): Adjust to get the register cache size
13754 from the current trace frame's description.
13755 (traceframe_get_pc): Adjust to get current trace frame's
13756 description and pass it down.
13757 (gdb_collect): Adjust to get the register cache size from the
13758 IPA's description.
13759 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13760 (gdbserver_xmltarget): Delete.
13761 (initialize_low_tracepoint): Set the ipa's target description.
13762 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13763 (initialize_low_tracepoint): Set the ipa's target description.
13764 * linux-x86-low.c: Include tdesc.h.
13765 [__x86_64__] (is_64bit_tdesc): New.
13766 (ps_get_thread_area, x86_get_thread_area): Use it.
13767 (i386_cannot_store_register): Rename to ...
13768 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13769 (i386_cannot_fetch_register): Rename to ...
13770 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13771 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13772 to new interface.
13773 (target_regsets): Rename to ...
13774 (x86_regsets): ... this.
13775 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13776 interface.
13777 (x86_siginfo_fixup): Use is_64bit_tdesc.
13778 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13779 (tdesc_x32_avx_linux, tdesc_x32_linux)
13780 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13781 Declare.
13782 (x86_linux_update_xmltarget): Delete.
13783 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13784 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13785 (AMD64_LINUX_USER64_CS): New.
13786 (x86_linux_read_description): New, based on
13787 x86_linux_update_xmltarget.
13788 (same_process_callback): New.
13789 (x86_arch_setup_process_callback): New.
13790 (x86_linux_update_xmltarget): New.
13791 (x86_regsets_info): New.
13792 (amd64_linux_regs_info): New.
13793 (i386_linux_usrregs_info): New.
13794 (i386_linux_regs_info): New.
13795 (x86_linux_regs_info): New.
13796 (x86_arch_setup): Reimplement.
13797 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13798 (x86_emit_ops): Ditto.
13799 (the_low_target): Adjust. Install x86_linux_regs_info,
13800 x86_cannot_fetch_register, and x86_cannot_store_register.
13801 (initialize_low_arch): New.
13802 * linux-ia64-low.c (tdesc_ia64): Declare.
13803 (ia64_fetch_register): Adjust.
13804 (ia64_usrregs_info, regs_info): New globals.
13805 (ia64_regs_info): New function.
13806 (the_low_target): Adjust.
13807 (initialize_low_arch): New function.
13808 * linux-sparc-low.c (tdesc_sparc64): Declare.
13809 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13810 Adjust.
13811 (sparc_arch_setup): New function.
13812 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13813 (the_low_target): Adjust.
13814 (initialize_low_arch): New function.
13815 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13816 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13817 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13818 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13819 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13820 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13821 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13822 (tdesc_powerpc_isa205_vsx64l): Declare.
13823 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13824 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13825 (ppc_set_pc, ppc_get_hwcap): Adjust.
13826 (ppc_usrregs_info): Forward declare.
13827 (!__powerpc64__) ppc_regmap_adjusted: New global.
13828 (ppc_arch_setup): Adjust to the current process'es target
13829 description.
13830 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13831 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13832 (ppc_store_evrregset): Adjust.
13833 (target_regsets): Rename to ...
13834 (ppc_regsets): ... this, and make static.
13835 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13836 (ppc_regs_info): New function.
13837 (the_low_target): Adjust.
13838 (initialize_low_arch): New function.
13839 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13840 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13841 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13842 (tdesc_s390x_linux64v2): Declare.
13843 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13844 (s390_fill_gregset, s390_store_last_break): Adjust.
13845 (target_regsets): Rename to ...
13846 (s390_regsets): ... this, and make static.
13847 (s390_get_pc, s390_set_pc): Adjust.
13848 (s390_get_hwcap): New target_desc parameter, and use it.
13849 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13850 (s390_arch_setup): Adjust to set the current process'es target
13851 description. Don't adjust the regmap.
13852 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13853 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13854 (regs_info_3264): New globals.
13855 (s390_regs_info): New function.
13856 (the_low_target): Adjust.
13857 (initialize_low_arch): New function.
13858 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13859 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13860 [__mips64] (init_registers_mips_linux)
13861 (init_registers_mips_dsp_linux): Delete defines.
13862 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13863 (have_dsp): New global.
13864 (mips_read_description): New, based on mips_arch_setup.
13865 (mips_arch_setup): Reimplement.
13866 (get_usrregs_info): New function.
13867 (mips_cannot_fetch_register, mips_cannot_store_register)
13868 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13869 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13870 (target_regsets): Rename to ...
13871 (mips_regsets): ... this, and make static.
13872 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13873 (dsp_regs_info, regs_info): New globals.
13874 (mips_regs_info): New function.
13875 (the_low_target): Adjust.
13876 (initialize_low_arch): New function.
13877 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13878 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13879 Declare.
13880 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13881 (arm_read_description): New, with bits factored from
13882 arm_arch_setup.
13883 (arm_arch_setup): Reimplement.
13884 (target_regsets): Rename to ...
13885 (arm_regsets): ... this, and make static.
13886 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13887 (arm_regs_info): New function.
13888 (the_low_target): Adjust.
13889 (initialize_low_arch): New function.
13890 * linux-m68k-low.c (tdesc_m68k): Declare.
13891 (target_regsets): Rename to ...
13892 (m68k_regsets): ... this, and make static.
13893 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13894 (m68k_regs_info): New function.
13895 (m68k_arch_setup): New function.
13896 (the_low_target): Adjust.
13897 (initialize_low_arch): New function.
13898 * linux-sh-low.c (tdesc_sharch): Declare.
13899 (target_regsets): Rename to ...
13900 (sh_regsets): ... this, and make static.
13901 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13902 (sh_regs_info, sh_arch_setup): New functions.
13903 (the_low_target): Adjust.
13904 (initialize_low_arch): New function.
13905 * linux-bfin-low.c (tdesc_bfin): Declare.
13906 (bfin_arch_setup): New function.
13907 (bfin_usrregs_info, regs_info): New globals.
13908 (bfin_regs_info): New function.
13909 (the_low_target): Adjust.
13910 (initialize_low_arch): New function.
13911 * linux-cris-low.c (tdesc_cris): Declare.
13912 (cris_arch_setup): New function.
13913 (cris_usrregs_info, regs_info): New globals.
13914 (cris_regs_info): New function.
13915 (the_low_target): Adjust.
13916 (initialize_low_arch): New function.
13917 * linux-cris-low.c (tdesc_crisv32): Declare.
13918 (cris_arch_setup): New function.
13919 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13920 (cris_regs_info): New function.
13921 (the_low_target): Adjust.
13922 (initialize_low_arch): New function.
13923 * linux-m32r-low.c (tdesc_m32r): Declare.
13924 (m32r_arch_setup): New function.
13925 (m32r_usrregs_info, regs_info): New globals.
13926 (m32r_regs_info): Adjust.
13927 (initialize_low_arch): New function.
13928 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13929 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13930 (tic6x_usrregs_info): Forward declare.
13931 (tic6x_read_description): New function, based on ...
13932 (tic6x_arch_setup): ... this. Reimplement.
13933 (target_regsets): Rename to ...
13934 (tic6x_regsets): ... this, and make static.
13935 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13936 (tic6x_regs_info): New function.
13937 (the_low_target): Adjust.
13938 (initialize_low_arch): New function.
13939 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13940 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13941 (target_regsets): Rename to ...
13942 (xtensa_regsets): ... this, and make static.
13943 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13944 globals.
13945 (xtensa_arch_setup, xtensa_regs_info): New functions.
13946 (the_low_target): Adjust.
13947 (initialize_low_arch): New function.
13948 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13949 (nios2_arch_setup): Set the current process'es tdesc.
13950 (target_regsets): Rename to ...
13951 (nios2_regsets): ... this.
13952 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13953 (nios2_regs_info): New function.
13954 (the_low_target): Adjust.
13955 (initialize_low_arch): New function.
13956 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13957 (aarch64_arch_setup): Set the current process'es tdesc.
13958 (target_regsets): Rename to ...
13959 (aarch64_regsets): ... this.
13960 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13961 (aarch64_regs_info): New function.
13962 (the_low_target): Adjust.
13963 (initialize_low_arch): New function.
13964 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13965 globals.
13966 (target_regsets): Rename to ...
13967 (tile_regsets): ... this.
13968 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13969 (tile_regs_info): New function.
13970 (tile_arch_setup): Set the current process'es tdesc.
13971 (the_low_target): Adjust.
13972 (initialize_low_arch): New function.
13973 * spu-low.c (tdesc_spu): Declare.
13974 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13975 * win32-arm-low.c (tdesc_arm): Declare.
13976 (arm_arch_setup): New function.
13977 (the_low_target): Install arm_arch_setup instead of
13978 init_registers_arm.
13979 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13980 (init_windows_x86): Rename to ...
13981 (i386_arch_setup): ... this. Set `win32_tdesc'.
13982 (the_low_target): Adjust.
13983 * win32-low.c (win32_tdesc): New global.
13984 (child_add_thread): Don't create the thread cache here.
13985 (do_initial_child_stuff): Set the new process'es tdesc.
13986 * win32-low.h (struct target_desc): Forward declare.
13987 (win32_tdesc): Declare.
13988 * lynx-i386-low.c (tdesc_i386): Declare global.
13989 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13990 * lynx-low.c (lynx_tdesc): New global.
13991 (lynx_add_process): Set the new process'es tdesc.
13992 * lynx-low.h (struct target_desc): Forward declare.
13993 (lynx_tdesc): Declare global.
13994 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13995 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13996 * nto-low.c (nto_tdesc): New global.
13997 (do_attach): Set the new process'es tdesc.
13998 * nto-low.h (struct target_desc): Forward declare.
13999 (nto_tdesc): Declare.
14000 * nto-x86-low.c (tdesc_i386): Declare.
14001 (nto_x86_arch_setup): Set `nto_tdesc'.
14002
14003 2013-06-04 Gary Benson <gbenson@redhat.com>
14004
14005 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14006 to qSupported response when appropriate.
14007 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14008 with nonzero-length annex.
14009 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14010 arguments supplied in annex.
14011
14012 2013-05-31 Doug Evans <dje@google.com>
14013
14014 PR server/15594
14015 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14016 64 bits in 64-cross-32 environment.
14017
14018 2013-05-28 Pedro Alves <palves@redhat.com>
14019
14020 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14021 (aarch64-without-fpu.c): Delete rule.
14022 * configure.srv (aarch64*-*-linux*): Remove references to
14023 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14024 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14025 declaration.
14026
14027 2013-05-24 Pedro Alves <palves@redhat.com>
14028
14029 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14030 instead of strchr/decode_address. Error if the range isn't split
14031 with a ','. Don't assume there's be a ':' in the action.
14032
14033 2013-05-23 Yao Qi <yao@codesourcery.com>
14034 Pedro Alves <palves@redhat.com>
14035
14036 * linux-low.c (lwp_in_step_range): New function.
14037 (linux_wait_1): If the thread was range stepping and stopped
14038 outside the stepping range, report the stop to GDB. Otherwise,
14039 continue stepping. Add range stepping debug output.
14040 (linux_set_resume_request): Copy the step range from the resume
14041 request to the lwp.
14042 (linux_supports_range_stepping): New.
14043 (linux_target_ops) <supports_range_stepping>: Set to
14044 linux_supports_range_stepping.
14045 * linux-low.h (struct linux_target_ops)
14046 <supports_range_stepping>: New field.
14047 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14048 * linux-x86-low.c (x86_supports_range_stepping): New.
14049 (the_low_target) <supports_range_stepping>: Set to
14050 x86_supports_range_stepping.
14051 * server.c (handle_v_cont): Handle 'r' action.
14052 (handle_v_requests): Append ";r" if the target supports range
14053 stepping.
14054 * target.h (struct thread_resume) <step_range_start,
14055 step_range_end>: New fields.
14056 (struct target_ops) <supports_range_stepping>:
14057 New field.
14058 (target_supports_range_stepping): New macro.
14059
14060 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14061
14062 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14063 confusion in comment.
14064
14065 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14066
14067 * lynx-low.c (struct process_info_private): New type.
14068 (lynx_add_process): New function.
14069 (lynx_create_inferior, lynx_attach): Replace calls to
14070 add_process by calls to lynx_add_process.
14071 (lynx_resume): If PTID is null, then try using
14072 current_process()->private->last_wait_event_ptid.
14073 Add comments.
14074 (lynx_clear_inferiors): Delete. The contents of that function
14075 has been inlined in lynx_mourn;
14076 (lynx_wait_1): Save the ptid in the process's private data.
14077 (lynx_mourn): Free the process' private data. Replace call
14078 to lynx_clear_inferiors by call to clear_inferiors.
14079
14080 2013-05-17 Yao Qi <yao@codesourcery.com>
14081
14082 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14083 the right place.
14084
14085 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14086
14087 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14088 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14089 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14090 PT_TEXT_END_ADDR guards. Update comments.
14091 (linux_target_op) <read_offsets>: Conditionally define to
14092 linux_read_offsets if the target is UCLIBC and if it defines
14093 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14094
14095 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14096 Andrew Jenner <andrew@codesourcery.com>
14097
14098 * Makefile.in (SFILES): Add linux-nios2-low.c.
14099 (clean): Add action to delete nios2-linux.c.
14100 (nios2-linux.c): New rule.
14101 * configure.srv: Add nios2*-*-linux*.
14102 * linux-nios2-low.c: New.
14103
14104 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14105
14106 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14107
14108 2013-04-25 Hui Zhu <hui@codesourcery.com>
14109
14110 PR gdb/15186
14111 * ax.c (ax_printf): Add fflush.
14112
14113 2013-04-22 Tom Tromey <tromey@redhat.com>
14114
14115 * Makefile.in (SFILES): Add filestuff.c.
14116 (OBS): Add filestuff.o.
14117 (filestuff.o): New target.
14118 * config.in, configure: Rebuild.
14119 * configure.ac: Check for fdwalk, pipe2.
14120
14121 2013-04-17 Pedro Alves <palves@redhat.com>
14122
14123 * configure.ac (USE_THREAD_DB): Delete variable.
14124 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14125 Don't AC_SUBST USE_THREAD_DB.
14126 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14127 * config.in, configure: Regenerate.
14128
14129 2013-04-16 Pedro Alves <palves@redhat.com>
14130
14131 * linux-low.h (struct lwp_info) <thread_known>: Move under
14132 the USE_THREAD_DB #ifdef.
14133
14134 2013-04-16 Pedro Alves <palves@redhat.com>
14135
14136 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14137 (linux-low.o): Delete rule.
14138 * linux-low.h: Always include "gdb_thread_db.h" instead of
14139 conditionally including thread_db.h.
14140 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14141 HAVE_THREAD_DB_H.
14142
14143 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14144
14145 * Makefile.in (install-only): Fix make install regression.
14146
14147 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14148
14149 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14150 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14151 installation.
14152 * gdbserver.1: Remove.
14153
14154 2013-03-22 Pedro Alves <palves@redhat.com>
14155
14156 * linux-low.c (handle_extended_wait): Don't call
14157 linux_enable_event_reporting.
14158
14159 2013-03-15 Tony Theodore <tonyt@logyst.com>
14160
14161 PR build/9098:
14162 * Makefile.in (SHELL): Use @SHELL@.
14163
14164 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14165
14166 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14167 compiler warning.
14168
14169 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14170
14171 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14172 Remove extraneous NULL element.
14173
14174 2013-03-13 Yao Qi <yao@codesourcery.com>
14175
14176 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14177 'V' block in trace frame.
14178
14179 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14180
14181 * target.h (struct target_ops): Add btrace ops.
14182 (target_supports_btrace): New macro.
14183 (target_enable_btrace): New macro.
14184 (target_disable_btrace): New macro.
14185 (target_read_btrace): New macro.
14186 * gdbthread.h (struct thread_info): Add btrace field.
14187 * server.c: Include btrace-common.h.
14188 (handle_btrace_general_set): New function.
14189 (handle_btrace_enable): New function.
14190 (handle_btrace_disable): New function.
14191 (handle_general_set): Call handle_btrace_general_set.
14192 (handle_qxfer_btrace): New function.
14193 (struct qxfer qxfer_packets[]): Add btrace entry.
14194 * inferiors.c (remove_thread): Disable btrace.
14195 * linux-low: Include linux-btrace.h.
14196 (linux_low_enable_btrace): New function.
14197 (linux_low_read_btrace): New function.
14198 (linux_target_ops): Add btrace ops.
14199 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14200 Add srv_linux_btrace=yes.
14201 (x86_64-*-linux*): Add linux-btrace.o.
14202 Add srv_linux_btrace=yes.
14203 * configure.ac: Define HAVE_LINUX_BTRACE.
14204 * config.in: Regenerated.
14205 * configure: Regenerated.
14206
14207 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14208
14209 * server.c (handle_qxfer): Preserve error message if -3 is
14210 returned.
14211 (qxfer): Document the -3 return value.
14212
14213 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14214
14215 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14216 (linux_btrace_h): New variable.
14217 (linux-btrace.o): New rule.
14218
14219 2013-03-08 Stan Shebs <stan@codesourcery.com>
14220 Hafiz Abid Qadeer <abidh@codesourcery.com>
14221
14222 * tracepoint.c (trace_buffer_size): New global.
14223 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14224 (init_trace_buffer): Change to one-argument function. Allocate
14225 trace buffer memory.
14226 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14227 handle QTBuffer:size packet.
14228 (cmd_bigqtbuffer_size): New function.
14229 (initialize_tracepoint): Call init_trace_buffer with
14230 DEFAULT_TRACE_BUFFER_SIZE.
14231 * server.c (handle_query): Add QTBuffer:size in the
14232 supported packets.
14233
14234 2013-03-07 Yao Qi <yao@codesourcery.com>
14235
14236 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14237 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14238 of -1.
14239 (cmd_qtsp): Adjust condition. Do post increment.
14240 Set cur_action and cur_step_action back to 0.
14241
14242 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14243
14244 PR server/15236
14245 * linux-low.c (linux_write_memory): Return early success if LEN is
14246 zero.
14247
14248 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14249
14250 * configure.srv: Add x86_64-*-cygwin* as target.
14251
14252 2013-02-28 Tom Tromey <tromey@redhat.com>
14253
14254 * configure.ac: Invoke AC_SYS_LARGEFILE.
14255 * configure, config.in: Rebuild.
14256
14257 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14258
14259 * win32-low.c: Throughout, fix format strings and casts of
14260 printf-like functions to avoid type related warnings on all
14261 platforms.
14262 (get_child_debug_event): Print dwDebugEventCode as hex since
14263 that's how it's usually documented.
14264
14265 2013-02-28 Yao Qi <yao@codesourcery.com>
14266
14267 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14268 pulongest.
14269
14270 2013-02-27 Jiong Wang <jiwang@tilera.com>
14271
14272 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14273 (reg-tilegx32.c): New rule.
14274 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14275 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14276 different register info initializer according to elf class.
14277 (init_registers_tilgx32): New function. The tilegx32 register info
14278 initializer.
14279 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14280 (tile_store_gregset): Likewise.
14281
14282 2013-02-27 Yao Qi <yao@codesourcery.com>
14283
14284 * server.c (process_point_options): Print debug message when
14285 debug_threads is true.
14286
14287 2013-02-26 Yao Qi <yao@codesourcery.com>
14288
14289 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14290
14291 2013-02-19 Pedro Alves <palves@redhat.com>
14292 Kai Tietz <ktietz@redhat.com>
14293
14294 PR gdb/15161
14295
14296 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14297 instead of strtoul to extract address from packet.
14298 (process_serial_event) <'z'>: Likewise.
14299
14300 2013-02-18 Yao Qi <yao@codesourcery.com>
14301
14302 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14303
14304 2013-02-14 Pedro Alves <palves@redhat.com>
14305
14306 Plug memory leak.
14307
14308 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14309 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14310
14311 2013-02-14 Pedro Alves <palves@redhat.com>
14312
14313 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14314
14315 2013-02-14 Pedro Alves <palves@redhat.com>
14316
14317 * tracepoint.c (save_string): Delete.
14318 (add_tracepoint_action): Use savestring instead of save_string.
14319
14320 2013-02-12 Pedro Alves <palves@redhat.com>
14321
14322 * linux-xtensa-low.c: Ditto.
14323 * xtensa-xtregs.c: Ditto.
14324
14325 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14326
14327 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14328 thread_db.
14329
14330 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14331
14332 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14333 aarch64_num_wp_regs and aarch64_num_bp_regs to
14334 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14335
14336 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14337
14338 * linux-aarch64-low.c (ps_get_thread_area): Replace
14339 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14340
14341 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14342 Marcus Shawcroft <marcus.shawcroft@arm.com>
14343 Nigel Stephens <nigel.stephens@arm.com>
14344 Yufeng Zhang <yufeng.zhang@arm.com>
14345
14346 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14347 (aarch64.c, aarch64-without-fpu.c): New targets.
14348 * configure.srv (aarch64*-*-linux*): New.
14349 * linux-aarch64-low.c: New file.
14350
14351 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14352
14353 * linux-low.c (handle_extended_wait, linux_create_inferior)
14354 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14355 (dequeue_one_deferred_signal, linux_resume_one_thread)
14356 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14357 (linux_tracefork_grandchild, linux_test_for_tracefork)
14358 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14359 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14360 where the argument is 0.
14361
14362 2013-01-25 Yao Qi <yao@codesourcery.com>
14363
14364 * event-loop.c: Include "queue.h".
14365 (gdb_event_p): New typedef.
14366 (struct gdb_event) <next_event>: Remove.
14367 (event_queue): Change to QUEUE(gdb_event_p).
14368 (async_queue_event): Remove.
14369 (gdb_event_xfree): New.
14370 (initialize_event_loop): New.
14371 (process_event): Use API from QUEUE.
14372 (wait_for_event): Likewise.
14373 * server.c (main): Call initialize_event_loop.
14374 * server.h (initialize_event_loop): Declare.
14375
14376 2013-01-18 Yao Qi <yao@codesourcery.com>
14377
14378 * ax.h (struct eval_agent_expr_context): New.
14379 (gdb_eval_agent_expr): Update declaration.
14380 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14381 TFRAME. Add new argument CTX.
14382 * server.h (struct eval_agent_expr_context): Declare.
14383 (agent_mem_read, agent_tsv_read): Update declaration.
14384 (agent_mem_read_string): Likewise.
14385 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14386 (add_traceframe_block): Add new argument TPOINT.
14387 Increase TPOINT->traceframe_usage.
14388 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14389 eval_tracepoint_agent_expr.
14390 (condition_true_at_tracepoint): Likewise.
14391 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14392 (agent_mem_read_string, agent_tsv_read): Likewise.
14393
14394 2013-01-16 Yao Qi <yao@codesourcery.com>
14395
14396 * linux-low.c (linux_resume_one_lwp): Don't check
14397 'lwp->bp_reinsert != 0'.
14398
14399 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14400 Pedro Alves <palves@redhat.com>
14401
14402 * lynx-low.c (ptrace_request_to_str): Define a temporary
14403 macro and use it to simplify this function's implementation.
14404
14405 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14406
14407 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14408 sets errno.
14409
14410 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14411
14412 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14413
14414 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14415
14416 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14417
14418 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14419
14420 * lynx-low.c (lynx_resume): Use the resume_info parameter
14421 to determine the ptid for the lynx_ptrace call, unless
14422 it is equal to minus_one_ptid, in which case we use the
14423 ptid of the current_inferior.
14424 (lynx_wait_1): After having received a thread create/exit
14425 event, resume the inferior's execution using the signaling
14426 thread's ptid, rather than the old ptid.
14427
14428 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14429
14430 * lynx-low.c (lynx_resume): Delete variable ret.
14431
14432 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14433
14434 * gdbreplay.c (gdbreplay_version): Update copyright year.
14435 * server.c (gdbserver_version): Likewise.
14436
14437 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14438
14439 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14440 new thread.
14441
14442 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14443
14444 * lynx-low.c (ptrace_request_to_str): Add handling for
14445 PTRACE_GETTRACESIG.
14446
14447 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14448
14449 * lynx-low.c (lynx_attach): Delete variable new_process.
14450
14451 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14452
14453 * lynx-low.c (lynx_create_inferior): Delete variable
14454 new_process.
14455
14456 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14457
14458 * lynx-low.c (ptrace_request_to_str): Do not handle
14459 PTRACE_GETTHREADLIST if this macro does not exist.
14460
14461 2012-12-15 Yao Qi <yao@codesourcery.com>
14462
14463 * Makefile.in (OBS): Add notif.o.
14464 * notif.c, notif.h: New.
14465 * server.c: Include "notif.h".
14466 (struct vstop_notif) <next>: Remove.
14467 <base>: New field.
14468 (queue_stop_reply): Update.
14469 (push_event, send_next_stop_reply): Remove.
14470 (discard_queued_stop_replies): Update.
14471 (notif_stop): New variable.
14472 (handle_v_stopped): Remove.
14473 (handle_v_requests): Don't call handle_v_stopped. Call
14474 handle_ack_notif instead.
14475 (queue_stop_reply_callback): Call notif_event_enque instead
14476 of queue_stop_reply.
14477 (handle_status): Don't call send_next_stop_reply, call
14478 notif_write_event instead.
14479 (kill_inferior_callback): Likewise.
14480 (detach_or_kill_inferior_callback): Likewise.
14481 (main): Call initialize_notif.
14482 (process_serial_event): Call QUEUE_is_empty.
14483 (handle_target_event): Call notif_push instead of push event.
14484 * server.h (push_event): Remove declaration.
14485
14486 2012-12-10 Tom Tromey <tromey@redhat.com>
14487
14488 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14489 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14490 macros.
14491 (.c.o): Rewrite.
14492 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14493 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14494 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14495 (amd64-linux-ipa.o, ax.o): Rewrite.
14496 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14497 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14498 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14499 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14500 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14501 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14502 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14503 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14504 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14505 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14506 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14507 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14508 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14509 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14510 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14511 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14512 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14513 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14514 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14515 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14516 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14517 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14518 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14519 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14520 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14521 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14522 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14523 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14524 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14525 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14526 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14527 (reg-tilegx.o): Remove.
14528 (all_object_files): New macro.
14529 Include .deps files.
14530 * aclocal.m4, configure: Rebuild.
14531 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14532 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14533 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14534
14535 2012-12-05 Tom Tromey <tromey@redhat.com>
14536
14537 PR gdb/14917:
14538 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14539
14540 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14541
14542 * configure.ac: Check for linux/perf_event.h.
14543 * config.in: Regenerated.
14544 * configure: Regenerated.
14545
14546 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14547
14548 * hostio.c (handle_readlink): Decrease buffer size
14549 parameter passed to readlink by one byte.
14550
14551 2012-11-26 Yao Qi <yao@codesourcery.com>
14552
14553 * configure.ac (build_warnings): Append '-Wempty-body'.
14554 * configure: Regenerated.
14555 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14556 body.
14557
14558 2012-11-15 Pierre Muller <muller@sourceware.org>
14559
14560 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14561 * config.in: Regenerate.
14562 * configure: Regenerate.
14563 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14564 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14565 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14566 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14567 header.
14568 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14569 instead of <sys/wait.h> header.
14570 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14571
14572 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14573
14574 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14575 (various make rules): Remove -DGDBSERVER
14576
14577 2012-11-09 Yao Qi <yao@codesourcery.com>
14578
14579 * spu-low.c (current_ptid): Move it to ..
14580 * gdbthread.h: ... here. New.
14581 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14582 * server.c (myresume, process_serial_event): Likewise.
14583 * thread-db.c (thread_db_find_new_threads): Likewise.
14584 * tracepoint.c (run_inferior_command): Likewise.
14585
14586 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14587
14588 * server.c (handle_search_memory_1): Include access length in
14589 warning message.
14590
14591 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14592
14593 * linux-crisv32-low.c: Fix compile errors.
14594
14595 2012-09-04 Yao Qi <yao@codesourcery.com>
14596
14597 * tracepoint.c (cmd_qtsv): Adjust debug message.
14598 Don't check CUR_TPOINT.
14599
14600 2012-08-28 Yao Qi <yao@codesourcery.com>
14601
14602 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14603 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14604 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14605 Remove declarations of xmalloc, xreallloc, xstrdup and
14606 freeargv.
14607 * Makefile.in (libiberty_h): New.
14608 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14609 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14610
14611 2012-08-23 Yao Qi <yao@codesourcery.com>
14612
14613 * server.h: Remove declaration of 'xsnprintf'.
14614
14615 2012-08-22 Keith Seitz <keiths@redhat.com>
14616
14617 * server.h: Include build-gnulib-gbserver/config.h.
14618 * gdbreplay.c: Likewise.
14619
14620 2012-08-08 Doug Evans <dje@google.com>
14621
14622 * Makefile.in (SFILES): Add gdb_vecs.c.
14623 (OBS): Add gdb_vecs.o.
14624 (gdb_vecs_h, host_defs_h): New variables.
14625 (thread-db.o): Add $(gdb_vecs_h) dependency.
14626 (gdb_vecs.o): New rule.
14627 * thread-db.c: #include "gdb_vecs.h".
14628 (thread_db_load_search): Use a vector to iterate over path elements.
14629 Handle text appearing after "$pdir".
14630
14631 * configure.ac: Add check for strstr.
14632 * config.in: Regenerate.
14633 * configure: Regenerate.
14634
14635 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14636
14637 * hostio.c (handle_pread): If pread fails, fall back to attempting
14638 lseek/read.
14639 (handle_pwrite): Likewise for pwrite.
14640
14641 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14642
14643 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14644 between unsupported TYPE and unimplementable ADDR/LEN combination.
14645 (arm_insert_point): Act on new return value.
14646
14647 2012-07-31 Pedro Alves <palves@redhat.com>
14648
14649 * server.c (process_point_options): Only skip tokens if we find
14650 one that is unrecognized. Don't treat 'X' specially while
14651 skipping unrecognized tokens.
14652
14653 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14654
14655 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14656 to 4-byte-align HW breakpoint addresses for Thumb.
14657
14658 2012-07-27 Yao Qi <yao@codesourcery.com>
14659
14660 PR remote/14161.
14661
14662 * server.h: Declare gdb_agent_about_to_close.
14663 * target.c (kill_inferior): Include "agent.h".
14664 New. Send command 'kill'.
14665 * target.h (kill_inferior): Removed macro.
14666 * tracepoint.c (gdb_agent_about_to_close): New.
14667 (gdb_agent_helper_thread): Handle command 'close'.
14668 Wait endlessly until the inferior stops.
14669 Install gdb_agent_remove_socket to atexit hook.
14670 (agent_socket_name): New static variable.
14671 (gdb_agent_socket_init): Replace local variable 'name' with
14672 'agent_socket_name'.
14673 (gdb_agent_remove_socket): New.
14674
14675 2012-07-27 Yao Qi <yao@codesourcery.com>
14676
14677 * server.c (process_point_options): Stop at 'X' when parsing.
14678
14679 2012-07-19 Michael Eager <eager@eagercon.com>
14680
14681 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14682 to hw_execute.
14683 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14684 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14685 hardware breakpoint.
14686
14687 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14688
14689 * gdbserver/linux-low.c (initialize_low): Call
14690 linux_ptrace_init_warnings.
14691
14692 2012-07-02 Doug Evans <dje@google.com>
14693
14694 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14695 pointer to int.
14696
14697 2012-07-02 Stan Shebs <stan@codesourcery.com>
14698
14699 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14700 (ax.o): Add it to build rule.
14701 (ax-ipa.o): Ditto.
14702 (OBS): Add format.o.
14703 (IPA_OBS): Add format.o.
14704 * server.c (handle_query): Claim support for breakpoint commands.
14705 (process_point_options): Add command case.
14706 (process_serial_event): Leave running if there are printfs in
14707 effect.
14708 * mem-break.h (any_persistent_commands): Declare.
14709 (add_breakpoint_commands): Declare.
14710 (gdb_no_commands_at_breakpoint): Declare.
14711 (run_breakpoint_commands): Declare.
14712 * mem-break.c (struct point_command_list): New struct.
14713 (struct breakpoint): New field command_list.
14714 (any_persistent_commands): New function.
14715 (add_commands_to_breakpoint): New function.
14716 (add_breakpoint_commands): New function.
14717 (gdb_no_commands_at_breakpoint): New function.
14718 (run_breakpoint_commands): New function.
14719 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14720 locally.
14721 * ax.c: Include format.h.
14722 (ax_printf): New function.
14723 (gdb_eval_agent_expr): Add printf opcode.
14724
14725 2012-06-13 Yao Qi <yao@codesourcery.com>
14726
14727 * server.c (start_inferior): Remove duplicated writes to fields
14728 'last_resume_kind' and 'last_status' of 'current_inferior'.
14729
14730 2012-06-12 Yao Qi <yao@codesourcery.com>
14731 Pedro Alves <palves@redhat.com>
14732
14733 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14734 comment.
14735 * server.c (handle_v_cont): Extend comment.
14736
14737 2012-06-11 Yao Qi <yao@codesourcery.com>
14738
14739 * linux-low.c (linux_attach): Add 'static'.
14740
14741 2012-06-06 Yao Qi <yao@codesourcery.com>
14742
14743 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14744
14745 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14746
14747 Fix gcc -flto compilation warning.
14748 * server.c (main): Make variable multi_mode and attach volatile.
14749
14750 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14751
14752 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14753 if the platform doesn't know about it.
14754
14755 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14756
14757 * Makefile.in (SFILES): Add linux-tile-low.c.
14758 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14759 * configure.srv: Handle tilegx-*-linux*.
14760 * linux-tile-low.c: New file.
14761
14762 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14763
14764 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14765
14766 2012-05-24 Pedro Alves <palves@redhat.com>
14767
14768 PR gdb/7205
14769
14770 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14771
14772 2012-05-24 Pedro Alves <palves@redhat.com>
14773
14774 PR gdb/7205
14775
14776 Replace target_signal with gdb_signal throughout.
14777
14778 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14779
14780 * linux-low.c (linux_store_registers): Avoid the copying sequence
14781 when no data has been retrieved by ptrace.
14782
14783 2012-05-22 Will Deacon <will.deacon@arm.com>
14784
14785 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14786 Include asm/ptrace.h.
14787 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14788 already defined.
14789
14790 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14791
14792 * linux-low.c (linux_store_registers): Don't re-retrieve data
14793 with ptrace that has already been obtained from /proc. Always
14794 copy any data retrieved with ptrace to the buffer supplied.
14795
14796 2012-05-11 Yao Qi <yao@codesourcery.com>
14797 Pedro Alves <palves@redhat.com>
14798
14799 * linux-low.c (enum stopping_threads_kind): New.
14800 (stopping_threads): Change type to `enum stopping_threads_kind'.
14801 (handle_extended_wait): If stopping and suspending threads, leave
14802 the new_lwp suspended too.
14803 (linux_wait_for_event): Adjust.
14804 (stop_all_lwps): Set `stopping_threads' to
14805 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14806 whether we're suspending threads or just stopping them. Assert no
14807 recursion happens.
14808
14809 2012-04-29 Yao Qi <yao@codesourcery.com>
14810
14811 * server.h: Move some code to ...
14812 * gdbthread.h: ... here. New.
14813 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14814 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14815 (nto-low.o, win32-low.o): Likewise.
14816 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14817 * regcache.c, remote-utils.c, server.c: Likewise.
14818 * target.c, tracepoint.c, win32-low.c: Likewise.
14819
14820 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14821
14822 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14823 (PTRACE_ARG4_TYPE): Likewise.
14824 (PTRACE_XFER_TYPE): Likewise.
14825 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14826 ptrace to PTRACE_ARG3_TYPE.
14827 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14828 (PTRACE_ARG4_TYPE): Likewise.
14829 (PTRACE_XFER_TYPE): Likewise.
14830 (linux_detach_one_lwp): Cast fourth argument of
14831 ptrace to long then PTRACE_ARG4_TYPE.
14832 (regsets_fetch_inferior_registers): Cast third argument of
14833 ptrace to long then PTRACE_ARG3_TYPE.
14834 (regsets_store_inferior_registers): Likewise.
14835
14836 2012-04-20 Pedro Alves <palves@redhat.com>
14837
14838 * configure: Regenerate.
14839
14840 2012-04-19 Pedro Alves <palves@redhat.com>
14841
14842 * Makefile.in (GNULIB_BUILDDIR): New.
14843 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14844 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14845 (all, install-only, uninstall, clean-info, all-lib, clean): No
14846 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14847 (maintainer-clean realclean distclean): Use subdir_do.
14848 (subdir_do): New.
14849 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14850 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14851 * acinclude.m4: Include acx_configure_dir.m4.
14852 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14853 calls. Call AC_PROG_RANLIB. Configure gnulib using
14854 ACX_CONFIGURE_DIR.
14855 (GNULIB): New.
14856 (GNULIB_STDINT_H): Adjust.
14857 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14858 * gdbreplay.c: Include build-gnulib/config.h.
14859 * server.h: Likewise.
14860 * aclocal.m4: Regenerate.
14861 * config.in: Regenerate.
14862 * configure: Regenerate.
14863
14864 2012-04-19 Pedro Alves <palves@redhat.com>
14865
14866 * Makefile.in (LIBGNU, INCGNU): Adjust.
14867 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14868 (all, install-only, uninstall, clean-info, all-lib, clean)
14869 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14870 * configure.ac: Adjust AC_OUTPUT output.
14871 * aclocal.m4: Regenerate.
14872 * configure: Regenerate.
14873
14874 2012-04-19 Pedro Alves <palves@redhat.com>
14875
14876 * Makefile.in (generated_files): New.
14877 (server_h): Remove the explicit dependency on config.h, and depend
14878 on $generated_files.
14879
14880 2012-04-19 Pedro Alves <palves@redhat.com>
14881
14882 * Makefile.in (INCGNU): Add -Ignulib.
14883
14884 2012-04-19 Pedro Alves <palves@redhat.com>
14885
14886 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14887 (INCGNU): ... this, and spell out -I here.
14888 (GNULIB_LIB): Rename to ...
14889 (LIBGNU): ... this.
14890 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14891
14892 2012-04-19 Pedro Alves <palves@redhat.com>
14893
14894 * config.in: Regenerate.
14895
14896 2012-04-19 Pedro Alves <palves@redhat.com>
14897
14898 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14899 * server.h (memmem): Remove declaration.
14900 * config.in: Regenerate.
14901 * configure: Regenerate.
14902
14903 2012-04-19 Yao Qi <yao@codesourcery.com>
14904
14905 * Makefile.in (SFILES): Add common/vec.c.
14906 (OBS): Add vec.o.
14907 (vec.o): New rule.
14908
14909 2012-04-19 Yao Qi <yao@codesourcery.com>
14910
14911 * remote-utils.c (prepare_resume_reply): Replace with macro
14912 target_core_of_thread.
14913 * server.c (handle_qxfer_threads_proper): Likewise.
14914 * target.h (traget_core_of_thread): New macro.
14915
14916 2012-04-18 Pedro Alves <palves@redhat.com>
14917
14918 * aclocal.m4: Regenerate.
14919 * configure: Regenerate.
14920
14921 2012-04-16 Yao Qi <yao@codesourcery.com>
14922
14923 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14924 duplicated on address.
14925
14926 2012-04-16 Yao Qi <yao@codesourcery.com>
14927
14928 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14929 (struct tracepoint_action_ops) <send>: New field.
14930 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14931 (agent_expr_send, x_tracepoint_action_send): New.
14932 (l_tracepoint_action_send): New.
14933 (cmd_qtdp): Download and install tracepoint
14934 according to `use_agent'.
14935 (run_inferior_command): Add one more parameter `len'.
14936 Update callers.
14937 (tracepoint_send_agent): New.
14938 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14939
14940 2012-04-16 Yao Qi <yao@codesourcery.com>
14941
14942 * tracepoint.c (download_tracepoints): Moved to ...
14943 (cmd_qtstart): ... here.
14944
14945 2012-04-14 Yao Qi <yao@codesourcery.com>
14946
14947 * tracepoint.c: Include inttypes.h.
14948 (struct collect_memory_action): Use sized types.
14949 (struct tracepoint): Likewise.
14950 (cmd_qtdp, stop_tracing): Update print specifiers.
14951 (cmd_qtp, response_tracepoint): Likewise.
14952 (collect_data_at_tracepoint): Likewise.
14953 (collect_data_at_step): Likewise.
14954
14955 2012-04-14 Yao Qi <yao@codesourcery.com>
14956
14957 Import gnulib module inttypes.
14958 * aclocal.m4, config.in, configure: Regenerated.
14959
14960 2012-04-14 Yao Qi <yao@codesourcery.com>
14961
14962 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14963 Makefile and config.status at last.
14964
14965 2012-04-13 Yao Qi <yao@codesourcery.com>
14966
14967 * tracepoint.c: Include stdint.h unconditionally.
14968
14969 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14970
14971 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14972 on BFD_HAVE_SYS_PROCFS_TYPE.
14973 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14974 * configure: Regenerate.
14975 * config.in: Likewise.
14976
14977 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14978
14979 * Makefile.in (clean): Also remove x32.c x32-linux.c
14980 x32-avx.c x32-avx-linux.c.
14981 (x32.o): New target.
14982 (x32.c): Likewise.
14983 (x32-linux.o): Likewise.
14984 (x32-linux.c): Likewise.
14985 (x32-avx.o): Likewise.
14986 (x32-avx.c): Likewise.
14987 (x32-avx-linux.o): Likewise.
14988 (x32-avx-linux.c): Likewise.
14989
14990 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14991 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14992 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14993 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14994 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14995 i386/x32-avx-linux.xml.
14996
14997 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14998 (init_registers_x32_avx_linux): Likwise.
14999 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15000 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15001
15002 2012-04-13 Pedro Alves <palves@redhat.com>
15003
15004 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15005 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15006 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15007 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15008 the sub-make.
15009
15010 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15011
15012 * linux-x86-low.c (compat_x32_clock_t): New.
15013 (compat_x32_siginfo_t): Likewise.
15014 (compat_x32_siginfo_from_siginfo): Likewise.
15015 (siginfo_from_compat_x32_siginfo): Likewise.
15016 (linux_is_elf64): Likewise.
15017 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15018 and siginfo_from_compat_x32_siginfo for x32.
15019 (x86_arch_setup): Set linux_is_elf64.
15020
15021 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15022
15023 PR gdb/13969
15024 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15025 e_machine field.
15026 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15027 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15028 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15029 compatible with process.
15030
15031 2012-04-12 Yao Qi <yao@codesourcery.com>
15032
15033 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15034 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15035 (install-only, install-info, clean): Handle sub dir gnulib.
15036 (all-lib, am--refresh): New targets.
15037 (memmem.o): Remove target.
15038 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15039 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15040 (AC_REPLACE_FUNCS): Remove memmem.
15041 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15042 (AC_OUTPUT): Generate Makefile in gnulib/.
15043 * aclocal.m4, config.in, configure: Regenerated.
15044
15045 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15046
15047 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15048
15049 2012-04-05 Pedro Alves <palves@redhat.com>
15050
15051 -Werror=strict-aliasing
15052
15053 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15054 pointer.
15055
15056 2012-04-04 Pedro Alves <palves@redhat.com>
15057
15058 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15059 (sparc_store_gregset_from_stack, sparc_store_gregset)
15060 (sparc_breakpoint_at): Fix formatting.
15061
15062 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15063
15064 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15065 are available.
15066 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15067 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15068 * config.in: Regenerate.
15069 * configure: Likewise.
15070
15071 2012-03-29 Pedro Alves <palves@redhat.com>
15072
15073 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15074 Correct ptrace arguments.
15075
15076 2012-03-28 Pedro Alves <palves@redhat.com>
15077
15078 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15079 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15080 (IA64_FR1_REGNUM): New defines.
15081 (ia64_fetch_register): New.
15082 (the_low_target): Install it.
15083 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15084 field.
15085 * linux-low.c (linux_fetch_registers): Try the
15086 the_low_target.fetch_register hook first.
15087
15088 * linux-arm-low.c (the_low_target): Adjust.
15089 * linux-bfin-low.c (the_low_target): Adjust.
15090 * linux-cris-low.c (the_low_target): Adjust.
15091 * linux-crisv32-low.c (the_low_target): Adjust.
15092 * linux-m32r-low.c (the_low_target): Adjust.
15093 * linux-m68k-low.c (the_low_target): Adjust.
15094 * linux-mips-low.c (the_low_target): Adjust.
15095 * linux-ppc-low.c (the_low_target): Adjust.
15096 * linux-s390-low.c (the_low_target): Adjust.
15097 * linux-sh-low.c (the_low_target): Adjust.
15098 * linux-sparc-low.c (the_low_target): Adjust.
15099 * linux-tic6x-low.c (the_low_target): Adjust.
15100 * linux-x86-low.c (the_low_target): Adjust.
15101 * linux-xtensa-low.c (the_low_target): Adjust.
15102
15103 2012-03-26 Pedro Alves <palves@redhat.com>
15104
15105 * server.c (handle_qxfer_libraries): Don't bail early if
15106 the_target->qxfer_libraries_svr4 is not NULL.
15107
15108 2012-03-26 Pedro Alves <palves@redhat.com>
15109
15110 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15111
15112 2012-03-23 Pedro Alves <palves@redhat.com>
15113
15114 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15115 "library-list-svr4" element's start tag when the the DSO list is
15116 empty.
15117
15118 2012-03-23 Pedro Alves <palves@redhat.com>
15119
15120 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15121 a variable whose type size is the same as the inferior's pointer
15122 size.
15123
15124 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15125
15126 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15127 struct siginfo.
15128 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15129 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15130 * linux-low.h: Include <signal.h>.
15131 (struct siginfo): Remove forward declaration.
15132 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15133 struct siginfo.
15134
15135 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15136
15137 * .gitignore: Ignore more files.
15138
15139 2012-03-19 Pedro Alves <palves@redhat.com>
15140 Jan Kratochvil <jan.kratochvil@redhat.com>
15141
15142 * server.c (cont_thread, general_thread): Add describing comments.
15143 (start_inferior): Clear `cont_thread'.
15144 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15145 of a process.
15146
15147 2012-03-15 Yao Qi <yao@codesourcery.com>
15148
15149 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15150 handling to ...
15151 (cmd_qtdp): ... here.
15152
15153 2012-03-15 Yao Qi <yao@codesourcery.com>
15154
15155 * tracepoint.c (struct tracepoint_action_ops): New.
15156 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15157 (m_tracepoint_action_download): New.
15158 (r_tracepoint_action_download): New.
15159 (x_tracepoint_action_download): New.
15160 (l_tracepoint_action_download): New.
15161 (add_tracepoint_action): Install `action->ops' according type.
15162 (download_tracepoint_1): Move code `download' function pointer
15163 of various tracepoint_action_ops.
15164
15165 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15166
15167 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15168 linux_ptrace_attach_warnings.
15169
15170 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15171
15172 * Makefile.in (linux-ptrace.o): New.
15173 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15174 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15175 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15176 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15177 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15178 of these targets.
15179 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15180
15181 2012-03-08 Yao Qi <yao@codesourcery.com>
15182 Pedro Alves <palves@redhat.com>
15183
15184 Fix PR server/13392.
15185 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15186 offset of JMP insn.
15187 * tracepoint.c (remove_tracepoint): New.
15188 (cmd_qtdp): Call remove_tracepoint when failed to install.
15189
15190 2012-03-07 Pedro Alves <palves@redhat.com>
15191
15192 * linux-low.c (get_detach_signal): New.
15193 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15194 Pass on pending signals to PTRACE_DETACH. Check the result of the
15195 ptrace call.
15196 * server.c (program_signals, program_signals_p): New.
15197 (handle_general_set): Handle QProgramSignals.
15198 * server.h (program_signals, program_signals_p): Declare.
15199
15200 2012-03-05 Pedro Alves <palves@redhat.com>
15201 Jan Kratochvil <jan.kratochvil@redhat.com>
15202
15203 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15204 New comment why.
15205
15206 2012-03-03 Yao Qi <yao@codesourcery.com>
15207
15208 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15209 agent_look_up_symbols.
15210
15211 2012-03-03 Yao Qi <yao@codesourcery.com>
15212
15213 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15214 (linux-x86-low.o): Likewise.
15215 * server.h: Remove in_process_agent_loaded.
15216 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15217 common/agent.c.
15218 Update callers.
15219
15220 2012-03-03 Yao Qi <yao@codesourcery.com>
15221
15222 * tracepoint.c (gdb_agent_capability): New global.
15223 (in_process_agent_loaded_ust): Renamed to
15224 `in_process_agent_supports_ust'.
15225 Update callers.
15226 (in_process_agent_supports_ust): Call agent_capability_check.
15227 (clear_installed_tracepoints): Assert that agent supports
15228 agent.
15229
15230 2012-03-03 Yao Qi <yao@codesourcery.com>
15231
15232 * linux-low.c (linux_supports_agent): New.
15233 (linux_target_ops): Initialize field `supports_agent' with
15234 linux_supports_agent.
15235 * target.h (struct target_ops) <supports_agent>: New.
15236 (target_supports_agent): New macro.
15237 * server.c (handle_general_set): Handle packet 'QAgent'.
15238 (handle_query): Send `QAgent+'.
15239 * Makefile.in (server.o): Depends on agent.h.
15240
15241 2012-03-03 Yao Qi <yao@codesourcery.com>
15242
15243 * Makefile.in (OBS): Add agent.o.
15244 Add new rule for agent.o.
15245 Track dependence of tracepoint.c on agent.h.
15246 * tracepoint.c (run_inferior_command_1):
15247 (run_inferior_command): Call agent_run_command.
15248 (gdb_ust_connect_sync_socket): Deleted. Move it to
15249 common/agent.c.
15250 (resume_thread, stop_thread): Likewise.
15251 (gdb_ust_socket_init): Renamed to ...
15252 (gdb_agent_socket_init): ... New.
15253 (gdb_ust_thread): Renamed to ...
15254 (gdb_agent_helper_thread): ... New.
15255 (gdb_ust_init): Move some code to ...
15256 (gdb_agent_init): ... here. New.
15257 [HAVE_UST]: Call gdb_ust_init.
15258 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15259 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15260 * config.in, configure: Regenerated.
15261
15262 2012-03-02 Pedro Alves <palves@redhat.com>
15263
15264 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15265 * linux-low.c (struct simple_pid_list): New.
15266 (stopped_pids): New a struct simple_pid_list pointer.
15267 (add_to_pid_list, pull_pid_from_list): New.
15268 (handle_extended_wait): Don't assume the first signal new children
15269 report is SIGSTOP. Adjust call to pull_pid_from_list.
15270 (linux_wait_for_lwp): Adjust.
15271
15272 2012-03-02 Yao Qi <yao@codesourcery.com>
15273
15274 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15275 debug log.
15276
15277 2012-03-02 Yao Qi <yao@codesourcery.com>
15278
15279 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15280 `stop_pc' and `tpoint'. Update caller.
15281
15282 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15283
15284 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15285 * linux-low.c (use_linux_regsets): New macro.
15286 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15287 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15288 (linux_register_in_regsets): New function.
15289 (usr_fetch_inferior_registers): Skip registers covered by
15290 regsets.
15291 (usr_store_inferior_registers): Likewise.
15292 (usr_fetch_inferior_registers): New macro.
15293 (usr_store_inferior_registers): Likewise.
15294 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15295 (linux_store_registers): Likewise.
15296 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15297 prototype.
15298 (init_registers_mips64_dsp_linux): Likewise.
15299 (init_registers_mips_linux): New macro.
15300 (init_registers_mips_dsp_linux): Likewise.
15301 (mips_dsp_num_regs): Likewise.
15302 (DSP_BASE, DSP_CONTROL): New fallback macros.
15303 (mips_base_regs): New macro.
15304 (mips_regmap): Use it. Fix the size.
15305 (mips_dsp_regmap): New variable.
15306 (mips_dsp_regset_bitmap): Likewise.
15307 (mips_arch_setup): New function.
15308 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15309 than mips_regmap.
15310 (mips_cannot_store_register): Likewise.
15311 (the_low_target): Update .arch_setup, .num_regs and .regmap
15312 initializers. Add .regset_bitmap initializer.
15313 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15314 initializer.
15315 * linux-bfin-low.c (the_low_target): Likewise.
15316 * linux-cris-low.c (the_low_target): Likewise.
15317 * linux-crisv32-low.c (the_low_target): Likewise.
15318 * linux-ia64-low.c (the_low_target): Likewise.
15319 * linux-m32r-low.c (the_low_target): Likewise.
15320 * linux-m68k-low.c (the_low_target): Likewise.
15321 * linux-ppc-low.c (the_low_target): Likewise.
15322 * linux-s390-low.c (the_low_target): Likewise.
15323 * linux-sh-low.c (the_low_target): Likewise.
15324 * linux-sparc-low.c (the_low_target): Likewise.
15325 * linux-tic6x-low.c (the_low_target): Likewise.
15326 * linux-x86-low.c (the_low_target): Likewise.
15327 * linux-xtensa-low.c (the_low_target): Likewise.
15328 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15329 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15330 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15331 srv_xmlfiles.
15332 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15333 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15334
15335 2012-02-29 Yao Qi <yao@codesourcery.com>
15336 Pedro Alves <palves@redhat.com>
15337
15338 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15339 `step_over_finished' is true.
15340
15341 2012-02-27 Pedro Alves <palves@redhat.com>
15342
15343 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15344 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15345
15346 2012-02-27 Pedro Alves <palves@redhat.com>
15347
15348 PR server/9684
15349 * linux-low.c (pid_is_stopped): New.
15350 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15351
15352 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15353
15354 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15355 of conditions.
15356
15357 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15358
15359 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15360
15361 2012-02-24 Luis Machado <lgustavo@codesourcery>
15362
15363 * server.c (handle_query): Advertise support for target-side
15364 breakpoint condition evaluation.
15365 (process_point_options): New function.
15366 (process_serial_event): When inserting a breakpoint, check for
15367 a target-side condition that should be evaluated.
15368
15369 * mem-break.c: Include regcache.h and ax.h.
15370 (point_cond_list_t): New data structure.
15371 (breakpoint) <cond_list>: New field.
15372 (find_gdb_breakpoint_at): Make non-static.
15373 (delete_gdb_breakpoint_at): Clear any target-side
15374 conditions.
15375 (clear_gdb_breakpoint_conditions): New function.
15376 (add_condition_to_breakpoint): Likewise.
15377 (add_breakpoint_condition): Likewise.
15378 (gdb_condition_true_at_breakpoint): Likewise.
15379 (gdb_breakpoint_here): Return result directly instead
15380 of going through a local variable.
15381
15382 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15383 (clear_gdb_breakpoint_conditions): Likewise.
15384 (add_breakpoint_condition): Likewise.
15385 (gdb_condition_true_at_breakpoint): Likewise.
15386
15387 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15388 (need_step_over_p): Take target-side breakpoint condition into
15389 consideration.
15390
15391 2012-02-24 Luis Machado <lgustavo@codesourcery>
15392
15393 * server.h: Include tracepoint.h.
15394 (agent_mem_read, agent_get_trace_state_variable_value,
15395 agent_set_trace_state_variable_value,
15396 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15397 get_set_tsv_func_addr): New prototypes.
15398
15399 * ax.h: New include file.
15400 * ax.c: New source file.
15401
15402 * tracepoint.c: Include ax.h.
15403 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15404 agent_expr, eval_result_type): Move to ax.h.
15405 (parse_agent_expr): Rename to ...
15406 (gdb_parse_agent_expr): ... this, make it non-static and move
15407 to ax.h.
15408 (unparse_agent_expr) Rename to ...
15409 (gdb_unparse_agent_expr): ... this, make it non-static and move
15410 to ax.h.
15411 (eval_agent_expr): Rename to ...
15412 (eval_tracepoint_agent_expr): ... this.
15413 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15414 forward declarations.
15415 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15416 (agent_get_trace_state_variable_value): New function.
15417 (agent_set_trace_state_variable_value): New function.
15418 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15419 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15420 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15421 (condition_true_at_tracepoint): Likewise.
15422 (parse_agent_expr): Rename to ...
15423 (gdb_parse_agent_expr): ... this and move to ax.c.
15424 (unparse_agent_expr): Rename to ...
15425 (gdb_unparse_agent_expr): ... this and move to ax.c.
15426 (gdb_agent_op_name): Move to ax.c.
15427 (eval_agent_expr): Rename to ...
15428 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15429 and move to ax.c.
15430 (eval_tracepoint_agent_expr): New function.
15431 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15432 non-static.
15433 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15434 ax.c.
15435 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15436 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15437 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15438 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15439 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15440 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15441 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15442 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15443 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15444 (compile_bytecodes): Remove forward declaration.
15445 (is_goto_target): Move to ax.c.
15446 (compile_bytecodes): Move to ax.c and call
15447 agent_get_trace_state_variable_value (...) and
15448 agent_set_trace_state_variable_value (...).
15449
15450 * Makefile.in: Update ax.c and IPA dependencies.
15451
15452 2012-02-24 Pedro Alves <palves@redhat.com>
15453
15454 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15455 (cmd_bigqtbuffer_circular): ... this. Only handle
15456 'QTBuffer:circular:'.
15457 (handle_tracepoint_general_set): Adjust.
15458
15459 2012-02-16 Yao Qi <yao@codesourcery.com>
15460
15461 * inferiors.c: Move code to ...
15462 * dll.c: .... here. New.
15463 * server.h: Declare clear_dlls.
15464 * Makefile.in (SFILES): Add dll.c.
15465 (OBS): Add dll.o
15466 (dll.o): New rule.
15467
15468 2012-02-11 Yao Qi <yao@codesourcery.com>
15469
15470 * server.c: (handle_monitor_command): Add a new parameter
15471 `own_buf'.
15472 (handle_query): Update caller.
15473
15474 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15475
15476 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15477 * configure, config.in: Regenerate.
15478 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15479 is not defined.
15480
15481 2012-02-02 Pedro Alves <palves@redhat.com>
15482
15483 Try SIGKILL first, then PTRACE_KILL.
15484 * linux-low.c (linux_kill_one_lwp): New.
15485 (linux_kill_one_lwp): Rename to ...
15486 (kill_one_lwp_callback): ... this. Use the new
15487 linux_kill_one_lwp.
15488
15489 2012-02-02 Pedro Alves <palves@redhat.com>
15490
15491 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15492 inferior.
15493
15494 2012-01-27 Pedro Alves <palves@redhat.com>
15495
15496 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15497 (elf_64_file_p): Make static.
15498 (linux_pid_exe_is_elf_64_file): New.
15499 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15500 Delete declarations.
15501 (linux_pid_exe_is_elf_64_file): Declare.
15502 * linux-x86-low.c (x86_arch_setup): Use
15503 linux_pid_exe_is_elf_64_file.
15504
15505 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15506
15507 * linux-low.c (linux_wait_for_event_1): Rename to ...
15508 (linux_wait_for_event): ... here and merge it with former
15509 linux_wait_for_event - new variable wait_ptid, use it.
15510 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15511
15512 2012-01-23 Pedro Alves <palves@redhat.com>
15513
15514 * server.c (main): Avoid yet another case of infinite loop while
15515 detaching/killing after a longjmp.
15516
15517 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15518
15519 Code cleanup.
15520 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15521
15522 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15523
15524 * hostio.c (handle_readlink): New function.
15525 (handle_vFile): Call it to handle "vFile:readlink" packets.
15526
15527 2012-01-20 Pedro Alves <palves@redhat.com>
15528 Ulrich Weigand <ulrich.weigand@linaro.org>
15529
15530 * server.c (handle_v_requests): Only support vAttach and vRun to
15531 start multiple processes when in extended protocol mode.
15532
15533 2012-01-17 Pedro Alves <palves@redhat.com>
15534
15535 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15536 memalign plus mprotect to allocate the scratch buffer.
15537
15538 2012-01-13 Pedro Alves <palves@redhat.com>
15539
15540 * server.c (attach_inferior): Clear `cont_thread'.
15541
15542 2012-01-13 Pedro Alves <palves@redhat.com>
15543
15544 * server.c (main): Avoid infinite loop while detaching/killing
15545 after a longjmp.
15546
15547 2012-01-09 Doug Evans <dje@google.com>
15548
15549 * server.c (start_inferior): Set last_ptid in --wrapper case.
15550
15551 2012-01-06 Yao Qi <yao@codesourcery.com>
15552
15553 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15554 defined.
15555 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15556
15557 2012-01-04 Yao Qi <yao@codesourcery.com>
15558
15559 * tracepoint.c (cmd_qtdp): Print debug message
15560 for static tracepoint.
15561
15562 2012-01-04 Yao Qi <yao@codesourcery.com>
15563
15564 * tracepoint.c (trace_vdebug): Differentiate debug message
15565 between gdbserver and IPA.
15566
15567 2012-01-03 Yao Qi <yao@codesourcery.com>
15568
15569 * tracepoint.c (tracepoint_was_hit): Don't collect for
15570 static tracepoint.
15571
15572 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15573
15574 * terminal.h: Reformat copyright header.
15575
15576 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15577
15578 * server.c (gdbserver_version): Update copyright year.
15579 * gdbreplay.c (gdbreplay_version): Likewise.
15580
15581 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15582
15583 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15584
15585 Revert:
15586 2011-12-18 Hui Zhu <teawater@gmail.com>
15587 * linux-low.c (linux_create_inferior): Save return value to ret.
15588
15589 2011-12-18 Hui Zhu <teawater@gmail.com>
15590
15591 * linux-low.c (linux_create_inferior): Save return value to ret.
15592
15593 2011-12-16 Doug Evans <dje@google.com>
15594
15595 * linux-low.c (linux_create_inferior): If stdio connection,
15596 redirect stdin from /dev/null, stdout to stderr.
15597 * remote-utils.c (remote_is_stdio): New static global.
15598 (remote_connection_is_stdio): New function.
15599 (remote_prepare): Handle stdio connection.
15600 (remote_open): Ditto.
15601 (remote_close): Don't close stdin for stdio connections.
15602 (read_prim,write_prim): New functions. Replace all calls to
15603 read/write to these.
15604 * server.c (main): Watch for "-" argument. Move call to
15605 remote_prepare before start_inferior.
15606 * server.h (STDIO_CONNECTION_NAME): New macro.
15607 (remote_connection_is_stdio): Declare.
15608
15609 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15610 in debugging output.
15611
15612 2011-12-15 Yao Qi <yao@codesourcery.com>
15613
15614 * tracepoint.c: Include sys/syscall.h.
15615 (gdb_ust_thread): Remove preprocessor conditional.
15616
15617 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15618
15619 * linux-low.c (linux_detach_one_lwp): Call
15620 the_low_target.prepare_to_resume before detaching.
15621
15622 2011-12-14 Yao Qi <yao@codesourcery.com>
15623
15624 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15625 of write.
15626
15627 2011-12-14 Yao Qi <yao@codesourcery.com>
15628
15629 * i386-low.c (i386_low_stopped_data_address): Initialize local
15630 variable `control'.
15631
15632 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15633
15634 PR remote/13492
15635
15636 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15637 DR_CONTROL unless necessary. Extend comments.
15638 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15639 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15640
15641 2011-12-13 Yao Qi <yao@codesourcery.com>
15642
15643 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15644 macros.
15645 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15646
15647 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15648
15649 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15650 Print new debug message for such case.
15651
15652 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15653
15654 Fix overlapping memcpy.
15655 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15656 the read_inferior_memory transfer.
15657 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15658 write_inferior_memory transfer.
15659 (set_fast_tracepoint_jump): New variable buf. Use it for the
15660 read_inferior_memory and write_inferior_memory transfers.
15661 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15662 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15663 Use it for the write_inferior_memory transfer.
15664 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15665 buffers.
15666
15667 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15668
15669 * linux-low.c (fetch_register, store_register): Make code
15670 consistent, fix formatting.
15671
15672 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15673
15674 * linux-low.c (usr_store_inferior_registers): Factor out code
15675 to handle individual registers into...
15676 (store_register): ... this new function.
15677
15678 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15679
15680 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15681 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15682 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15683 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15684 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15685 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15686 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15687 (srv_xmlfiles): Add new XML files.
15688
15689 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15690 and <sys/uio.h>.
15691 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15692 (init_registers_s390_linux32v1): Add prototype.
15693 (init_registers_s390_linux32v2): Likewise.
15694 (init_registers_s390_linux64v1): Likewise.
15695 (init_registers_s390_linux64v2): Likewise.
15696 (init_registers_s390x_linux64v1): Likewise.
15697 (init_registers_s390x_linux64v2): Likewise.
15698 (s390_num_regs): Increment to 52.
15699 (s390_regmap): Add orig_r2 register.
15700 (s390_num_regs_3264): Increment to 68.
15701 (s390_regmap_3264): Add orig_r2 register.
15702 (s390_collect_ptrace_register): Handle orig_r2 register.
15703 (s390_supply_ptrace_register): Likewise.
15704 (s390_fill_last_break): New function.
15705 (s390_store_last_break): Likewise.
15706 (s390_fill_system_call): New function.
15707 (s390_store_system_call): Likewise.
15708 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15709 register sets.
15710 (s390_check_regset): New function.
15711 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15712 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15713 Update target_regsets for available register sets.
15714
15715 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15716 Jan Kratochvil <jan.kratochvil@redhat.com>
15717
15718 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15719 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15720 New.
15721 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15722 * linux-low.h (struct process_info_private): New member r_debug.
15723 * server.c (handle_qxfer_libraries): Call
15724 the_target->qxfer_libraries_svr4.
15725 (handle_qxfer_libraries_svr4): New function.
15726 (qxfer_packets): New entry "libraries-svr4".
15727 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15728 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15729 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15730 PACKET_qXfer_libraries_svr4.
15731
15732 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15733
15734 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15735 PSW address/mask between 8-byte and 16-byte formats.
15736 (s390_supply_ptrace_register): Likewise.
15737 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15738 basic addressing mode bit.
15739
15740 2011-11-24 Stan Shebs <stan@codesourcery.com>
15741
15742 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15743
15744 2011-11-17 Stan Shebs <stan@codesourcery.com>
15745
15746 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15747 (tracing_start_time): New global.
15748 (tracing_stop_time): New global.
15749 (tracing_user_name): New global.
15750 (tracing_notes): New global.
15751 (tracing_stop_note): New global.
15752 (cmd_qtstart): Set traceframe_usage, start_time.
15753 (stop_tracing): Set stop_time.
15754 (cmd_qtstatus): Report additional status.
15755 (cmd_qtp): New function.
15756 (handle_tracepoint_query): Call it.
15757 (cmd_qtnotes): New function.
15758 (handle_tracepoint_general_set): Call it.
15759 (get_timestamp): Rename from tsv_get_timestamp.
15760
15761 2011-11-14 Stan Shebs <stan@codesourcery.com>
15762 Kwok Cheung Yeung <kcy@codesourcery.com>
15763
15764 * linux-x86-low.c (small_jump_insn): New.
15765 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15766 trampoline and error message, build a trampoline and issue a small
15767 jump instruction to it.
15768 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15769 trampoline and error message.
15770 (x86_get_min_fast_tracepoint_insn_len): New.
15771 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15772 * linux-low.h (struct linux_target_ops): Add arguments to
15773 install_fast_tracepoint_jump_pad operation, add new operation.
15774 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15775 arguments.
15776 (linux_get_min_fast_tracepoint_insn_len): New function.
15777 (linux_target_op): Add new operation.
15778 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15779 (gdb_trampoline_buffer_end): Ditto.
15780 (gdb_trampoline_buffer_error): Ditto.
15781 (struct ipa_sym_addresses): Add fields for new IPA variables.
15782 (symbol_list): Add entries for new IPA variables.
15783 (struct tracepoint): Add fields to hold the address range of the
15784 trampoline used by the tracepoint.
15785 (trampoline_buffer_head): New static variable.
15786 (trampoline_buffer_tail): Ditto.
15787 (claim_trampoline_space): New function.
15788 (have_fast_tracepoint_trampoline_buffer): New function.
15789 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15790 structure.
15791 (install_fast_tracepoint): Ditto, also add error buffer argument.
15792 (cmd_qtminftpilen): New function.
15793 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15794 (fast_tracepoint_from_trampoline_address): New function.
15795 (fast_tracepoint_collecting): Handle trampoline as part of jump
15796 pad space.
15797 (set_trampoline_buffer_space): New function.
15798 (initialize_tracepoint): Initialize new IPA variables.
15799 * target.h (struct target_ops): Add arguments to
15800 install_fast_tracepoint_jump_pad operation, add new
15801 get_min_fast_tracepoint_insn_len operation.
15802 (target_get_min_fast_tracepoint_insn_len): New.
15803 (install_fast_tracepoint_jump_pad): Add arguments.
15804 * server.h (IPA_BUFSIZ): Define.
15805 * linux-i386-ipa.c: Include extra header files.
15806 (initialize_fast_tracepoint_trampoline_buffer): New function.
15807 (initialize_low_tracepoint): Call it.
15808 * server.h (set_trampoline_buffer_space): Declare.
15809 (claim_trampoline_space): Ditto.
15810 (have_fast_tracepoint_trampoline_buffer): Ditto.
15811
15812 2011-11-14 Yao Qi <yao@codesourcery.com>
15813
15814 * server.c (handle_query): Handle InstallInTrace for qSupported.
15815 * tracepoint.c (add_tracepoint): Sort list.
15816 (install_tracepoint, download_tracepoint): New.
15817 (cmd_qtdp): Call them to install and download tracepoints.
15818 (sort_tracepoints): Removed.
15819 (cmd_qtstart): Update.
15820
15821 2011-11-14 Yao Qi <yao@codesourcery.com>
15822
15823 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15824 * mem-break.h: Declare.
15825 * tracepoint.c (cmd_qtstart): Move some code to ...
15826 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15827 New.
15828 (download_tracepoints): Move some code to ...
15829 (download_tracepoint_1): ... here. New.
15830
15831 2011-11-08 Yao Qi <yao@codesourcery.com>
15832
15833 * remote-utils.c (relocate_instruction): A comment fix.
15834
15835 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15836
15837 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15838 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15839 dr_status_mirror and dr_control_mirror from debug_reg_state.
15840 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15841 (i386_initial_stuff): Remove use of deleted globals.
15842 (i386_get_thread_context, i386_set_thread_context,
15843 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15844 from debug_reg_state.
15845
15846 2011-11-05 Yao Qi <yao@codesourcery.com>
15847
15848 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15849 address as TPOINT's.
15850
15851 2011-11-02 Stan Shebs <stan@codesourcery.com>
15852
15853 * tracepoint.c (agent_mem_read_string): New function.
15854 (eval_agent_expr): Call it for tracenz.
15855 * server.c (handle_query): Report support for tracenz.
15856
15857 2011-11-02 Yao Qi <yao@codesourcery.com>
15858
15859 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15860
15861 2011-11-02 Yao Qi <yao@codesourcery.com>
15862
15863 * target.h: Fix a typo in comment.
15864
15865 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15866
15867 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15868 clobber the breakpoints' shadows with fast tracepoint jumps.
15869 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15870 * target.c (write_inferior_memory): Also pass MYADDR down to
15871 check_mem_write.
15872
15873 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15874
15875 * configure.ac: Check support for personality routine.
15876 * configure: Regenerate.
15877 * config.in: Likewise.
15878 * linux-low.c: Include <sys/personality.h>.
15879 Define ADDR_NO_RANDOMIZE if necessary.
15880 (linux_create_inferior): Disable address space randomization when
15881 forking inferior, if requested.
15882 (linux_supports_disable_randomization): New function.
15883 (linux_target_ops): Install it.
15884 * server.h (disable_randomization): Declare.
15885 * server.c (disable_randomization): New global variable.
15886 (handle_general_set): Handle QDisableRandomization.
15887 (handle_query): Likewise for qSupported.
15888 (main): Support --disable-randomization and --no-disable-randomization
15889 command line arguments.
15890 * target.h (struct target_ops): Add supports_disable_randomization.
15891 (target_supports_disable_randomization): New macro.
15892
15893 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15894
15895 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15896 ifdef check.
15897 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15898 [!PT_GETDSBT] (target_loadmap): New definition.
15899 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15900 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15901 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15902 and PT_GETDSBT to LINUX_LOADMAP.
15903 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15904 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15905
15906 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15907
15908 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15909 (arm_linux_hwbp_cap): New static variable.
15910 (arm_linux_get_hwbp_cap): Replace by ...
15911 (arm_linux_init_hwbp_cap): ... this new function.
15912 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15913 (arm_linux_get_hw_watchpoint_count): Likewise.
15914 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15915 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15916 (arm_prepare_to_resume): Use perror_with_name instead of error.
15917
15918 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15919
15920 * linux-arm-low.c: Include <signal.h>.
15921 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15922 (struct arm_linux_hwbp_cap): New data type.
15923 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15924 (struct arm_linux_hw_breakpoint): New data type.
15925 (MAX_BPTS, MAX_WPTS): Define.
15926 (struct arch_process_info, struct arch_lwp_info): New data types.
15927 (arm_linux_get_hwbp_cap): New function.
15928 (arm_linux_get_hw_breakpoint_count): Likewise.
15929 (arm_linux_get_hw_watchpoint_count): Likewise.
15930 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15931 (arm_hwbp_control_initialize): Likewise.
15932 (arm_hwbp_control_is_enabled): Likewise.
15933 (arm_hwbp_control_is_initialized): Likewise.
15934 (arm_hwbp_control_disable): Likewise.
15935 (arm_linux_hw_breakpoint_equal): Likewise.
15936 (arm_linux_hw_point_initialize): Likewise.
15937 (struct update_registers_data): New data structure.
15938 (update_registers_callback: New function.
15939 (arm_insert_point): Likewise.
15940 (arm_remove_point): Likewise.
15941 (arm_stopped_by_watchpoint): Likewise.
15942 (arm_stopped_data_address): Likewise.
15943 (arm_new_process): Likewise.
15944 (arm_new_thread): Likewise.
15945 (arm_prepare_to_resume): Likewise.
15946 (the_low_target): Register arm_insert_point, arm_remove_point,
15947 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15948 arm_new_thread, and arm_prepare_to_resume.
15949
15950 2011-09-15 Stan Shebs <stan@codesourcery.com>
15951
15952 * server.h (struct emit_ops): Add compare-goto fields.
15953 * tracepoint.c (gdb_agent_op_sizes): New table.
15954 (emit_eq_goto): New function.
15955 (emit_ne_goto): New function.
15956 (emit_lt_goto): New function.
15957 (emit_le_goto): New function.
15958 (emit_gt_goto): New function.
15959 (emit_ge_goto): New function.
15960 (is_goto_target): New function.
15961 (compile_bytecodes): Recognize special cases of compare-goto
15962 combinations and call specialized emitters for them.
15963 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15964 (amd64_emit_ne_goto): New function.
15965 (amd64_emit_lt_goto): New function.
15966 (amd64_emit_le_goto): New function.
15967 (amd64_emit_gt_goto): New function.
15968 (amd64_emit_ge_goto): New function.
15969 (amd64_emit_ops): Add the new functions.
15970 (i386_emit_eq_goto): New function.
15971 (i386_emit_ne_goto): New function.
15972 (i386_emit_lt_goto): New function.
15973 (i386_emit_le_goto): New function.
15974 (i386_emit_gt_goto): New function.
15975 (i386_emit_ge_goto): New function.
15976 (i386_emit_ops): Add the new functions.
15977
15978 2011-09-08 Stan Shebs <stan@codesourcery.com>
15979
15980 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15981 (i386_emit_epilogue): Restore %ebx.
15982
15983 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15984
15985 * server.c (step_thread): Remove definition.
15986 (process_serial_event): Don't handle Hs.
15987 * server.h (step_thread): Remove declaration.
15988 * target.c (set_desired_inferior): Remove use of step_thread.
15989
15990 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15991
15992 * linux-low.c: Include linux-procfs.h.
15993 (linux_attach_lwp_1): Update comments.
15994 (linux_attach): Scan for existing threads when attaching to a
15995 process that is the tgid.
15996 * Makefile.in: Update dependencies.
15997
15998 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15999
16000 * configure.srv: Add linux-procfs.o dependencies.
16001
16002 2011-08-14 Yao Qi <yao@codesourcery.com>
16003
16004 * target.h (struct target_ops): Fix indent.
16005 * win32-low.c (win32_target_ops): Fix comment.
16006
16007 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16008 Yao Qi <yao@codesourcery.com>
16009
16010 * Makefile.in (clean): Remove tic6x-*.c files.
16011 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16012 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16013 (tic6x-c64xp-linux.c): Likewise.
16014 * configure.srv: Add support for tic6x-*-uclinux.
16015 * linux-tic6x-low.c: New.
16016 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16017
16018 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16019 Yao Qi <yao@codesourcery.com>
16020
16021 * target.h (struct target_ops): Add read_loadmap.
16022 * linux-low.c (struct target_loadseg): New type.
16023 (struct target_loadmap): New type.
16024 (linux_read_loadmap): New function.
16025 (linux_target_ops): Add linux_read_loadmap.
16026 * server.c (handle_query): Support qXfer:fdpic:read packet.
16027 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16028 to NULL.
16029
16030 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16031
16032 * win32-low.c: Include <stdint.h>.
16033
16034 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16035
16036 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16037 to the inferior here.
16038 (i386_remove_aligned_watchpoint): Ditto.
16039 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16040 fit part of the watchpoint in the debug registers.
16041 (i386_update_inferior_debug_regs): New.
16042 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16043 registers, and only update the inferior on success.
16044 (i386_low_remove_watchpoint): Ditto.
16045
16046 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16047
16048 * linux-low.c (compare_ints, unique, list_threads, show_process,
16049 linux_core_of_thread): Delete.
16050 (linux_target_ops): Change linux_core_of_thread to
16051 linux_common_core_of_thread.
16052 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16053 * utils.c (malloc_failure): Change type of argument.
16054 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16055 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16056 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16057 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16058 (IPA_OBJS): Add common-utils-ipa.o.
16059 (ptid_h, linux_osdata_h): New macros.
16060 (server_h): Add common/common-utils.h, common/xml-utils.h,
16061 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16062 common/ptid.h.
16063 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16064 ptid.o, buffer.o): New rules.
16065 (linux-low.o): Add common/linux-osdata.h as a dependency.
16066 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16067 * configure.ac: Add AC_HEADER_DIRENT check.
16068 * config.in: Regenerate.
16069 * configure: Regenerate.
16070 * remote-utils.c (xml_escape_text): Delete.
16071 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16072 buffer_xml_printf): Move to common/buffer.c.
16073 * server.c (main): Remove call to initialize_inferiors.
16074 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16075 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16076 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16077 internal_error, gdb_assert, gdb_assert_fail): Delete.
16078 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16079 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16080 common/buffer.h.
16081 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16082 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16083 initialize_inferiors): Delete.
16084
16085 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16086
16087 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16088 symbol error.
16089
16090 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16091
16092 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16093 assertion.
16094 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16095
16096 2011-05-26 Yao Qi <yao@codesourcery.com>
16097
16098 * Makefile.in (thread-db.o): Track dependence to
16099 common/gdb_thread_db.h.
16100 * thread-db.c: include gdb_thread_db.h from right place.
16101
16102 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16103
16104 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16105 __FILE__ and __LINE__ to internal_error.
16106
16107 2011-05-13 Doug Evans <dje@google.com>
16108
16109 * thread-db.c (try_thread_db_load_from_sdir): New function.
16110 (try_thread_db_load_from_dir): New function.
16111 (thread_db_load_search): Handle $sdir, ignore $pdir.
16112 Remove trying of system directories if search of
16113 libthread-db-search-path fails, that is now done via $sdir.
16114
16115 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16116
16117 * server.c (handle_query): Add EnableDisableTracepoints to the list
16118 of supported features.
16119 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16120 tracepoints.
16121 (cmd_qtenable_disable): New.
16122 (cmd_qtstart): Install tracepoints even if disabled.
16123 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16124 receiving a QTEnable or QTDisable packet.
16125 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16126 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16127 tracepoints.
16128 (gdb_probe): Skip data collection if static tracepoint is disabled.
16129
16130 2011-05-10 Doug Evans <dje@google.com>
16131
16132 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16133
16134 2011-05-04 Doug Evans <dje@google.com>
16135
16136 * linux-low.c (linux_join): Skip process lookup.
16137 * spu-low.c (spu_join): Ditto.
16138 * server.c (join_inferiors_callback): Delete.
16139 (process_serial_event): For 'D' packet (detach) call join_inferior
16140 directly.
16141
16142 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16143
16144 * README: Don't mention xscale*-*-linux*.
16145 * configure.srv (xscale*-*-linux*): Don't handle target.
16146
16147 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16148
16149 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16150 casting pointers.
16151 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16152 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16153 (i386_emit_void_call_2): Likewise.
16154
16155 2011-04-26 Yao Qi <yao@codesourcery.com>
16156
16157 * linux-low.c: Move common macros to linux-ptrace.h.
16158 Include linux-ptrace.h.
16159 * Makefile.in (linux_ptrace_h): New.
16160 (linux-low.o): Depends on linux-ptrace.h.
16161
16162 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16163
16164 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16165 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16166 (remote_prepare): New function with most of the TCP code from ...
16167 (remote_open): ... here. Detect PORT here unconditionally. Move also
16168 setting transport_is_reliable.
16169 * server.c (run_once): New variable.
16170 (gdbserver_usage): Document it.
16171 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16172 the first run if RUN_ONCE.
16173 * server.h (run_once, remote_prepare): New declarations.
16174
16175 2011-04-19 Tom Tromey <tromey@redhat.com>
16176
16177 * win32-low.c (handle_load_dll): Remove duplicate "the".
16178
16179 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16180
16181 Remove support for old Cygwin 1.5 versions.
16182 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16183 function to avoid warning.
16184 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16185 warning.
16186
16187 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16188
16189 * gdbserver/server.h (Macro _): Define it if not available.
16190
16191 2011-03-14 Michael Snyder <msnyder@vmware.com>
16192
16193 * hostio.c (handle_close): Remove unnecessary null test.
16194
16195 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16196
16197 * Makefile.in (maintainer-clean realclean distclean): Remove
16198 "make ... subdir_do" command.
16199
16200 2011-03-10 Michael Snyder <msnyder@vmware.com>
16201
16202 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16203
16204 * server.c (handle_v_run): Free alloced buffer on early return.
16205
16206 2011-03-09 Yao Qi <yao@codesourcery.com>
16207
16208 Revert:
16209 2011-03-04 Yao Qi <yao@codesourcery.com>
16210
16211 * Makefile.in: Remove GNU make feature --directory.
16212
16213 2011-03-05 Yao Qi <yao@codesourcery.com>
16214
16215 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16216 (subdir_do): New make target. Copied from gdb/Makefile.
16217 (maintainer-clean, realclean, distclean, clean): Call corresponding
16218 make targets in common/Makefile.
16219
16220 2011-02-11 Yao Qi <yao@codesourcery.com>
16221
16222 * configure.ac: Call AC_PROG_RANLIB.
16223 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16224 * configure: Regenerate.
16225
16226 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16227
16228 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16229
16230 2011-03-06 Yao Qi <yao@codesourcery.com>
16231
16232 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16233
16234 2011-03-05 Yao Qi <yao@codesourcery.com>
16235
16236 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16237 (subdir_do): New make target. Copied from gdb/Makefile.
16238 (maintainer-clean, realclean, distclean, clean): Call corresponding
16239 make targets in common/Makefile.
16240
16241 2011-03-04 Yao Qi <yao@codesourcery.com>
16242
16243 * Makefile.in: Remove GNU make feature --directory.
16244
16245 2011-03-04 Michael Snyder <msnyder@vmware.com>
16246
16247 * server.c (queue_stop_reply): Call xmalloc not malloc.
16248
16249 2011-03-02 Michael Snyder <msnyder@vmware.com>
16250
16251 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16252
16253 2011-02-28 Michael Snyder <msnyder@vmware.com>
16254
16255 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16256 (cmd_qtframe): Ditto.
16257 (cmd_qtbuffer): Ditto.
16258 (cmd_bigqtbuffer): Ditto.
16259
16260 * utils.c (decimal2str): Initialize 'width' to nine, then
16261 don't mess with it.
16262
16263 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16264
16265 * hostio.c (require_data): Free *data, not data.
16266
16267 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16268
16269 * hostio.c (require_data): Use free, not xfree.
16270
16271 2011-02-27 Michael Snyder <msnyder@vmware.com>
16272
16273 * server.c (handle_query): Discard unused value.
16274
16275 * hostio.c (require_data): Free malloc memory before returning
16276 error.
16277
16278 2011-02-26 Michael Snyder <msnyder@vmware.com>
16279
16280 * linux-low.c (list_threads): Call closedir for dirent.
16281
16282 2011-02-27 Michael Snyder <msnyder@vmware.com>
16283
16284 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16285 a case statement falls through.
16286
16287 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16288
16289 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16290 in comparison.
16291
16292 2011-02-26 Michael Snyder <msnyder@vmware.com>
16293
16294 * utils.c (decimal2str): Eliminate dead code and dead param.
16295 (pulongest): Drop dead param from call to decimal2str.
16296 (plongest): Ditto.
16297
16298 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16299
16300 Revert the following patch (not approved yet):
16301 2011-02-21 Hui Zhu <teawater@gmail.com>
16302 * tracepoint.c (tp_printf): New function.
16303 (eval_agent_expr): Handle gdb_agent_op_printf.
16304
16305 2011-02-21 Hui Zhu <teawater@gmail.com>
16306
16307 * tracepoint.c (tp_printf): New function.
16308 (eval_agent_expr): Handle gdb_agent_op_printf.
16309
16310 2011-02-18 Tom Tromey <tromey@redhat.com>
16311
16312 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16313 (tracepoint.o): Likewise.
16314 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16315 (gdb_agent_op_names): Likewise.
16316
16317 2011-02-18 Tom Tromey <tromey@redhat.com>
16318
16319 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16320 gdb_agent_op_rot>: New constants.
16321 (gdb_agent_op_names): Add pick and roll.
16322 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16323 cases.
16324
16325 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16326
16327 * aclocal.m4: Regenerated with aclocal-1.11.1.
16328
16329 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16330
16331 * server.c (handle_qxfer_traceframe_info): New.
16332 (qxfer_packets): Register "traceframe-info".
16333 (handle_query): Report support for qXfer:traceframe-info:read+.
16334 * tracepoint.c (match_blocktype): New.
16335 (traceframe_find_block_type): Rename to ...
16336 (traceframe_walk_blocks): ... this. Add callback filter argument,
16337 and use it.
16338 (traceframe_find_block_type): New, reimplemented on top of
16339 traceframe_walk_blocks.
16340 (build_traceframe_info_xml): New.
16341 (traceframe_read_info): New.
16342 * server.h (traceframe_read_info): Declare.
16343
16344 2011-02-11 Yao Qi <yao@codesourcery.com>
16345
16346 * configure.ac: Call AC_PROG_RANLIB.
16347 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16348 * configure: Regenerate.
16349
16350 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16351
16352 * server.c (gdb_read_memory): Change return semantics to allow
16353 partial transfers.
16354 (handle_search_memory_1): Adjust.
16355 (process_serial_event) <'m' packet>: Handle partial transfers.
16356 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16357
16358 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16359
16360 * regcache.c (init_register_cache): Initialize
16361 regcache->register_status.
16362 (free_register_cache): Release regcache->register_status.
16363 (regcache_cpy): Copy register_status.
16364 (registers_to_string): Print 'x's for unavailable registers.
16365 (supply_register): Mark the register's status valid or
16366 unavailable, depending on whether a buffer was passed in or not.
16367 (supply_register_zeroed): New.
16368 (supply_regblock): Mark the registers' status valid or
16369 unavailable, depending on whether a buffer was passed in or not.
16370 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16371 (struct regcache): New `register_status' field.
16372 (supply_register_zeroed): Declare.
16373 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16374 supply_register_zeroed, rather than passing a NULL buffer to
16375 supply_register.
16376 * tracepoint.c (fetch_traceframe_registers): Update comment.
16377
16378 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16379
16380 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16381 buffer explicit.
16382
16383 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16384
16385 * server.h (decode_xfer_write): Change prototype.
16386 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16387 and don't extract the annex here.
16388 * server.c (decode_xfer_read): Remove `annex' parameter,
16389 and don't extract the annex here.
16390 (decode_xfer): New.
16391 (struct qxfer): New.
16392 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16393 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16394 (handle_qxfer_statictrace): New functions, abstracted out from
16395 handle_query, and made to use the struct qxfer interface.
16396 (handle_threads_qxfer_proper): Rename to ...
16397 (handle_qxfer_threads_proper): ... this.
16398 (handle_threads_qxfer): Rename to ...
16399 (handle_qxfer_threads): ... this. Adjust.
16400 (qxfer_packets): New array.
16401 (handle_qxfer): New function.
16402 (handle_query): Use handle_qxfer.
16403
16404 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16405
16406 * gdbreplay.c: Shorten lines of >= 80 columns.
16407 * linux-low.c: Ditto.
16408 * linux-ppc-low.c: Ditto.
16409 * linux-s390-low.c: Ditto.
16410 * linux-sparc-low.c: Ditto.
16411 * linux-x86-low.c: Ditto.
16412 * linux-xtensa-low.c: Ditto.
16413 * mem-break.c: Ditto.
16414 * nto-low.c: Ditto.
16415 * regcache.h: Ditto.
16416 * remote-utils.c: Ditto.
16417 * server.c: Ditto.
16418 * server.h: Ditto.
16419 * thread-db.c: Ditto.
16420 * tracepoint.c: Ditto.
16421 * utils.c: Ditto.
16422 * win32-low.h: Ditto.
16423
16424 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16425
16426 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16427 update.
16428
16429 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16430
16431 * server.c (gdbserver_version): Update copyright year in version
16432 output.
16433 * gdbreplay.c (gdbreplay_version): Ditto.
16434
16435 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16436
16437 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16438 * linux-bfin-low.c: New file.
16439 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16440 PT_DATA_ADDR for BFIN targets.
16441 * Makefile.in (SFILES): Add linux-bfin-low.c.
16442 (clean): Remove reg-bfin.c.
16443 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16444 * README: Mention supported Blackfin targets.
16445
16446 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16447
16448 * .gitignore: New file.
16449
16450 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16451
16452 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16453
16454 2010-10-22 Jie Zhang <jie@codesourcery.com>
16455
16456 * Makefile.in: Add FLAGS_TO_PASS variable.
16457 (install): Remove dependency of install-only and recursively
16458 invoke make for install-only.
16459
16460 2010-10-04 Doug Evans <dje@google.com>
16461
16462 * Makefile.in (uninstall): Use $(DESTDIR).
16463
16464 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16465
16466 PR gdb/11842
16467
16468 * linux-x86-low.c (compat_siginfo_from_siginfo)
16469 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16470 si_code is < 0. Check for si_code == SI_TIMER before checking for
16471 si_code < 0.
16472
16473 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16474
16475 * lynx-i386-low.c: New file.
16476 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16477
16478 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16479
16480 * lynx-low.c (ptrace_request_to_str): Remove handling for
16481 request values that have been removed in LynxOS 5.x.
16482
16483 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16484
16485 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16486 <ptrace.h>
16487
16488 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16489
16490 * configure.ac: Add --enable-inprocess-agent option.
16491 * configure: Rebuilt.
16492
16493 2010-09-06 Yao Qi <yao@codesourcery.com>
16494
16495 * linux-low.c (linux_kill): Remove unused variable.
16496 (linux_stabilize_threads): Likewise.
16497 * server.c (start_inferior): Likewise.
16498 (queue_stop_reply_callback): Likewise.
16499 * tracepoint.c (do_action_at_tracepoint): Likewise.
16500
16501 2010-09-06 Yao Qi <yao@codesourcery.com>
16502
16503 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16504 on return.
16505
16506 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16507
16508 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16509
16510 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16511
16512 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16513 "$(IPA_DEPFILES)".
16514
16515 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16516
16517 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16518 gdbserver/lynx-ppc-low.c: New files.
16519 * Makefile.in (lynx_low_h): New variable.
16520 (lynx-low.o, lynx-ppc-low.o): New rules.
16521 * configure.ac: On LynxOS, link with -lnetinet.
16522 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16523 * configure: regenerate.
16524
16525 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16526
16527 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16528 * configure.ac: Add check for vasprintf and vsnprintf.
16529 * configure, config.in: Regenerate.
16530 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16531
16532 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16533
16534 * gdbreplay.c: Move include of alloca.h up, next to include of
16535 malloc.h.
16536 * server.h: Add include of malloc.h.
16537 * mem-break.c: Remove include of malloc.h.
16538 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16539
16540 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16541
16542 * Makefile.in (memmem.o): Build with -Wno-error.
16543
16544 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16545
16546 * utils.c (xsnprintf): Make non-static.
16547 * server.h: Add xsnprintf declaration.
16548 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16549 replace calls to snprintf by calls to xsnprintf throughout.
16550
16551 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16552
16553 * configure.ac: Add configure check for alloca.
16554 * configure, config.in: Regenerate.
16555 * server.h: Include alloca.h if it exists.
16556 * gdbreplay.c: Include alloca.h if it exists.
16557
16558 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16559
16560 * linux-low.c (__SIGRTMIN): Define if not already defined.
16561 (linux_create_inferior): Check for __ANDROID__ rather than
16562 __SIGRTMIN.
16563 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16564 are already deferred.
16565 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16566 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16567 stopped and already has a pending signal to report.
16568 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16569 a pending signal to report or is moving out of a jump pad.
16570 (linux_init_signals): Check for __ANDROID__ rather than
16571 __SIGRTMIN.
16572
16573 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16574
16575 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16576 debug_threads check. Avoid a linear search when not doing debug
16577 output.
16578
16579 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16580
16581 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16582 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16583 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16584 (process_event): Change local fd's type to gdb_fildes_t.
16585 (create_file_handler): Adjust prototype.
16586 (delete_file_handler): Adjust prototype.
16587 (handle_file_event): Adjust prototype. Use pfildes.
16588 (create_file_event): Adjsut prototype.
16589 * remote-utils.c (remote_desc, listen_desc): Change type to
16590 gdb_fildes_t.
16591 * server.h: New gdb_fildes_t typedef.
16592 [USE_WIN32API]: Include winsock2.h.
16593 (delete_file_handler, add_file_handler): Adjust prototypes.
16594 (pfildes): Declare.
16595 * utils.c (pfildes): New.
16596
16597 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16598
16599 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16600 * configure: Regenerate.
16601
16602 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16603
16604 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16605 (linux_done_accessing_memory): ... this.
16606 (linux_target_ops): Adjust.
16607 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16608 * nto-low.c (nto_target_ops): Adjust comment.
16609 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16610 * spu-low.c (spu_target_ops): Adjust comment.
16611 * target.h (target_ops): Rename unprepare_to_access_memory field
16612 to done_accessing_memory.
16613 (unprepare_to_access_memory): Rename to ...
16614 (done_accessing_memory): ... this.
16615
16616 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16617
16618 * linux-low.c (linux_prepare_to_access_memory): New.
16619 (linux_unprepare_to_access_memory): New.
16620 (linux_target_ops): Install them.
16621 * server.c (read_memory): Rename to ...
16622 (gdb_read_memory): ... this. Use
16623 prepare_to_access_memory/prepare_to_access_memory.
16624 (write_memory): Rename to ...
16625 (gdb_write_memory): ... this. Use
16626 prepare_to_access_memory/prepare_to_access_memory.
16627 (handle_search_memory_1): Adjust.
16628 (process_serial_event): Adjust.
16629 * target.h (struct target_ops): New fields
16630 prepare_to_access_memory and unprepare_to_access_memory.
16631 (prepare_to_access_memory, unprepare_to_access_memory): New.
16632 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16633 prepare_to_access_memory/prepare_to_access_memory.
16634 * nto-low.c (nto_target_ops): Adjust.
16635 * spu-low.c (spu_target_ops): Adjust.
16636 * win32-low.c (win32_target_ops): Adjust.
16637
16638 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16639
16640 * Makefile.in (WARN_CFLAGS): Get it from configure.
16641 (WERROR_CFLAGS): New.
16642 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16643 * configure.ac: Introduce --enable-werror, which adds -Werror to
16644 the compiler command line. Enabled by default. Disable with
16645 --disable-werror. Add -Wdeclaration-after-statement
16646 Wpointer-arith and -Wformat-nonliteral to warning flags.
16647 * configure: Regenerate.
16648
16649 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16650
16651 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16652
16653 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16654
16655 * gdbreplay.c (remote_error): New.
16656 (gdbchar): New.
16657 (expect): Use gdbchar. Check for error reading from GDB.
16658 Clarify sync error output.
16659 (play): Check for errors writing to GDB.
16660 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16661 * remote-utils.c (getpkt): Check for errors writing to the remote
16662 descriptor.
16663
16664 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16665
16666 * linux-low.c (linux_wait_1): Move non-debugging code out of
16667 `debug_threads' control.
16668
16669 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16670
16671 * linux-low.c (linux_wait_1): Don't set last_status here.
16672 * server.c (push_event, queue_stop_reply_callback): Assert we're
16673 not pushing a TARGET_WAITKIND_IGNORE event.
16674 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16675 (myresume, handle_target_event): Set the thread's last_resume_kind
16676 and last_status from the target returned status.
16677
16678 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16679
16680 PR threads/10729
16681
16682 * linux-x86-low.c (update_debug_registers_callback): New.
16683 (i386_dr_low_set_addr): Use it.
16684 (i386_dr_low_get_addr): New.
16685 (i386_dr_low_set_control): Use update_debug_registers_callback.
16686 (i386_dr_low_get_control): New.
16687 (i386_dr_low_get_status): Adjust.
16688 * linux-low.c (linux_stop_lwp): New.
16689 * linux-low.h (linux_stop_lwp): Declare.
16690
16691 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16692 argument instead of a i386_debug_reg_state.
16693 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16694 a i386_debug_reg_state.
16695 (i386_insert_aligned_watchpoint): Adjust.
16696 (i386_remove_aligned_watchpoint): Adjust.
16697 (i386_low_stopped_data_address): Read the debug registers from the
16698 inferior instead of from the mirrors.
16699 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16700 (i386_dr_low_get_addr): Declare.
16701 (i386_dr_low_get_control): Declare.
16702 (i386_dr_low_get_status): Change prototype.
16703
16704 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16705 (i386_dr_low_get_addr): New.
16706 (i386_dr_low_get_control): New.
16707 (i386_dr_low_get_status): Adjust prototype. Return
16708 dr_status_mirror.
16709 (i386_initial_stuff): Clear dr_status_mirror and
16710 dr_control_mirror.
16711 (i386_get_thread_context): Adjust.
16712 (i386_set_thread_context): Adjust.
16713 (i386_thread_added): Adjust.
16714
16715 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16716
16717 * linux-low.h (linux_thread_area): Delete declaration.
16718
16719 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16720
16721 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16722 after its termination.
16723
16724 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16725
16726 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16727 (gdb_wants_all_stopped): Delete.
16728 (linux_wait_1): Don't call them.
16729 * server.c (handle_v_cont): Tag all threads as want-stopped.
16730 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16731 stopped as "client-wants-stopped".
16732
16733 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16734
16735 * Makefile.in (signals_h): New.
16736 (server_h): Depend on it.
16737 (server.o): Don't depend on $(signals_def).
16738 (signals.o): Depend on $(signals_def).
16739
16740 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16741
16742 * Makefile.in (signals_def): New.
16743 (server_h): Append include/gdb/signals.h and signals_def.
16744 (server.o): Append signals_def.
16745
16746 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16747
16748 * server.c (handle_target_event): Use target_signal_to_host for
16749 resume_info.sig initialization.
16750 * target.h (struct thread_resume) <sig>: New comment.
16751
16752 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16753
16754 * server.c (handle_query): strcpy() the returned string from paddress()
16755 instead of sprintf().
16756 * utils.c (paddress): Return phex_nz().
16757
16758 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16759
16760 * server.c (handle_v_cont): Call mourn_inferior if process
16761 just exited.
16762 (myresume): Likewise.
16763
16764 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16765
16766 Static tracepoints, and integration with UST.
16767
16768 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16769 * mem-break.c (uninsert_all_breakpoints)
16770 (reinsert_all_breakpoints): New.
16771 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16772 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16773 (gdb_agent_ust_loaded, helper_thread_id)
16774 (gdb_agent_helper_thread_id): New macros.
16775 (struct ipa_sym_addresses): Add addr_ust_loaded,
16776 addr_helper_thread_id, addr_cmd_buf.
16777 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16778 (in_process_agent_loaded_ust): New.
16779 (write_e_ust_not_loaded): New.
16780 (maybe_write_ipa_ust_not_loaded): New.
16781 (struct collect_static_trace_data_action): New.
16782 (enum tracepoint_type) <static_tracepoint>: New.
16783 (struct tracepoint) <handle>: Mention static tracepoints.
16784 (struct static_tracepoint_ctx): New.
16785 (CMD_BUF_SIZE): New.
16786 (add_tracepoint_action): Handle static tracepoint actions.
16787 (unprobe_marker_at): New.
16788 (clear_installed_tracepoints): Handle static tracepoints.
16789 (cmd_qtdp): Handle static tracepoints.
16790 (probe_marker_at): New.
16791 (cmd_qtstart): Handle static tracepoints.
16792 (response_tracepoint): Handle static tracepoints.
16793 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16794 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16795 (get_context_regcache): Handle static tracepoints.
16796 (do_action_at_tracepoint): Handle static tracepoint actions.
16797 (traceframe_find_block_type): Handle static trace data blocks.
16798 (traceframe_read_sdata): New.
16799 (download_tracepoints): Download static tracepoint actions.
16800 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16801 (GDB_PROBE_NAME): New.
16802 (ust_ops): New.
16803 (GET_UST_SYM): New.
16804 (USTF): New.
16805 (dlsym_ust): New.
16806 (ust_marker_to_static_tracepoint): New.
16807 (gdb_probe): New.
16808 (collect_ust_data_at_tracepoint): New.
16809 (gdb_ust_probe): New.
16810 (UNIX_PATH_MAX, SOCK_DIR): New.
16811 (gdb_ust_connect_sync_socket): New.
16812 (resume_thread, stop_thread): New.
16813 (run_inferior_command): New.
16814 (init_named_socket): New.
16815 (gdb_ust_socket_init): New.
16816 (cstr_to_hexstr): New.
16817 (next_st): New.
16818 (first_marker, next_marker): New.
16819 (response_ust_marker): New.
16820 (cmd_qtfstm, cmd_qtsstm): New.
16821 (unprobe_marker_at, probe_marker_at): New.
16822 (cmd_qtstmat, gdb_ust_thread): New.
16823 (gdb_ust_init): New.
16824 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16825 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16826 (ST_REGENTRY): New.
16827 (x86_64_st_collect_regmap): New.
16828 (X86_64_NUM_ST_COLLECT_GREGS): New.
16829 (AMD64_RIP_REGNUM): New.
16830 (supply_static_tracepoint_registers): New.
16831 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16832 (ST_REGENTRY): New.
16833 (i386_st_collect_regmap): New.
16834 (i386_NUM_ST_COLLECT_GREGS): New.
16835 (supply_static_tracepoint_registers): New.
16836 * server.c (handle_query): Handle qXfer:statictrace:read.
16837 <qSupported>: Report support for StaticTracepoints, and
16838 qXfer:statictrace:read features.
16839 * server.h (traceframe_read_sdata)
16840 (supply_static_tracepoint_registers): Declare.
16841 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16842 (unpack_varlen_hex): Include in IPA build.
16843 * Makefile.in (ustlibs, ustinc): New.
16844 (IPA_OBJS): Add remote-utils-ipa.o.
16845 ($(IPA_LIB)): Link -ldl and -lpthread.
16846 (UST_CFLAGS): New.
16847 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16848 * config.in, configure: Regenerate.
16849
16850 2010-06-20 Ian Lance Taylor <iant@google.com>
16851 Pedro Alves <pedro@codesourcery.com>
16852
16853 * linux-x86-low.c (always_true): Delete.
16854 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16855 trying to fool the compiler with always_true.
16856
16857 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16858
16859 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16860 conditions in gdbserver.
16861
16862 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16863
16864 * spu-low.c (spu_read_memory): Wrap around local store limit.
16865 (spu_write_memory): Likewise.
16866
16867 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16868
16869 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16870 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16871 LONGEST uses.
16872 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16873 uses.
16874 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16875 uses with LONGEST uses.
16876
16877 2010-06-14 Stan Shebs <stan@codesourcery.com>
16878 Pedro Alves <pedro@codesourcery.com>
16879
16880 Bytecode compiler.
16881
16882 * linux-x86-low.c: Include limits.h.
16883 (add_insns): New.
16884 (always_true): New.
16885 (EMIT_ASM): New.
16886 (EMIT_ASM32): New.
16887 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16888 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16889 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16890 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16891 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16892 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16893 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16894 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16895 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16896 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16897 (amd64_emit_void_call_2): New.
16898 (amd64_emit_ops): New.
16899 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16900 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16901 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16902 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16903 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16904 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16905 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16906 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16907 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16908 (i386_emit_stack_adjust, i386_emit_int_call_1)
16909 (i386_emit_void_call_2): New.
16910 (i386_emit_ops): New.
16911 (x86_emit_ops): New.
16912 (the_low_target): Install x86_emit_ops.
16913 * server.h (struct emit_ops): New.
16914 (get_raw_reg_func_addr): Declare.
16915 (current_insn_ptr, emit_error): Declare.
16916 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16917 (set_trace_state_variable_value): New defines.
16918 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16919 addr_get_trace_state_variable_value and
16920 addr_set_trace_state_variable_value.
16921 (symbol_list): New fields for get_raw_reg,
16922 get_trace_state_variable_value and set_trace_state_variable_value.
16923 (condfn): New typedef.
16924 (struct tracepoint): New field `compiled_cond'.
16925 (do_action_at_tracepoint): Clear compiled_cond.
16926 (get_trace_state_variable_value, set_trace_state_variable_value):
16927 Export in the IPA.
16928 (condition_true_at_tracepoint): If there's a compiled condition,
16929 run that.
16930 (current_insn_ptr, emit_error): New globals.
16931 (struct bytecode_address): New.
16932 (get_raw_reg_func_addr): New.
16933 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16934 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16935 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16936 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16937 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16938 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16939 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16940 (compile_tracepoint_condition, compile_bytecodes): New.
16941 * target.h (emit_ops): Forward declare.
16942 (struct target_ops): New field emit_ops.
16943 (target_emit_ops): New.
16944 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16945 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16946 * linux-low.c (linux_emit_ops): New.
16947 (linux_target_ops): Install it.
16948 * linux-low.h (struct linux_target_ops): New field emit_ops.
16949
16950 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16951
16952 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16953 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16954
16955 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16956 Stan Shebs <stan@codesourcery.com>
16957
16958 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16959 (all): Depend on $(extra_libraries).
16960 (install-only): Install the IPA.
16961 (IPA_OBJS, IPA_LIB): New.
16962 (clean): Remove the IPA lib.
16963 (IPAGENT_CFLAGS): New.
16964 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16965 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16966 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16967 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16968 * configure.ac: Check for atomic builtins support in the compiler.
16969 (IPA_DEPFILES, extra_libraries): Define.
16970 * configure.srv (ipa_obj): Add description.
16971 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16972 (i[34567]86-*-linux*): Set ipa_obj.
16973 (x86_64-*-linux*): Set ipa_obj.
16974 * linux-low.c (stabilizing_threads): New.
16975 (supports_fast_tracepoints): New.
16976 (linux_detach): Stabilize threads before detaching.
16977 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16978 the lwp is either not stabilizing, or is moving out of a jump pad.
16979 (linux_fast_tracepoint_collecting): New.
16980 (maybe_move_out_of_jump_pad): New.
16981 (enqueue_one_deferred_signal): New.
16982 (dequeue_one_deferred_signal): New.
16983 (linux_wait_for_event_1): If moving out of a jump pad, defer
16984 pending signals to later.
16985 (linux_stabilize_threads): New.
16986 (linux_wait_1): Check if threads need moving out of jump pads, and
16987 do it if so.
16988 (stuck_in_jump_pad_callback): New.
16989 (move_out_of_jump_pad_callback): New.
16990 (lwp_running): New.
16991 (linux_resume_one_lwp): Handle moving out of jump pads.
16992 (linux_set_resume_request): Dequeue deferred signals.
16993 (need_step_over_p): Also step over fast tracepoint jumps.
16994 (start_step_over): Also uninsert fast tracepoint jumps.
16995 (finish_step_over): Also reinsert fast tracepoint jumps.
16996 (linux_install_fast_tracepoint_jump): New.
16997 (linux_target_ops): Install linux_stabilize_threads and
16998 linux_install_fast_tracepoint_jump_pad.
16999 * linux-low.h (linux_target_ops) <get_thread_area,
17000 install_fast_tracepoint_jump_pad>: New fields.
17001 (struct lwp_info) <collecting_fast_tracepoint,
17002 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17003 (linux_get_thread_area): Declare.
17004 * linux-x86-low.c (jump_insn): New.
17005 (x86_get_thread_area): New.
17006 (append_insns): New.
17007 (push_opcode): New.
17008 (amd64_install_fast_tracepoint_jump_pad): New.
17009 (i386_install_fast_tracepoint_jump_pad): New.
17010 (x86_install_fast_tracepoint_jump_pad): New.
17011 (the_low_target): Install x86_get_thread_area and
17012 x86_install_fast_tracepoint_jump_pad.
17013 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17014 (struct fast_tracepoint_jump): New.
17015 (fast_tracepoint_jump_insn): New.
17016 (fast_tracepoint_jump_shadow): New.
17017 (find_fast_tracepoint_jump_at): New.
17018 (fast_tracepoint_jump_here): New.
17019 (delete_fast_tracepoint_jump): New.
17020 (set_fast_tracepoint_jump): New.
17021 (uninsert_fast_tracepoint_jumps_at): New.
17022 (reinsert_fast_tracepoint_jumps_at): New.
17023 (set_breakpoint_at): Use write_inferior_memory.
17024 (uninsert_raw_breakpoint): Use write_inferior_memory.
17025 (check_mem_read): Mask out fast tracepoint jumps.
17026 (check_mem_write): Mask out fast tracepoint jumps.
17027 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17028 (set_fast_tracepoint_jump): Declare.
17029 (delete_fast_tracepoint_jump)
17030 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17031 (reinsert_fast_tracepoint_jumps_at): Declare.
17032 * regcache.c: Don't compile many functions when building the
17033 in-process agent library.
17034 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17035 the register buffer in the heap.
17036 (free_register_cache): If the register buffer isn't owned by the
17037 regcache, don't free it.
17038 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17039 pre-existing register caches.
17040 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17041 type.
17042 (convert_ascii_to_int): : Constify `from' parameter type.
17043 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17044 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17045 the needed buffer in-place.
17046 (relocate_instruction): New.
17047 * server.c (handle_query) <qSymbols>: If the target supports
17048 tracepoints, give it a chance of looking up symbols. Report
17049 support for fast tracepoints.
17050 (handle_status): Stabilize threads.
17051 (process_serial_event): Adjust.
17052 * server.h (struct fast_tracepoint_jump): Forward declare.
17053 (struct process_info) <fast_tracepoint_jumps>: New field.
17054 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17055 (decode_X_packet, decode_M_packet): Adjust.
17056 (relocate_instruction): Declare.
17057 (in_process_agent_loaded): Declare.
17058 (tracepoint_look_up_symbols): Declare.
17059 (struct fast_tpoint_collect_status): Declare.
17060 (fast_tracepoint_collecting): Declare.
17061 (force_unlock_trace_buffer): Declare.
17062 (handle_tracepoint_bkpts): Declare.
17063 (initialize_low_tracepoint)
17064 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17065 * target.h (struct target_ops) <stabilize_threads,
17066 install_fast_tracepoint_jump_pad>: New fields.
17067 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17068 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17069 [HAVE_STDINT_H]: Include stdint.h.
17070 (trace_debug_1): Rename to ...
17071 (trace_vdebug): ... this.
17072 (trace_debug): Rename to ...
17073 (trace_debug_1): ... this. Add `level' parameter.
17074 (trace_debug): New.
17075 (ATTR_USED, ATTR_NOINLINE): New.
17076 (IP_AGENT_EXPORT): New.
17077 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17078 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17079 (about_to_request_buffer_space, trace_buffer_is_full)
17080 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17081 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17082 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17083 (traceframe_write_count, traceframes_created)
17084 (trace_state_variables)
17085 New renaming defines.
17086 (struct ipa_sym_addresses): New.
17087 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17088 (symbol_list): New.
17089 (ipa_sym_addrs): New.
17090 (all_tracepoint_symbols_looked_up): New.
17091 (in_process_agent_loaded): New.
17092 (write_e_ipa_not_loaded): New.
17093 (maybe_write_ipa_not_loaded): New.
17094 (tracepoint_look_up_symbols): New.
17095 (debug_threads) [IN_PROCESS_AGENT]: New.
17096 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17097 (UNKNOWN_SIDE_EFFECTS): New.
17098 (stop_tracing): New.
17099 (flush_trace_buffer): New.
17100 (stop_tracing_bkpt): New.
17101 (flush_trace_buffer_bkpt): New.
17102 (read_inferior_integer): New.
17103 (read_inferior_uinteger): New.
17104 (read_inferior_data_pointer): New.
17105 (write_inferior_data_pointer): New.
17106 (write_inferior_integer): New.
17107 (write_inferior_uinteger): New.
17108 (struct collect_static_trace_data_action): Delete.
17109 (enum tracepoint_type): New.
17110 (struct tracepoint) <type>: New field `type'.
17111 <actions_str, step_actions, step_actions_str>: Only include in
17112 GDBserver.
17113 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17114 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17115 (tracepoints): Use IP_AGENT_EXPORT.
17116 (last_tracepoint): Don't include in the IPA.
17117 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17118 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17119 (alloced_trace_state_variables): New.
17120 (trace_state_variables): Use IP_AGENT_EXPORT.
17121 (traceframe_t): Delete unused variable.
17122 (circular_trace_buffer): Don't include in the IPA.
17123 (trace_buffer_start): Delete.
17124 (struct trace_buffer_control): New.
17125 (trace_buffer_free): Delete.
17126 (struct ipa_trace_buffer_control): New.
17127 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17128 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17129 New.
17130 (trace_buffer_ctrl): New.
17131 (TRACE_BUFFER_CTRL_CURR): New.
17132 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17133 Reimplement as macros.
17134 (trace_buffer_wrap): Delete.
17135 (traceframe_write_count, traceframe_read_count)
17136 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17137 (struct tracepoint_hit_ctx) <type>: New field.
17138 (struct fast_tracepoint_ctx): New.
17139 (memory_barrier): New.
17140 (cmpxchg): New.
17141 (record_tracepoint_error): Update atomically in the IPA.
17142 (clear_inferior_trace_buffer): New.
17143 (about_to_request_buffer_space): New.
17144 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17145 updating the same buffer.
17146 (add_tracepoint): Default the tracepoint's type to trap
17147 tracepoint, and orig_size to -1.
17148 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17149 internal variables.
17150 (create_trace_state_variable): New parameter `gdb'. Handle it.
17151 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17152 (cmd_qtdp): Handle fast tracepoints.
17153 (cmd_qtdv): Adjust.
17154 (max_jump_pad_size): New.
17155 (gdb_jump_pad_head): New.
17156 (get_jump_space_head): New.
17157 (claim_jump_space): New.
17158 (sort_tracepoints): New.
17159 (MAX_JUMP_SIZE): New.
17160 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17161 IPA.
17162 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17163 support. Upload fast traceframes, and delete internal IPA
17164 breakpoints.
17165 (stop_tracing_handler): New.
17166 (flush_trace_buffer_handler): New.
17167 (cmd_qtstop): Upload fast tracepoints.
17168 (response_tracepoint): Handle fast tracepoints.
17169 (tracepoint_finished_step): Upload fast traceframes. Set the
17170 tracepoint hit context's tracepoint type.
17171 (handle_tracepoint_bkpts): New.
17172 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17173 type. Add comment about fast tracepoints.
17174 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17175 non-existing action_str field.
17176 (get_context_regcache): Handle fast tracepoints.
17177 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17178 to the regcache.
17179 (fast_tracepoint_from_jump_pad_address): New.
17180 (fast_tracepoint_from_ipa_tpoint_address): New.
17181 (collecting_t): New.
17182 (force_unlock_trace_buffer): New.
17183 (fast_tracepoint_collecting): New.
17184 (collecting): New.
17185 (gdb_collect): New.
17186 (write_inferior_data_ptr): New.
17187 (target_tp_heap): New.
17188 (target_malloc): New.
17189 (download_agent_expr): New.
17190 (UALIGN): New.
17191 (download_tracepoints): New.
17192 (download_trace_state_variables): New.
17193 (upload_fast_traceframes): New.
17194 (IPA_FIRST_TRACEFRAME): New.
17195 (IPA_NEXT_TRACEFRAME_1): New.
17196 (IPA_NEXT_TRACEFRAME): New.
17197 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17198 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17199 (gdb_jump_pad_buffer_end): New.
17200 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17201 (initialize_tracepoint): Adjust.
17202 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17203 buffer. Initialize the low module.
17204 * utils.c (PREFIX, TOOLNAME): New.
17205 (malloc_failure): Use PREFIX.
17206 (error): In the IPA, an error causes an exit.
17207 (fatal, warning): Use PREFIX.
17208 (internal_error): Use TOOLNAME.
17209 (NUMCELLS): Increase to 10.
17210 * configure, config.in: Regenerate.
17211
17212 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17213
17214 * server.c (handle_query) <qSupported>: Do two passes over the
17215 qSupported string to avoid nesting strtok.
17216
17217 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17218
17219 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17220 (CDEPS): New.
17221 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17222 -Wl,--dynamic-list.
17223 * configure: Regenerate.
17224 * proc-service.list: New.
17225
17226 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17227
17228 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17229 New comment.
17230
17231 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17232
17233 * gdbreplay.c (remote_open): Check error return from socket() call by
17234 its equality to -1 not by it being negative.
17235 * remote-utils.c (remote_open): Likewise.
17236
17237 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17238
17239 * config.h: Regenerate.
17240
17241 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17242
17243 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17244 doesn't provide PTRACE_GET_THREAD_AREA.
17245
17246 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17247
17248 * linux-m68k-low.c: Include <asm/ptrace.h>
17249 (ps_get_thread_area): Implement.
17250
17251 2010-05-03 Doug Evans <dje@google.com>
17252
17253 * event-loop.c (struct callback_event): New struct.
17254 (callback_list): New global.
17255 (append_callback_event, delete_callback_event): New functions.
17256 (process_callback): New function.
17257 (start_event_loop): Call it.
17258 * remote-utils.c (NOT_SCHEDULED): Define.
17259 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17260 moved out of readchar.
17261 (readchar): Rewrite. Call reschedule before returning.
17262 (reset_readchar): New function.
17263 (remote_close): Call it.
17264 (process_remaining, reschedule): New functions.
17265 * server.h (callback_handler_func): New typedef.
17266 (append_callback_event, delete_callback_event): Declare.
17267
17268 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17269
17270 * proc-service.c (ps_pglobal_lookup): Use
17271 thread_db_look_up_one_symbol.
17272 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17273 parameter. Use it instead of all_symbols_looked_up.
17274 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17275 field.
17276 (all_symbols_looked_up): Don't declare.
17277 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17278 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17279 field.
17280 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17281 Set all_symbols_looked_up here.
17282 (thread_db_look_up_one_symbol): New.
17283 (thread_db_get_tls_address): Adjust.
17284 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17285 thread_db object on the heap, and tentatively set it in the
17286 process structure.
17287 (thread_db_init): Don't set all_symbols_looked_up here.
17288 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17289
17290 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17291
17292 * linux-low.c (linux_kill, linux_detach): Adjust.
17293 (status_pending_p_callback): Remove redundant statement. Check
17294 for !TARGET_WAITIKIND_IGNORE, instead of
17295 TARGET_WAITKIND_STOPPED.
17296 (handle_tracepoints): Make sure LWP is locked. Adjust.
17297 (linux_wait_for_event_1): Adjust.
17298 (linux_cancel_breakpoints): New.
17299 (unsuspend_one_lwp): New.
17300 (unsuspend_all_lwps): New.
17301 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17302 (send_sigstop_callback): Change return type to int, add new
17303 `except' parameter and handle it.
17304 (suspend_and_send_sigstop_callback): New.
17305 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17306 pass them down. If SUSPEND, also increment the lwp's suspend
17307 count.
17308 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17309 (need_step_over_p): Don't consider suspended LWPs.
17310 (start_step_over): Adjust.
17311 (proceed_one_lwp): Change return type to int, add new `except'
17312 parameter and handle it.
17313 (unsuspend_and_proceed_one_lwp): New.
17314 (proceed_all_lwps): Use find_inferior instead of
17315 for_each_inferior.
17316 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17317 also decrement the suspend count of LWPs. Pass `except' down,
17318 instead of hacking its suspend count.
17319 (linux_pause_all): Add `freeze' parameter. Adjust.
17320 (linux_unpause_all): New.
17321 (linux_target_ops): Install linux_unpause_all.
17322 * server.c (handle_status): Adjust.
17323 * target.h (struct target_ops): New fields `unpause_all' and
17324 `cancel_breakpoints'. Add new parameter to `pause_all'.
17325 (pause_all): Add new `freeze' parameter.
17326 (unpause_all): New.
17327 (cancel_breakpoints): New.
17328 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17329 cancel breakpoints.
17330 (cmd_qtstart): Pause threads.
17331 (stop_tracing): Pause threads, and cancel breakpoints.
17332 * win32-low.c (win32_target_ops): Adjust.
17333
17334 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17335
17336 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17337 the inferior right away from here...
17338 (linux_wait_1): ... to here, and adjust to check the thread's
17339 last_resume_kind instead of the lwp's step or stop_expected flags.
17340
17341 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17342
17343 * README: Use consistent `GDB' and `GDBserver' spellings.
17344
17345 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17346
17347 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17348 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17349 (linux_detach_one_lwp): Assume the lwp is stopped.
17350 (any_thread_of): Delete.
17351 (linux_detach): Stop all lwps here. Don't blindly delete all
17352 breakpoints.
17353 (delete_lwp_callback): New.
17354 (linux_mourn): Delete all lwps of the process that is gone.
17355 (linux_wait_1): Don't delete the last lwp of the process here.
17356 * mem-break.h (mark_breakpoints_out): Declare.
17357 * mem-break.c (mark_breakpoints_out): New.
17358 (free_all_breakpoints): Use it.
17359 * server.c (handle_target_event): If the process is gone, mark
17360 breakpoints out.
17361 * thread-db.c (struct thread_db) <create_bp>: New field.
17362 (thread_db_enable_reporting): Fix prototype. Store a thread event
17363 breakpoint reference in the thread_db struct.
17364 (thread_db_load_search): Clear the thread_db object.
17365 (try_thread_db_load_1): Ditto.
17366 (switch_to_process): New.
17367 (disable_thread_event_reporting): Use it.
17368 (remove_thread_event_breakpoints): New.
17369 (thread_db_detach, thread_db_mourn): Use it.
17370
17371 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17372
17373 * linux-low.c (linux_enable_event_reporting): New.
17374 (linux_wait_for_event_1, handle_extended_wait): Use it.
17375
17376 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17377
17378 * linux-low.c (linux_kill_one_lwp, linux_kill)
17379 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17380 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17381 SIGSTOP even if the LWP is stopped.
17382 (send_sigstop_callback): New.
17383 (stop_all_lwps): Use send_sigstop_callback instead.
17384 (linux_resume_one_thread): Adjust.
17385 (proceed_one_lwp): Still proceed an LWP that the client has
17386 requested to stop, if we haven't reported it as stopped yet. Make
17387 sure that LWPs the client want stopped, have a pending SIGSTOP.
17388
17389 2010-04-26 Doug Evans <dje@google.com>
17390
17391 * server.c (handle_general_set): Make static.
17392
17393 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17394 Print received char after testing for error/eof instead of before.
17395 (input_interrupt): Tweak comment.
17396
17397 2010-04-23 Doug Evans <dje@google.com>
17398
17399 * server.c (start_inferior): Print inferior argv if --debug.
17400
17401 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17402
17403 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17404 * nto-x86-low.c: Include server.h
17405
17406 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17407
17408 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17409 be consistent with other sources of this directory.
17410 (init_registers_amd64): Correct name of source file of this function
17411 in the comment.
17412
17413 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17414
17415 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17416 64-bit executables.
17417
17418 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17419
17420 * win32-i386-low.c: Add 64-bit support.
17421 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17422 (init_registers_amd64): Declare.
17423 (mappings): Add 64-bit version of array.
17424 (init_windows_x86): New function.
17425 (the_low_target): Change init_arch field to init_windows_x86.
17426
17427 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17428
17429 * win32-low.c: Adapt to support also 64-bit architecture.
17430 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17431 (get_image_name): Use SIZE_T type for local variable `done'.
17432 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17433 (toolhelp_get_dll_name): Idem.
17434 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17435 Use uintptr_t typecast to avoid warning.
17436 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17437 (handle_exception): Use phex_nz to avoid warning.
17438 (win32_wait): Remove unused local variable `process'.
17439
17440 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17441
17442 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17443 `amd64-avx.o'.
17444
17445 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17446
17447 * configure.ac: Use `ws2_32' library for srv_mingw.
17448 * configure: Regenerate.
17449 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17450 * remote-utils.c: Likewise.
17451
17452 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17453
17454 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17455 if __x86_64__ is defined.
17456
17457 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17458
17459 * configure: Regenerate.
17460
17461 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17462
17463 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17464 * target.h (target_ops): New get_tib_address field.
17465 * win32-low.h (win32_thread_info): Add thread_local_base field.
17466 * win32-low.c (child_add_thread): Add tlb argument.
17467 Set thread_local_base field to TLB.
17468 (get_child_debug_event): Adapt to child_add_thread change.
17469 (win32_get_tib_address): New function.
17470 (win32_target_ops): Set get_tib_address field to
17471 win32_get_tib_address.
17472 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17473
17474 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17475
17476 * linux-low.c (linux_mourn): Also remove the process.
17477 * server.c (handle_target_event): Don't remove the process here.
17478 * nto-low.c (nto_mourn): New.
17479 (nto_target_ops): Install it.
17480 * spu-low.c (spu_mourn): New.
17481 (spu_target_ops): Install it.
17482 * win32-low.c (win32_mourn): New.
17483 (win32_target_ops): Install it.
17484
17485 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17486
17487 * server.h (buffer_xml_printf): Remove redundant `;'.
17488
17489 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17490
17491 * regcache.c (set_register_cache): Invalidate regcaches before
17492 changing the register cache layout.
17493 (regcache_invalidate_one): Allow a NULL regcache.
17494 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17495 regcaches before changing the register cache layout or the target
17496 regsets.
17497
17498 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17499
17500 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17501 variable warning on Linux/x86-64.
17502
17503 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17504
17505 GDBserver disconnected tracing support.
17506
17507 * linux-low.c (linux_remove_process): Delete.
17508 (add_lwp): Don't set last_resume_kind here.
17509 (linux_kill): Use `mourn'.
17510 (linux_detach): Use `thread_db_detach', and `mourn'.
17511 (linux_mourn): New.
17512 (linux_attach_lwp_1): Adjust comment.
17513 (linux_attach): last_resume_kind moved the thread_info; adjust.
17514 (status_pending_p_callback): Adjust.
17515 (linux_wait_for_event_1): Adjust.
17516 (count_events_callback, select_singlestep_lwp_callback)
17517 (select_event_lwp_callback, cancel_breakpoints_callback)
17518 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17519 (proceed_one_lwp): Adjust.
17520 (linux_async): Add debug output.
17521 (linux_thread_stopped): New.
17522 (linux_pause_all): New.
17523 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17524 linux_pause_all.
17525 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17526 (thread_db_free): Delete declaration.
17527 (thread_db_detach, thread_db_mourn): Declare.
17528 * thread-db.c (thread_db_init): Use thread_db_mourn.
17529 (thread_db_free): Delete, split in two.
17530 (disable_thread_event_reporting): New.
17531 (thread_db_detach): New.
17532 (thread_db_mourn): New.
17533
17534 * server.h (struct thread_info) <last_resume_kind>: New field.
17535 <attached>: Add comment.
17536 <gdb_detached>: New field.
17537 (handler_func): Change return type to int.
17538 (handle_serial_event, handle_target_event): Ditto.
17539 (gdb_connected): Declare.
17540 (tracing): Delete.
17541 (disconnected_tracing): Declare.
17542 (stop_tracing): Declare.
17543
17544 * server.c (handle_query) <qSupported>: Report support for
17545 disconnected tracing.
17546 (queue_stop_reply_callback): Account for running threads.
17547 (gdb_wants_thread_stopped): New.
17548 (gdb_wants_all_threads_stopped): New.
17549 (gdb_reattached_process): New.
17550 (handle_status): Clear the `gdb_detached' flag of all processes.
17551 In all-stop, stop all threads.
17552 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17553 (process_serial_event): If the remote connection breaks, or if an
17554 exit was forced with "monitor exit", force an event loop exit.
17555 Handle disconnected tracing on detach.
17556 (handle_serial_event): Adjust.
17557 (handle_target_event): If GDB isn't connected, forward events back
17558 to the inferior, unless the last process exited, in which case,
17559 exit gdbserver. Adjust interface.
17560
17561 * remote-utils.c (remote_open): Don't block in accept. Instead
17562 register an event loop source on the listen socket file
17563 descriptor. Refactor bits into ...
17564 (listen_desc): ... this new global.
17565 (gdb_connected): ... this new function.
17566 (enable_async_notification): ... this new function.
17567 (handle_accept_event): ... this new function.
17568 (remote_close): Clear remote_desc.
17569
17570 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17571
17572 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17573 New fields.
17574 (mourn_inferior): Define.
17575 (target_process_qsupported): Avoid the dangling else problem.
17576 (thread_stopped): Define.
17577 (pause_all): Define.
17578 (target_waitstatus_to_string): Declare.
17579 * target.c (target_waitstatus_to_string): New.
17580
17581 * tracepoint.c (tracing): Make extern.
17582 (disconnected_tracing): New.
17583 (stop_tracing): Make extern. Handle tracing stops due to GDB
17584 disconnecting.
17585 (cmd_qtdisconnected): New.
17586 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17587 (handle_tracepoint_general_set): Handle QTDisconnected.
17588
17589 * event-loop.c (event_handler_func): Change return type to int.
17590 (process_event): Bail out if the event handler wants the event
17591 loop to stop.
17592 (handle_file_event): Ditto.
17593 (start_event_loop): Bail out if the event handler wants the event
17594 loop to stop.
17595
17596 * nto-low.c (nto_target_ops): Adjust.
17597 * spu-low.c (spu_wait): Don't remove the process here.
17598 (spu_target_ops): Adjust.
17599 * win32-low.c (win32_wait): Don't remove the process here.
17600 (win32_target_ops): Adjust.
17601
17602 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17603
17604 * regcache.c (realloc_register_cache): Invalidate inferior's
17605 regcache before recreating it.
17606
17607 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17608
17609 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17610
17611 2010-04-09 Stan Shebs <stan@codesourcery.com>
17612 Pedro Alves <pedro@codesourcery.com>
17613
17614 * server.h (LONGEST): New.
17615 (struct thread_info) <while_stepping>: New field.
17616 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17617 Declare.
17618 (initialize_tracepoint, handle_tracepoint_general_set)
17619 (handle_tracepoint_query, tracepoint_finished_step)
17620 (tracepoint_was_hit, release_while_stepping_state_list):
17621 (current_traceframe): Declare.
17622 * server.c (handle_general_set): Handle tracepoint packets.
17623 (read_memory): New.
17624 (write_memory): New.
17625 (handle_search_memory_1): Use read_memory.
17626 (handle_query): Report support for conditional tracepoints, trace
17627 state variables, and tracepoint sources. Handle tracepoint
17628 queries.
17629 (main): Initialize the tracepoints module.
17630 (process_serial_event): Handle traceframe reads/writes.
17631
17632 * linux-low.c (handle_tracepoints): New.
17633 (linux_wait_1): Call it.
17634 (linux_resume_one_lwp): Handle while-stepping.
17635 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17636 (linux_target_ops): Install them.
17637 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17638 New field.
17639 * linux-x86-low.c (x86_supports_tracepoints): New.
17640 (the_low_target). Install it.
17641
17642 * mem-break.h (delete_breakpoint): Declare.
17643 * mem-break.c (delete_breakpoint): Make external.
17644
17645 * target.h (struct target_ops): Add `supports_tracepoints',
17646 `read_pc', and `write_pc' fields.
17647 (target_supports_tracepoints): Define.
17648 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17649 (phex_nz): New.
17650
17651 * regcache.h (struct regcache) <registers_owned>: New field.
17652 (init_register_cache, regcache_cpy): Declare.
17653 (regcache_read_pc, regcache_write_pc): Declare.
17654 (register_cache_size): Declare.
17655 (supply_regblock): Declare.
17656 * regcache.c (init_register_cache): New.
17657 (new_register_cache): Use it.
17658 (regcache_cpy): New.
17659 (register_cache_size): New.
17660 (supply_regblock): New.
17661 (regcache_read_pc, regcache_write_pc): New.
17662
17663 * tracepoint.c: New.
17664
17665 * Makefile.in (OBS): Add tracepoint.o.
17666 (tracepoint.o): New rule.
17667
17668 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17669
17670 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17671 (i386-mmx.o): New.
17672 (i386-mmx.c): Likewise.
17673 (i386-mmx-linux.o): Likewise.
17674 (i386-mmx-linux.c): Likewise.
17675
17676 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17677 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17678 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17679 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17680
17681 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17682 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17683 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17684
17685 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17686
17687 * Makefile.in (clean): Updated.
17688 (i386-avx.o): New.
17689 (i386-avx.c): Likewise.
17690 (i386-avx-linux.o): Likewise.
17691 (i386-avx-linux.c): Likewise.
17692 (amd64-avx.o): Likewise.
17693 (amd64-avx.c): Likewise.
17694 (amd64-avx-linux.o): Likewise.
17695 (amd64-avx-linux.c): Likewise.
17696
17697 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17698 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17699 (srv_amd64_regobj): Add amd64-avx.o.
17700 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17701 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17702 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17703 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17704 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17705 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17706 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17707
17708 * i387-fp.c: Include "i386-xstate.h".
17709 (i387_xsave): New.
17710 (i387_cache_to_xsave): Likewise.
17711 (i387_xsave_to_cache): Likewise.
17712 (x86_xcr0): Likewise.
17713
17714 * i387-fp.h (i387_cache_to_xsave): Likewise.
17715 (i387_xsave_to_cache): Likewise.
17716 (x86_xcr0): Likewise.
17717
17718 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17719 * linux-crisv32-low.c (target_regsets): Likewise.
17720 * linux-m68k-low.c (target_regsets): Likewise.
17721 * linux-mips-low.c (target_regsets): Likewise.
17722 * linux-ppc-low.c (target_regsets): Likewise.
17723 * linux-s390-low.c (target_regsets): Likewise.
17724 * linux-sh-low.c (target_regsets): Likewise.
17725 * linux-sparc-low.c (target_regsets): Likewise.
17726 * linux-xtensa-low.c (target_regsets): Likewise.
17727
17728 * linux-low.c: Include <sys/uio.h>.
17729 (regsets_fetch_inferior_registers): Support nt_type.
17730 (regsets_store_inferior_registers): Likewise.
17731 (linux_process_qsupported): New.
17732 (linux_target_ops): Add linux_process_qsupported.
17733
17734 * linux-low.h (regset_info): Add nt_type.
17735 (linux_target_ops): Add process_qsupported.
17736
17737 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17738 and <sys/uio.h>.
17739 (init_registers_i386_avx_linux): New.
17740 (init_registers_amd64_avx_linux): Likewise.
17741 (xmltarget_i386_linux_no_xml): Likewise.
17742 (xmltarget_amd64_linux_no_xml): Likewise.
17743 (PTRACE_GETREGSET): Likewise.
17744 (PTRACE_SETREGSET): Likewise.
17745 (x86_fill_xstateregset): Likewise.
17746 (x86_store_xstateregset): Likewise.
17747 (use_xml): Likewise.
17748 (x86_linux_update_xmltarget): Likewise.
17749 (x86_linux_process_qsupported): Likewise.
17750 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17751 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17752 init_registers_i386_linux here. Call
17753 x86_linux_update_xmltarget.
17754 (the_low_target): Add x86_linux_process_qsupported.
17755
17756 * server.c (handle_query): Call target_process_qsupported.
17757
17758 * target.h (target_ops): Add process_qsupported.
17759 (target_process_qsupported): New.
17760
17761 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17762
17763 * inferiors.c (add_thread): Set last_status kind to
17764 TARGET_WAITKIND_IGNORE.
17765 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17766 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17767 (linux_wait_1): Move `thread' local definition to block that uses
17768 it. Don't NULL initialize `event_child'.
17769 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17770 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17771 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17772
17773 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17774
17775 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17776 an extended waitstatus, or by a watchpoint.
17777 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17778 thread was stepping or has been stopped by a watchpoint.
17779
17780 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17781
17782 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17783 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17784 of another, then delete the previous, and validate all
17785 breakpoints.
17786 (validate_inserted_breakpoint): New.
17787 (delete_disabled_breakpoints): New.
17788 (validate_breakpoints): New.
17789 (check_mem_read): Validate breakpoints before trusting their
17790 shadow. Delete disabled breakpoints.
17791 (check_mem_write): Validate breakpoints before trusting they
17792 should be inserted. Delete disabled breakpoints.
17793 * mem-break.h (validate_breakpoints):
17794 * server.c (handle_query): Validate breakpoints when we see a
17795 qSymbol query.
17796
17797 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17798
17799 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17800 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17801 if we could tell there's a GDB breakpoint at stop_pc.
17802 (need_step_over_p): Don't do a step over if we find a GDB
17803 breakpoint at the resume PC.
17804
17805 * mem-break.c (struct raw_breakpoint): New.
17806 (enum bkpt_type): New type `gdb_breakpoint'.
17807 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17808 fields. New field `raw'.
17809 (find_raw_breakpoint_at): New.
17810 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17811 breakpoint instead.
17812 (set_breakpoint_at): Adjust.
17813 (delete_raw_breakpoint): New.
17814 (release_breakpoint): New.
17815 (delete_breakpoint): Rename to...
17816 (delete_breakpoint_1): ... this. Add proc parameter. Use
17817 release_breakpoint. Return ENOENT.
17818 (delete_breakpoint): Reimplement.
17819 (find_breakpoint_at): Delete.
17820 (find_gdb_breakpoint_at): New.
17821 (delete_breakpoint_at): Delete.
17822 (set_gdb_breakpoint_at): New.
17823 (delete_gdb_breakpoint_at): New.
17824 (gdb_breakpoint_here): New.
17825 (set_reinsert_breakpoint): Use release_breakpoint.
17826 (uninsert_breakpoint): Rename to ...
17827 (uninsert_raw_breakpoint): ... this.
17828 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17829 (reinsert_raw_breakpoint): Change parameter type to
17830 raw_breakpoint.
17831 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17832 instead.
17833 (check_breakpoints): Adjust. Use release_breakpoint.
17834 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17835 (breakpoint_inserted_here): Ditto.
17836 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17837 Don't trust the breakpoint's shadow if it is not inserted.
17838 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17839 (delete_all_breakpoints): Adjust.
17840 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17841 use delete_breakpoint_1.
17842
17843 * mem-break.h (breakpoints_supported): Delete declaration.
17844 (set_gdb_breakpoint_at): Declare.
17845 (gdb_breakpoint_here): Declare.
17846 (delete_breakpoint_at): Delete.
17847 (delete_gdb_breakpoint_at): Declare.
17848
17849 * server.h (struct raw_breakpoint): Forward declare.
17850 (struct process_info): New field `raw_breakpoints'.
17851
17852 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17853 breakpoints.
17854
17855 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17856
17857 * linux-low.c (status_pending_p_callback): Fix comment.
17858 (linux_wait_for_event_1): Move most of the internal breakpoint
17859 handling from here...
17860 (linux_wait_1): ... to here.
17861 (count_events_callback): New.
17862 (select_singlestep_lwp_callback): New.
17863 (select_event_lwp_callback): New.
17864 (cancel_breakpoints_callback): New.
17865 (select_event_lwp): New.
17866 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17867 priority to all LWPs that have had events that should be reported
17868 to the client. Cancel breakpoints when about to reporting the
17869 event to the client, not while stopping lwps. No longer cancel
17870 finished single-steps here.
17871 (cancel_finished_single_step): Delete.
17872 (cancel_finished_single_steps): Delete.
17873
17874 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17875
17876 * mem-break.c (enum bkpt_type): New.
17877 (struct breakpoint): New field `type'.
17878 (set_breakpoint_at): Change return type to struct breakpoint
17879 pointer. Set type to `other_breakpoint' by default.
17880 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17881 in the breakpoint list.
17882 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17883 (reinsert_breakpoint): Rename to ...
17884 (reinsert_raw_breakpoint): ... this.
17885 (reinsert_breakpoints_at): Adjust.
17886 * mem-break.h (struct breakpoint): Declare.
17887 (set_breakpoint_at): Change return type to struct breakpoint
17888 pointer.
17889
17890 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17891
17892 * server.c (handle_query): Assign, not compare.
17893
17894 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17895
17896 Teach linux gdbserver to step-over-breakpoints.
17897
17898 * linux-low.c (can_hardware_single_step): New.
17899 (supports_breakpoints): New.
17900 (handle_extended_wait): If stopping threads, read the stop pc of
17901 the new cloned LWP.
17902 (get_pc): New.
17903 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17904 low target doesn't support retrieving the PC.
17905 (add_lwp): Set last_resume_kind to resume_continue.
17906 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17907 (linux_attach): Don't clear stop_expected. Set the lwp's
17908 last_resume_kind to resume_stop.
17909 (linux_detach_one_lwp): Don't check for removed breakpoints.
17910 (check_removed_breakpoint): Delete.
17911 (status_pending_p): Rename to ...
17912 (status_pending_p_callback): ... this. Don't check for removed
17913 breakpoints. Don't consider threads that are stopped from GDB's
17914 perspective.
17915 (linux_wait_for_lwp): Always read the stop_pc here.
17916 (cancel_breakpoint): New.
17917 (step_over_bkpt): New global.
17918 (linux_wait_for_event_1): Implement stepping over breakpoints.
17919 (gdb_wants_lwp_stopped): New.
17920 (gdb_wants_all_stopped): New.
17921 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17922 single-step traps here. Store the thread's last reported target
17923 wait status.
17924 (send_sigstop): Don't clear stop_expected. Always set it,
17925 instead.
17926 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17927 (cancel_finished_single_step): New.
17928 (cancel_finished_single_steps): New.
17929 (wait_for_sigstop): Don't cancel finished single-step traps here.
17930 (linux_resume_one_lwp): Don't check for removed breakpoints.
17931 Don't set `step' on non-hardware step archs.
17932 (linux_set_resume_request): Ignore resume_stop requests if already
17933 stopping or stopped. Set the lwp's last_resume_kind.
17934 (resume_status_pending_p): Don't check for removed breakpoints.
17935 (need_step_over_p): New.
17936 (start_step_over): New.
17937 (finish_step_over): New.
17938 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17939 requests. Clear the thread's last reported target waitstatus.
17940 Don't use the `suspended' flag. Don't consider pending breakpoints.
17941 (linux_resume): Start a step-over if necessary.
17942 (proceed_one_lwp): New.
17943 (proceed_all_lwps): New.
17944 (unstop_all_lwps): New.
17945 * linux-low.h (struct lwp_info): Rewrite comment for the
17946 `suspended' flag. Add the `stop_pc' field. Delete the
17947 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17948 Add `'last_resume_kind' and `need_step_over' fields.
17949 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17950 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17951 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17952 (set_raw_breakpoint_at): New.
17953 (set_breakpoint_at): Rewrite to use it.
17954 (reinsert_breakpoint_handler): Delete.
17955 (set_reinsert_breakpoint): New.
17956 (reinsert_breakpoint_by_bp): Delete.
17957 (delete_reinsert_breakpoints): New.
17958 (uninsert_breakpoint): Rewrite.
17959 (uninsert_breakpoints_at): New.
17960 (reinsert_breakpoint): Rewrite.
17961 (reinsert_breakpoints_at): New.
17962 (check_breakpoints): Rewrite.
17963 (breakpoint_here): New.
17964 (breakpoint_inserted_here): New.
17965 (check_mem_read): Adjust.
17966 * mem-break.h (breakpoints_supported, breakpoint_here)
17967 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17968 (reinsert_breakpoint_by_bp): Delete declaration.
17969 (delete_reinsert_breakpoints): Declare.
17970 (reinsert_breakpoint): Delete declaration.
17971 (reinsert_breakpoints_at): Declare.
17972 (uninsert_breakpoint): Delete declaration.
17973 (uninsert_breakpoints_at): Declare.
17974 (check_breakpoints): Adjust prototype.
17975 * server.h: Adjust include order.
17976 (struct thread_info): Declare here. Add a `last_status' field.
17977
17978 2010-03-23 Michael Snyder <msnyder@vmware.com>
17979
17980 * server.c (crc32): New function.
17981 (handle_query): Add handling for 'qCRC:' request.
17982
17983 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17984
17985 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17986 lwp had been stopped by a watchpoint.
17987
17988 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17989
17990 * server.h (internal_error): Declare.
17991 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17992 * utils.c (internal_error): New function.
17993
17994 2010-03-15 Andreas Schwab <schwab@redhat.com>
17995
17996 * configure.srv: Fix typo setting srv_regobj.
17997
17998 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17999
18000 * linux-low.c (fetch_register): Avoid passing a non string literal
18001 format to `error'.
18002 (usr_store_inferior_registers): Ditto.
18003
18004 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18005
18006 * linux-low.c (linux_write_memory): Bail out early if peeking
18007 memory failed.
18008
18009 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18010
18011 * linux-low.h (struct lwp_info): New fields
18012 `stopped_by_watchpoint' and `stopped_data_address'.
18013 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18014 here, and cache them in the lwp object.
18015 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18016 directly.
18017 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18018 field.
18019 (linux_stopped_by_watchpoint): Rewrite.
18020 (linux_stopped_data_address): Rewrite.
18021
18022 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18023
18024 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18025 switching the current inferior, not before.
18026
18027 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18028
18029 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18030 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18031 i386-linux.c and amd64-linux.c.
18032 (reg-i386.o): Removed.
18033 (reg-i386.c): Likewise.
18034 (reg-i386-linux.o): Likewise.
18035 (reg-i386-linux.c): Likewise.
18036 (reg-x86-64.o): Likewise.
18037 (reg-x86-64.c): Likewise.
18038 (reg-x86-64-linux.o): Likewise.
18039 (reg-x86-64-linux.c): Likewise.
18040 (i386.o): New.
18041 (i386.c): Likewise.
18042 (i386-linux.o): Likewise.
18043 (i386-linux.c): Likewise.
18044 (amd64.o): Likewise.
18045 (amd64.c): Likewise.
18046 (amd64-linux.o): Likewise.
18047 (amd64-linux.c): Likewise.
18048
18049 * configure.srv (srv_i386_regobj): New.
18050 (srv_i386_linux_regobj): Likewise.
18051 (srv_amd64_regobj): Likewise.
18052 (srv_amd64_linux_regobj): Likewise.
18053 (srv_i386_32bit_xmlfiles): Likewise.
18054 (srv_i386_64bit_xmlfiles): Likewise.
18055 (srv_i386_xmlfiles): Likewise.
18056 (srv_amd64_xmlfiles): Likewise.
18057 (srv_i386_linux_xmlfiles): Likewise.
18058 (srv_amd64_linux_xmlfiles): Likewise.
18059 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18060 srv_xmlfiles to $srv_i386_xmlfiles.
18061 (i[34567]86-*-mingw32ce*): Likewise.
18062 (i[34567]86-*-mingw*): Likewise.
18063 (i[34567]86-*-nto*): Likewise.
18064 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18065 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18066 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18067 (x86_64-*-linux*): Likewise.
18068
18069 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18070 (init_registers_amd64_linux): New.
18071 (x86_arch_setup): Replace init_registers_x86_64_linux with
18072 init_registers_amd64_linux.
18073
18074 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18075
18076 * configure.ac: Check for libdl. If it is not available link against
18077 static libthread_db.
18078 * configure: Regenerate.
18079
18080 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18081
18082 PR9605
18083
18084 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18085 handing a read watchpoint.
18086 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18087
18088 2010-02-12 Doug Evans <dje@google.com>
18089
18090 * linux-low.c (linux_supports_tracefork_flag): Document.
18091 (linux_look_up_symbols): Add comment.
18092
18093 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18094
18095 * regcache.c (supply_register): Clear regcache if buf is NULL.
18096
18097 2010-02-02 Nicolas Roche <roche@sourceware.org>
18098 Joel Brobecker <brobecker@adacore.com>
18099
18100 * inferiors.c (find_inferior): Add function documentation.
18101 (unloaded_dll): Handle the case where the unloaded dll has not
18102 been previously registered in the dll list.
18103
18104 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18105
18106 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18107 (thumb2_breakpoint): New.
18108 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18109
18110 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18111
18112 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18113 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18114 breakpoints.
18115
18116 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18117
18118 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18119
18120 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18121
18122 * linux-s390-low.c (s390_collect_ptrace_register)
18123 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18124
18125 2010-01-21 Doug Evans <dje@google.com>
18126
18127 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18128 (PTRACE_ARG4_TYPE): New macro.
18129 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18130 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18131 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18132 (usr_store_inferior_registers): Ditto.
18133 (linux_read_memory, linux_write_memory): Ditto.
18134 (linux_test_for_tracefork): Ditto.
18135
18136 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18137 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18138
18139 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18140
18141 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18142 target.
18143
18144 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18145
18146 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18147 prototype to take a regcache. Adjust.
18148
18149 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18150
18151 * regcache.h (struct thread_info): Forward declare.
18152 (struct regcache): New.
18153 (new_register_cache): Adjust prototype.
18154 (get_thread_regcache): Declare.
18155 (free_register_cache): Adjust prototype.
18156 (registers_to_string, registers_from_string): Ditto.
18157 (supply_register, supply_register_by_name, collect_register)
18158 (collect_register_as_string, collect_register_by_name): Ditto.
18159 * regcache.c (struct inferior_regcache_data): Delete.
18160 (get_regcache): Rename to ...
18161 (get_thread_regcache): ... this. Adjust. Switch inferior before
18162 fetching registers.
18163 (regcache_invalidate_one): Adjust.
18164 (regcache_invalidate): Fix prototype.
18165 (new_register_cache): Return the new register cache.
18166 (free_register_cache): Change prototype.
18167 (realloc_register_cache): Adjust.
18168 (registers_to_string): Change prototype to take a regcache. Adjust.
18169 (registers_from_string): Ditto.
18170 (register_data): Ditto.
18171 (supply_register): Ditto.
18172 (supply_register_by_name): Ditto.
18173 (collect_register): Ditto.
18174 (collect_register_as_string): Ditto.
18175 (collect_register_by_name): Ditto.
18176 * server.c (process_serial_event): Adjust.
18177 * linux-low.h (regset_fill_func, regset_store_func): Change
18178 prototype.
18179 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18180 Change prototype.
18181 * linux-low.c (get_stop_pc): Adjust.
18182 (check_removed_breakpoint): Adjust.
18183 (linux_wait_for_event): Adjust.
18184 (linux_resume_one_lwp): Adjust.
18185 (fetch_register): Add regcache parameter. Adjust.
18186 (usr_store_inferior_registers): Ditto.
18187 (regsets_fetch_inferior_registers): Ditto.
18188 (regsets_store_inferior_registers): Ditto.
18189 (linux_fetch_registers, linux_store_registers): Ditto.
18190 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18191 regcache. Adjust.
18192 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18193 Ditto.
18194 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18195 prototype to take a regcache.
18196 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18197 * remote-utils.c (convert_ascii_to_int, outreg)
18198 (prepare_resume_reply): Change prototype to take a regcache.
18199 Adjust.
18200 * target.h (struct target_ops) <fetch_registers, store_registers>:
18201 Change prototype to take a regcache.
18202 (fetch_inferior_registers, store_inferior_registers): Change
18203 prototype to take a regcache. Adjust.
18204 * proc-service.c (ps_lgetregs): Adjust.
18205 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18206 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18207 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18208 take a regcache. Adjust.
18209 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18210 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18211 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18212 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18213 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18214 (cris_cannot_fetch_register):
18215 (cris_breakpoint_at): Change prototype to take a regcache.
18216 Adjust.
18217 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18218 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18219 to take a regcache. Adjust.
18220 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18221 Adjust.
18222 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18223 take a regcache. Adjust.
18224 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18225 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18226 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18227 * linux-mips-low.c (mips_get_pc):
18228 (mips_set_pc): Change prototype to take a regcache. Adjust.
18229 (mips_reinsert_addr): Adjust.
18230 (mips_collect_register): Change prototype to take a regcache.
18231 Adjust.
18232 (mips_supply_register):
18233 (mips_collect_register_32bit, mips_supply_register_32bit)
18234 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18235 (mips_store_fpregset): Ditto.
18236 * linux-ppc-low.c (ppc_supply_ptrace_register)
18237 (ppc_supply_ptrace_register): Ditto.
18238 (parse_spufs_run): Adjust.
18239 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18240 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18241 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18242 take a regcache. Adjust.
18243 * linux-s390-low.c (s390_collect_ptrace_register)
18244 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18245 (s390_set_pc): Change prototype to take a regcache. Adjust.
18246 (s390_arch_setup): Adjust.
18247 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18248 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18249 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18250 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18251 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18252 regcache. Adjust.
18253 (sparc_breakpoint_at): Adjust.
18254 * linux-xtensa-low.c (xtensa_fill_gregset):
18255 (xtensa_store_gregset):
18256 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18257 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18258 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18259 prototype to take a regcache. Adjust.
18260 * win32-arm-low.c (arm_fetch_inferior_register)
18261 (arm_store_inferior_register): Change prototype to take a
18262 regcache. Adjust.
18263 * win32-i386-low.c (i386_fetch_inferior_register)
18264 (i386_store_inferior_register): Change prototype to take a
18265 regcache. Adjust.
18266 * win32-low.c (child_fetch_inferior_registers)
18267 (child_store_inferior_registers): Change prototype to take a
18268 regcache. Adjust.
18269 (win32_wait): Adjust.
18270 (win32_fetch_inferior_registers): Change prototype to take a
18271 regcache. Adjust.
18272 (win32_store_inferior_registers): Adjust.
18273 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18274 store_inferior_register>: Change prototype to take a regcache.
18275
18276 2010-01-20 Doug Evans <dje@google.com>
18277
18278 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18279 #ifdef.
18280 (linux_wait_for_event1, linux_init_signals): Ditto.
18281 (W_STOPCODE): Provide definition if missing.
18282
18283 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18284
18285 * linux-low.c (linux_core_of_thread): New.
18286 (compare_ints, show_process, list_threads): New.
18287 (linux_qxfer_osdata): Report threads and cores.
18288 (linux_target_op): Register linux_core_of_thread.
18289 * remote-utils.c (prepare_resume_reply): Report the core.
18290 (buffer_xml_printf): Support %d specifier.
18291 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18292 New.
18293 (handle_query): Handle qXfer:threads. Announce availability
18294 thereof.
18295 * target.h (struct target_ops): New field core_of_thread.
18296
18297 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18298
18299 * Makefile.in (clean): Remove new generated files.
18300 (reg-s390.o, reg-s390.c): Remove rules.
18301 (reg-s390x.o, reg-s390x.c): Likewise.
18302 (s390-linux32.o, s390-linux32.c): Add rules.
18303 (s390-linux64.o, s390-linux64.c): Likewise.
18304 (s390x-linux64.o, s390x-linux64.c): Likewise.
18305 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18306 * linux-s390-low.c: Include <elf.h>.
18307 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18308 (init_registers_s390): Remove prototype.
18309 (init_registers_s390x): Likewise.
18310 (init_registers_s390_linux32): Add prototype.
18311 (init_registers_s390_linux64): Likewise.
18312 (init_registers_s390x_linux64): Likewise.
18313 (s390_num_regs_3264): New define.
18314 (s390_regmap_3264): New global variable.
18315 (s390_cannot_fetch_register): Remove obsolete check.
18316 (s390_cannot_store_register): Likewise.
18317 (s390_collect_ptrace_register): Handle upper/lower register halves.
18318 (s390_supply_ptrace_register): Likewise.
18319 (s390_fill_gregset): Update to register number changes.
18320 (s390_get_hwcap): New routine.
18321 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18322 Install appropriate regmap and register set.
18323
18324 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18325
18326 * server.c (gdbserver_version): Update copyright year to 2010.
18327 * gdbreplay.c (gdbreplay_version): Likewise.
18328
18329 2009-12-28 Doug Evans <dje@google.com>
18330
18331 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18332 elf/external.h. Include <elf.h> instead but only if necessary.
18333
18334 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18335
18336 * linux-low.c (linux_remove_process): Remove `detaching'
18337 parameter. Don't release/detach from thread_db here.
18338 (linux_kill): Release/detach from thread_db here, ...
18339 (linux_detach): ... and here, before actually detaching.
18340 (linux_wait_1): ... and here, when a process exits.
18341 * thread-db.c (any_thread_of): New.
18342 (thread_db_free): Switch the current inferior to a thread of the
18343 passed in process.
18344
18345 2009-12-21 Doug Evans <dje@google.com>
18346
18347 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18348
18349 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18350 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18351 warning ifndef __NR_tkill. Move setting of errno there too.
18352 Delete unnecessary resetting of errno after syscall.
18353 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18354
18355 * configure.ac: Check for dladdr.
18356 * config.in: Regenerate.
18357 * configure: Regenerate.
18358 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18359 (try_thread_db_load): Update.
18360
18361 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18362
18363 2009-12-18 Doug Evans <dje@google.com>
18364
18365 * event-loop.c: Include unistd.h if it exists.
18366
18367 * linux-low.c (my_waitpid): Move definition away from being in
18368 between linux_tracefork_child/linux_test_for_tracefork.
18369
18370 * gdb_proc_service.h (psaddr_t): Fix type.
18371 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18372 signature to match glibc.
18373
18374 2009-12-16 Doug Evans <dje@google.com>
18375
18376 * linux-low.c (linux_read_memory): Fix argument to read.
18377
18378 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18379
18380 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18381 events, don't leave current_inferior pointing at null.
18382
18383 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18384
18385 * win32-low.c (LOG): Delete.
18386 (OUTMSG): Output to stderr.
18387 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18388 on compile time LOG macro.
18389 (win32_wait): Fix debug output.
18390
18391 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18392
18393 * win32-low.c (win32_add_one_solib): If the dll name is
18394 "ntdll.dll", prepend the system directory to the dll path.
18395
18396 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18397
18398 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18399
18400 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18401 Vladimir Prus <vladimir@codesourcery.com>
18402
18403 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18404 * configure.ac: Check for __mcoldfire__ and set
18405 gdb_cv_m68k_is_coldfire.
18406 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18407 reg-cf.o and reg-m68k.o.
18408 * configure: Regenerated.
18409
18410 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18411
18412 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18413 Pass it to thread_db_free.
18414 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18415 proper `detaching' argument to linux_remove_process.
18416 * linux-low.h (thread_db_free): Add `detaching' parameter.
18417 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18418 to thread_db_free.
18419 (thread_db_free): Add `detaching' parameter. Only
18420 call td_ta_clear_event if detaching from process.
18421
18422 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18423
18424 * thread-db.c (thread_db_free): Fix typo.
18425
18426 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18427
18428 PR gdb/10838
18429 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18430
18431 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18432
18433 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18434 with an i686 compiler.
18435 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18436 needed.
18437 * configure: Rebuilt.
18438
18439 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18440
18441 PR gdb/10783
18442
18443 * server.c (handle_search_memory_1): Correct read_addr initialization
18444 in loop for searching subsequent chunks.
18445
18446 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18447
18448 * configure.ac: New --with-libthread-db option.
18449 * thread-db.c: Allow direct dependence on libthread_db.
18450 (thread_db_free): Adjust.
18451 * config.in: Regenerate.
18452 * configure: Likewise.
18453
18454 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18455
18456 PR gdb/10757
18457 * thread-db.c (attach_thread): New function.
18458 (maybe_attach_thread): Return success/failure.
18459 (find_new_threads_callback): Adjust.
18460 (thread_db_find_new_threads): Loop until no new threads.
18461
18462 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18463
18464 * proc-service.c (ps_lgetregs): Formatting.
18465
18466 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18467
18468 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18469 * configure.ac: Adjust.
18470 * linux-low.h (struct process_info_private): Move members to struct
18471 thread_db.
18472 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18473 * linux-low.c (linux_remove_process): Adjust.
18474 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18475 * server.c (handle_query): Move code ...
18476 (handle_monitor_command): ... here. New function.
18477 * target.h (struct target_ops): New member.
18478 * thread-db.c (struct thread_db): New.
18479 (libthread_db_search_path): New variable.
18480 (thread_db_create_event, thread_db_enable_reporting)
18481 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18482 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18483 (try_thread_db_load_1, dladdr_to_soname): New functions.
18484 (try_thread_db_load, thread_db_load_search): New functions.
18485 (thread_db_init): Search for libthread_db.
18486 (thread_db_free): New function.
18487 (thread_db_handle_monitor_command): Likewise.
18488 * config.in: Regenerate.
18489 * configure: Regenerate.
18490
18491 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18492
18493 * spu-low.c (spu_kill): Wait for inferior to terminate.
18494 Call clear_inferiors.
18495 (spu_detach): Call clear_inferiors.
18496
18497 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18498
18499 * aclocal.m4: Regenerate.
18500 * config.in: Likewise.
18501 * configure: Likewise.
18502
18503 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18504
18505 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18506 (parse_spufs_run): New function.
18507 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18508 (ppc_breakpoint_at): Handle SPU breakpoints.
18509
18510 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18511
18512 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18513 (SPUFS_MAGIC): Define.
18514 (spu_enumerate_spu_ids): New function.
18515 (linux_qxfer_spu): New function.
18516 (linux_target_ops): Install linux_qxfer_spu.
18517
18518 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18519
18520 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18521 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18522 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18523 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18524 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18525 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18526 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18527 (init_registers_powerpc_cell32l): Add prototype.
18528 (init_registers_powerpc_cell64l): Likewise.
18529 (ppc_arch_setup): Detect Cell/B.E. architecture.
18530
18531 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18532
18533 * Makefile.in (datarootdir): New variable.
18534
18535 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18536
18537 * linux-low.c (linux_write_memory): Update debugging output.
18538 * Makefile.in (clean): Add new descriptions.
18539 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18540 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18541 * configure.srv: Add new files for arm*-*-linux*.
18542 * linux-arm-low.c: Add new declarations.
18543 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18544 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18545 (HWCAP_VFPv3D16): New.
18546 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18547 instead of __IWMMXT__.
18548 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18549 (arm_arch_setup): New.
18550 (target_regsets): Remove #ifdef. Add VFP regset.
18551 (the_low_target): Use arm_arch_setup.
18552
18553 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18554
18555 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18556 the main thread again.
18557
18558 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18559
18560 Adding Neutrino gdbserver.
18561 * configure: Regenerated.
18562 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18563 * configure.srv (i[34567]86-*-nto*): New target.
18564 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18565 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18566 (nto_comctrl) [__QNX__]: New function.
18567 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18568
18569 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18570
18571 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18572 srv_tgtobj.
18573
18574 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18575 Pedro Alves <pedro@codesourcery.com>
18576
18577 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18578 don't support CONTEXT_EXTENDED_REGISTERS.
18579 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18580 (the_low_target): Install them.
18581 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18582 failing with ERROR_PIPE_NOT_CONNECTED.
18583
18584 2009-06-30 Doug Evans <dje@google.com>
18585 Pierre Muller <muller@ics.u-strasbg.fr>
18586
18587 Add h/w watchpoint support to x86-linux, win32-i386.
18588 * Makefile.in (SFILES): Add i386-low.c
18589 (i386_low_h): Define.
18590 (i386-low.o): Add dependencies.
18591 (linux-x86-low.o): Add i386-low.h dependency.
18592 (win32-i386-low.o): Ditto.
18593 * i386-low.c: New file.
18594 * i386-low.h: New file.
18595 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18596 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18597 * linux-low.c (linux_add_process): Initialize arch_private.
18598 (linux_remove_process): Free arch_private.
18599 (add_lwp): Initialize arch_private.
18600 (delete_lwp): Free arch_private.
18601 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18602 provided.
18603 * linux-low.h (process_info_private): New member arch_private.
18604 (lwp_info): New member arch_private.
18605 (linux_target_ops): New members new_process, new_thread,
18606 prepare_to_resume.
18607 (ptid_of): New macro.
18608 * linux-x86-low.c: Include stddef.h, i386-low.h.
18609 (arch_process_info): New struct.
18610 (arch_lwp_info): New struct.
18611 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18612 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18613 (i386_dr_low_get_status): New function.
18614 (x86_insert_point, x86_remove_point): New functions.
18615 (x86_stopped_by_watchpoint): New function.
18616 (x86_stopped_data_address): New function.
18617 (x86_linux_new_process, x86_linux_new_thread): New functions.
18618 (x86_linux_prepare_to_resume): New function.
18619 (the_low_target): Add entries for insert_point, remove_point,
18620 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18621 prepare_to_resume.
18622 * server.c (debug_hw_points): New global.
18623 (monitor_show_help): Document set debug-hw-points.
18624 (handle_query): Process "set debug-hw-points".
18625 * server.h (debug_hw_points): Declare.
18626 (paddress): Declare.
18627 * utils.c (NUMCELLS, CELLSIZE): New macros.
18628 (get_sell, xsnprintf, paddress): New functions.
18629 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18630 remove_point, stopped_by_watchpoint, stopped_data_address.
18631 * win32-i386-low.c: Include i386-low.h.
18632 (debug_reg_state): Replaces dr.
18633 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18634 (i386_dr_low_get_status): New function.
18635 (i386_insert_point, i386_remove_point): New functions.
18636 (i386_stopped_by_watchpoint): New function.
18637 (i386_stopped_data_address): New function.
18638 (i386_initial_stuff): Update.
18639 (get_thread_context,set_thread_context,i386_thread_added): Update.
18640 (the_low_target): Add entries for insert_point,
18641 remove_point, stopped_by_watchpoint, stopped_data_address.
18642 * win32-low.c (win32_insert_watchpoint): New function.
18643 (win32_remove_watchpoint): New function.
18644 (win32_stopped_by_watchpoint): New function.
18645 (win32_stopped_data_address): New function.
18646 (win32_target_ops): Add entries for insert_watchpoint,
18647 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18648 * win32-low.h (win32_target_ops): New members insert_point,
18649 remove_point, stopped_by_watchpoint, stopped_data_address.
18650
18651 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18652
18653 * server.c (process_serial_event): Re-return unsupported, not
18654 error, if the type isn't recognized. Re-allow supporting only
18655 insert or remove packets. Also call require_running for
18656 breakpoints. Add missing break statement to default case. Tidy.
18657 * target.h (struct target_ops): Rename insert_watchpoint to
18658 insert_point, and remove_watchpoint to remove_point.
18659
18660 * linux-low.h (struct linux_target_ops): Likewise.
18661 * linux-low.c (linux_insert_watchpoint): Rename to ...
18662 (linux_insert_point): ... this. Adjust.
18663 (linux_remove_watchpoint): Rename to ...
18664 (linux_remove_point): ... this. Adjust.
18665 (linux_target_ops): Adjust.
18666 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18667 (cris_insert_point): ... this.
18668 (cris_remove_watchpoint): Rename to ...
18669 (cris_remove_point): ... this.
18670 (the_low_target): Adjust.
18671
18672 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18673
18674 * server.c (handle_v_kill): Pass signal_pid to
18675 kill_inferior if multi_process is zero.
18676
18677 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18678
18679 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18680 * target.h (target_ops): Comment for *_watchpoint to make it clear
18681 the functions can get types '0' and '1'.
18682
18683 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18684
18685 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18686 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18687 * regcache.c (get_regcache): Likewise.
18688 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18689 * win32-low.c (child_fetch_inferior_registers): Remove check for
18690 regno 0.
18691
18692 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18693 Pedro Alves <pedro@codesourcery.com>
18694
18695 * target.h (struct target_ops) <supports_multi_process>: New
18696 callback.
18697 (target_supports_multi_process): New.
18698 * server.c (handle_query): Even if GDB reports support, only
18699 enable multi-process if the target also supports it. Report
18700 multi-process support only if the target backend supports it.
18701 * linux-low.c (linux_supports_multi_process): New function.
18702 (linux_target_ops): Install it as target_supports_multi_process
18703 callback.
18704
18705 2009-05-24 Doug Evans <dje@google.com>
18706
18707 Global renaming of find_thread_pid to find_thread_ptid.
18708 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18709 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18710 All callers updated.
18711
18712 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18713 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18714 directly.
18715
18716 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18717 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18718 (linux_resume_one_lwp): Ditto.
18719
18720 2009-05-23 Doug Evans <dje@google.com>
18721
18722 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18723 from struct inferior_list_entry * to struct lwp_info *.
18724 All callers updated.
18725
18726 2009-05-13 Doug Evans <dje@google.com>
18727
18728 * linux-x86-low.c: Don't include assert.h.
18729 (x86_siginfo_fixup): Use fatal, not assert.
18730 (x86_arch_setup): Fix comment.
18731
18732 2009-05-12 Doug Evans <dje@google.com>
18733
18734 Biarch support for i386/amd64 gdbserver.
18735 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18736 Add linux-x86-low.c.
18737 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18738 (linux-x86-low.o): Add.
18739 * linux-x86-64-low.c: Delete.
18740 * linux-i386-low.c: Delete.
18741 * linux-x86-low.c: New file.
18742 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18743 linux-x86-low.o.
18744 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18745 linux-x86-low.o.
18746 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18747 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18748 (linux_child_pid_to_exec_file): New function.
18749 (elf_64_header_p, elf_64_file_p): New functions.
18750 (siginfo_fixup): New function.
18751 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18752 give target a chance to convert layout.
18753 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18754 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18755
18756 2009-05-07 Doug Evans <dje@google.com>
18757
18758 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18759 (regsets_store_inferior_registers): Ditto.
18760
18761 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18762
18763 PR server/10048
18764
18765 * linux-low.c (must_set_ptrace_flags): Delete.
18766 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18767 of the global.
18768 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18769 `lwp->must_set_ptrace_flags' instead.
18770 (linux_wait_for_event_1): Set ptrace options here.
18771 (linux_wait_1): ... not here.
18772
18773 2009-04-30 Doug Evans <dje@google.com>
18774
18775 * inferiors.c (started_inferior_callback): New function.
18776 (attached_inferior_callback): New function.
18777 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18778 * server.c (print_started_pid, print_attached_pid): New functions.
18779 (detach_or_kill_for_exit): New function.
18780 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18781 * server.h (have_started_inferiors_p): Declare.
18782 (have_attached_inferiors_p): Declare.
18783
18784 * inferiors.c (remove_process): Fix memory leak, free process.
18785 * linux-low.c (linux_remove_process): New function.
18786 (linux_kill): Call it instead of remove_process.
18787 (linux_detach, linux_wait_1): Ditto.
18788
18789 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18790
18791 * configure.srv: Add x86 Windows CE target.
18792
18793 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18794
18795 * inferiors.c (get_thread_process): Make global.
18796 * server.h (get_thread_process): Add prototype.
18797 * thread-db.c (find_one_thread): Use get_thread_process
18798 instead of current_process.
18799 (thread_db_get_tls_address): Do not crash if called when
18800 thread layer is not yet initialized.
18801
18802 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18803
18804 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18805 * spu-low.c (current_tid): Rename to ...
18806 (current_ptid): ... this.
18807 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18808 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18809 ptid_get_lwp (current_ptid) instead of current_tid.
18810 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18811 instead of current_tid. Use find_process_pid to verify pid
18812 argument is valid. Pass proper argument to remove_process.
18813 (spu_thread_alive): Compare current_ptid instead of current_tid.
18814 (spu_resume): Likewise.
18815
18816 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18817
18818 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18819 variable.
18820
18821 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18822
18823 Implement the multiprocess extensions, and add linux multiprocess
18824 support.
18825
18826 * server.h (ULONGEST): Declare.
18827 (struct ptid, ptid_t): New.
18828 (minus_one_ptid, null_ptid): Declare.
18829 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18830 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18831 (struct inferior_list_entry): Change `id' type from unsigned from
18832 to ptid_t.
18833 (struct sym_cache, struct breakpoint, struct
18834 process_info_private): Forward declare.
18835 (struct process_info): Declare.
18836 (current_process): Declare.
18837 (all_processes): Declare.
18838 (initialize_inferiors): Declare.
18839 (add_thread): Adjust to use ptid_t.
18840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18841 (add_process, remove_process, find_thread_pid): Declare.
18842 (find_inferior_id): Adjust to use ptid_t.
18843 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18844 (multi_process): Declare.
18845 (push_event): Adjust to use ptid_t.
18846 (read_ptid, write_ptid): Declare.
18847 (prepare_resume_reply): Adjust to use ptid_t.
18848 (clear_symbol_cache): Declare.
18849 * inferiors.c (all_processes): New.
18850 (null_ptid, minus_one_ptid): New.
18851 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18852 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18853 (add_thread): Change unsigned long to ptid. Remove gdb_id
18854 parameter. Adjust.
18855 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18856 (gdb_id_to_thread): Rename to ...
18857 (find_thread_pid): ... this. Change unsigned long to ptid.
18858 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18859 (loaded_dll, pull_pid_from_list): Adjust.
18860 (add_process, remove_process, find_process_pid)
18861 (get_thread_process, current_process, initialize_inferiors): New.
18862 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18863 (struct target_waitstatus) <related_pid>: Ditto.
18864 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18865 return type to int.
18866 (struct target_ops) <join>: Add `pid' argument.
18867 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18868 (struct target_ops) <wait>: Add `ptid' field. Change return type
18869 to ptid.
18870 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18871 (mywait): Add `ptid' argument. Change return type to ptid_t.
18872 (target_pid_to_str): Declare.
18873 * target.c (set_desired_inferior): Adjust to use ptids.
18874 (mywait): Add new `ptid' argument. Adjust.
18875 (target_pid_to_str): New.
18876 * mem-break.h (free_all_breakpoints): Declare.
18877 * mem-break.c (breakpoints): Delelete.
18878 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18879 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18880 to use per-process breakpoint list.
18881 (free_all_breakpoints): New.
18882 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18883 (symbol_cache, all_symbols_looked_up): Delete.
18884 (hexchars): New.
18885 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18886 read_ptid): New.
18887 (prepare_resume_reply): Change ptid argument's type from unsigned
18888 long to ptid_t. Adjust. Implement W;process and X;process.
18889 (free_sym_cache, clear_symbol_cache): New.
18890 (look_up_one_symbol): Adjust to per-process symbol cache. *
18891 * server.c (cont_thread, general_thread, step_thread): Change type
18892 to ptid_t.
18893 (attached): Delete.
18894 (multi_process): New.
18895 (last_ptid): Change type to ptid_t.
18896 (struct vstop_notif) <ptid>: Change type to ptid_t.
18897 (queue_stop_reply, push_event): Change `ptid' argument's type to
18898 ptid_t.
18899 (discard_queued_stop_replies): Add `pid' argument.
18900 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18901 changes. Don't reference the `attached' global.
18902 (attach_inferior): Adjust to mywait interface changes.
18903 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18904 features. Handle and report "multiprocess+". Handle
18905 "qAttached:PID".
18906 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18907 changes.
18908 (handle_v_kill): New.
18909 (handle_v_stopped): Adjust to use target_pid_to_str.
18910 (handle_v_requests): Allow multiple attaches and runs when
18911 multiprocess extensions are in effect. Handle "vKill".
18912 (myresume): Adjust to use ptids.
18913 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18914 (handle_status): Adjust to discard_queued_stop_replies interface
18915 change.
18916 (first_thread_of, kill_inferior_callback)
18917 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18918 (main): Call initialize_inferiors. Adjust to use ptids, killing
18919 and detaching from all inferiors. Handle multiprocess packet
18920 variants.
18921 * linux-low.h: Include gdb_proc_service.h.
18922 (struct process_info_private): New.
18923 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18924 <lwpid_of>: Use ptid_get_lwp.
18925 (get_lwp_thread): Adjust.
18926 (struct lwp_info): Add `dead' member.
18927 (find_lwp_pid): Declare.
18928 * linux-low.c (thread_db_active): Delete.
18929 (new_inferior): Adjust comment.
18930 (inferior_pid): Delete.
18931 (linux_add_process): New.
18932 (handle_extended_wait): Adjust.
18933 (add_lwp): Change unsigned long to ptid.
18934 (linux_create_inferior): Add process to processes table. Adjust
18935 to use ptids. Don't set new_inferior here.
18936 (linux_attach_lwp): Rename to ...
18937 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18938 it. Adjust to use ptids.
18939 (linux_attach_lwp): New.
18940 (linux_attach): Add process to processes table. Don't set
18941 new_inferior here.
18942 (struct counter): New.
18943 (second_thread_of_pid_p, last_thread_of_process_p): New.
18944 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18945 multiple processes.
18946 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18947 processes. Remove process from process table.
18948 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18949 to multiple processes.
18950 (any_thread_of): New.
18951 (linux_detach): Add `pid' argument, and handle it. Remove process
18952 from processes table.
18953 (linux_join): Add `pid' argument. Handle it.
18954 (linux_thread_alive): Change unsighed long argument to ptid_t.
18955 Consider dead lwps as not being alive.
18956 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18957 threads we're not interested in.
18958 (same_lwp, find_lwp_pid): New.
18959 (linux_wait_for_lwp): Change `pid' argument's type from int to
18960 ptid_t. Adjust.
18961 (linux_wait_for_event): Rename to ...
18962 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18963 from int to ptid_t. Adjust.
18964 (linux_wait_for_event): New.
18965 (linux_wait_1): Add `ptid' argument. Change return type to
18966 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18967 that exit from the process table.
18968 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18969 Adjust.
18970 (mark_lwp_dead): New.
18971 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18972 stopping all threads, mark its main lwp as dead.
18973 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18974 ptids.
18975 (fetch_register, usr_store_inferior_registers)
18976 (regsets_fetch_inferior_registers)
18977 (regsets_store_inferior_registers, linux_read_memory)
18978 (linux_write_memory): Inline `inferior_pid'.
18979 (linux_look_up_symbols): Adjust to use per-process
18980 `thread_db_active'.
18981 (linux_request_interrupt): Adjust to use ptids.
18982 (linux_read_auxv): Inline `inferior_pid'.
18983 (initialize_low): Don't reference thread_db_active.
18984 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18985 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18986 (ps_getpid): Return the pid of the current inferior.
18987 * thread-db.c (proc_handle, thread_agent): Delete.
18988 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18989 per-process data.
18990 (find_one_thread): Change argument type to ptid_t. Adjust to
18991 per-process data.
18992 (maybe_attach_thread): Adjust to per-process data and ptids.
18993 (thread_db_find_new_threads): Ditto.
18994 (thread_db_init): Ditto.
18995 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18996 processes table. Adjust to use ptids.
18997 (spu_kill, spu_detach): Adjust interface. Remove process from
18998 processes table.
18999 (spu_join, spu_thread_alive): Adjust interface.
19000 (spu_wait): Adjust interface. Remove process from processes
19001 table. Adjust to use ptids.
19002 * win32-low.c (current_inferior_tid): Delete.
19003 (current_inferior_ptid): New.
19004 (debug_event_ptid): New.
19005 (thread_rec): Take a ptid. Adjust.
19006 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19007 (child_delete_thread): Ditto.
19008 (do_initial_child_stuff): Add `attached' argument. Add process to
19009 processes table.
19010 (child_fetch_inferior_registers, child_store_inferior_registers):
19011 Adjust.
19012 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19013 (win32_attach): Pass 1 to do_initial_child_stuff.
19014 (win32_kill): Adjust interface. Remove process from processes
19015 table.
19016 (win32_detach): Ditto.
19017 (win32_join): Adjust interface.
19018 (win32_thread_alive): Take a ptid.
19019 (win32_resume): Adjust to use ptids.
19020 (get_child_debug_event): Ditto.
19021 (win32_wait): Adjust interface. Remove exiting process from
19022 processes table.
19023
19024 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19025
19026 Non-stop mode support.
19027
19028 * server.h (non_stop): Declare.
19029 (gdb_client_data, handler_func): Declare.
19030 (delete_file_handler, add_file_handler, start_event_loop):
19031 Declare.
19032 (handle_serial_event, handle_target_event, push_event)
19033 (putpkt_notif): Declare.
19034 * target.h (enum resume_kind): New.
19035 (struct thread_resume): Replace `step' field by `kind' field.
19036 (TARGET_WNOHANG): Define.
19037 (struct target_ops) <wait>: Add `options' argument.
19038 <supports_non_stop, async, start_non_stop>: New fields.
19039 (target_supports_non_stop, target_async): New.
19040 (start_non_stop): Declare.
19041 (mywait): Add `options' argument.
19042 * target.c (mywait): Add `options' argument. Print child exit
19043 notifications here.
19044 (start_non_stop): New.
19045 * server.c (non_stop, own_buf, mem_buf): New globals.
19046 (struct vstop_notif): New.
19047 (notif_queue): New global.
19048 (queue_stop_reply, push_event, discard_queued_stop_replies)
19049 (send_next_stop_reply): New.
19050 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19051 interface changes.
19052 (attach_inferior): In non-stop mode, don't wait for the target
19053 here.
19054 (handle_general_set): Handle QNonStop.
19055 (handle_query): When handling qC, return the current general
19056 thread, instead of the first thread of the list.
19057 (handle_query): If the backend supports non-stop mode, include
19058 QNonStop+ in the qSupported query response.
19059 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19060 and non-stop mode.
19061 (handle_v_attach, handle_v_run): Handle non-stop mode.
19062 (handle_v_stopped): New.
19063 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19064 (myresume): Adjust to use resume_kind. Handle non-stop.
19065 (queue_stop_reply_callback): New.
19066 (handle_status): Handle non-stop mode.
19067 (main): Clear non_stop flag on reconnection. Use the event-loop.
19068 Refactor serial protocol handling from here ...
19069 (process_serial_event): ... to this new function. When GDB
19070 selects any thread, select one here. In non-stop mode, wait until
19071 GDB acks all pending events before exiting.
19072 (handle_serial_event, handle_target_event): New.
19073 * remote-utils.c (remote_open): Install remote_desc in the event
19074 loop.
19075 (remote_close): Remove remote_desc from the event loop.
19076 (putpkt_binary): Rename to...
19077 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19078 (putpkt_binary): New as wrapper around putpkt_binary_1.
19079 (putpkt_notif): New.
19080 (prepare_resume_reply): In non-stop mode, don't change the
19081 general_thread.
19082 * event-loop.c: New.
19083 * Makefile.in (OBJ): Add event-loop.o.
19084 (event-loop.o): New rule.
19085
19086 * linux-low.h (pid_of): Moved here.
19087 (lwpid_of): New.
19088 (get_lwp_thread): Use lwpid_of.
19089 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19090 * linux-low.c (pid_of): Delete.
19091 (inferior_pid): Use lwpid_of.
19092 (linux_event_pipe): New.
19093 (target_is_async_p): New.
19094 (delete_lwp): New.
19095 (handle_extended_wait): Use lwpid_of.
19096 (add_lwp): Don't set lwpid field.
19097 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19098 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19099 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19100 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19101 first. Adjust to linux_wait_for_event interface changes. Use
19102 lwpid_of.
19103 (linux_detach): Don't delete the main lwp here.
19104 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19105 (status_pending_p): Don't consider explicitly suspended lwps.
19106 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19107 pointer. Add OPTIONS argument. Change return type to int. Use
19108 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19109 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19110 pointer. Add status pointer argument. Return a pid instead of a
19111 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19112 changes. In non-stop mode, don't switch to a random thread.
19113 (linux_wait): Rename to...
19114 (linux_wait_1): ... this. Add target_options argument, and handle
19115 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19116 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19117 clean exit and signal exit code. Don't stop all threads in
19118 non-stop mode. In all-stop mode, only stop all threads when
19119 reporting a stop to GDB. Handle explicit thread stop requests.
19120 (async_file_flush, async_file_mark): New.
19121 (linux_wait): New.
19122 (send_sigstop): Use lwpid_of.
19123 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19124 interface changes. In non-stop mode, don't switch to a random
19125 thread.
19126 (linux_resume_one_lwp): Use lwpid_of.
19127 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19128 (linux_resume_one_thread): ... this. Handle resume_stop. In
19129 non-stop mode, don't look for pending flag in all threads.
19130 (resume_status_pending_p): Don't consider explicitly suspended
19131 threads.
19132 (my_waitpid): Reimplement. Emulate __WALL.
19133 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19134 Use lwpid_of.
19135 (sigchld_handler, linux_supports_non_stop, linux_async)
19136 (linux_start_non_stop): New.
19137 (linux_target_ops): Register linux_supports_non_stop, linux_async
19138 and linux_start_non_stop.
19139 (initialize_low): Install SIGCHLD handler.
19140 * thread-db.c (thread_db_create_event, find_one_thread)
19141 (thread_db_get_tls_address): Use lwpid_of.
19142 * win32-low.c (win32_detach): Adjust to use resume_kind.
19143 (win32_wait): Add `options' argument.
19144 * spu-low.c (spu_resume): Adjust to use resume_kind.
19145 (spu_wait): Add `options' argument.
19146
19147 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19148
19149 Decouple target code from remote protocol.
19150
19151 * target.h (enum target_waitkind): New.
19152 (struct target_waitstatus): New.
19153 (struct target_ops) <wait>: Return an unsigned long. Take a
19154 target_waitstatus pointer instead of a char pointer.
19155 (mywait): Likewise.
19156 * target.c (mywait): Change prototype to return an unsigned long.
19157 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19158 * server.h (thread_from_wait, old_thread_from_wait): Delete
19159 declarations.
19160 (prepare_resume_reply): Change prototype to take a
19161 target_waitstatus.
19162 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19163 (last_status, last_ptid): New.
19164 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19165 pid instead of a signal.
19166 (attach_inferior): Remove "status" and "signal" parameters.
19167 Adjust.
19168 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19169 not as an address.
19170 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19171 (handle_v_requests, myresume): Remove "status" and "signal"
19172 parameters. Adjust.
19173 (handle_status): New.
19174 (main): Delete local `status'. Adjust.
19175 * remote-utils.c: Include target.h.
19176 (prepare_resume_reply): Change prototype to take a
19177 target_waitstatus. Adjust.
19178
19179 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19180 interface.
19181 * spu-low.c (spu_wait): Adjust.
19182 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19183 Delete.
19184 (win32_wait): Adjust.
19185
19186 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19187
19188 * target.h (struct thread_resume): Delete leave_stopped member.
19189 (struct target_ops): Add a `n' argument to the `resume' callback.
19190 * server.c (start_inferior): Adjust.
19191 (handle_v_cont, myresume): Adjust.
19192 * linux-low.c (check_removed_breakpoint): Adjust to resume
19193 interface change, and to removed leave_stopped field.
19194 (resume_ptr): Delete.
19195 (struct thread_resume_array): New.
19196 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19197 resume interface change.
19198 (linux_continue_one_thread, linux_queue_one_thread)
19199 (resume_status_pending_p): Check if the resume field is NULL
19200 instead of checking the leave_stopped member.
19201 (linux_resume): Adjust to the target resume interface change.
19202 * spu-low.c (spu_resume): Adjust to the target resume interface
19203 change.
19204 * win32-low.c (win32_detach, win32_resume): Ditto.
19205
19206 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19207
19208 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19209 flag.
19210 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19211 pending.
19212 (linux_continue_one_thread): Only preserve the stepping flag if
19213 there's a pending breakpoint.
19214
19215 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19216
19217 * server.c (main): After the inferior having exited, call
19218 remote_close before exiting gdbserver.
19219
19220 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19221
19222 Fix size of FPSCR in Power 7 processors.
19223 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19224 (PPC_FEATURE_HAS_DFP): New #define.
19225 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19226 size of the FPSCR.
19227
19228 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19229
19230 * server.c (handle_query) Whitespace and formatting.
19231
19232 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19233
19234 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19235 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19236 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19237 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19238 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19239 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19240 Makefile.in, configure.ac: Fix whitespace throughout.
19241 * configure: Regenerate.
19242
19243 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19244
19245 * inferiors.c (find_inferior): Make it safe for the callback
19246 function to delete the currently iterated inferior.
19247
19248 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19249
19250 * Makefile.in (linuw_low_h): Move higher.
19251 (thread-db.o): Depend on $(linux_low_h).
19252
19253 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19254
19255 Rename "process" to "lwp" throughout.
19256
19257 * linux-low.c (all_processes): Rename to...
19258 (all_lwps): ... this.
19259 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19260 (add_process): Rename to ...
19261 (add_lwp): ... this. Adjust.
19262 (linux_create_inferior): Adjust.
19263 (linux_attach_lwp): Adjust.
19264 (linux_attach): Adjust.
19265 (linux_kill_one_process): Rename to ...
19266 (linux_kill_one_lwp): ... this. Adjust.
19267 (linux_kill): Adjust.
19268 (linux_detach_one_process): Rename to ...
19269 (linux_detach_one_lwp): ... this. Adjust.
19270 (linux_detach): Adjust.
19271 (check_removed_breakpoint): Adjust.
19272 (status_pending_p): Adjust.
19273 (linux_wait_for_process): Rename to ...
19274 (linux_wait_for_lwp): ... this. Adjust.
19275 (linux_wait_for_event): Adjust.
19276 (send_sigstop): Adjust.
19277 (wait_for_sigstop): Adjust.
19278 (stop_all_processes): Rename to ...
19279 (stop_all_lwps): ... this.
19280 (linux_resume_one_process): Rename to ...
19281 (linux_resume_one_lwp): ... this. Adjust.
19282 (linux_set_resume_request, linux_continue_one_thread)
19283 (linux_queue_one_thread, resume_status_pending_p)
19284 (usr_store_inferior_registers, regsets_store_inferior_registers)
19285 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19286 Adjust.
19287 * linux-low.h (get_process): Rename to ...
19288 (get_lwp): ... this. Adjust.
19289 (get_thread_process): Rename to ...
19290 (get_thread_lwp): ... this. Adjust.
19291 (get_process_thread): Rename to ...
19292 (get_lwp_thread): ... this. Adjust.
19293 (struct process_info): Rename to ...
19294 (struct lwp_info): ... this.
19295 (all_processes): Rename to ...
19296 (all_lwps): ... this.
19297 * proc-service.c (ps_lgetregs): Adjust.
19298 * thread-db.c (thread_db_create_event, find_one_thread)
19299 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19300
19301 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19302
19303 * server.c (handle_query): Handle "qAttached".
19304
19305 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19306
19307 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19308 GPLv3, update license URL.
19309
19310 2009-03-01 Doug Evans <dje@google.com>
19311
19312 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19313 (server_h): Add gdb_signals.h.
19314 (signals.o): Update.
19315 * server.h (target_signal_from_host,target_signal_to_host_p)
19316 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19317
19318 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19319
19320 * remote-utils.c (getpkt): Also generate remote-debug
19321 information if noack_mode is set.
19322
19323 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19324
19325 * server.c (handle_query): Report qXfer:siginfo:read and
19326 qXfer:siginfo:write as supported and handle them.
19327 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19328 * linux-low.c (linux_xfer_siginfo): New.
19329 (linux_target_ops): Set it.
19330
19331 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19332
19333 * server.c (gdbserver_usage): Mention --remote-debug.
19334 (main): Accept '--remote-debug' switch.
19335
19336 2009-01-18 Doug Evans <dje@google.com>
19337
19338 * regcache.c (new_register_cache): No need to check result of xcalloc.
19339 * server.c (handle_search_memory): Back out calls to xmalloc,
19340 result is checked and error is returned to user upon failure.
19341 (handle_query): Ditto. Add more checks for result of malloc.
19342 (handle_v_cont): Check result of malloc, report error back to
19343 user upon failure.
19344 (handle_v_run): Ditto. Call freeargv.
19345 * server.h (freeargv): Declare.
19346 * utils.c (freeargv): New fn.
19347
19348 2009-01-15 Doug Evans <dje@google.com>
19349
19350 * gdbreplay.c (perror_with_name): Make arg const char *.
19351 * server.h (target_signal_to_name): Make return type const char *.
19352 * thread-db.c (thread_db_err_str): Make return type const char *.
19353 * utils.c (perror_with_name): Make arg const char *.
19354
19355 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19356
19357 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19358 when handling a EXIT_PROCESS_DEBUG_EVENT.
19359
19360 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19361
19362 * gdbreplay.c (gdbreplay_version): Update copyright year.
19363 * server.c (gdbserver_version): Likewise.
19364
19365 2009-01-05 Doug Evans <dje@google.com>
19366
19367 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19368 (handle_extended_wait): Improve comment.
19369
19370 2008-12-13 Doug Evans <dje@google.com>
19371
19372 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19373 * server.h (ATTR_MALLOC): New macro.
19374 (xmalloc,xcalloc,xstrdup): Declare.
19375 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19376 * inferiors.c: Ditto.
19377 * linux-low.c: Ditto.
19378 * mem-break.c: Ditto.
19379 * regcache.c: Ditto.
19380 * remote-utils.c: Ditto.
19381 * server.c: Ditto.
19382 * target.c: Ditto.
19383 * win32-low.c: Ditto.
19384
19385 2008-12-12 Doug Evans <dje@google.com>
19386
19387 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19388 in debugging printf.
19389
19390 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19391
19392 2008-12-09 Doug Evans <dje@google.com>
19393
19394 * linux-low.h (struct process_info): Delete member tid, unused.
19395 * thread-db.c (find_one_thread): Update.
19396 (maybe_attach_thread): Update.
19397
19398 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19399
19400 * target.h (struct target_ops): Add qxfer_osdata member.
19401 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19402 and dirent.h.
19403 (linux_qxfer_osdata): New functions.
19404 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19405 callback.
19406 * server.c (handle_query): Handle "qXfer:osdata:read:".
19407 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19408 (buffer_xml_printf): New functions.
19409 * server.h (struct buffer): New.
19410 (buffer_grow_str, buffer_grow_str0): New macros.
19411 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19412 (buffer_xml_printf): Declare.
19413
19414 2008-11-24 Doug Evans <dje@google.com>
19415
19416 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19417
19418 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19419
19420 * server.c (handle_v_run): Always use the supplied argument list.
19421
19422 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19423
19424 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19425 (xtensa_regmap_table): Add entry for scompare1.
19426
19427 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19428
19429 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19430 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19431 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19432 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19433 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19434 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19435 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19436 XML target descriptions.
19437 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19438 when inferior is running on an ISA 2.05 or later processor. Add
19439 special case to return offset for full 64-bit slot of FPSCR when
19440 in 32-bits.
19441
19442 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19443
19444 * Makefile.in (SFILES, clean): Added sparc64 files.
19445 (reg-sparc64.o, reg-sparc64.c): New.
19446 * configure.srv (sparc*-*-linux*): New configuration.
19447 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19448 syscall arguments for SPARC.
19449 (regsets_store_inferior_registers): Likewise.
19450 * linux-sparc-low.c: New file.
19451
19452 2008-10-21 Doug Evans <dje@google.com>
19453
19454 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19455 (READLINE_DIR,READLINE_DEP): Delete.
19456 (INTERNAL_CFLAGS): Update.
19457 (LINTFLAGS): Update.
19458
19459 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19460
19461 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19462 whole argv from the last run, not just argv[0].
19463
19464 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19465
19466 * regcache.c (new_register_cache): Return NULL if the register
19467 cache size isn't known yet.
19468 (free_register_cache): Avoid dereferencing a NULL regcache.
19469
19470 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19471
19472 * configure.srv: Merge MIPS and MIPS64.
19473
19474 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19475
19476 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19477
19478 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19479
19480 * Makefile.in: Add required vsx dependencies.
19481
19482 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19483 Declare init_registers_powerpc_vsx32l.
19484 Declare init_registers_powerpc_vsx64l.
19485 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19486 (ppc_arch_setup): Check for VSX in hwcap.
19487 (ppc_fill_vsxregset): New function.
19488 (ppc_store_vsxregset): New function.
19489 Add new VSX entry in regset_info target_regsets.
19490
19491 * configure.srv: Add new VSX dependencies.
19492
19493 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19494
19495 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19496 (remote_open): Set or clear transport_is_reliable.
19497 (putpkt_binary): Don't expect acks in noack mode.
19498 (getpkt): Don't send ack/nac in noack mode.
19499 * server.c (handle_general_set): Handle QStartNoAckMode.
19500 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19501 qSupported.
19502 (main): Reset noack_mode on every connection.
19503 * server.h (noack_mode): Declare.
19504
19505 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19506
19507 * Makefile.in (GDBREPLAY_OBS): New variable.
19508 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19509
19510 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19511 Daniel Jacobowitz <dan@codesourcery.com>
19512
19513 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19514 (usr_store_inferior_registers): Likewise.
19515 (regsets_store_inferior_registers): Likewise.
19516
19517 2008-07-31 Rolf Jansen <rj@surtec.com>
19518 Pedro Alves <pedro@codesourcery.com>
19519
19520 * configure.ac: Check for memmem declaration.
19521 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19522 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19523 (disable_packet_qfThreadInfo): Unconditionally compile.
19524 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19525 * configure, config.in: Regenerate.
19526
19527 2008-07-28 Doug Kwan <dougkwan@google.com>
19528
19529 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19530 (linux_write_memory): Remove declaration of errno.
19531
19532 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19533
19534 * linux-low.c (handle_extended_wait): Do not use "status"
19535 variable uninitialized.
19536
19537 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19538
19539 * server.c (handle_v_attach): Inhibit reporting dll changes.
19540
19541 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19542
19543 * remote-utils.c (prepare_resume_reply): If requested, don't
19544 output "thread:TID" in the T stop reply.
19545
19546 * server.c (disable_packet_vCont, disable_packet_Tthread)
19547 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19548 (handle_query): If requested, disable support for qC, qfThreadInfo
19549 and qsThreadInfo.
19550 (handle_v_requests): If requested, disable support for vCont.
19551 (gdbserver_show_disableable): New.
19552 (main): Handle --disable-packet and --disable-packet=LIST.
19553
19554 * server.h (disable_packet_vCont, disable_packet_Tthread)
19555 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19556
19557 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19558
19559 * server.c (gdbserver_usage): Mention --version.
19560
19561 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19562
19563 * Makefile.in (gdbreplay.o): New rule.
19564
19565 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19566
19567 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19568 message, not gdbserver.
19569
19570 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19571 Nathan Sidwell <nathan@codesourcery.com>
19572 Joseph Myers <joseph@codesourcery.com>
19573
19574 * acinclude.m4: Include ../../config/acx.m4.
19575 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19576 * configure, config.in: Regenerate.
19577 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19578 * server.c (gdbserver_version): Print PKGVERSION.
19579 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19580 (main): Adjust gdbserver_usage calls.
19581 * gdbreplay.c (version, host_name): Add declarations.
19582 (gdbreplay_version, gdbreplay_usage): New.
19583 (main): Accept --version and --help options.
19584
19585 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19586
19587 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19588 (arm_breakpoint_at): Handle Thumb.
19589 (the_low_target): Add comment.
19590
19591 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19592
19593 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19594
19595 2008-05-09 Doug Evans <dje@google.com>
19596
19597 * server.h (decode_search_memory_packet): Declare.
19598 * remote-utils.c (decode_search_memory_packet): New fn.
19599 * server.c (handle_search_memory_1): New fn.
19600 (handle_search_memory): New fn.
19601 (handle_query): Process qSearch:memory packets.
19602
19603 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19604
19605 * regcache.c (registers_length): Remove.
19606 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19607 full register packet.
19608 * regcache.h (registers_length): Remove prototype.
19609 * server.h (PBUFSIZ): Define to 16384.
19610
19611 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19612
19613 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19614 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19615 powerpc-64l.o, and powerpc-altivec64l.o.
19616 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19617 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19618 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19619 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19620 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19621 to srv_xmlfiles.
19622
19623 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19624 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19625 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19626 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19627 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19628 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19629 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19630 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19631 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19632 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19633 (clean): Update.
19634
19635 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19636 (init_registers_powerpc_32l): ... this new prototype.
19637 (init_registers_powerpc_32): Remove, replace by ...
19638 (init_registers_powerpc_altivec32l): ... this new prototype.
19639 (init_registers_powerpc_e500): Remove, replace by ...
19640 (init_registers_powerpc_e500l): ... this new prototype.
19641 (init_registers_ppc64): Remove, replace by ...
19642 (init_registers_powerpc_64l): ... this new prototype.
19643 (init_registers_powerpc_64): Remove, replace by ...
19644 (init_registers_powerpc_altivec64l): ... this new prototype.
19645 (ppc_num_regs): Set to 73.
19646 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19647 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19648 (ppc_cannot_store_register): Handle orig_r3 and trap.
19649 (ppc_arch_setup): Update init_registers_... calls.
19650 (ppc_fill_gregset): Handle orig_r3 and trap.
19651
19652 * inferiors.c (clear_inferiors): Reset current_inferior.
19653
19654 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19655
19656 * acinclude.m4: Add override.m4.
19657 * configure: Regenerate.
19658
19659 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19660
19661 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19662 initial call to init_register_ppc64.
19663
19664 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19665
19666 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19667 single powerpc*-*-linux* case.
19668 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19669
19670 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19671
19672 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19673 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19674 from reg_xmlfiles.
19675 * linux-ppc-low.c: Include <elf.h>.
19676 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19677 (ppc_hwcap): New global variable.
19678 (ppc_regmap): Remove __SPE__ #ifdef sections.
19679 (ppc_regmap_e500): New global variable.
19680 (ppc_cannot_store_register): Update __SPE__ special case.
19681 (ppc_get_hwcap): New function.
19682 (ppc_arch_setup): Use it to determine whether inferior supports
19683 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19684 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19685 Do not access registers if target does not support AltiVec.
19686 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19687 Do not access registers if target does not support SPE.
19688 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19689
19690 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19691
19692 * linux-low.c (disabled_regsets, num_regsets): New.
19693 (use_regsets_p): Delete.
19694 (linux_wait_for_process): Clear disabled_regsets.
19695 (regsets_fetch_inferior_registers): Check and set it.
19696 (regsets_store_inferior_registers): Likewise.
19697 (linux_fetch_registers, linux_store_registers): Do not use
19698 use_regsets_p.
19699 (initialize_low): Allocate disabled_regsets.
19700
19701 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19702
19703 * Makefile.in (LIBOBJS): New.
19704 (OBS): Use LIBOBJS.
19705 (memmem.o): New rule.
19706 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19707 * configure: Regenerated.
19708
19709 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19710
19711 * server.c (handle_query): Never return "unsupported" for
19712 qXfer:features:read queries.
19713
19714 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19715
19716 * server.c (get_features_xml): Fix inverted condition.
19717 (handle_query): Always support qXfer:feature:read.
19718
19719 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19720
19721 * server.c (wrapper_argv): New.
19722 (start_inferior): Handle wrapper_argv. If set, expect an extra
19723 trap.
19724 (gdbserver_usage): Document --wrapper.
19725 (main): Parse --wrapper.
19726
19727 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19728
19729 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19730 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19731 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19732 (ppc_set_pc): Likewise.
19733 (ppc_arch_setup): New function.
19734 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19735 of collect_register.
19736 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19737
19738 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19739
19740 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19741 instead of linux-ppc64-low.o.
19742 * linux-ppc64-low.c: Remove file.
19743 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19744 (linux-ppc64-low.o): Remove rule.
19745
19746 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19747 (init_registers_powerpc_64): Likewise.
19748 (ppc_regmap): Conditionally define depending on __powerpc64__.
19749 (ppc_cannot_store_register): Do not special-case "fpscr" when
19750 compiled on __powerpc64__.
19751 (ppc_collect_ptrace_register): New function.
19752 (ppc_supply_ptrace_register): New function.
19753 (ppc_breakpoint): Change type to "unsigned int".
19754 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19755 (the_low_target): Conditionally provide initializers for the
19756 arch_setup member depending on __powerpc64__. Install
19757 collect_ptrace_register and supply_ptrace_register members.
19758
19759 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19760
19761 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19762 * server.c (gdbserver_xmltarget): Define.
19763 (get_features_xml): Use it to replace "target.xml" and arch_string.
19764
19765 * configure.srv: Remove srv_xmltarget. Add XML files that were
19766 mentioned there to srv_xmlfiles instead. Remove conditional tests
19767 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19768 srv_xmlfiles and srv_regobj to include all possible choices.
19769 * configure.ac (srv_xmltarget): Remove.
19770 (srv_xmlfiles): Do not add "target.xml".
19771 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19772 checks for supplementary target information.
19773 * configure: Regenerate.
19774 * Makefile.in (XML_TARGET): Remove.
19775 (target.xml): Remove rule.
19776 (clean): Do not clean up target.xml.
19777 (.PRECIOUS): Do not mention target.xml.
19778
19779 * target.h (struct target_ops): Remove arch_string member.
19780 * linux-low.c (linux_arch_string): Remove.
19781 (linux_target_ops): Remove arch_string initializer.
19782 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19783 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19784 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19785 * spu-low.c (spu_arch_string): Remove.
19786 (spu_target_ops): Remove arch_string initializer.
19787 * win32-low.c (win32_arch_string): Remove.
19788 (win32_target_ops): Remove arch_string initializer.
19789 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19790 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19791 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19792
19793 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19794
19795 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19796 by collect_ptrace_register and supply_ptrace_register hooks.
19797 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19798 instead of checking for the_low_target.left_pad_xfer.
19799 (usr_store_inferior_registers): Use collect_ptrace_register callback
19800 instead of checking for the_low_target.left_pad_xfer.
19801
19802 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19803 (s390_supply_ptrace_register): Likewise.
19804 (s390_fill_gregset): Call s390_collect_ptrace_register.
19805 (the_low_target): Update.
19806
19807 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19808 (ppc_supply_ptrace_register): Likewise.
19809 (the_low_target): Update.
19810
19811 * linux-i386-low.c (the_low_target): Update.
19812 * linux-x86-64-low.c (the_low_target): Update.
19813
19814 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19815
19816 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19817 reg-s390.o and reg-s390x.o.
19818
19819 * linux-low.c (new_inferior): New global variable.
19820 (linux_create_inferior, linux_attach): Set it.
19821 (linux_wait_for_process): Call the_low_target.arch_setup after the
19822 target has stopped for the first time.
19823 (initialize_low): Do not call the_low_target.arch_setup.
19824
19825 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19826 (s390_set_pc): Likewise.
19827 (s390_arch_setup): New function.
19828 (the_low_target): Use s390_arch_setup as arch_setup routine.
19829
19830 * regcache.c (realloc_register_cache): New function.
19831 (set_register_cache): Call it for each existing regcache.
19832
19833 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19834
19835 * server.h (init_registers): Remove prototype.
19836
19837 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19838 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19839 instead of init_registers ().
19840 * linux-arm-low.c (init_registers_arm): Add prototype.
19841 (init_registers_arm_with_iwmmxt): Likewise.
19842 (the_low_target): Add initializer for arch_setup field.
19843 * linux-cris-low.c (init_registers_cris): Add prototype.
19844 (the_low_target): Add initializer for arch_setup field.
19845 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19846 (the_low_target): Add initializer for arch_setup field.
19847 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19848 (the_low_target): Add initializer for arch_setup field.
19849 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19850 (the_low_target): Add initializer for arch_setup field.
19851 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19852 (the_low_target): Add initializer for arch_setup field.
19853 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19854 (the_low_target): Add initializer for arch_setup field.
19855 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19856 (init_registers_mips64_linux): Likewise.
19857 (the_low_target): Add initializer for arch_setup field.
19858 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19859 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19860 (the_low_target): Add initializer for arch_setup field.
19861 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19862 (init_registers_powerpc_64): Likewise.
19863 (the_low_target): Add initializer for arch_setup field.
19864 * linux-s390-low.c (init_registers_s390): Add prototype.
19865 (init_registers_s390x): Likewise.
19866 (the_low_target): Add initializer for arch_setup field.
19867 * linux-sh-low.c (init_registers_sh): Add prototype.
19868 (the_low_target): Add initializer for arch_setup field.
19869 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19870 (the_low_target): Add initializer for arch_setup field.
19871 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19872 (the_low_target): Add initializer for arch_setup field.
19873
19874 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19875 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19876 instead of init_registers ().
19877 * win32-arm-low.c (init_registers_arm): Add prototype.
19878 (the_low_target): Add initializer for arch_setup field.
19879 * win32-i386-low.c (init_registers_i386): Add prototype.
19880 (the_low_target): Add initializer for arch_setup field.
19881
19882 * spu-low.c (init_registers_spu): Add prototype.
19883 (initialize_low): Call initialie_registers_spu () instead of
19884 initialize_registers ().
19885
19886 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19887
19888 * server.c (handle_v_requests): When handling the vRun and vAttach
19889 packets, if already debugging a process, don't kill it. Return an
19890 error instead.
19891
19892 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19893
19894 * server.c (handle_query): Correct length check.
19895
19896 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19897
19898 * win32-low.c (do_initial_child_stuff): Add process handle
19899 parameter. Set current_process_handle and current_process_id from the
19900 parameters. Clear globals.
19901 (win32_create_inferior): Don't set current_process_handle and
19902 current_process_id here. Instead pass them on the call to
19903 do_initial_child_stuff.
19904 (win32_attach): Likewise.
19905 (win32_clear_inferiors): New.
19906 (win32_kill): Don't close the current process handle or the
19907 current thread handle here. Instead call win32_clear_inferiors.
19908 (win32_detach): Don't open a new handle to the process. Call
19909 win32_clear_inferiors.
19910 (win32_join): Don't rely on current_process_handle; open a new
19911 handle using the process id.
19912 (win32_wait): Call win32_clear_inferiors when the inferior process
19913 has exited.
19914
19915 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19916
19917 * server.c (monitor_show_help): Add "exit".
19918
19919 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19920
19921 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19922 (clean): Add reg-xtensa.c.
19923 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19924 * configure.srv (xtensa*-*-linux*) New target.
19925 * linux-xtensa-low.c: New.
19926 * xtensa-xtregs.c: New.
19927
19928 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19929
19930 * hostio.c: Don't include errno.h.
19931 (errno_to_fileio_errno): Move to hostio-errno.
19932 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19933 error number outputting to the target->hostio_last_error callback.
19934 (hostio_packet_error): Use FILEIO_EINVAL directly.
19935 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19936 calls to hostio_error.
19937 * hostio-errno.c: New.
19938 * server.h (hostio_last_error_from_errno): Declare.
19939 * target.h (target_ops): Add hostio_last_error member.
19940 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19941 as hostio_last_error handler.
19942 * spu-low.c (spu_target_ops): Likewise.
19943 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19944 (wince_hostio_last_error): New functions.
19945 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19946 as hostio_last_error handler.
19947 (win32_target_ops) [!_WIN32_WCE]: Register
19948 hostio_last_error_from_errno as hostio_last_error handler.
19949 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19950 (hostio-errno.o): New rule.
19951 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19952 * configure.srv (srv_hostio_err_objs): New variable. Default to
19953 hostio-errno.o.
19954 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19955 * configure: Regenerate.
19956
19957 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19958
19959 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19960 (linux_kill, linux_detach): Clean up the process list.
19961 * remote-utils.c (remote_open): Improve port number parsing.
19962 (putpkt_binary, input_interrupt): Only send interrupts if the target
19963 is running.
19964 * server.c (extended_protocol): Make static.
19965 (attached): Define earlier.
19966 (exit_requested, response_needed, program_argv): New variables.
19967 (target_running): New.
19968 (start_inferior): Clear attached here.
19969 (attach_inferior): Set attached here.
19970 (require_running): Define.
19971 (handle_query): Use require_running and target_running. Implement
19972 "monitor exit".
19973 (handle_v_attach, handle_v_run): New.
19974 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19975 (gdbserver_usage): Update.
19976 (main): Redo argument parsing. Handle --debug and --multi. Handle
19977 --attach along with other options or after the port. Save
19978 program_argv. Support no initial program. Resynchronize
19979 communication with GDB after an error. Handle "monitor exit".
19980 Use require_running and target_running. Always allow the extended
19981 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19982 restart in extended mode.
19983 * README: Refer to the GDB manual. Update --attach usage.
19984
19985 2007-12-20 Andreas Schwab <schwab@suse.de>
19986
19987 * linux-low.c (STACK_SIZE): Define.
19988 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19989 (linux_test_for_tracefork): Likewise.
19990
19991 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19992
19993 * linux-low.c (linux_wait_for_event): Update messages. Do not
19994 reinsert auto-delete breakpoints.
19995 * mem-break.c (struct breakpoint): Change return type of handler to
19996 int.
19997 (set_breakpoint_at): Update handler type.
19998 (reinsert_breakpoint_handler): Return 1 instead of calling
19999 delete_breakpoint.
20000 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20001 setting a new one.
20002 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20003 * mem-break.h (set_breakpoint_at): Update handler type.
20004 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20005 * win32-low.c (auto_delete_breakpoint): New.
20006 (get_child_debug_event): Use it.
20007
20008 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20009
20010 * configure.ac: Check for pread and pwrite.
20011 * hostio.c (handle_pread): Fall back to lseek and read.
20012 (handle_pwrite): Fall back to lseek and write.
20013 * config.in, configure: Regenerated.
20014
20015 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20016
20017 * server.c (myresume): Add own_buf argument.
20018 (main): Update calls.
20019
20020 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20021
20022 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20023 * remote-utils.c (remote_open): Do not call disable_async_io.
20024 (block_async_io): Delete.
20025 (unblock_async_io): Make static.
20026 (initialize_async_io): New.
20027 * server.c (handle_v_cont): Handle async I/O here.
20028 (myresume): Likewise. Move other common resume tasks here...
20029 (main): ... from here. Call initialize_async_io. Disable async
20030 I/O before the main loop.
20031 * server.h (initialize_async_io): Declare.
20032 (block_async_io, unblock_async_io): Delete prototypes.
20033 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20034
20035 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20036
20037 * remote-utils.c (readchar): Allow binary data in received messages.
20038
20039 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20040
20041 * win32-low.c (attaching): New global.
20042 (win32_create_inferior): Clear the `attaching' global.
20043 (win32_attach): Set the `attaching' global.
20044 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20045 attaching. Only set a breakpoint at the entry point if not
20046 attaching.
20047
20048 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20049
20050 * server.c (main): Don't report dll events on the initial
20051 connection on attaches.
20052
20053 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20054
20055 * server.c (main): Relax numerical bases supported for the pid of
20056 the --attach command line argument.
20057
20058 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20059
20060 * win32-low.c (win32_attach): Call OpenProcess before
20061 DebugActiveProcess, not after. Add last error output to error
20062 call.
20063
20064 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20065
20066 * win32-low.c (win32_get_thread_context)
20067 (win32_set_thread_context): New functions.
20068 (thread_rec): Use win32_get_thread_context.
20069 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20070 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20071 field.
20072
20073 2007-12-03 Leo Zayas
20074 Pedro Alves <pedro_alves@portugalmail.pt>
20075
20076 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20077 global variables.
20078 (child_add_thread): Minor cleanup.
20079 (child_continue): Resume artificially suspended threads before
20080 calling ContinueDebugEvent.
20081 (suspend_one_thread): New.
20082 (fake_breakpoint_event): New.
20083 (get_child_debug_event): Change return type to int. Check here if
20084 gdb sent an interrupt request. If a soft interrupt was requested,
20085 fake a breakpoint event. Return 0 if there is no event to handle,
20086 and 1 otherwise.
20087 (win32_wait): Don't check here if gdb sent an interrupt request.
20088 Ensure there is a valid event to handle.
20089 (win32_request_interrupt): Add soft interruption method as last
20090 resort.
20091
20092 2007-12-03 Leo Zayas
20093 Pedro Alves <pedro_alves@portugalmail.pt>
20094
20095 * win32-low.h (win32_thread_info): Add descriptions to the
20096 structure members. Replace `suspend_count' counter by a
20097 `suspended' flag.
20098 * win32-low.c (thread_rec): Update condition of when to get the
20099 context from the inferior. Rely on ContextFlags being set if it
20100 has already been retrieved. Only suspend the inferior thread if
20101 we haven't already. Warn if that fails.
20102 (continue_one_thread): s/suspend_count/suspended/. Only call
20103 ResumeThread once. Warn if that fails.
20104
20105 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20106
20107 * win32-low.c (win32_wait): Don't read from the inferior when it
20108 has already exited.
20109
20110 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20111
20112 * Makefile.in (win32_low_h): New variable.
20113 (win32-low.o): Add dependency on $(win32_low_h).
20114 (win32-arm-low.o, win32-i386-low.o): New rules.
20115
20116 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20117
20118 * hostio.c: Correct copyright year.
20119
20120 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20121
20122 * Makefile.in (OBS): Add hostio.o.
20123 (hostio.o): New rule.
20124 * server.h (handle_vFile): Declare.
20125 * hostio.c: New file.
20126 * server.c (handle_v_requests): Take packet_len and new_packet_len
20127 for binary packets. Call handle_vFile.
20128 (main): Update call to handle_v_requests.
20129
20130 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20131
20132 * linux-low.c: Include <sched.h>.
20133
20134 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20135
20136 * linux-low.c (linux_tracefork_grandchild): New.
20137 (linux_tracefork_child): Use clone.
20138 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20139
20140 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20141
20142 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20143
20144 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20145
20146 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20147
20148 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20149
20150 * inferiors.c (change_inferior_id): Delete.
20151 (add_pid_to_list, pull_pid_from_list): New.
20152 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20153 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20154 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20155 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20156 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20157 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20158 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20159 (using_threads): Always set to 1.
20160 (handle_extended_wait): New.
20161 (add_process): Do not set TID.
20162 (linux_create_inferior): Set must_set_ptrace_flags.
20163 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20164 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20165 (linux_thread_alive): Rename TID argument to LWPID.
20166 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20167 (linux_wait_for_event): Do not use TID or check using_threads. Update
20168 call to dead_thread_notify. Call handle_extended_wait.
20169 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20170 (send_sigstop): Delete sigstop_sent.
20171 (wait_for_sigstop): Avoid TID.
20172 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20173 (linux_test_for_tracefork): New.
20174 (linux_lookup_signals): Use thread_db_active and
20175 linux_supports_tracefork_flag.
20176 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20177 * linux-low.h (get_process_thread): Avoid TID.
20178 (struct process_ifo): Move thread_known and tid to the end. Remove
20179 sigstop_sent.
20180 (linux_attach_lwp, thread_db_init): Update prototypes.
20181 * server.h (change_inferior_id): Delete prototype.
20182 (add_pid_to_list, pull_pid_from_list): New prototypes.
20183 * thread-db.c (thread_db_use_events): New.
20184 (find_first_thread): Rename to...
20185 (find_one_thread): ...this. Update callers and messages. Do not
20186 call fatal. Check thread_db_use_events. Do not call
20187 change_inferior_id or new_thread_notify.
20188 (maybe_attach_thread): Update. Do not call new_thread_notify.
20189 (thread_db_init): Set thread_db_use_events. Check use_events.
20190 * utils.c (fatal, warning): Correct message prefix.
20191
20192 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20193
20194 * Makefile.in (clean): Remove new files.
20195 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20196 (powerpc-64.o, powerpc-64.c): New rules.
20197 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20198 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20199 with SPE.
20200 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20201 SPE targets.
20202 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20203 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20204 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20205 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20206 (target_regsets): Add AltiVec and SPE register sets.
20207 * configure.ac: Check for AltiVec and SPE.
20208 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20209 (ppc_fill_vrregset, ppc_store_vrregset): New.
20210 (target_regsets): Add AltiVec register set.
20211 * configure: Regenerated.
20212
20213 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20214
20215 * linux-low.c (O_LARGEFILE): Define.
20216 (linux_read_memory): Use /proc/PID/mem.
20217 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20218 * configure, config.in: Regenerated.
20219
20220 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20221
20222 * linux-low.c (linux_wait_for_event): Do not pass signals while
20223 single-stepping.
20224
20225 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20226
20227 * win32-low.c (create_process): New.
20228 (win32_create_inferior): Use create_process instead of
20229 CreateProcess. If create_process failed retry appending an ".exe"
20230 suffix. Store the GetLastError result immediatelly after
20231 create_process calls and use it on the call to error.
20232
20233 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20234
20235 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20236
20237 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20238
20239 * configure.ac: Switch license to GPLv3.
20240
20241 2007-08-01 Michael Snyder <msnyder@access-company.com>
20242
20243 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20244
20245 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20246
20247 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20248 typedef.
20249 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20250 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20251 CloseToolhelp32Snapshot.
20252 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20253 CloseToolhelp32Snapshot.
20254
20255 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20256
20257 * server.c (main): Check for inferior exit before main loop.
20258
20259 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20260
20261 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20262 instead of on tmp_desc.
20263
20264 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20265 Daniel Jacobowitz <dan@codesourcery.com>
20266
20267 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20268 (add_thread): Minor cleanups.
20269 (clear_inferiors): Move lower in the file. Clear the DLL
20270 list.
20271 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20272 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20273 (xml_escape_text): New.
20274 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20275 for qSupported.
20276 (handle_v_cont): Report errors.
20277 (gdbserver_version): Update.
20278 (main): Correct size of own_buf. Do not report initial DLL events.
20279 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20280 (unloaded_dll, xml_escape_text): New.
20281 * win32-low.c (enum target_waitkind): Update comments.
20282 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20283 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20284 (win32_EnumProcessModules, win32_GetModuleInformation)
20285 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20286 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20287 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20288 (win32_Module32First, win32_Module32Next, load_toolhelp)
20289 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20290 (get_child_debug_event): Handle DLL events.
20291 (win32_wait): Likewise.
20292
20293 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20294
20295 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20296 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20297
20298 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20299
20300 * win32-low.c (handle_output_debug_string): Ignore event if not
20301 waiting.
20302
20303 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20304
20305 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20306
20307 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20308
20309 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20310
20311 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20312
20313 * inferiors.c (change_inferior_id): Add comment.
20314 * linux-low.c (check_removed_breakpoint): Add an early
20315 prototype. Improve debug output.
20316 (linux_attach): Doc update.
20317 (linux_detach_one_process, linux_detach): Clean up before releasing
20318 each process.
20319 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20320 * linux-low.h (struct process_info): Doc improvement.
20321 * mem-break.c (delete_all_breakpoints): New.
20322 * mem-break.h (delete_all_breakpoints): New prototype.
20323 * thread-db.c (find_first_thread): New.
20324 (thread_db_create_event): Call it instead of
20325 thread_db_find_new_threads. Clean up unused variables.
20326 (maybe_attach_thread): Remove first thread handling.
20327 (thread_db_find_new_threads): Use find_first_thread.
20328 (thread_db_get_tls_address): Likewise.
20329
20330 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20331
20332 * thread-db.c (thread_db_find_new_threads): Add prototype.
20333 (thread_db_create_event): Check for the main thread before adding
20334 a new thread.
20335 (maybe_attach_thread): Only enable event reporting if TID == 0.
20336 (thread_db_get_tls_address): Check for new threads.
20337
20338 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20339
20340 * linux-low.c (linux_create_inferior): Try execv before execvp.
20341 * spu-low.c (spu_create_inferior): Likewise.
20342
20343 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20344
20345 * linux-low.c (linux_create_inferior): Change execv to execvp.
20346 * spu-low.c (spu_create_inferior): Likewies.
20347
20348 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20349
20350 * Makefile.in (clean): Clean new files instead of deleted ones.
20351 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20352 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20353 rules.
20354 * configure.srv: Specify XML files and new regformats for MIPS and
20355 MIPS64 GNU/Linux.
20356 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20357 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20358 an entry for the restart register.
20359 (mips_cannot_fetch_register, mips_cannot_store_register)
20360 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20361 register names to match the XML descriptions.
20362 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20363 restart register instead of $0.
20364
20365 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20366 Markus Deuling <deuling@de.ibm.com>
20367
20368 * remote-utils.c (decode_xfer_write): New function.
20369 * server.h (decode_xfer_write): Add prototype.
20370 * server.c (handle_query): Add PACKET_LEN argument. Support
20371 qXfer:spu:read and qXfer:spu:write packets.
20372 (main): Pass packet_len to handle_query.
20373 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20374 * target.h (target_ops): Add qxfer_spu.
20375
20376 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20377
20378 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20379 accessing non-seekable spufs files.
20380
20381 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20382
20383 * server.c (handle_query): Add reply for qC packet.
20384
20385 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20386 Leo Zayas <lerele@champenstudios@com>
20387
20388 * server.h (check_remote_input_interrupt_request): New function.
20389 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20390 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20391 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20392 (check_remote_input_interrupt_request): New function.
20393 * server.h (check_remote_input_interrupt_request): Declare.
20394 * win32-low.c (winapi_DebugBreakProcess,
20395 winapi_GenerateConsoleCtrlEvent): New typedefs.
20396 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20397 to 250 ms.
20398 (win32_wait): Check for remote interrupt request
20399 with check_remote_input_interrupt_request.
20400 (win32_request_interrupt): New function.
20401 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20402
20403 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20404
20405 * win32-low.c (debug_registers_changed,
20406 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20407 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20408 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20409 (thread_rec): Get context using the low target.
20410 (child_add_thread): Call thread_added on the low target,
20411 which does the same thing.
20412 (regptr): Delete.
20413 (do_initial_child_stuff): Remove debug registers references.
20414 Set context using the low target. Resume threads after
20415 setting the contexts.
20416 (child_continue): Remove dead variable. Remove debug
20417 registers references.
20418 (child_fetch_inferior_registers): Go through the low target.
20419 (do_child_store_inferior_registers): Remove.
20420 (child_store_inferior_registers): Go through the low target.
20421 (win32_resume): Remove debug registers references.
20422 Set context using the low target.
20423 (handle_exception): Change return type to void. Don't record
20424 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20425 first chance exception.
20426 (get_child_debug_event): Change return type to void. Remove
20427 goto loop. Always return after waiting for debug event.
20428 (win32_wait): Convert to switch statement. Handle spurious
20429 events.
20430
20431 * win32-i386-low.c (debug_registers_changed,
20432 debug_registers_used): New.
20433 (initial_stuff): Rename to ...
20434 (i386_initial_stuff): ... this. Clear debug registers
20435 state variables.
20436 (store_debug_registers): Delete.
20437 (i386_get_thread_context): New.
20438 (load_debug_registers): Delete.
20439 (i386_set_thread_context): New.
20440 (i386_thread_added): New.
20441 (single_step): Rename to ...
20442 (i386_single_step): ... this.
20443 (do_fetch_inferior_registers): Rename to ...
20444 (i386_fetch_inferior_register): ... this.
20445 (i386_store_inferior_register): New.
20446 (the_low_target): Adapt to new interface.
20447
20448 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20449 (arm_get_thread_context): New.
20450 (arm_set_thread_context): New.
20451 (regptr): New.
20452 (do_fetch_inferior_registers): Rename to ...
20453 (arm_fetch_inferior_register): ... this.
20454 (arm_store_inferior_register): New.
20455 (arm_wince_breakpoint): Reimplement as unsigned long.
20456 (arm_wince_breakpoint_len): Define.
20457 (the_low_target): Adapt to new interface.
20458
20459 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20460 load_debug_registers. Add get_thread_context, set_thread_context,
20461 thread_added and store_inferior_register. Rename
20462 fetch_inferior_registers to fetch_inferior_register.
20463 (regptr): Remove declaration.
20464
20465 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20466
20467 * linux-low.c (linux_detach): Change return type to int. Return 0.
20468 * spu-low.c (spu_detach): Likewise.
20469
20470 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20471
20472 * target.h (target_ops): Change return type of detach to int.
20473 Add join.
20474 (join_inferior): New.
20475 * server.c (main): Don't skip detach support on mingw32.
20476 If the inferior doesn't support detaching return error.
20477 Call join_inferior instead of using waitpid.
20478 * linux-low.c (linux_join): New.
20479 (linux_target_op): Add linux_join.
20480 * spu-low.c (spu_join): New.
20481 (spu_target_ops): Add spu_join.
20482 * win32-low.c (win32_detach): Adapt to new interface.
20483 Reopen current_process_handle before detaching. Issue a child
20484 resume before detaching.
20485 (win32_join): New.
20486 (win32_target_op): Add win32_join.
20487
20488 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20489
20490 * win32-low.c (win32-attach): Fix return value.
20491 * target.h (target_ops): Describe ATTACH return values.
20492
20493 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20494
20495 * win32-low.c (GETPROCADDRESS): Define.
20496 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20497 (winapi_DebugSetProcessKillOnExit): Likewise.
20498 (win32_create_inferior): Force usage of ansi CreateProcessA.
20499 (win32_attach): Use GETPROCADDRESS.
20500 (win32_detach): Likewise.
20501
20502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20503
20504 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20505
20506 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20507
20508 * win32-low.c: Commit leftover changes from 2007-03-29.
20509
20510 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20511
20512 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20513 fields short instead of int. Add explicit padding.
20514 (i387_cache_to_fsave): Remove unnecessary casts.
20515 (i387_fsave_to_cache): Doc fix.
20516 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20517
20518 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20519
20520 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20521 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20522
20523 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20524
20525 * configure.srv (arm*-*-mingw32ce*): Move near the other
20526 arm targets.
20527
20528 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20529
20530 * configure.ac: Add errno checking.
20531 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20532 sys/file.h and malloc.h.
20533 (AC_CHECK_DECLS): Add perror.
20534 (srv_mingwce): Handle.
20535 * configure.srv (i[34567]86-*-cygwin*): Add
20536 win32-i386-low.o to srv_tgtobj.
20537 (i[34567]86-*-mingw*): Likewise.
20538 (arm*-*-mingw32ce*): Add case.
20539 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20540 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20541 [__MINGW32CE__] (strerror): New function.
20542 [__MINGW32CE__] (errno): Define to GetLastError.
20543 [__MINGW32CE__] (COUNTOF): New macro.
20544 (remote_open): Remove extra close call.
20545 * mem-break.c (delete_breakpoint_at): New function.
20546 * mem-break.h (delete_breakpoint_at): Declare.
20547 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20548 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20549 [USE_WIN32API] (read, write): Add char* casts.
20550 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20551 * server.h: Include wincecompat.h on Windows CE.
20552 [HAVE_ERRNO_H]: Check.
20553 (perror): Declare if not declared.
20554 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20555 (perror_with_name): Remove errno declaration.
20556 * wincecompat.h: New.
20557 * wincecompat.c: New.
20558 * win32-low.h: New.
20559 * win32-arm-low.c: New.
20560 * win32-i386-low.c: New.
20561 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20562 (OUTMSG2): Make it safe.
20563 (_T): New macro.
20564 (COUNTOF): New macro.
20565 (NUM_REGS): Get it from the low target.
20566 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20567 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20568 (thread_rec): Let low target handle debug registers.
20569 (child_add_thread): Likewise.
20570 (child_init_thread_list): Likewise.
20571 (continue_one_thread): Likewise.
20572 (regptr): New.
20573 (do_child_fetch_inferior_registers): Move to ...
20574 * win32-i386-low.c: ... here, and rename to ...
20575 (do_fetch_inferior_registers): ... this.
20576 * win32-low.c (child_fetch_inferior_registers):
20577 Go through the low target.
20578 (do_child_store_inferior_registers): Use regptr.
20579 (strwinerror): New function.
20580 (win32_create_inferior): Handle Windows CE.
20581 Use strwinerror instead of strerror on Windows error
20582 codes. Add program to the error output.
20583 Don't close the main thread handle on Windows CE.
20584 (win32_attach): Use coredll.dll on Windows CE.
20585 (win32_kill): Close current process and current
20586 thread handles.
20587 (win32_detach): Use coredll.dll on Windows CE.
20588 (win32_resume): Let low target handle debug registers, and
20589 step request.
20590 (handle_exception): Add/Remove initial breakpoint. Avoid
20591 non-existant WSTOPSIG on Windows CE.
20592 (win32_read_inferior_memory): Cast to remove warning.
20593 (win32_arch_string): Go through the low target.
20594 (initialize_low): Call set_breakpoint_data with the low
20595 target's breakpoint.
20596 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20597 FOP_REGNUM, mappings): Move to ...
20598 * win32-i386-low.c: ... here.
20599 * win32-low.c (win32_thread_info): Move to ...
20600 * win32-low.h: ... here.
20601 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20602 win32-arm-low.c and wincecompat.c.
20603 (all:): Add $EXEEXT.
20604 (install-only:): Likewise.
20605 (gdbserver:): Likewise.
20606 (gdbreplay:): Likewise.
20607 * config.in: Regenerate.
20608 * configure: Regenerate.
20609
20610 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20611
20612 * win32-low.c: Rename typedef thread_info to
20613 win32_thread_info throughout.
20614
20615 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20616
20617 * win32-i386-low.c: Rename to ...
20618 * win32-low.c: ... this.
20619 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20620 * Makefile.in: Likewise.
20621
20622 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20623
20624 * remote-utils.c (monitor_output): Constify msg parameter.
20625 * server.h (monitor_output): Likewise.
20626 * win32-i386-low.c (handle_output_debug_string): New.
20627 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20628 handle_output_debug_string.
20629 (get_child_debug_event): Likewise.
20630
20631 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20632
20633 * server.c (main): Correct strtoul check.
20634
20635 2007-03-27 Jon Ringle <jon@ringle.org>
20636
20637 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20638
20639 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20640
20641 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20642
20643 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20644
20645 * terminal.h: Check HAVE_SGTTY_H.
20646
20647 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20648
20649 * remote-utils.c (remote_open): Print out the assigned port number.
20650
20651 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20652
20653 * remote-utils.c (monitor_output): New function.
20654 * server.c (debug_threads): Define here.
20655 (monitor_show_help): New function.
20656 (handle_query): Handle qRcmd.
20657 (main): Do not handle 'd' packet.
20658 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20659 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20660 of debug_threads.
20661
20662 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20663
20664 * Makefile.in (EXEEXT): New.
20665 (clean): Use $(EXEEXT).
20666
20667 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20668
20669 * target.h (target_ops): Rename send_signal to request_interrupt,
20670 and remove enum target_signal parameter.
20671 * linux-low.c (linux_request_interrupt): Rename from
20672 linux_send_signal, and always send SIGINT.
20673 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20674 and always send SIGINT.
20675 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20676 of send_signal.
20677 (input_interrupt): Likewise.
20678
20679 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20680
20681 * server.c (get_features_xml): Check if target implemented
20682 arch_string.
20683 * win32-i386-low.c (win32_arch_string): New.
20684 (win32_target_ops): Add win32_arch_string as arch_string member.
20685
20686 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20687
20688 * spu-low.c (spu_arch_string): New.
20689 (spu_target_ops): Add spu_arch_string.
20690
20691 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20692
20693 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20694 * configure.ac: Do not check for terminal.h.
20695 * configure, config.in: Regenerated.
20696
20697 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20698
20699 * Makefile.in (OBS): Add $(XML_BUILTIN).
20700 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20701 (clean): Update.
20702 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20703 (arm-with-iwmmxt.c): New.
20704 * config.in, configure: Regenerate.
20705 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20706 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20707 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20708 (arm*-*-linux*): Add iWMMXt and regset support.
20709 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20710 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20711 (arm_store_wmmxregset, target_regsets): New.
20712 * server.c (get_features_xml): Take annex argument. Check builtin
20713 XML documents.
20714 (handle_query): Handle multiple annexes.
20715
20716 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20717
20718 * remote-utils.c [USE_WIN32API] (read, write): Define.
20719 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20720 write.
20721
20722 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20723
20724 * linux-i386-low.c (the_low_target): Set arch_string.
20725 * linux-x86-64-low.c (the_low_target): Likewise.
20726 * linux-low.c (linux_arch_string): New.
20727 (linux_target_ops): Add it.
20728 * linux-low.h (struct linux_target_ops): Add arch_string.
20729 * server.c (write_qxfer_response): Use const void * for DATA.
20730 (get_features_xml): New.
20731 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20732 * target.h (struct target_ops): Add arch_string method.
20733
20734 2007-01-03 Denis Pilat <denis.pilat@st.com>
20735 Daniel Jacobowitz <dan@codesourcery.com>
20736
20737 * linux-low.c (linux_kill): Handle being called with no threads.
20738 * win32-i386-low.c (win32_kill): Likewise.
20739 (get_child_debug_event): Clear current_process_handle.
20740
20741 2006-12-30 Denis PILAT <denis.pilat@st.com>
20742 Daniel Jacobowitz <dan@codesourcery.com>
20743
20744 * remote-utils.c (remote_open): Check the type of specified
20745 serial port devices before opening them.
20746 * server.c (main): Kill the inferior if an error occurs during
20747 the first remote_open.
20748
20749 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20750
20751 * README: Update supported targets.
20752
20753 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20754
20755 * Makefile.in (clean): Remove reg-mips64.c.
20756 (reg-mips64.c, reg-mips64.o): New rules.
20757 * configure.srv: Handle mips64. Include regset support for mips.
20758 * linux-mips-low.c (union mips_register): New.
20759 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20760 (mips_breakpoint, mips_breakpoint_at): Use int.
20761 (mips_collect_register, mips_supply_register)
20762 (mips_collect_register_32bit, mips_supply_register_32bit)
20763 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20764 (mips_store_fpregset, target_regsets): New.
20765 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20766
20767 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20768
20769 * configure.srv: Add target "spu*-*-*".
20770 * Makefile.in (clean): Remove reg-spu.c.
20771 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20772 * spu-low.c: New file.
20773
20774 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20775
20776 * configure.ac: Correct td_thr_tls_get_addr test.
20777 * configure: Regenerated.
20778
20779 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20780
20781 * linux-low.c (linux_wait_for_event): Reformat. Use the
20782 pass_signals array.
20783 * remote-utils.c (decode_address_to_semicolon): New.
20784 * server.c (pass_signals, handle_general_set): New.
20785 (handle_query): Mention QPassSignals for qSupported.
20786 (main): Call handle_general_set.
20787 * server.h (pass_signals, decode_address_to_semicolon): New.
20788
20789 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20790
20791 * server.c (handle_query): Correct error handling for read_auxv.
20792
20793 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20794
20795 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20796 and srv_linux_thread_db to yes.
20797 * linux-s390-low.c (s390_fill_gregset): New function.
20798 (target_regsets): Define data structure.
20799
20800 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20801
20802 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20803 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20804 * config.in, configure: Regenerated.
20805 * inferiors.c (gdb_id_to_thread): New function.
20806 (gdb_id_to_thread_id): Use it.
20807 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20808 * linux-low.h (struct process_info): Add th member.
20809 (thread_db_get_tls_address): New prototype.
20810 * remote-utils.c (decode_address): Make non-static.
20811 * server.c (handle_query): Handle qGetTLSAddr.
20812 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20813 * target.h (struct target_ops): Add get_tls_address.
20814 * thread-db.c (maybe_attach_thread): Save the thread handle.
20815 (thread_db_get_tls_address): New.
20816
20817 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20818
20819 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20820 (linux_resume_one_process): Take a siginfo_t *. Update all
20821 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20822 (struct pending_signals): Add a siginfo_t.
20823 (linux_wait_for_process): Always set last_status.
20824 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20825 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20826 * linux-low.h (struct process_info): Add last_status.
20827
20828 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20829
20830 * remote-utils.c (try_rle): New function.
20831 (putpkt_binary): Use it.
20832
20833 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20834
20835 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20836 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20837 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20838 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20839 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20840 point registers.
20841
20842 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20843
20844 * server.c (terminal_fd): New variable.
20845 (old_foreground_pgrp): Likewise.
20846 (restore_old_foreground_pgrp): New function.
20847 (start_inferior): Record the terminal file descriptor in terminal_fd
20848 and its original foreground group in old_foreground_pgrp. Register
20849 restore_old_foreground_pgrp with atexit().
20850
20851 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20852
20853 * server.c (handle_query): Correct qPart to qXfer.
20854
20855 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20856
20857 * configure.ac: Check for more headers which are missing on
20858 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20859 * configure.srv: Add Cygwin and mingw32.
20860 * remote-utils.c: Don't include headers unconditionally which
20861 are missing on mingw32. Include <winsock.h> for mingw32.
20862 (remote_open): Adjust for mingw32 support. Flush
20863 standard error after writing to it.
20864 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20865 (unblock_async_io, enable_async_io, disable_async_io)
20866 (readchar, getpkt): Update for Winsock support.
20867 (prepare_resume_reply): Expect a protocol signal number.
20868 * server.c: Disable <sys/wait.h> on mingw32.
20869 (start_inferior): Adjust for mingw32 support. Flush
20870 standard error after writing to it.
20871 (attach_inferior): Likewise. Use protocol signal
20872 numbers.
20873 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20874 and names.
20875 * win32-i386-low.c: New file.
20876 * Makefile.in (XM_CLIBS): Set.
20877 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20878 (win32-i386-low.o): New dependency rule.
20879 * linux-low.c (linux_wait): Use target signal numbers.
20880 * target.h (struct target_ops): Doc fix.
20881 * server.h (target_signal_to_name): New prototype.
20882 * gdbreplay.c: Don't include headers unconditionally which
20883 are missing on mingw32. Include <winsock.h> for mingw32.
20884 (remote_close, remote_open): Adjust for Winsock support.
20885 * configure, config.in: Regenerated.
20886
20887 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20888
20889 * server.c (decode_xfer_read, write_qxfer_response): New.
20890 (handle_query): Take a packet length argument. Handle
20891 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20892 the qSupported response.
20893 (main): Update call to handle_query.
20894
20895 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20896
20897 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20898 (putpkt_binary): Renamed from putpkt and adjusted for binary
20899 data.
20900 (putpkt): New wrapper for putpkt_binary.
20901 (readchar): Don't mask off the high bit.
20902 (decode_X_packet): New function.
20903 * server.c (main): Call putpkt_binary if a handler sets the packet
20904 length. Save the length of the incoming packet. Handle 'X'.
20905 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20906
20907 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20908
20909 * server.c (handle_query): Handle qSupported.
20910
20911 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20912
20913 * remote-utils.c (all_symbols_looked_up): New variable.
20914 (look_up_one_symbol): Check it.
20915 * server.h (look_up_one_symbol): New declaration.
20916 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20917
20918 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20919
20920 * Makefile.in (linux-arm-low.o): Update dependencies.
20921 * linux-arm-low.c: Include "gdb_proc_service.h".
20922 (PTRACE_GET_THREAD_AREA): Define.
20923 (ps_get_thread_area): New function.
20924
20925 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20926
20927 * configure.srv (m68k*-*-uclinux*): New target.
20928 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20929 (linux_resume_one_process): Remove extraneous cast.
20930 (linux_read_offsets): New.
20931 (linux_target_op): Add linux_read_offsets on mmuless systems.
20932 * server.c (handle_query): Add qOffsets logic.
20933 * target.h (struct target_ops): Add read_offsets.
20934
20935 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20936
20937 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20938 (PTRACE_GET_THREAD_AREA): Define.
20939 (ps_get_thread_area): New function.
20940 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20941 (linux-x86-64-low.o): Update.
20942
20943 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20944
20945 * configure.ac: Remove checks for prfpregset_t.
20946 * gdb_proc_service.h: New file.
20947 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20948 new "gdb_proc_service.h".
20949 * proc-service.c: Likewise.
20950 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20951 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20952 * Makefile.in (gdb_proc_service_h): Updated.
20953 * configure, config.in: Regenerated.
20954
20955 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20956
20957 * remote-utils.c (prepare_resume_reply): Move declaration
20958 of gdb_id_from_wait to the top of the block.
20959
20960 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20961
20962 * linux-low.c (regsets_store_inferior_registers): Read the regset
20963 from the target before filling it.
20964
20965 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20966
20967 * server.c (attach_inferior): Return SIGTRAP for a successful
20968 attach.
20969
20970 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20971
20972 * Makefile.in (OBS): Add version.o.
20973 (STAGESTUFF): Delete.
20974 (version.o): Add dependencies.
20975 (version.c): Replace rule.
20976 (clean): Remove version.c.
20977 * server.c (gdbserver_version): New.
20978 (gdbserver_usage): Use printf.
20979 (main): Handle --version and --help.
20980 * server.h (version, host_name): Add declarations.
20981
20982 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20983
20984 * linux-arm-low.c:
20985 * linux-arm-low.c:
20986 * inferiors.c:
20987 * i387-fp.h:
20988 * i387-fp.c:
20989 * gdbreplay.c:
20990 * regcache.c:
20991 * proc-service.c:
20992 * mem-break.h:
20993 * mem-break.c:
20994 * linux-x86-64-low.c:
20995 * linux-sh-low.c:
20996 * linux-s390-low.c:
20997 * linux-ppc64-low.c:
20998 * linux-ppc-low.c:
20999 * linux-mips-low.c:
21000 * linux-m68k-low.c:
21001 * linux-m32r-low.c:
21002 * linux-low.h:
21003 * linux-low.c:
21004 * linux-ia64-low.c:
21005 * linux-i386-low.c:
21006 * linux-crisv32-low.c:
21007 * thread-db.c:
21008 * terminal.h:
21009 * target.h:
21010 * target.c:
21011 * server.h:
21012 * server.c:
21013 * remote-utils.c:
21014 * regcache.h:
21015 * utils.c:
21016 * Makefile.in:
21017 * configure.ac:
21018 * gdbserver.1: Add (C) after Copyright. Update the FSF
21019 address.
21020
21021 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21022
21023 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21024 (arm_breakpoint_at): Recognize both breakpoints.
21025 (the_low_target): Use the correct breakpoint instruction.
21026
21027 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21028
21029 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21030 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21031 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21032 (the_low_target): Update.
21033
21034 2005-10-25 Andreas Schwab <schwab@suse.de>
21035
21036 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21037
21038 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21039 (ia64_num_regs): Reduce to 462.
21040
21041 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21042
21043 * acinclude.m4: Correct quoting.
21044 * aclocal.m4: Regenerated.
21045
21046 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21047 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21048 (thread_db_init): Call thread_db_err_str.
21049 * configure.ac: Check for TD_VERSION.
21050 * config.in, configure: Regenerated.
21051
21052 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21053
21054 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21055
21056 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21057
21058 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21059 is not available. Define HAVE_PTRACE_GETREGS if it is.
21060 * config.in, configure: Regenerated.
21061 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21062 * linux-i386-low.c, linux-m68k-low.c: Update to use
21063 HAVE_PTRACE_GETREGS.
21064 * linux-low.c (regsets_fetch_inferior_registers)
21065 (regsets_store_inferior_registers): Only return 0 if we processed
21066 GENERAL_REGS.
21067 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21068 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21069
21070 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21071
21072 * inferiors.c (struct thread_info): Add gdb_id.
21073 (add_thread): Add gdb_id argument.
21074 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21075 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21076 calls to add_thread.
21077 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21078 * server.c (handle_query): Use thread_to_gdb_id.
21079 (handle_v_cont, main): Use gdb_id_to_thread_id.
21080 * server.h (add_thread): Update prototype.
21081 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21082 prototypes.
21083
21084 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21085
21086 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21087 left-padded registers.
21088 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21089 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21090
21091 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21092
21093 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21094 * configure: Regenerate.
21095 * config.in: Regenerate.
21096 * server.h (NEED_DECLARATION_STRERROR):
21097 Replace with !HAVE_DECL_STRERROR.
21098
21099 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21100
21101 * linux-low.c (linux_wait, linux_send_signal): Don't test
21102 an unsigned long variable for > 0 if it could be MAX_ULONG.
21103 * server.c (myresume): Likewise.
21104 * target.c (set_desired_inferior): Likewise.
21105
21106 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21107
21108 * configure.ac: Simplify and improve check for socklen_t.
21109 * configure, config.in: Regenerate.
21110
21111 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21112
21113 * acconfig.h: Remove.
21114 * configure.ac: Add a test for socklen_t. Use three-argument
21115 AC_DEFINE throughout.
21116 * config.in: Regenerated using autoheader 2.59.
21117 * configure: Regenerated.
21118
21119 * gdbreplay.c (socklen_t): Provide a default.
21120 (remote_open): Use socklen_t.
21121 * remote-utils.c (socklen_t): Provide a default.
21122 (remote_open): Use socklen_t.
21123 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21124 unsigned char.
21125
21126 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21127 char for buffers.
21128 * linux-low.c (linux_read_memory, linux_write_memory)
21129 (linux_read_auxv): Likewise.
21130 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21131 (check_mem_write): Likewise.
21132 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21133 Likewise.
21134 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21135 (registers_from_string, register_data): Likewise.
21136 * server.c (handle_query, main): Likewise.
21137 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21138 (decode_M_packet): Likewise.
21139 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21140 * target.h (struct target_ops): Update read_memory, write_memory,
21141 and read_auxv.
21142 (read_inferior_memory, write_inferior_memory): Update.
21143 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21144 to unsigned char *.
21145 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21146 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21147 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21148 linux-s390-low.c, linux-sh-low.c: Update for changes in
21149 read_inferior_memory and the_low_target->breakpoint.
21150
21151 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21152
21153 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21154 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21155 * configure.srv: Add powerpc64-*-linux*.
21156 * linux-ppc64-low.c: New file.
21157
21158 2005-05-23 Orjan Friberg <orjanf@axis.com>
21159
21160 * linux-cris-low.c: New file with support for CRIS.
21161 * linux-crisv32-low.c: Ditto for CRISv32.
21162 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21163 (clean): Add reg-cris.c and reg-crisv32.c.
21164 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21165 reg-crisv32.o, and reg-crisv32.c to make rules.
21166 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21167 recognized targets.
21168
21169 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21170
21171 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21172 of sizeof (PTRACE_XFER_TYPE).
21173 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21174
21175 2005-05-12 Orjan Friberg <orjanf@axis.com>
21176
21177 * target.h (struct target_ops): Add insert_watchpoint,
21178 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21179 pointers for hardware watchpoint support.
21180 * linux-low.h (struct linux_target_ops): Ditto.
21181 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21182 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21183 to linux_target_ops.
21184 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21185 reply packet.
21186 * server.c (main): Recognize 'Z' and 'z' packets.
21187
21188 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21189
21190 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21191 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21192 (the_low_target): Add new members.
21193
21194 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21195
21196 * proc-service.c (ps_lgetregs): Search all_processes instead of
21197 all_threads.
21198
21199 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21200
21201 * server.c (start_inferior): Change return type to int.
21202 (attach_inferior): Change sigptr to int *.
21203 (handle_v_cont, handle_v_requests): Change signal to int *.
21204 (main): Change signal to int.
21205
21206 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21207
21208 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21209 * configure.srv: Add m32r*-*-linux*.
21210 * linux-m32r-low.c: New file.
21211
21212 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21213
21214 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21215
21216 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21217
21218 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21219 Take unsigned long arguments for PIDs.
21220 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21221 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21222 (wait_for_sigstop, linux_resume_one_process)
21223 (regsets_fetch_inferior_registers, linux_send_signal)
21224 (linux_read_auxv): Likewise. Update the types of variables holding
21225 PIDs. Update format string specifiers.
21226 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21227 * remote-utils.c (prepare_resume_reply): Likewise.
21228 * server.c (cont_thread, general_thread, step_thread)
21229 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21230 unsigned long.
21231 (handle_query): Update format specifiers.
21232 (handle_v_cont, main): Use strtoul for thread IDs.
21233 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21234 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21235 (general_thread, step_thread, thread_from_wait)
21236 (old_thread_from_wait): Update.
21237 * target.h (struct thread_resume): Use unsigned long for THREAD.
21238 (struct target_ops): Use unsigned long for arguments to attach and
21239 thread_alive.
21240
21241 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21242
21243 * acinclude.m4: Include bfd/bfd.m4 directly.
21244 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21245 <agriffis@toolchain.org>.
21246 * aclocal.m4, configure: Regenerated.
21247
21248 2005-01-07 Andrew Cagney <cagney@gnu.org>
21249
21250 * configure.ac: Rename configure.in, require autoconf 2.59.
21251 * configure: Re-generate.
21252
21253 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21254
21255 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21256 LIBS when finished.
21257 * aclocal.m4: Regenerated.
21258 * configure: Regenerated.
21259
21260 2004-11-21 Andreas Schwab <schwab@suse.de>
21261
21262 * linux-m68k-low.c (m68k_num_gregs): Define.
21263 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21264 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21265 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21266 (m68k_breakpoint_at): New. Add to the_low_target.
21267
21268 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21269 srv_linux_thread_db to yes.
21270
21271 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21272
21273 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21274 (ARCH_SET_FS): Likewise.
21275 (ARCH_GET_FS): Likewise.
21276 (ARCH_GET_GS): Likewise.
21277
21278 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21279
21280 * linux-i386-low.c (ps_get_thread_area): New.
21281 * linux-x86-64-low.c (ps_get_thread_area): New.
21282 * linux-low.c: Include <sys/syscall.h>.
21283 (linux_kill_one_process): Don't kill the first thread here.
21284 (linux_kill): Kill the first thread here.
21285 (kill_lwp): New function.
21286 (send_sigstop, linux_send_signal): Use it.
21287 * proc-service.c: Clean up #ifdefs.
21288 (fpregset_info): Delete.
21289 (ps_lgetregs): Update and enable implementation.
21290 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21291 implementations.
21292 * remote-utils.c (struct sym_cache, symbol_cache): New.
21293 (input_interrupt): Print a clearer message.
21294 (async_io_enabled): New variable.
21295 (enable_async_io, disable_async_io): Use it. Update comments.
21296 (look_up_one_symbol): Use the symbol cache.
21297 * thread-db.c (thread_db_look_up_symbols): New function.
21298 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21299
21300 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21301
21302 * configure.in: Test for -rdynamic.
21303 * configure: Regenerated.
21304 * Makefile (INTERNAL_LDFLAGS): New.
21305 (gdbserver, gdbreplay): Use it.
21306
21307 2004-09-02 Andrew Cagney <cagney@gnu.org>
21308
21309 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21310
21311 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21312
21313 * linux-low.c (linux_wait): Clear all_processes list also.
21314
21315 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21316
21317 * linux-low.c: Include <errno.h>. Remove extern declaration of
21318 errno.
21319
21320 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21321
21322 * gdbreplay.c, server.h, utils.c: Update copyright years.
21323
21324 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21325
21326 * server.c (main): Print child status or termination signal from
21327 variable 'signal', not 'sig'.
21328
21329 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21330
21331 * linux-low.c (linux_read_memory): Change return type to
21332 int. Check for and return error from ptrace().
21333 * target.c (read_inferior_memory): Change return type to int. Pass
21334 back return status from the_target->read_memory().
21335 * target.h (struct target_ops): Adapt *read_memory() prototype.
21336 Update comment.
21337 (read_inferior_memory): Adapt prototype.
21338 * server.c (main): Return an error packet if
21339 read_inferior_memory() returns an error.
21340
21341 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21342
21343 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21344 Unify with other clean targets.
21345
21346 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21347
21348 * server.c (handle_v_cont): Call set_desired_inferior.
21349
21350 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21351
21352 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21353
21354 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21355
21356 * linux-low.c (linux_wait): Unblock async I/O.
21357 (linux_resume): Block and enable async I/O.
21358 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21359 * server.h (block_async_io, unblock_async_io): Add prototypes.
21360
21361 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21362
21363 * remote-utils.c (remote_open): Print a status notice after
21364 opening a TCP port.
21365 * server.c (attach_inferior): Print a status notice after
21366 attaching.
21367
21368 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21369
21370 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21371
21372 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21373
21374 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21375 error packet.
21376 * server.c, target.h: Update copyright years.
21377
21378 2004-02-25 Roland McGrath <roland@redhat.com>
21379
21380 * target.h (struct target_ops): New member `read_auxv'.
21381 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21382 * linux-low.c (linux_read_auxv): New function.
21383 (linux_target_ops): Initialize `read_auxv' member to that.
21384
21385 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21386
21387 Committed by Jim Blandy <jimb@redhat.com>.
21388
21389 * linux-s390-low.c (s390_num_regs): Update.
21390 (s390_regmap): Remove control registers. Use __s390x__ predefine
21391 instead of GPR_SIZE to distiguish s390 and s390x targets.
21392
21393 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21394
21395 * linux-low.c: Update copyright year.
21396 (check_removed_breakpoint): Clear pending_is_breakpoint.
21397 (linux_set_resume_request, linux_queue_one_thread)
21398 (resume_status_pending_p): New functions.
21399 (linux_continue_one_thread): Use process->resume.
21400 (linux_resume): Only resume threads if there are no pending events.
21401 * linux-low.h (struct process_info): Add resume request
21402 pointer.
21403
21404 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21405
21406 * regcache.c (new_register_cache): Clear the allocated register
21407 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21408
21409 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21410
21411 * linux-low.c (linux_resume): Take a struct thread_resume *
21412 argument.
21413 (linux_wait): Update call.
21414 (resume_ptr): New static variable.
21415 (linux_continue_one_thread): Renamed from
21416 linux_continue_one_process. Use resume_ptr.
21417 (linux_resume): Use linux_continue_one_thread.
21418 * server.c (handle_v_cont, handle_v_requests): New functions.
21419 (myresume): New function.
21420 (main): Handle 'v' case.
21421 * target.h (struct thread_resume): New type.
21422 (struct target_ops): Change argument of "resume" to struct
21423 thread_resume *.
21424 (myresume): Delete macro.
21425
21426 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21427
21428 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21429 (uninstall): Support DESTDIR.
21430
21431 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21432
21433 * configure.srv: Add xscale*linux copy of arm*linux entry.
21434
21435 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21436
21437 * linux-arm-low.c (arm_reinsert_addr): New function.
21438 (the_low_target): Add arm_reinsert_addr.
21439
21440 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21441
21442 * mem-break.c: Remove whitespace at end of file.
21443
21444 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21445
21446 * configure.in: Check whether we need to prototype strerror.
21447 * server.h: Optionally prototype strerror.
21448 * gdbreplay.c (perror_with_name): Use strerror.
21449 * linux-low.c (linux_attach_lwp): Use strerror.
21450 * utils.c (perror_with_name): Use strerror.
21451 * config.in, configure: Regenerated.
21452
21453 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21454
21455 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21456 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21457
21458 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21459
21460 * Makefile.in (SFILES): Update.
21461 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21462 low-sun3.c: Remove files.
21463
21464 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21465
21466 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21467 (linux_detach_one_process, linux_detach): New functions.
21468 (linux_target_ops): Add linux_detach.
21469 * server.c (main): Handle 'D' packet.
21470 * target.h (struct target_ops): Add "detach" member.
21471 (detach_inferior): Define.
21472
21473 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21474
21475 From Kelley Cook <kelleycook@wideopenwest.com>:
21476 * configure.srv: Accept i[34567]86 variants.
21477
21478 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21479
21480 * linux-low.c (linux_wait_for_event): Correct comment typos.
21481 (linux_resume_one_process): Call check_removed_breakpoint.
21482 (linux_send_signal): New function.
21483 (linux_target_ops): Add linux_send_signal.
21484 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21485 of kill.
21486 * target.h (struct target_ops): Add send_signal.
21487
21488 2003-05-29 Jim Blandy <jimb@redhat.com>
21489
21490 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21491 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21492 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21493 away part of the register's value.
21494
21495 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21496
21497 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21498 (linux_wait_for_event, linux_init_signals): Likewise.
21499
21500 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21501
21502 * configure.in: Check for stdlib.h.
21503 * configure: Regenerated.
21504 * config.in: Regenerated.
21505
21506 2003-01-04 Andreas Schwab <schwab@suse.de>
21507
21508 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21509
21510 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21511
21512 * Makefile.in: Remove obsolete code.
21513
21514 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21515
21516 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21517 defined(PT_FPR0_HI).
21518
21519 2002-11-17 Stuart Hughes <seh@zee2.com>
21520
21521 * linux-arm-low.c (arm_num_regs): Increase.
21522 (arm_regmap): Include status register.
21523
21524 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21525
21526 * linux-low.c (register_addr): Remove incorrect -1 check.
21527
21528 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21529
21530 * linux-low.c (linux_create_inferior): Call setpgid. Return
21531 the new PID.
21532 (unstopped_p, linux_signal_pid): Remove.
21533 (linux_target_ops): Remove linux_signal_pid.
21534 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21535 global instead of target method.
21536 * target.h (struct target_ops): Remove signal_pid. Update comment
21537 for create_inferior.
21538 * server.c (signal_pid): New variable.
21539 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21540 gdbserver. Set the child to be the foreground process group.
21541 (attach_inferior): Set signal_pid.
21542
21543 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21544
21545 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21546
21547 2002-08-20 Jim Blandy <jimb@redhat.com>
21548
21549 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21550 default for this.
21551
21552 2002-08-01 Andrew Cagney <cagney@redhat.com>
21553
21554 * Makefile.in: Make chill references obsolete.
21555
21556 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21557
21558 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21559 * configure: Regenerate.
21560 * config.in: Regenerate.
21561
21562 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21563
21564 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21565 (perror_with_name, remote_close, remote_open, expect, play): Static.
21566
21567 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21568
21569 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21570 byte offsets instead of an array of indexes.
21571 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21572
21573 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21574
21575 * regcache.c: Add comment.
21576
21577 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21578
21579 * thread-db.c: New file.
21580 * proc-service.c: New file.
21581 * acinclude.m4: New file.
21582 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21583 proc-service.o, and thread-db.o.
21584 (linux-low.o): Add USE_THREAD_DB.
21585 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21586 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21587 * aclocal.m4: Regenerated.
21588 * config.in: Regenerated.
21589 * configure: Regenerated.
21590 * configure.in: Check for proc_service.h, sys/procfs.h,
21591 thread_db.h, and linux/elf.h headrs.
21592 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21593 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21594 Check for -lthread_db and thread support.
21595 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21596 PowerPC, and SuperH.
21597 * i387-fp.c: Constify arguments.
21598 * i387-fp.h: Likewise.
21599 * inferiors.c: (struct thread_info): Renamed from
21600 `struct inferior_info'. Remove PID member. Use generic inferior
21601 list header. All uses updated.
21602 (inferiors, signal_pid): Removed.
21603 (all_threads): New variable.
21604 (get_thread): Define.
21605 (add_inferior_to_list): New function.
21606 (for_each_inferior): New function.
21607 (change_inferior_id): New function.
21608 (add_inferior): Removed.
21609 (remove_inferior): New function.
21610 (add_thread): New function.
21611 (free_one_thread): New function.
21612 (remove_thread): New function.
21613 (clear_inferiors): Use for_each_inferior and free_one_thread.
21614 (find_inferior): New function.
21615 (find_inferior_id): New function.
21616 (inferior_target_data): Update argument type.
21617 (set_inferior_target_data): Likewise.
21618 (inferior_regcache_data): Likewise.
21619 (set_inferior_regcache_data): Likewise.
21620 * linux-low.c (linux_bp_reinsert): Remove.
21621 (all_processes, stopping_threads, using_thrads)
21622 (struct pending_signals, debug_threads, pid_of): New.
21623 (inferior_pid): Replace with macro.
21624 (struct inferior_linux_data): Remove.
21625 (get_stop_pc, add_process): New functions.
21626 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21627 Use add_process and add_thread.
21628 (linux_attach_lwp): New function, based on old linux_attach. Use
21629 add_process and add_thread. Set stop_expected for new threads.
21630 (linux_attach): New function.
21631 (linux_kill_one_process): New function.
21632 (linux_kill): Kill all LWPs.
21633 (linux_thread_alive): Use find_inferior_id.
21634 (check_removed_breakpoints, status_pending_p): New functions.
21635 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21636 Update. Use WNOHANG. Wait for cloned processes also. Update process
21637 struct for the found process.
21638 (linux_wait_for_event): New function.
21639 (linux_wait): Use it. Support LWPs.
21640 (send_sigstop, wait_for_sigstop, stop_all_processes)
21641 (linux_resume_one_process, linux_continue_one_process): New functions.
21642 (linux_resume): Support LWPs.
21643 (REGISTER_RAW_SIZE): Remove.
21644 (fetch_register): Use register_size instead. Call supply_register.
21645 (usr_store_inferior_registers): Likewise. Call collect_register.
21646 Fix recursive case.
21647 (regsets_fetch_inferior_registers): Improve error message.
21648 (regsets_store_inferior_registers): Add debugging.
21649 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21650 (unstopped_p, linux_signal_pid): New functions.
21651 (linux_target_ops): Add linux_signal_pid.
21652 (linux_init_signals): New function.
21653 (initialize_low): Call it. Initialize using_threads.
21654 * regcache.c (inferior_regcache_data): Add valid
21655 flag.
21656 (get_regcache): Fetch registers lazily. Add fetch argument
21657 and update all callers.
21658 (regcache_invalidate_one, regcache_invalidate): New
21659 functions.
21660 (new_register_cache): Renamed from create_register_cache.
21661 Return the new regcache.
21662 (free_register_cache): Change argument to a void *.
21663 (registers_to_string, registers_from_string): Call get_regcache
21664 with fetch flag set.
21665 (register_data): Make static. Pass fetch flag to get_regcache.
21666 (supply_register): Call get_regcache with fetch flag clear.
21667 (collect_register): Call get_regcache with fetch flag set.
21668 (collect_register_as_string): New function.
21669 * regcache.h: Update.
21670 * remote-utils.c (putpkt): Flush after debug output and use
21671 stderr.
21672 Handle input interrupts while waiting for an ACK.
21673 (input_interrupt): Use signal_pid method.
21674 (getpkt): Flush after debug output and use stderr.
21675 (outreg): Use collect_register_as_string.
21676 (new_thread_notify, dead_thread_notify): New functions.
21677 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21678 and general_thread.
21679 (look_up_one_symbol): Flush after debug output.
21680 * server.c (step_thread, server_waiting): New variables.
21681 (start_inferior): Don't use signal_pid. Update call to mywait.
21682 (attach_inferior): Update call to mywait.
21683 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21684 (main): Don't fetch/store registers explicitly. Use
21685 set_desired_inferior. Support proposed ``Hs'' packet. Update
21686 calls to mywait.
21687 * server.h: Update.
21688 (struct inferior_list, struct_inferior_list_entry): New.
21689 * target.c (set_desired_inferior): New.
21690 (write_inferior_memory): Constify.
21691 (mywait): New function.
21692 * target.h: Update.
21693 (struct target_ops): New signal_pid method.
21694 (mywait): Removed macro, added prototype.
21695
21696 * linux-low.h (regset_func): Removed.
21697 (regset_fill_func, regset_store_func): New.
21698 (enum regset_type): New.
21699 (struct regset_info): Add type field. Use new operation types.
21700 (struct linux_target_ops): stop_pc renamed to get_pc.
21701 Add decr_pc_after_break and breakpoint_at.
21702 (get_process, get_thread_proess, get_process_thread)
21703 (strut process_info, all_processes, linux_attach_lwp)
21704 (thread_db_init): New.
21705
21706 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21707 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21708 (the_low_target): Add new members.
21709 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21710 (i386_store_fpxregset): Constify.
21711 (target_regsets): Add new kind identifier.
21712 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21713 (i386_set_pc): Add debugging.
21714 (i386_breakpoint_at): New function.
21715 (the_low_target): Add new members.
21716 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21717 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21718 (mips_breakpoint_at): New.
21719 (the_low_target): Add new members.
21720 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21721 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21722 (the_low_target): Add new members.
21723 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21724 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21725 (the_low_target): Add new members.
21726 * linux-x86-64-low.c (target_regsets): Add new kind
21727 identifier.
21728
21729 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21730
21731 From Martin Pool <mbp@samba.org>:
21732 * server.c (gdbserver_usage): New function.
21733 (main): Call it.
21734
21735 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21736
21737 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21738 stop_at -> stop_pc.
21739
21740 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21741
21742 * Makefile.in: Remove obsolete code.
21743
21744 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21745
21746 * linux-low.c (regsets_fetch_inferior_registers),
21747 (regsets_store_inferior_registers): Removed cast to int from
21748 ptrace() calls.
21749 * regcache.h: Added declaration of struct inferior_info.
21750
21751 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21752
21753 * inferiors.c (struct inferior_info): Add regcache_data.
21754 (add_inferior): Call create_register_cache.
21755 (clear_inferiors): Call free_register_cache.
21756 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21757 * regcache.c (struct inferior_regcache_data): New.
21758 (registers): Remove.
21759 (get_regcache): New function.
21760 (create_register_cache, free_register_cache): New functions.
21761 (set_register_cache): Don't initialize the register cache here.
21762 (registers_to_string, registers_from_string, register_data): Call
21763 get_regcache.
21764 * regcache.h: Add prototypes.
21765 * server.h: Likewise.
21766
21767 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21768
21769 * mem-break.c: New file.
21770 * mem-break.h: New file.
21771 * Makefile.in: Add mem-break.o rule; update server.h
21772 dependencies.
21773 * inferiors.c (struct inferior_info): Add target_data
21774 member.
21775 (clear_inferiors): Free target_data member if set.
21776 (inferior_target_data, set_inferior_target_data): New functions.
21777 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21778 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21779 * linux-low.c (linux_bp_reinsert): New variable.
21780 (struct inferior_linux_data): New.
21781 (linux_create_inferior): Use set_inferior_target_data.
21782 (linux_attach): Likewise. Call add_inferior.
21783 (linux_wait_for_one_inferior): New function.
21784 (linux_wait): Call it.
21785 (linux_write_memory): Add const.
21786 (initialize_low): Call set_breakpoint_data.
21787 * linux-low.h (struct linux_target_ops): Add breakpoint
21788 handling members.
21789 * server.c (attach_inferior): Remove extra add_inferior
21790 call.
21791 * server.h: Include mem-break.h. Update inferior.c
21792 prototypes.
21793 * target.c (read_inferior_memory)
21794 (write_inferior_memory): New functions.
21795 * target.h (read_inferior_memory)
21796 (write_inferior_memory): Change macros to prototypes.
21797 (struct target_ops): Update comments. Add const to write_memory
21798 definition.
21799
21800 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21801
21802 * linux-low.c (usr_store_inferior_registers): Support
21803 registers which are allowed to fail to store.
21804 * linux-low.h (linux_target_ops): Likewise.
21805 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21806 (ppc_cannot_store_register): FPSCR may not be storable.
21807
21808 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21809
21810 * server.h: Include <string.h> if HAVE_STRING_H.
21811 * ChangeLog: Correct paths in last ChangeLog entry.
21812
21813 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21814
21815 * linux-low.h: Remove obsolete prototypes.
21816 (struct linux_target_ops): New.
21817 (extern the_low_target): New.
21818 * linux-low.c (num_regs, regmap): Remove declarations.
21819 (register_addr): Use the_low_target explicitly.
21820 (fetch_register): Likewise.
21821 (usr_fetch_inferior_registers): Likewise.
21822 (usr_store_inferior_registers): Likewise.
21823 * linux-arm-low.c (num_regs): Remove.
21824 (arm_num_regs): Define.
21825 (arm_regmap): Renamed from regmap, made static.
21826 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21827 made static.
21828 (arm_cannot_store_register): Renamed from cannot_store_register,
21829 made static.
21830 (the_low_target): New.
21831 * linux-i386-low.c (num_regs): Remove.
21832 (i386_num_regs): Define.
21833 (i386_regmap): Renamed from regmap, made static.
21834 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21835 made static.
21836 (i386_cannot_store_register): Renamed from cannot_store_register,
21837 made static.
21838 (the_low_target): New.
21839 * linux-ia64-low.c (num_regs): Remove.
21840 (ia64_num_regs): Define.
21841 (ia64_regmap): Renamed from regmap, made static.
21842 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21843 made static.
21844 (ia64_cannot_store_register): Renamed from cannot_store_register,
21845 made static.
21846 (the_low_target): New.
21847 * linux-m68k-low.c (num_regs): Remove.
21848 (m68k_num_regs): Define.
21849 (m68k_regmap): Renamed from regmap, made static.
21850 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21851 made static.
21852 (m68k_cannot_store_register): Renamed from cannot_store_register,
21853 made static.
21854 (the_low_target): New.
21855 * linux-mips-low.c (num_regs): Remove.
21856 (mips_num_regs): Define.
21857 (mips_regmap): Renamed from regmap, made static.
21858 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21859 made static.
21860 (mips_cannot_store_register): Renamed from cannot_store_register,
21861 made static.
21862 (the_low_target): New.
21863 * linux-ppc-low.c (num_regs): Remove.
21864 (ppc_num_regs): Define.
21865 (ppc_regmap): Renamed from regmap, made static.
21866 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21867 made static.
21868 (ppc_cannot_store_register): Renamed from cannot_store_register,
21869 made static.
21870 (the_low_target): New.
21871 * linux-s390-low.c (num_regs): Remove.
21872 (s390_num_regs): Define.
21873 (s390_regmap): Renamed from regmap, made static.
21874 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21875 made static.
21876 (s390_cannot_store_register): Renamed from cannot_store_register,
21877 made static.
21878 (the_low_target): New.
21879 * linux-sh-low.c (num_regs): Remove.
21880 (sh_num_regs): Define.
21881 (sh_regmap): Renamed from regmap, made static.
21882 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21883 made static.
21884 (sh_cannot_store_register): Renamed from cannot_store_register,
21885 made static.
21886 (the_low_target): New.
21887 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21888 (the_low_target): New.
21889
21890 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21891
21892 * Makefile.in: Add stamp-h target.
21893 * configure.in: Create stamp-h.
21894 * configure: Regenerated.
21895
21896 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21897
21898 * inferiors.c: New file.
21899 * target.c: New file.
21900 * target.h: New file.
21901 * Makefile.in: Add target.o and inferiors.o. Update
21902 dependencies.
21903 * linux-low.c (inferior_pid): New static variable,
21904 moved from server.c.
21905 (linux_create_inferior): Renamed from create_inferior.
21906 Call add_inferior. Return 0 on success instead of a PID.
21907 (linux_attach): Renamed from myattach.
21908 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21909 (linux_thread_alive): Renamed from mythread_alive.
21910 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21911 child dies.
21912 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21913 (regsets_store_inferior_registers): Correct error message.
21914 Add missing ``return 0''.
21915 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21916 (linux_store_registers): Renamed from store_inferior_registers.
21917 (linux_read_memory): Renamed from read_inferior_memory.
21918 (linux_write_memory): Renamed from write_inferior_memory.
21919 (linux_target_ops): New structure.
21920 (initialize_low): Call set_target_ops ().
21921 * remote-utils.c (unhexify): New function.
21922 (hexify): New function.
21923 (input_interrupt): Send signals to ``signal_pid''.
21924 * server.c (inferior_pid): Remove.
21925 (start_inferior): Update create_inferior call.
21926 (attach_inferior): Call add_inferior.
21927 (handle_query): New function.
21928 (main): Call handle_query for `q' packets.
21929 * server.h: Include "target.h". Remove obsolete prototypes.
21930 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21931
21932 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21933
21934 * Makefile.in: Add WARN_CFLAGS. Update configury
21935 dependencies.
21936 * configure.in: Check for <string.h>
21937 * configure: Regenerate.
21938 * config.in: Regenerate.
21939 * gdbreplay.c: Include needed system headers.
21940 (remote_open): Remove strchr prototype.
21941 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21942 * regcache.c (supply_register): Change buf argument to const void *.
21943 (supply_register_by_name): Likewise.
21944 (collect_register): Change buf argument to void *.
21945 (collect_register_by_name): Likewise.
21946 * regcache.h: Add missing prototypes.
21947 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21948 * server.c (handle_query): New function.
21949 (attached): New static variable, moved out of main.
21950 (main): Quiet longjmp clobber warnings.
21951 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21952 * utils.c (error): Remove NORETURN.
21953 (fatal): Likewise.
This page took 0.57209 seconds and 3 git commands to generate.