Normalize handle_output_debug_string API
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-08 Tom Tromey <tromey@adacore.com>
2
3 * win32-low.c (handle_output_debug_string): Add parameter. Change
4 return type.
5 (win32_kill, get_child_debug_event): Update.
6
7 2020-04-08 Tom Tromey <tromey@adacore.com>
8
9 * win32-low.c (current_process_handle, current_process_id)
10 (main_thread_id, last_sig, current_event, siginfo_er): Move to
11 nat/windows-nat.c.
12
13 2020-04-08 Tom Tromey <tromey@adacore.com>
14
15 * win32-low.c (get_image_name): Remove.
16 (handle_load_dll): Update.
17
18 2020-04-08 Tom Tromey <tromey@adacore.com>
19
20 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
21 No longer static. Change parameters.
22 (child_add_thread, child_fetch_inferior_registers)
23 (child_store_inferior_registers, win32_resume)
24 (win32_get_tib_address): Update.
25
26 2020-04-08 Tom Tromey <tromey@adacore.com>
27
28 * win32-low.h (struct win32_target_ops): Use qualified names where
29 needed.
30 * win32-i386-low.c: Add "using namespace".
31 * win32-low.c: Add "using namespace".
32 * win32-arm-low.c: Add "using namespace".
33
34 2020-04-08 Tom Tromey <tromey@adacore.com>
35
36 * win32-low.c (delete_thread_info): Don't call CloseHandle.
37
38 2020-04-08 Tom Tromey <tromey@adacore.com>
39
40 * win32-low.c (win32_require_context, suspend_one_thread): Use
41 windows_thread_info::suspend.
42 (continue_one_thread): Use windows_thread_info::resume.
43 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
44
45 2020-04-08 Tom Tromey <tromey@adacore.com>
46
47 * win32-i386-low.c (update_debug_registers)
48 (i386_prepare_to_resume, i386_thread_added): Update.
49
50 2020-04-08 Tom Tromey <tromey@adacore.com>
51
52 * win32-low.c (child_add_thread): Use new.
53 (delete_thread_info): Use delete.
54
55 2020-04-08 Tom Tromey <tromey@adacore.com>
56
57 * win32-low.h (struct windows_thread_info): Remove.
58
59 2020-04-08 Tom Tromey <tromey@adacore.com>
60
61 * win32-low.h (struct windows_thread_info): Rename from
62 win32_thread_info. Remove typedef.
63 (struct win32_target_ops, win32_require_context): Update.
64 * win32-low.c (win32_get_thread_context)
65 (win32_set_thread_context, win32_prepare_to_resume)
66 (win32_require_context, thread_rec, child_add_thread)
67 (delete_thread_info, continue_one_thread)
68 (child_fetch_inferior_registers, child_store_inferior_registers)
69 (win32_resume, suspend_one_thread, win32_get_tib_address):
70 Update.
71 * win32-i386-low.c (update_debug_registers)
72 (win32_get_current_dr, i386_get_thread_context)
73 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
74 (i386_fetch_inferior_register, i386_store_inferior_register):
75 Update.
76 * win32-arm-low.c (arm_get_thread_context)
77 (arm_fetch_inferior_register, arm_store_inferior_register):
78 Update.
79
80 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
81
82 * linux-low.h (struct linux_target_ops): Remove.
83 (the_low_target): Remove.
84 * linux-x86-low.cc (the_low_target): Remove.
85 * linux-aarch64-low.cc (the_low_target): Ditto.
86 * linux-arm-low.cc (the_low_target): Ditto.
87 * linux-bfin-low.cc (the_low_target): Ditto.
88 * linux-cris-low.cc (the_low_target): Ditto.
89 * linux-crisv32-low.cc (the_low_target): Ditto.
90 * linux-ia64-low.cc (the_low_target): Ditto.
91 * linux-m32r-low.cc (the_low_target): Ditto.
92 * linux-m68k-low.cc (the_low_target): Ditto.
93 * linux-mips-low.cc (the_low_target): Ditto.
94 * linux-nios2-low.cc (the_low_target): Ditto.
95 * linux-ppc-low.cc (the_low_target): Ditto.
96 * linux-riscv-low.cc (the_low_target): Ditto.
97 * linux-s390-low.cc (the_low_target): Ditto.
98 * linux-sh-low.cc (the_low_target): Ditto.
99 * linux-sparc-low.cc (the_low_target): Ditto.
100 * linux-tic6x-low.cc (the_low_target): Ditto.
101 * linux-tile-low.cc (the_low_target): Ditto.
102 * linux-xtensa-low.cc (the_low_target): Ditto.
103
104 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
105
106 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
107 linux target define the op by overriding the declaration in
108 process_stratum_target.
109
110 * linux-low.h (struct linux_target_ops): Remove the op.
111 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
112 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
113 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
114 (x86_get_ipa_tdesc_idx): Turn into...
115 (x86_target::get_ipa_tdesc_idx): ...this.
116 (the_low_target): Remove the op field.
117 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
118 (ppc_get_ipa_tdesc_idx): Turn into...
119 (ppc_target::get_ipa_tdesc_idx): ...this.
120 (the_low_target): Remove the op field.
121 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
122 (s390_get_ipa_tdesc_idx): Turn into...
123 (s390_target::get_ipa_tdesc_idx): ...this.
124 (the_low_target): Remove the op field.
125
126 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
127
128 Turn the 'get_syscall_trapinfo' linux target op into a method
129 of process_stratum_target.
130
131 * linux-low.h (struct linux_target_ops): Remove the op.
132 (class linux_process_target) <get_syscall_trapinfo>
133 <gdb_catch_this_syscall>
134 <low_supports_catch_syscall>
135 <low_get_syscall_trapinfo>: Declare.
136 * linux-low.cc (get_syscall_trapinfo): Turn into...
137 (linux_process_target::get_syscall_trapinfo): ...this.
138 (linux_process_target::low_get_syscall_trapinfo): Define.
139 (gdb_catch_this_syscall_p): Turn into...
140 (linux_process_target::gdb_catch_this_syscall): ...this.
141 (linux_process_target::low_supports_catch_syscall): Define.
142
143 Update the callers below.
144
145 (linux_process_target::wait_1)
146 (linux_process_target::supports_catch_syscall)
147
148 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
149 <low_get_syscall_trapinfo>: Declare.
150 (x86_target::low_supports_catch_syscall): Define.
151 (x86_get_syscall_trapinfo): Turn into...
152 (x86_target::low_get_syscall_trapinfo): ...this.
153 (the_low_target): Remove the op field.
154 * linux-aarch64-low.cc (class aarch64_target)
155 <low_supports_catch_syscall>
156 <low_get_syscall_trapinfo>: Declare.
157 (aarch64_target::low_supports_catch_syscall): Define.
158 (aarch64_get_syscall_trapinfo): Turn into...
159 (aarch64_target::low_get_syscall_trapinfo): ...this.
160 (the_low_target): Remove the op field.
161 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
162 <low_get_syscall_trapinfo>: Declare.
163 (arm_target::low_supports_catch_syscall): Define.
164 (arm_get_syscall_trapinfo): Turn into...
165 (arm_target::low_get_syscall_trapinfo): ...this.
166 (the_low_target): Remove the op field.
167 * linux-ppc-low.cc (the_low_target): Remove the op field.
168 * linux-s390-low.cc (the_low_target): Remove the op field.
169
170 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
171
172 Remove the 'supports_hardware_single_step' linux target op and
173 override the process_stratum_target's op definition in
174 linux_process_target to return true.
175
176 * linux-low.h (struct linux_target_ops): Remove the op.
177 (class linux_process_target) <finish_step_over>
178 <maybe_hw_step>: Declare.
179 * linux-low.cc (can_hardware_single_step): Remove.
180 (maybe_hw_step): Turn into...
181 (linux_process_target::maybe_hw_step): ...this.
182 (finish_step_over): Turn into...
183 (linux_process_target::finish_step_over): ...this.
184 (linux_process_target::supports_hardware_single_step): Update
185 to return true.
186
187 Update the callers below.
188
189 (linux_process_target::single_step)
190 (linux_process_target::resume_one_lwp_throw)
191
192 * linux-arm-low.cc (class arm_target)
193 <supports_hardware_single_step>: Declare.
194 (arm_supports_hardware_single_step): Turn into...
195 (arm_target::supports_hardware_single_step): ...this.
196 (the_low_target): Remove the op field.
197 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
198 (the_low_target): Remove the op field.
199 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
200 Remove.
201 (the_low_target): Remove the op field.
202 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
203 (the_low_target): Remove the op field.
204 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
205 (the_low_target): Remove the op field.
206 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
207 (the_low_target): Remove the op field.
208 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
209 (the_low_target): Remove the op field.
210 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
211 (the_low_target): Remove the op field.
212 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
213 (the_low_target): Remove the op field.
214 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
215 (the_low_target): Remove the op field.
216 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
217 (the_low_target): Remove the op field.
218 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
219 (the_low_target): Remove the op field.
220 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
221 Remove.
222 (the_low_target): Remove the op field.
223
224 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
225
226 Turn the 'supports_range_stepping' linux target op into a method
227 of linux_process_target.
228
229 * linux-low.h (struct linux_target_ops): Remove the op.
230 (class linux_process_target) <low_supports_range_stepping>: Declare.
231 * linux-low.cc (linux_process_target::low_supports_range_stepping):
232 Define.
233 (linux_process_target::supports_range_stepping): Update the call
234 site.
235 * linux-x86-low.cc (class x86_target)
236 <low_supports_range_stepping>: Declare.
237 (x86_supports_range_stepping): Turn into...
238 (x86_target::low_supports_range_stepping): ...this.
239 (the_low_target): Remove the op field.
240 * linux-aarch64-low.cc (class aarch64_target)
241 <low_supports_range_stepping>: Declare.
242 (aarch64_supports_range_stepping): Turn into...
243 (aarch64_target::low_supports_range_stepping): ...this.
244 (the_low_target): Remove the op field.
245 * linux-arm-low.cc (the_low_target): Remove the op field.
246 * linux-bfin-low.cc (the_low_target): Ditto.
247 * linux-crisv32-low.cc (the_low_target): Ditto.
248 * linux-m32r-low.cc (the_low_target): Ditto.
249 * linux-m68k-low.cc (the_low_target): Ditto.
250 * linux-ppc-low.cc (the_low_target): Ditto.
251 * linux-s390-low.cc (the_low_target): Ditto.
252 * linux-sh-low.cc (the_low_target): Ditto.
253 * linux-tic6x-low.cc (the_low_target): Ditto.
254 * linux-tile-low.cc (the_low_target): Ditto.
255 * linux-xtensa-low.cc (the_low_target): Ditto.
256
257 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
258
259 Remove the 'emit_ops' linux target ops and let the concrete
260 linux target define the op by overriding the declaration of
261 process_stratum_target.
262
263 * linux-low.h (struct linux_target_ops): Remove the op.
264 (class linux_process_target) <emit_ops>: Remove.
265 * linux-low.cc (linux_process_target::emit_ops): Remove.
266 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
267 (x86_emit_ops): Turn into...
268 (x86_target::emit_ops): ...this.
269 (the_low_target): Remove the op field.
270 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
271 (aarch64_emit_ops): Turn into...
272 (aarch64_target::emit_ops): ...this.
273 (the_low_target): Remove the op field.
274 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
275 (ppc_emit_ops): Turn into...
276 (ppc_target::emit_ops): ...this.
277 (the_low_target): Remove the op field.
278 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
279 (s390_emit_ops): Turn into...
280 (s390_target::emit_ops): ...this.
281 (the_low_target): Remove the op field.
282 * linux-arm-low.cc (the_low_target): Remove the op field.
283 * linux-bfin-low.cc (the_low_target): Ditto.
284 * linux-crisv32-low.cc (the_low_target): Ditto.
285 * linux-m32r-low.cc (the_low_target): Ditto.
286 * linux-m68k-low.cc (the_low_target): Ditto.
287 * linux-sh-low.cc (the_low_target): Ditto.
288 * linux-tic6x-low.cc (the_low_target): Ditto.
289 * linux-tile-low.cc (the_low_target): Ditto.
290 * linux-xtensa-low.cc (the_low_target): Ditto.
291
292 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
293
294 Remove the 'install_fast_tracepoint_jump_pad' and
295 'get_min_fast_tracepoint_insn_len' linux target ops to let the
296 concrete linux target define the ops by overriding the declarations
297 of process_stratum_target.
298
299 * linux-low.h (struct linux_target_ops): Remove the ops.
300 (class linux_process_target) <supports_fast_tracepoints>
301 <install_fast_tracepoint_jump_pad>
302 <get_min_fast_tracepoint_insn_len>: Remove.
303 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
304 (linux_process_target::install_fast_tracepoint_jump_pad)
305 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
306 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
307 <install_fast_tracepoint_jump_pad>
308 <get_min_fast_tracepoint_insn_len>: Declare.
309 (x86_target::supports_fast_tracepoints): Define.
310 (x86_install_fast_tracepoint_jump_pad): Turn into...
311 (x86_target::install_fast_tracepoint_jump_pad): ...this.
312 (x86_get_min_fast_tracepoint_insn_len): Turn into...
313 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
314 (the_low_target): Remove the op fields.
315 * linux-aarch64-low.cc (class aarch64_target)
316 <supports_fast_tracepoints>
317 <install_fast_tracepoint_jump_pad>
318 <get_min_fast_tracepoint_insn_len>: Declare.
319 (aarch64_target::supports_fast_tracepoints): Define.
320 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
321 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
322 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
323 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
324 (the_low_target): Remove the op fields.
325 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
326 <install_fast_tracepoint_jump_pad>
327 <get_min_fast_tracepoint_insn_len>: Declare.
328 (ppc_target::supports_fast_tracepoints): Define.
329 (ppc_install_fast_tracepoint_jump_pad): Turn into...
330 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
331 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
332 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
333 (the_low_target): Remove the op fields.
334 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
335 <install_fast_tracepoint_jump_pad>
336 <get_min_fast_tracepoint_insn_len>: Declare.
337 (s390_target::supports_fast_tracepoints): Define.
338 (s390_install_fast_tracepoint_jump_pad): Turn into...
339 (s390_target::install_fast_tracepoint_jump_pad): ...this.
340 (s390_get_min_fast_tracepoint_insn_len): Turn into...
341 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
342 (the_low_target): Remove the op fields.
343 * linux-arm-low.cc (the_low_target): Remove the op fields.
344 * linux-bfin-low.cc (the_low_target): Ditto.
345 * linux-crisv32-low.cc (the_low_target): Ditto.
346 * linux-m32r-low.cc (the_low_target): Ditto.
347 * linux-m68k-low.cc (the_low_target): Ditto.
348 * linux-sh-low.cc (the_low_target): Ditto.
349 * linux-tic6x-low.cc (the_low_target): Ditto.
350 * linux-tile-low.cc (the_low_target): Ditto.
351 * linux-xtensa-low.cc (the_low_target): Ditto.
352
353 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
354
355 Turn the 'get_thread_area' linux target op into a method of
356 process_stratum_target.
357
358 * linux-low.h (struct linux_target_ops): Remove the op.
359 (class linux_process_target) <stuck_in_jump_pad>
360 <linux_fast_tracepoint_collecting>
361 <low_get_thread_area>: Declare.
362 * linux-low.cc (supports_fast_tracepoints): Remove.
363 (linux_fast_tracepoint_collecting): Turn into...
364 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
365 (linux_process_target::low_get_thread_area): Define.
366 (stuck_in_jump_pad_callback): Turn into...
367 (linux_process_target::stuck_in_jump_pad): ...this.
368
369 Update the caller below.
370
371 (linux_process_target::stabilize_threads)
372
373 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
374 Declare.
375 (x86_get_thread_area): Turn into...
376 (x86_target::low_get_thread_area): ...this.
377 (the_low_target): Remove the op field.
378 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
379 Declare.
380 (aarch64_get_thread_area): Turn into...
381 (aarch64_target::low_get_thread_area): ...this.
382 (the_low_target): Remove the op field.
383 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
384 Declare.
385 (ppc_get_thread_area): Turn into...
386 (ppc_target::low_get_thread_area): ...this.
387 (the_low_target): Remove the op field.
388 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
389 Declare.
390 (s390_get_thread_area): Turn into...
391 (s390_target::low_get_thread_area): ...this.
392 (the_low_target): Remove the op field.
393 * linux-arm-low.cc (the_low_target): Remove the op field.
394 * linux-bfin-low.cc (the_low_target): Ditto.
395 * linux-crisv32-low.cc (the_low_target): Ditto.
396 * linux-m32r-low.cc (the_low_target): Ditto.
397 * linux-m68k-low.cc (the_low_target): Ditto.
398 * linux-sh-low.cc (the_low_target): Ditto.
399 * linux-tic6x-low.cc (the_low_target): Ditto.
400 * linux-tile-low.cc (the_low_target): Ditto.
401 * linux-xtensa-low.cc (the_low_target): Ditto.
402
403 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
404
405 Remote the 'supports_tracepoints' linux target op and let the
406 concrete linux target define it by overriding the op declared in
407 process_stratum_target.
408
409 * linux-low.h (struct linux_target_ops): Remove the op.
410 (class linux_process_target) <supports_tracepoints>: Remove.
411 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
412 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
413 Declare.
414 (x86_supports_tracepoints): Turn into...
415 (x86_target::supports_tracepoints): ...this.
416 (the_low_target): Remove the op field.
417 * linux-aarch64-low.cc (class aarch64_target)
418 <supports_tracepoints>: Declare.
419 (aarch64_supports_tracepoints): Turn into...
420 (aarch64_target::supports_tracepoints): ...this.
421 (the_low_target): Remove the op field.
422 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
423 Declare.
424 (ppc_supports_tracepoints): Turn into...
425 (ppc_target::supports_tracepoints): ...this.
426 (the_low_target): Remove the op field.
427 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
428 Declare.
429 (s390_supports_tracepoints): Turn into...
430 (s390_target::supports_tracepoints): ...this.
431 (the_low_target): Remove the op field.
432 * linux-arm-low.cc (the_low_target): Remove the op field.
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-sh-low.cc (the_low_target): Ditto.
438 * linux-tic6x-low.cc (the_low_target): Ditto.
439 * linux-tile-low.cc (the_low_target): Ditto.
440 * linux-xtensa-low.cc (the_low_target): Ditto.
441
442 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
443
444 Remove the 'process_qsupported' linux target op and let a concrete
445 linux target define the op by overriding the op declaration in
446 process_stratum_target.
447
448 * linux-low.h (struct linux_target_ops): Remove the op.
449 (class linux_process_target) <process_qsupported>: Remove.
450 * linux-low.cc (linux_process_target::process_qsupported): Remove.
451 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
452 (x86_linux_process_qsupported): Turn into...
453 (x86_target::process_qsupported): ...this.
454 (the_low_target): Remove the op field.
455 * linux-aarch64-low.cc (the_low_target): Remove the op
456 field.
457 * linux-arm-low.cc (the_low_target): Ditto.
458 * linux-bfin-low.cc (the_low_target): Ditto.
459 * linux-crisv32-low.cc (the_low_target): Ditto.
460 * linux-m32r-low.cc (the_low_target): Ditto.
461 * linux-m68k-low.cc (the_low_target): Ditto.
462 * linux-ppc-low.cc (the_low_target): Ditto.
463 * linux-s390-low.cc (the_low_target): Ditto.
464 * linux-sh-low.cc (the_low_target): Ditto.
465 * linux-tic6x-low.cc (the_low_target): Ditto.
466 * linux-tile-low.cc (the_low_target): Ditto.
467 * linux-xtensa-low.cc (the_low_target): Ditto.
468
469 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
470
471 Turn the 'prepare_to_resume' linux target op into a method of
472 linux_process_target.
473
474 * linux-low.h (struct linux_target_ops): Remove the op.
475 (class linux_process_target) <low_prepare_to_resume>: Declare.
476 * linux-low.cc (linux_process_target::low_prepare_to_resume):
477 Define.
478
479 Update the callers below:
480
481 (linux_process_target::resume_one_lwp_throw)
482 (linux_process_target::low_prepare_to_resume)
483
484 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
485 Declare.
486 (x86_target::low_prepare_to_resume): Define.
487 (the_low_target): Remove the op field.
488 * linux-aarch64-low.cc (class aarch64_target)
489 <low_prepare_to_resume>: Declare.
490 (aarch64_target::low_prepare_to_resume): Define.
491 (the_low_target): Remove the op field.
492 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
493 Declare.
494 (arm_prepare_to_resume): Turn into...
495 (arm_target::low_prepare_to_resume): ...this.
496 (the_low_target): Remove the op field.
497 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
498 Declare.
499 (mips_linux_prepare_to_resume): Turn into...
500 (mips_target::low_prepare_to_resume): ...this.
501 (the_low_target): Remove the op field.
502 * linux-bfin-low.cc (the_low_target): Remove the op field.
503 * linux-crisv32-low.cc (the_low_target): Ditto.
504 * linux-m32r-low.cc (the_low_target): Ditto.
505 * linux-m68k-low.cc (the_low_target): Ditto.
506 * linux-ppc-low.cc (the_low_target): Ditto.
507 * linux-s390-low.cc (the_low_target): Ditto.
508 * linux-sh-low.cc (the_low_target): Ditto.
509 * linux-tic6x-low.cc (the_low_target): Ditto.
510 * linux-tile-low.cc (the_low_target): Ditto.
511 * linux-xtensa-low.cc (the_low_target): Ditto.
512
513 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
514
515 Turn the 'new_process', 'delete_process', 'new_thread',
516 'delete_thread', and 'new_fork' linux target ops into methods
517 of linux_process_target.
518
519 * linux-low.h (struct linux_target_ops): Remove the ops.
520 (class linux_process_target) <add_linux_process>
521 <add_lwp>
522 <delete_lwp>
523 <attach_lwp>
524 <detach_one_lwp>
525 <check_zombie_leaders>
526 <filter_exit_event>
527 <low_new_process>
528 <low_delete_process>
529 <low_new_thread>
530 <low_delete_thread>
531 <low_new_fork>: Declare.
532 * linux-low.cc (delete_lwp): Turn into...
533 (linux_process_target::delete_lwp): ...this.
534 (linux_process_target::low_delete_thread): Define.
535 (linux_add_process): Turn into...
536 (linux_process_target::add_linux_process): ...this.
537 (linux_process_target::low_new_process): Define.
538 (linux_process_target::low_delete_process): Define.
539 (linux_process_target::low_new_fork): Define.
540 (add_lwp): Turn into...
541 (linux_process_target::add_lwp): ...this.
542 (linux_process_target::low_new_thread): Define.
543 (linux_attach_lwp): Turn into...
544 (linux_process_target::attach_lwp): ...this.
545 (linux_detach_one_lwp): Turn into...
546 (linux_process_target::detach_one_lwp): ...this.
547 (linux_detach_lwp_callback): Remove and inline...
548 (linux_process_target::detach): ...here.
549 (check_zombie_leaders): Turn into...
550 (linux_process_target::check_zombie_leaders): ...this.
551 (filter_exit_event): Turn into...
552 (linux_process_target::filter_exit_event): ...this.
553
554 Update the callers below.
555
556 (linux_process_target::handle_extended_wait)
557 (linux_process_target::create_inferior)
558 (attach_proc_task_lwp_callback)
559 (linux_process_target::attach)
560 (linux_process_target::detach)
561 (linux_process_target::mourn)
562 * thread-db.cc (attach_thread)
563
564 * linux-x86-low.cc (class x86_target) <low_new_process>
565 <low_delete_process>
566 <low_new_thread>
567 <low_delete_thread>
568 <low_new_fork>: Declare.
569 (x86_linux_new_process): Turn into...
570 (x86_target::low_new_process): ...this.
571 (x86_linux_delete_process): Turn into...
572 (x86_target::low_delete_process): ...this.
573 (x86_target::low_new_thread): Define.
574 (x86_target::low_delete_thread): Define.
575 (x86_linux_new_fork): Turn into...
576 (x86_target::low_new_fork): ...this.
577 (the_low_target): Remove the op fields.
578 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
579 <low_delete_process>
580 <low_new_thread>
581 <low_delete_thread>
582 <low_new_fork>: Declare.
583 (aarch64_linux_new_process): Turn into...
584 (aarch64_target::low_new_process): ...this.
585 (aarch64_linux_delete_process): Turn into...
586 (aarch64_target::low_delete_process): ...this.
587 (aarch64_target::low_new_thread): Define.
588 (aarch64_target::low_delete_thread): Define.
589 (aarch64_linux_new_fork): Turn into...
590 (aarch64_target::low_new_fork): ...this.
591 (the_low_target): Remove the op fields.
592 * linux-arm-low.cc (class arm_target) <low_new_process>
593 <low_delete_process>
594 <low_new_thread>
595 <low_delete_thread>
596 <low_new_fork>: Declare.
597 (arm_new_process): Turn into...
598 (arm_target::low_new_process): ...this.
599 (arm_delete_process): Turn into...
600 (arm_target::low_delete_process): ...this.
601 (arm_new_thread): Turn into...
602 (arm_target::low_new_thread): ...this.
603 (arm_delete_thread): Turn into...
604 (arm_target::low_delete_thread): ...this.
605 (arm_new_fork): Turn into...
606 (arm_target::low_new_fork): ...this.
607 (the_low_target): Remove the op fields.
608 * linux-mips-low.cc (class mips_target) <low_new_process>
609 <low_delete_process>
610 <low_new_thread>
611 <low_delete_thread>
612 <low_new_fork>: Declare.
613 (mips_linux_new_process): Turn into...
614 (mips_target::low_new_process): ...this.
615 (mips_linux_delete_process): Turn into...
616 (mips_target::low_delete_process): ...this.
617 (mips_linux_new_thread): Turn into...
618 (mips_target::low_new_thread): ...this.
619 (mips_linux_delete_thread): Turn into...
620 (mips_target::low_delete_thread): ...this.
621 (mips_linux_new_fork): Turn into...
622 (mips_target::low_new_fork): ...this.
623 (the_low_target): Remove the op fields.
624 * linux-bfin-low.cc (the_low_target): Remove the op fields.
625 * linux-crisv32-low.cc (the_low_target): Ditto.
626 * linux-m32r-low.cc (the_low_target): Ditto.
627 * linux-m68k-low.cc (the_low_target): Ditto.
628 * linux-ppc-low.cc (the_low_target): Ditto.
629 * linux-s390-low.cc (the_low_target): Ditto.
630 * linux-sh-low.cc (the_low_target): Ditto.
631 * linux-tic6x-low.cc (the_low_target): Ditto.
632 * linux-tile-low.cc (the_low_target): Ditto.
633 * linux-xtensa-low.cc (the_low_target): Ditto.
634
635 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
636
637 Turn the 'siginfo_fixup' linux target op into a method of
638 linux_process_target.
639
640 * linux-low.h (struct linux_target_ops): Remove the op.
641 (class linux_process_target) <siginfo_fixup>
642 <low_siginfo_fixup>: Declare.
643 * linux-low.cc (siginfo_fixup): Turn into...
644 (linux_process_target::siginfo_fixup): ...this.
645 (linux_process_target::low_siginfo_fixup): Define.
646 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
647 (x86_siginfo_fixup): Turn into...
648 (x86_target::low_siginfo_fixup): ...this.
649 (the_low_target): Remove the op field.
650 * linux-aarch64-low.cc (class aarch64_target):
651 <low_siginfo_fixup>: Declare.
652 (aarch64_linux_siginfo_fixup): Turn into...
653 (aarch64_target::low_siginfo_fixup): ...this.
654 (the_low_target): Remove the op field.
655 * linux-arm-low.cc (the_low_target): Remove the op field.
656 * linux-bfin-low.cc (the_low_target): Ditto.
657 * linux-crisv32-low.cc (the_low_target): Ditto.
658 * linux-m32r-low.cc (the_low_target): Ditto.
659 * linux-m68k-low.cc (the_low_target): Ditto.
660 * linux-mips-low.cc (the_low_target): Ditto.
661 * linux-ppc-low.cc (the_low_target): Ditto.
662 * linux-s390-low.cc (the_low_target): Ditto.
663 * linux-sh-low.cc (the_low_target): Ditto.
664 * linux-tic6x-low.cc (the_low_target): Ditto.
665 * linux-tile-low.cc (the_low_target): Ditto.
666 * linux-xtensa-low.cc (the_low_target): Ditto.
667
668 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
669
670 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
671 linux target ops into methods of linux_process_target.
672
673 * linux-low.h (struct linux_target_ops): Remove the ops.
674 (class linux_process_target) <low_collect_ptrace_register>
675 <low_store_ptrace_register>: Declare.
676 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
677 (linux_process_target::low_supply_ptrace_register): Define.
678
679 Update the callers below.
680
681 (linux_process_target::fetch_register)
682 (linux_process_target::store_register)
683
684 * linux-x86-low.cc (the_low_target): Remove the op fields.
685 * linux-aarch64-low.cc (the_low_target): Ditto.
686 * linux-arm-low.cc (the_low_target): Ditto.
687 * linux-bfin-low.cc (the_low_target): Ditto.
688 * linux-crisv32-low.cc (the_low_target): Ditto.
689 * linux-m32r-low.cc (the_low_target): Ditto.
690 * linux-m68k-low.cc (the_low_target): Ditto.
691 * linux-sh-low.cc (the_low_target): Ditto.
692 * linux-sparc-low.cc (the_low_target): Ditto.
693 * linux-tic6x-low.cc (the_low_target): Ditto.
694 * linux-tile-low.cc (the_low_target): Ditto.
695 * linux-xtensa-low.cc (the_low_target): Ditto.
696 * linux-mips-low.cc (class mips_target)
697 <low_collect_ptrace_register>
698 <low_supply_ptrace_register>: Declare.
699 (mips_collect_ptrace_register): Turn into ...
700 (mips_target::low_collect_ptrace_register): ...this.
701 (mips_supply_ptrace_register): Turn into...
702 (mips_target::low_supply_ptrace_register): ...this.
703 (the_low_target): Remove the op fields.
704 * linux-ppc-low.cc (class ppc_target)
705 <low_collect_ptrace_register>
706 <low_supply_ptrace_register>: Declare.
707 (ppc_collect_ptrace_register): Turn into ...
708 (ppc_target::low_collect_ptrace_register): ...this.
709 (ppc_supply_ptrace_register): Turn into ...
710 (ppc_target::low_supply_ptrace_register): ...this.
711 (ppc_fill_gregset): Update for the calls to
712 low_collect_ptrace_register.
713 (the_low_target): Remove the op fields.
714 * linux-s390-low.cc (class s390_target)
715 <low_collect_ptrace_register>
716 <low_supply_ptrace_register>: Declare.
717 (s390_collect_ptrace_register): Turn into ...
718 (s390_target::low_collect_ptrace_register): ...this.
719 (s390_supply_ptrace_register): Turn into ...
720 (s390_target::low_supply_ptrace_register): ...this.
721 (s390_fill_gregset): Update for the calls to
722 low_collect_ptrace_register.
723 (the_low_target): Remove the op fields.
724
725 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
726
727 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
728 target ops into methods of linux_process_target.
729
730 * linux-low.h (struct linux_target_ops): Remove the ops.
731 (class linux_process_target) <check_stopped_by_watchpoint>
732 <low_stopped_by_watchpoint>
733 <low_stopped_data_address>: Declare.
734 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
735 (linux_process_target::check_stopped_by_watchpoint): ...this.
736 (linux_process_target::low_stopped_by_watchpoint): Define.
737 (linux_process_target::low_stopped_data_address): Define.
738 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
739 <low_stopped_data_address>: Declare.
740 (x86_stopped_by_watchpoint): Turn into...
741 (x86_target::low_stopped_by_watchpoint): ...this.
742 (x86_stopped_data_address): Turn into...
743 (x86_target::low_stopped_data_address): ...this.
744 (the_low_target): Remove the op fields.
745 * linux-aarch64-low.cc (class aarch64_target)
746 <low_stopped_by_watchpoint>
747 <low_stopped_data_address>: Declare.
748 (aarch64_stopped_by_watchpoint): Turn into...
749 (aarch64_target::low_stopped_by_watchpoint): ...this.
750 (aarch64_stopped_data_address): Turn into...
751 (aarch64_target::low_stopped_data_address): ...this.
752 (the_low_target): Remove the op fields.
753 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
754 <low_stopped_data_address>: Declare.
755 (arm_stopped_by_watchpoint): Turn into...
756 (arm_target::low_stopped_by_watchpoint): ...this.
757 (arm_stopped_data_address): Turn into...
758 (arm_target::low_stopped_data_address): ...this.
759 (the_low_target): Remove the op fields.
760 * linux-crisv32-low.cc (class crisv32_target)
761 <low_stopped_by_watchpoint>
762 <low_stopped_data_address>: Declare.
763 (cris_stopped_by_watchpoint): Turn into...
764 (crisv32_target::low_stopped_by_watchpoint): ...this.
765 (cris_stopped_data_address): Turn into...
766 (crisv32_target::low_stopped_data_address): ...this.
767 (the_low_target): Remove the op fields.
768 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
769 <low_stopped_data_address>: Declare.
770 (mips_stopped_by_watchpoint): Turn into...
771 (mips_target::low_stopped_by_watchpoint): ...this.
772 (mips_stopped_data_address): Turn into...
773 (mips_target::low_stopped_data_address): ...this.
774 (the_low_target): Remove the op fields.
775 * linux-bfin-low.cc (the_low_target): Remove the op fields.
776 * linux-m32r-low.cc (the_low_target): Ditto.
777 * linux-m68k-low.cc (the_low_target): Ditto.
778 * linux-ppc-low.cc (the_low_target): Ditto.
779 * linux-s390-low.cc (the_low_target): Ditto.
780 * linux-sh-low.cc (the_low_target): Ditto.
781 * linux-sparc-low.cc (the_low_target): Ditto.
782 * linux-tic6x-low.cc (the_low_target): Ditto.
783 * linux-tile-low.cc (the_low_target): Ditto.
784 * linux-xtensa-low.cc (the_low_target): Ditto.
785
786 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
787
788 Turn the 'insert_point' and 'remove_point' linux target ops into
789 methods of linux_process_target.
790
791 * linux-low.h (struct linux_target_ops): Remove the ops.
792 (class linux_process_target) <low_insert_point>
793 <low_remove_point>: Declare.
794 * linux-low.cc (linux_process_target::low_insert_point)
795 (linux_process_target::low_remove_point): Define.
796 (linux_process_target::insert_point)
797 (linux_process_target::remove_point): Update for calls to
798 low_insert_point and low_remove_point.
799 * linux-x86-low.cc (class x86_target) <low_insert_point>
800 <low_remove_point>: Declare.
801 (x86_insert_point): Turn into...
802 (x86_target::low_insert_point): ...this.
803 (x86_remove_point): Turn into...
804 (x86_target::low_remove_point): ...this.
805 (the_low_target): Remove the op fields.
806 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
807 <low_remove_point>: Declare.
808 (aarch64_insert_point): Turn into...
809 (aarch64_target::low_insert_point): ...this.
810 (aarch64_remove_point): Turn into...
811 (aarch64_target::low_remove_point): ...this.
812 (the_low_target): Remove the op fields.
813 * linux-arm-low.cc (class arm_target) <low_insert_point>
814 <low_remove_point>: Declare.
815 (arm_insert_point): Turn into...
816 (arm_target::low_insert_point): ...this.
817 (arm_remove_point): Turn into...
818 (arm_target::low_remove_point): ...this.
819 (the_low_target): Remove the op fields.
820 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
821 <low_remove_point>: Declare.
822 (crisv32_insert_point): Turn into...
823 (crisv32_target::low_insert_point): ...this.
824 (crisv32_remove_point): Turn into...
825 (crisv32_target::low_remove_point): ...this.
826 (the_low_target): Remove the op fields.
827 * linux-mips-low.cc (class mips_target) <low_insert_point>
828 <low_remove_point>: Declare.
829 (mips_insert_point): Turn into...
830 (mips_target::low_insert_point): ...this.
831 (mips_remove_point): Turn into...
832 (mips_target::low_remove_point): ...this.
833 (the_low_target): Remove the op fields.
834 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
835 <low_remove_point>: Declare.
836 (ppc_insert_point): Turn into...
837 (ppc_target::low_insert_point): ...this.
838 (ppc_remove_point): Turn into...
839 (ppc_target::low_remove_point): ...this.
840 (the_low_target): Remove the op fields.
841 * linux-bfin-low.cc (the_low_target): Remove the op fields.
842 * linux-m32r-low.cc (the_low_target): Ditto.
843 * linux-m68k-low.cc (the_low_target): Ditto.
844 * linux-s390-low.cc (the_low_target): Ditto.
845 * linux-sh-low.cc (the_low_target): Ditto.
846 * linux-sparc-low.cc (the_low_target): Ditto.
847 * linux-tic6x-low.cc (the_low_target): Ditto.
848 * linux-tile-low.cc (the_low_target): Ditto.
849 * linux-xtensa-low.cc (the_low_target): Ditto.
850
851 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
852
853 Remove the 'supports_z_point_type' linux target op and let the
854 concrete linux target define it by overriding the op declared in
855 process_stratum_target.
856
857 * linux-low.cc (linux_process_target::supports_z_point_type):
858 Remove.
859 * linux-low.h (struct linux_target_ops): Remove the op.
860 (class linux_process_target) <supports_z_point_type>: Remove.
861 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
862 Declare.
863 (x86_supports_z_point_type): Turn into...
864 (x86_target::supports_z_point_type): ...this.
865 (the_low_target): Remove the op field.
866 * linux-aarch64-low.cc (class aarch64_target)
867 <supports_z_point_type>: Declare.
868 (aarch64_supports_z_point_type): Turn into...
869 (aarch64_target::supports_z_point_type): ...this.
870 (the_low_target): Remove the op field.
871 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
872 Declare.
873 (arm_supports_z_point_type): Turn into...
874 (arm_target::supports_z_point_type): ...this.
875 (the_low_target): Remove the op field.
876 * linux-crisv32-low.cc (class crisv32_target)
877 <supports_z_point_type>: Declare.
878 (cris_supports_z_point_type): Turn into...
879 (crisv32_target::supports_z_point_type): ...this.
880 (the_low_target): Remove the op field.
881 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
882 Declare.
883 (mips_supports_z_point_type): Turn into...
884 (mips_target::supports_z_point_type): ...this.
885 (the_low_target): Remove the op field.
886 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
887 Declare.
888 (ppc_supports_z_point_type): Turn into...
889 (ppc_target::supports_z_point_type): ...this.
890 (the_low_target): Remove the op field.
891 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
892 Declare.
893 (s390_supports_z_point_type): Turn into...
894 (s390_target::supports_z_point_type): ...this.
895 (the_low_target): Remove the op field.
896 * linux-bfin-low.cc (the_low_target): Remove the op field.
897 * linux-m32r-low.cc (the_low_target): Ditto.
898 * linux-m68k-low.cc (the_low_target): Ditto.
899 * linux-sh-low.cc (the_low_target): Ditto.
900 * linux-sparc-low.cc (the_low_target): Ditto.
901 * linux-tic6x-low.cc (the_low_target): Ditto.
902 * linux-tile-low.cc (the_low_target): Ditto.
903 * linux-xtensa-low.cc (the_low_target): Ditto.
904
905 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
906
907 Turn the 'breakpoint_at' linux target op into a method of
908 linux_process_target.
909
910 * linux-low.h (struct linux_target_ops): Remove the op.
911 (class linux_process_target) <low_breakpoint_at>: Declare.
912
913 Update the callers below:
914
915 * linux-low.cc (linux_process_target::save_stop_reason)
916 (linux_process_target::thread_still_has_status_pending)
917 (linux_process_target::wait_1)
918
919 * linux-x86-low.cc (class x86_target)
920 <low_breakpoint_at>: Declare.
921 (x86_breakpoint_at): Turn into...
922 (x86_target::low_breakpoint_at): ...this.
923 (the_low_target): Remove the op field.
924 * linux-aarch64-low.cc (class aarch64_target)
925 <low_breakpoint_at>: Declare.
926 (aarch64_breakpoint_at): Turn into...
927 (aarch64_target::low_breakpoint_at): ...this.
928 (the_low_target): Remove the op field.
929 * linux-arm-low.cc (class arm_target)
930 <low_breakpoint_at>: Declare.
931 (arm_target::low_breakpoint_at): Define.
932 (the_low_target): Remove the op field.
933 * linux-bfin-low.cc (class bfin_target)
934 <low_breakpoint_at>: Declare.
935 (bfin_breakpoint_at): Turn into...
936 (bfin_target::low_breakpoint_at): ...this.
937 (the_low_target): Remove the op field.
938 * linux-cris-low.cc (class cris_target)
939 <low_breakpoint_at>: Declare.
940 (cris_breakpoint_at): Turn into...
941 (cris_target::low_breakpoint_at): ...this.
942 (the_low_target): Remove the op field.
943 * linux-crisv32-low.cc (class crisv32_target)
944 <low_breakpoint_at>: Declare.
945 (crisv32_breakpoint_at): Turn into...
946 (crisv32_target::low_breakpoint_at): ...this.
947 (the_low_target): Remove the op field.
948 * linux-ia64-low.cc (class ia64_target)
949 <low_breakpoint_at>: Declare.
950 (ia64_target::low_breakpoint_at): Define.
951 * linux-m32r-low.cc (class m32r_target)
952 <low_breakpoint_at>: Declare.
953 (m32r_breakpoint_at): Turn into...
954 (m32r_target::low_breakpoint_at): ...this.
955 (the_low_target): Remove the op field.
956 * linux-m68k-low.cc (class m68k_target)
957 <low_breakpoint_at>: Declare.
958 (m68k_breakpoint_at): Turn into...
959 (m68k_target::low_breakpoint_at): ...this.
960 (the_low_target): Remove the op field.
961 * linux-mips-low.cc (class mips_target)
962 <low_breakpoint_at>: Declare.
963 (mips_breakpoint_at): Turn into...
964 (mips_target::low_breakpoint_at): ...this.
965 (the_low_target): Remove the op field.
966 * linux-nios2-low.cc (class nios2_target)
967 <low_breakpoint_at>: Declare.
968 (nios2_breakpoint_at): Turn into...
969 (nios2_target::low_breakpoint_at): ...this.
970 (the_low_target): Remove the op field.
971 * linux-ppc-low.cc (class ppc_target)
972 <low_breakpoint_at>: Declare.
973 (ppc_breakpoint_at): Turn into...
974 (ppc_target::low_breakpoint_at): ...this.
975 (the_low_target): Remove the op field.
976 * linux-riscv-low.cc (class riscv_target)
977 <low_breakpoint_at>: Declare.
978 (riscv_breakpoint_at): Turn into...
979 (riscv_target::low_breakpoint_at): ...this.
980 (the_low_target): Remove the op field.
981 * linux-s390-low.cc (class s390_target)
982 <low_breakpoint_at>: Declare.
983 (s390_breakpoint_at): Turn into...
984 (s390_target::low_breakpoint_at): ...this.
985 (the_low_target): Remove the op field.
986 * linux-sh-low.cc (class sh_target)
987 <low_breakpoint_at>: Declare.
988 (sh_breakpoint_at): Turn into...
989 (sh_target::low_breakpoint_at): ...this.
990 (the_low_target): Remove the op field.
991 * linux-sparc-low.cc (class sparc_target)
992 <low_breakpoint_at>: Declare.
993 (sparc_breakpoint_at): Turn into...
994 (sparc_target::low_breakpoint_at): ...this.
995 (the_low_target): Remove the op field.
996 * linux-tic6x-low.cc (class tic6x_target)
997 <low_breakpoint_at>: Declare.
998 (tic6x_breakpoint_at): Turn into...
999 (tic6x_target::low_breakpoint_at): ...this.
1000 (the_low_target): Remove the op field.
1001 * linux-tile-low.cc (class tile_target)
1002 <low_breakpoint_at>: Declare.
1003 (tile_breakpoint_at): Turn into...
1004 (tile_target::low_breakpoint_at): ...this.
1005 (the_low_target): Remove the op field.
1006 * linux-xtensa-low.cc (class xtensa_target)
1007 <low_breakpoint_at>: Declare.
1008 (xtensa_breakpoint_at): Turn into...
1009 (xtensa_target::low_breakpoint_at): ...this.
1010 (the_low_target): Remove the op field.
1011
1012 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1013
1014 Turn the 'decr_pc_after_break' linux_target_ops field into
1015 a method of linux_process_target.
1016
1017 * linux-low.h (struct linux_target_ops)
1018 <decr_pc_after_break>: Remove.
1019 (class linux_process_target) <low_decr_pc_after_break>: New method
1020 declaration.
1021 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1022 New method implementation.
1023
1024 Update the users below.
1025
1026 (linux_process_target::save_stop_reason)
1027 (linux_process_target::wait_1)
1028 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1029 New declaration.
1030 (x86_target::low_decr_pc_after_break): New method implementation.
1031 (the_low_target): Remove the field.
1032 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1033 New declaration.
1034 (bfin_target::low_decr_pc_after_break): New method implementation.
1035 (the_low_target): Remove the field.
1036 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1037 New declaration.
1038 (m68k_target::low_decr_pc_after_break): New method implementation.
1039 (the_low_target): Remove the field.
1040 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1041 New declaration.
1042 (s390_target::low_decr_pc_after_break): New method implementation.
1043 (the_low_target): Remove the field.
1044 * linux-aarch64-low.cc (the_low_target): Remove the field.
1045 * linux-arm-low.cc (the_low_target): Remove the field.
1046 * linux-cris-low.cc (the_low_target): Remove the field.
1047 * linux-crisv32-low.cc (the_low_target): Remove the field.
1048 * linux-m32r-low.cc (the_low_target): Remove the field.
1049 * linux-mips-low.cc (the_low_target): Remove the field.
1050 * linux-nios2-low.cc (the_low_target): Remove the field.
1051 * linux-ppc-low.cc (the_low_target): Remove the field.
1052 * linux-riscv-low.cc (the_low_target): Remove the field.
1053 * linux-sh-low.cc (the_low_target): Remove the field.
1054 * linux-sparc-low.cc (the_low_target): Remove the field.
1055 * linux-tic6x-low.cc (the_low_target): Remove the field.
1056 * linux-tile-low.cc (the_low_target): Remove the field.
1057 * linux-xtensa-low.cc (the_low_target): Remove the field.
1058
1059 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1060
1061 Remove the 'supports_software_single_step' linux target op and let
1062 the concrete linux target define it by overriding the op in
1063 process_stratum_target.
1064 Turn the 'get_next_pcs' linux target op into a method of
1065 linux_process_target.
1066
1067 * linux-low.h (struct linux_target_ops): Remove the ops.
1068 (class linux_process_target) <supports_software_single_step>:
1069 Remove.
1070 <low_get_next_pcs>: Declare.
1071 * linux-low.cc (can_software_single_step): Remove.
1072 (linux_process_target::low_get_next_pcs): Define.
1073 (linux_process_target::supports_software_single_step): Remove.
1074
1075 Update the callers below.
1076
1077 (linux_process_target::handle_extended_wait)
1078 (linux_process_target::wait_1)
1079 (linux_process_target::install_software_single_step_breakpoints)
1080 (linux_process_target::single_step)
1081 (linux_process_target::thread_needs_step_over)
1082 (linux_process_target::proceed_one_lwp)
1083 (linux_process_target::supports_range_stepping)
1084
1085 * linux-x86-low.cc (the_low_target): Remove the op field.
1086 * linux-aarch64-low.cc (the_low_target): Ditto.
1087 * linux-bfin-low.cc (the_low_target): Ditto.
1088 * linux-cris-low.cc (the_low_target): Ditto.
1089 * linux-crisv32-low.cc (the_low_target): Ditto.
1090 * linux-m32r-low.cc (the_low_target): Ditto.
1091 * linux-m68k-low.cc (the_low_target): Ditto.
1092 * linux-mips-low.cc (the_low_target): Ditto.
1093 * linux-nios2-low.cc (the_low_target): Ditto.
1094 * linux-ppc-low.cc (the_low_target): Ditto.
1095 * linux-riscv-low.cc (the_low_target): Ditto.
1096 * linux-s390-low.cc (the_low_target): Ditto.
1097 * linux-sh-low.cc (the_low_target): Ditto.
1098 * linux-sparc-low.cc (the_low_target): Ditto.
1099 * linux-tic6x-low.cc (the_low_target): Ditto.
1100 * linux-tile-low.cc (the_low_target): Ditto.
1101 * linux-xtensa-low.cc (the_low_target): Ditto.
1102 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1103 <supports_software_single_step>: Declare.
1104 (arm_target::supports_software_single_step): Define.
1105 (arm_gdbserver_get_next_pcs): Turn into...
1106 (arm_target::low_get_next_pcs): ...this.
1107 (the_low_target): Remove the op field.
1108
1109 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1110
1111 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1112 the concrete linux target define it by overriding the op
1113 in process_stratum_target.
1114
1115 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1116 Remove.
1117 * linux-low.h (struct linux_target_ops): Remove the op.
1118 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1119 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1120 Declare.
1121 (x86_sw_breakpoint_from_kind): Turn into...
1122 (x86_target::sw_breakpoint_from_kind): ...this.
1123 (the_low_target): Remove the op field.
1124 * linux-aarch64-low.cc (class aarch64_target)
1125 <sw_breakpoint_from_kind>: Declare.
1126 (aarch64_sw_breakpoint_from_kind): Turn into...
1127 (aarch64_target::sw_breakpoint_from_kind): ...this.
1128 (the_low_target): Remove the op field.
1129 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1130 Declare.
1131 (arm_target::sw_breakpoint_from_kind): Define.
1132 (the_low_target): Remove the op field.
1133 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1134 Declare.
1135 (bfin_sw_breakpoint_from_kind): Turn into...
1136 (bfin_target::sw_breakpoint_from_kind): ...this.
1137 (the_low_target): Remove the op field.
1138 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1139 Declare.
1140 (cris_sw_breakpoint_from_kind): Turn into...
1141 (cris_target::sw_breakpoint_from_kind): ...this.
1142 (the_low_target): Remove the op field.
1143 * linux-crisv32-low.cc (class crisv32_target)
1144 <sw_breakpoint_from_kind>: Declare.
1145 (cris_sw_breakpoint_from_kind): Turn into...
1146 (crisv32_target::sw_breakpoint_from_kind): ...this.
1147 (the_low_target): Remove the op field.
1148 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1149 Declare.
1150 (ia64_target::sw_breakpoint_from_kind): Define.
1151 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1152 Declare.
1153 (m32r_sw_breakpoint_from_kind): Turn into...
1154 (m32r_target::sw_breakpoint_from_kind): ...this.
1155 (the_low_target): Remove the op field.
1156 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1157 Declare.
1158 (m68k_sw_breakpoint_from_kind): Turn into...
1159 (m68k_target::sw_breakpoint_from_kind): ...this.
1160 (the_low_target): Remove the op field.
1161 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1162 Declare.
1163 (mips_sw_breakpoint_from_kind): Turn into...
1164 (mips_target::sw_breakpoint_from_kind): ...this.
1165 (the_low_target): Remove the op field.
1166 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1167 Declare.
1168 (nios2_sw_breakpoint_from_kind): Turn into...
1169 (nios2_target::sw_breakpoint_from_kind): ...this.
1170 (the_low_target): Remove the op field.
1171 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1172 Declare.
1173 (ppc_sw_breakpoint_from_kind): Turn into...
1174 (ppc_target::sw_breakpoint_from_kind): ...this.
1175 (the_low_target): Remove the op field.
1176 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1177 Declare.
1178 (riscv_sw_breakpoint_from_kind): Turn into...
1179 (riscv_target::sw_breakpoint_from_kind): ...this.
1180 (the_low_target): Remove the op field.
1181 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1182 Declare.
1183 (s390_sw_breakpoint_from_kind): Turn into...
1184 (s390_target::sw_breakpoint_from_kind): ...this.
1185 (the_low_target): Remove the op field.
1186 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1187 Declare.
1188 (sh_sw_breakpoint_from_kind): Turn into...
1189 (sh_target::sw_breakpoint_from_kind): ...this.
1190 (the_low_target): Remove the op field.
1191 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1192 Declare.
1193 (sparc_sw_breakpoint_from_kind): Turn into...
1194 (sparc_target::sw_breakpoint_from_kind): ...this.
1195 (the_low_target): Remove the op field.
1196 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1197 Declare.
1198 (tic6x_sw_breakpoint_from_kind): Turn into...
1199 (tic6x_target::sw_breakpoint_from_kind): ...this.
1200 (the_low_target): Remove the op field.
1201 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1202 Declare.
1203 (tile_sw_breakpoint_from_kind): Turn into...
1204 (tile_target::sw_breakpoint_from_kind): ...this.
1205 (the_low_target): Remove the op field.
1206 * linux-xtensa-low.cc (class xtensa_target)
1207 <sw_breakpoint_from_kind>: Declare.
1208 (xtensa_sw_breakpoint_from_kind): Turn into...
1209 (xtensa_target::sw_breakpoint_from_kind): ...this.
1210 (the_low_target): Remove the op field.
1211
1212 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1213
1214 Remove the 'breakpoint_kind_from_pc' and
1215 'breakpoint_kind_from_current_state' linux target ops, and let the
1216 concrete linux target define them by overriding the ops of
1217 process_stratum_target.
1218
1219 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1220 Remove.
1221 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1222 * linux-low.h (struct linux_target_ops): Remove ops.
1223 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1224 <breakpoint_kind_from_current_state>: Remove.
1225 * linux-x86-low.cc (the_low_target): Remove the op fields.
1226 * linux-bfin-low.cc (the_low_target): Ditto.
1227 * linux-cris-low.cc (the_low_target): Ditto.
1228 * linux-crisv32-low.cc (the_low_target): Ditto.
1229 * linux-m32r-low.cc (the_low_target): Ditto.
1230 * linux-m68k-low.cc (the_low_target): Ditto.
1231 * linux-mips-low.cc (the_low_target): Ditto.
1232 * linux-nios2-low.cc (the_low_target): Ditto.
1233 * linux-ppc-low.cc (the_low_target): Ditto.
1234 * linux-s390-low.cc (the_low_target): Ditto.
1235 * linux-sh-low.cc (the_low_target): Ditto.
1236 * linux-sparc-low.cc (the_low_target): Ditto.
1237 * linux-tic6x-low.cc (the_low_target): Ditto.
1238 * linux-tile-low.cc (the_low_target): Ditto.
1239 * linux-xtensa-low.cc (the_low_target): Ditto.
1240 * linux-aarch64-low.cc (class aarch64_target)
1241 <breakpoint_kind_from_pc>
1242 <breakpoint_kind_from_current_state>: Declare.
1243 (aarch64_breakpoint_kind_from_pc): Turn into...
1244 (aarch64_target::breakpoint_kind_from_pc): ...this.
1245 (aarch64_breakpoint_kind_from_current_state): Turn into...
1246 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1247 (the_low_target): Remove the op fields.
1248 * linux-arm-low.cc (class arm_target):
1249 <breakpoint_kind_from_pc>
1250 <breakpoint_kind_from_current_state>: Declare.
1251 (arm_target::breakpoint_kind_from_pc): Define.
1252 (arm_target::breakpoint_kind_from_current_state): Define.
1253 (the_low_target): Remove the op fields.
1254 * linux-riscv-low.cc (class riscv_target):
1255 <breakpoint_kind_from_pc>: Declare.
1256 (riscv_breakpoint_kind_from_pc): Turn into...
1257 (riscv_target::breakpoint_kind_from_pc): ...this.
1258 (the_low_target): Remove the op fields.
1259
1260 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1261
1262 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1263 of linux_process_target.
1264
1265 * linux-low.h (struct linux_target_ops): Remove the ops.
1266 (class linux_process_target) <low_supports_breakpoints>
1267 <low_get_pc>
1268 <low_set_pc>: Declare.
1269 * linux-low.cc (supports_breakpoints): Turn into...
1270 (linux_process_target::low_supports_breakpoints): ...this.
1271 (linux_process_target::low_get_pc): Define.
1272 (linux_process_target::low_set_pc): Define.
1273
1274 Update the callers below.
1275
1276 (linux_process_target::get_pc)
1277 (linux_process_target::save_stop_reason)
1278 (linux_process_target::maybe_move_out_of_jump_pad)
1279 (linux_process_target::wait_1)
1280 (linux_process_target::resume_one_lwp_throw)
1281 (linux_process_target::resume)
1282 (linux_process_target::proceed_all_lwps)
1283 (linux_process_target::read_pc)
1284 (linux_process_target::write_pc)
1285
1286 * linux-x86-low.cc (class linux_process_target)
1287 <low_supports_breakpoints>
1288 <low_get_pc>
1289 <low_set_pc>: Declare.
1290 (x86_target::low_supports_breakpoints): Define.
1291 (x86_get_pc): Turn into...
1292 (x86_target::low_get_pc): ...this.
1293 (x86_set_pc): Turn into...
1294 (x86_target::low_set_pc): ...this.
1295 (the_low_target): Remove the op fields.
1296 * linux-arm-low.cc (class arm_target)
1297 <low_supports_breakpoints>
1298 <low_get_pc>
1299 <low_set_pc>: Declare.
1300 (arm_target::low_supports_breakpoints)
1301 (arm_target::low_get_pc)
1302 (arm_target::low_set_pc): Define.
1303 (the_low_target): Remove the op fields.
1304 * linux-bfin-low.cc (class bfin_target)
1305 <low_supports_breakpoints>
1306 <low_get_pc>
1307 <low_set_pc>: Declare.
1308 (bfin_target::low_supports_breakpoints)
1309 (bfin_target::low_get_pc)
1310 (bfin_target::low_set_pc): Define.
1311 (the_low_target): Remove the op fields.
1312 * linux-cris-low.cc (class cris_target)
1313 <low_supports_breakpoints>
1314 <low_get_pc>
1315 <low_set_pc>: Declare.
1316 (cris_target::low_supports_breakpoints)
1317 (cris_target::low_get_pc)
1318 (cris_target::low_set_pc): Define.
1319 (the_low_target): Remove the op fields.
1320 * linux-crisv32-low.cc (class crisv32_target)
1321 <low_supports_breakpoints>
1322 <low_get_pc>
1323 <low_set_pc>: Declare.
1324 (crisv32_target::low_supports_breakpoints)
1325 (crisv32_target::low_get_pc)
1326 (crisv32_target::low_set_pc): Define.
1327 (the_low_target): Remove the op fields.
1328 * linux-m32r-low.cc (class m32r_target)
1329 <low_supports_breakpoints>
1330 <low_get_pc>
1331 <low_set_pc>: Declare.
1332 (m32r_target::low_supports_breakpoints)
1333 (m32r_target::low_get_pc)
1334 (m32r_target::low_set_pc): Define.
1335 (the_low_target): Remove the op fields.
1336 * linux-m68k-low.cc (class m68k_target)
1337 <low_supports_breakpoints>
1338 <low_get_pc>
1339 <low_set_pc>: Declare.
1340 (m68k_target::low_supports_breakpoints)
1341 (m68k_target::low_get_pc)
1342 (m68k_target::low_set_pc): Define.
1343 (the_low_target): Remove the op fields.
1344 * linux-nios2-low.cc (class nios2_target)
1345 <low_supports_breakpoints>
1346 <low_get_pc>
1347 <low_set_pc>: Declare.
1348 (nios2_target::low_supports_breakpoints)
1349 (nios2_target::low_get_pc)
1350 (nios2_target::low_set_pc): Define.
1351 (the_low_target): Remove the op fields.
1352 * linux-sh-low.cc (class sh_target)
1353 <low_supports_breakpoints>
1354 <low_get_pc>
1355 <low_set_pc>: Declare.
1356 (sh_target::low_supports_breakpoints)
1357 (sh_target::low_get_pc)
1358 (sh_target::low_set_pc): Define.
1359 (the_low_target): Remove the op fields.
1360 * linux-xtensa-low.cc (class xtensa_target)
1361 <low_supports_breakpoints>
1362 <low_get_pc>
1363 <low_set_pc>: Declare.
1364 (xtensa_target::low_supports_breakpoints)
1365 (xtensa_target::low_get_pc)
1366 (xtensa_target::low_set_pc): Define.
1367 (the_low_target): Remove the op fields.
1368 * linux-sparc-low.cc (class sparc_target)
1369 <low_supports_breakpoints>
1370 <low_get_pc>: Declare.
1371 (sparc_target::low_supports_breakpoints)
1372 (sparc_target::low_get_pc): Define.
1373 (the_low_target): Remove the op fields.
1374 * linux-tile-low.cc (class tile_target)
1375 <low_supports_breakpoints>
1376 <low_get_pc>
1377 <low_set_pc>: Declare.
1378 (tile_target::low_supports_breakpoints)
1379 (tile_target::low_get_pc)
1380 (tile_target::low_set_pc): Define.
1381 (the_low_target): Remove the op fields.
1382 * linux-aarch64-low.cc (class aarch64_target)
1383 <low_supports_breakpoints>
1384 <low_get_pc>
1385 <low_set_pc>: Declare.
1386 (aarch64_target::low_supports_breakpoints): Define.
1387 (aarch64_get_pc): Turn into...
1388 (aarch64_target::low_get_pc): ...this.
1389 (aarch64_set_pc): Turn into...
1390 (aarch64_target::low_set_pc): ...this.
1391 (the_low_target): Remove the op fields.
1392 * linux-mips-low.cc (class mips_target)
1393 <low_supports_breakpoints>
1394 <low_get_pc>
1395 <low_set_pc>: Declare.
1396 (mips_target::low_supports_breakpoints): Define.
1397 (mips_get_pc): Turn into...
1398 (mips_target::low_get_pc): ...this.
1399 (mips_set_pc): Turn into...
1400 (mips_target::low_set_pc): ...this.
1401 (the_low_target): Remove the op fields.
1402 * linux-ppc-low.cc (class ppc_target)
1403 <low_supports_breakpoints>
1404 <low_get_pc>
1405 <low_set_pc>: Declare.
1406 (ppc_target::low_supports_breakpoints): Define.
1407 (ppc_get_pc): Turn into...
1408 (ppc_target::low_get_pc): ...this.
1409 (ppc_set_pc): Turn into...
1410 (ppc_target::low_set_pc): ...this.
1411 (the_low_target): Remove the op fields.
1412 * linux-riscv-low.cc (class riscv_target)
1413 <low_supports_breakpoints>
1414 <low_get_pc>
1415 <low_set_pc>: Declare.
1416 (riscv_target::low_supports_breakpoints): Define.
1417 (riscv_get_pc): Turn into...
1418 (riscv_target::low_get_pc): ...this.
1419 (riscv_set_pc): Turn into...
1420 (riscv_target::low_set_pc): ...this.
1421 (the_low_target): Remove the op fields.
1422 * linux-s390-low.cc (class s390_target)
1423 <low_supports_breakpoints>
1424 <low_get_pc>
1425 <low_set_pc>: Declare.
1426 (s390_target::low_supports_breakpoints): Define.
1427 (s390_get_pc): Turn into...
1428 (s390_target::low_get_pc): ...this.
1429 (s390_set_pc): Turn into...
1430 (s390_target::low_set_pc): ...this.
1431 (the_low_target): Remove the op fields.
1432 * linux-tic6x-low.cc (class tic6x_target)
1433 <low_supports_breakpoints>
1434 <low_get_pc>
1435 <low_set_pc>: Declare.
1436 (tic6x_target::low_supports_breakpoints): Define.
1437 (tic6x_get_pc): Turn into...
1438 (tic6x_target::low_get_pc): ...this.
1439 (tic6x_set_pc): Turn into...
1440 (tic6x_target::low_set_pc): ...this.
1441 (the_low_target): Remove the op fields.
1442
1443 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1444
1445 Turn some more static methods in linux-low into private methods
1446 of linux_process_target.
1447
1448 * linux-low.cc (get_pc): Turn into...
1449 (linux_process_target::get_pc): ...this.
1450 (save_stop_reason): Turn into...
1451 (linux_process_target::save_stop_reason): ...this.
1452 (thread_still_has_status_pending_p): Turn into...
1453 (linux_process_target::thread_still_has_status_pending): ...this.
1454 (status_pending_p_callback): Turn into...
1455 (linux_process_target::status_pending_p_callback): ...this.
1456 (resume_stopped_resumed_lwps): Turn into...
1457 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1458 (install_software_single_step_breakpoints): Turn into...
1459 (linux_process_target::install_software_single_step_breakpoints):
1460 ...this.
1461 (single_step): Turn into...
1462 (linux_process_target::single_step): ...this.
1463 (linux_resume_one_lwp_throw): Turn into...
1464 (linux_process_target::resume_one_lwp_throw): ...this.
1465 (linux_resume_one_lwp): Turn into...
1466 (linux_process_target::resume_one_lwp): ...this.
1467 (resume_status_pending_p): Turn into...
1468 (linux_process_target::resume_status_pending): ...this.
1469 (need_step_over_p): Turn into...
1470 (linux_process_target::thread_needs_step_over): ...this.
1471 (linux_resume_one_thread): Turn into...
1472 (linux_process_target::resume_one_thread): ...this.
1473 (proceed_one_lwp): Turn into...
1474 (linux_process_target::proceed_one_lwp): ...this.
1475 (unsuspend_and_proceed_one_lwp): Turn into...
1476 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1477
1478 Update the calls/references to the above functions below.
1479
1480 (linux_process_target::handle_extended_wait)
1481 (linux_process_target::filter_event)
1482 (linux_process_target::wait_for_event_filtered)
1483 (linux_process_target::wait_1)
1484 (linux_process_target::move_out_of_jump_pad)
1485 (linux_process_target::start_step_over)
1486 (linux_process_target::resume)
1487 (linux_process_target::proceed_all_lwps)
1488 (regsets_store_inferior_registers)
1489 (linux_process_target::store_register)
1490
1491 * linux-low.h (class linux_process_target)
1492 <get_pc>
1493 <save_stop_reason>
1494 <thread_still_has_status_pending>
1495 <status_pending_p_callback>
1496 <resume_stopped_resumed_lwps>
1497 <install_software_single_step_breakpoints>
1498 <single_step>
1499 <resume_one_lwp_throw>
1500 <resume_one_lwp>
1501 <resume_status_pending>
1502 <thread_needs_step_over>
1503 <resume_one_thread>
1504 <proceed_one_lwp>
1505 <unsuspend_and_proceed_one_lwp>: Declare.
1506
1507 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1508
1509 Turn the 'fetch_register' linux target op into a method of
1510 linux_process_target.
1511
1512 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1513 (class linux_process_target) <low_fetch_register>: Declare.
1514 * linux-x86-low.cc (the_low_target)
1515 * linux-aarch64-low.cc (the_low_target)
1516 * linux-arm-low.cc (the_low_target)
1517 * linux-bfin-low.cc (the_low_target)
1518 * linux-cris-low.cc (the_low_target)
1519 * linux-crisv32-low.cc (the_low_target)
1520 * linux-m32r-low.cc (the_low_target)
1521 * linux-m68k-low.cc (the_low_target)
1522 * linux-nios2-low.cc (the_low_target)
1523 * linux-ppc-low.cc (the_low_target)
1524 * linux-s390-low.cc (the_low_target)
1525 * linux-sh-low.cc (the_low_target)
1526 * linux-sparc-low.cc (the_low_target)
1527 * linux-tic6x-low.cc (the_low_target)
1528 * linux-tile-low.cc (the_low_target)
1529 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1530 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1531 Declare.
1532 (ia64_fetch_register): Turn into...
1533 (ia64_target::low_fetch_register): ...this.
1534 (the_low_target): Remove the op field.
1535 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1536 Declare.
1537 (mips_fetch_register): Turn into...
1538 (mips_target::low_fetch_register): ...this.
1539 (the_low_target): Remove the op field.
1540 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1541 Declare.
1542 (riscv_fetch_register): Turn into...
1543 (riscv_target::low_fetch_register): ...this.
1544 (the_low_target): Remove the op field.
1545
1546 Update the callers below.
1547
1548 * linux-low.cc (linux_process_target::fetch_registers)
1549 (linux_process_target::low_fetch_register)
1550
1551 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1552
1553 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1554 linux target ops into methods of linux_process_target.
1555
1556 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1557 (class linux_process_target) <fetch_register>
1558 <store_register>
1559 <usr_fetch_inferior_registers>
1560 <usr_store_inferior_registers>
1561 <low_cannot_fetch_register>
1562 <low_cannot_fetch_register> Declare.
1563 * linux-low.cc (fetch_register): Turn into...
1564 (linux_process_target::fetch_register): ...this.
1565 (store_register): Turn into ...
1566 (linux_process_target::store_register): ...this.
1567 (usr_fetch_inferior_registers): Turn into...
1568 (linux_process_target::usr_fetch_inferior_registers): ...this.
1569 (usr_store_inferior_registers): Turn into...
1570 (linux_process_target::usr_store_inferior_registers): ...this.
1571 * linux-x86-low.cc (class x86_target)
1572 <low_cannot_fetch_register>
1573 <low_cannot_store_register>: Declare.
1574 (x86_cannot_store_register): Turn into...
1575 (x86_target::low_cannot_store_register): ...this.
1576 (x86_cannot_fetch_register): Turn into...
1577 (x86_target::low_cannot_fetch_register): ...this.
1578 (the_low_target): Remove the target op fields.
1579 * linux-aarch64-low.cc (class aarch64_target)
1580 <low_cannot_fetch_register>
1581 <low_cannot_store_register>: Declare.
1582 (aarch64_target::low_cannot_fetch_register)
1583 (aarch64_target::low_cannot_store_register): Define.
1584 (the_low_target): Remove the op fields.
1585 * linux-arm-low.cc (class arm_target)
1586 <low_cannot_fetch_register>
1587 <low_cannot_store_register>: Declare.
1588 (arm_cannot_fetch_register): Turn into...
1589 (arm_target::low_cannot_fetch_register): ...this.
1590 (arm_cannot_store_register): Turn into...
1591 (arm_target::low_cannot_store_register): ...this.
1592 (the_low_target): Remove the op fields.
1593 * linux-bfin-low.cc (class bfin_target)
1594 <low_cannot_fetch_register>
1595 <low_cannot_store_register>: Declare.
1596 (bfin_cannot_fetch_register): Turn into...
1597 (bfin_target::low_cannot_fetch_register): ...this.
1598 (bfin_cannot_store_register): Turn into...
1599 (bfin_target::low_cannot_store_register): ...this.
1600 (the_low_target): Remove the op fields.
1601 * linux-cris-low.cc (class cris_target)
1602 <low_cannot_fetch_register>
1603 <low_cannot_store_register>: Declare.
1604 (cris_cannot_fetch_register): Turn into...
1605 (cris_target::low_cannot_fetch_register): ...this.
1606 (cris_cannot_store_register): Turn into...
1607 (cris_target::low_cannot_store_register): ...this.
1608 (the_low_target): Remove the op fields.
1609 * linux-crisv32-low.cc (class crisv32_target)
1610 <low_cannot_fetch_register>
1611 <low_cannot_store_register>: Declare.
1612 (crisv32_target::low_cannot_fetch_register)
1613 (crisv32_target::low_cannot_store_register): Define.
1614 (the_low_target): Remove the op fields.
1615 * linux-ia64-low.cc (class ia64_target)
1616 <low_cannot_fetch_register>
1617 <low_cannot_store_register>: Declare.
1618 (ia64_cannot_fetch_register): Turn into...
1619 (ia64_target::low_cannot_fetch_register): ...this.
1620 (ia64_cannot_store_register): Turn into...
1621 (ia64_target::low_cannot_store_register): ...this.
1622 (the_low_target): Remove the op fields.
1623 * linux-m32r-low.cc (class m32r_target)
1624 <low_cannot_fetch_register>
1625 <low_cannot_store_register>: Declare.
1626 (m32r_cannot_fetch_register): Turn into...
1627 (m32r_target::low_cannot_fetch_register): ...this.
1628 (m32r_cannot_store_register): Turn into...
1629 (m32r_target::low_cannot_store_register): ...this.
1630 (the_low_target): Remove the op fields.
1631 * linux-m68k-low.cc (class m68k_target)
1632 <low_cannot_fetch_register>
1633 <low_cannot_store_register>: Declare.
1634 (m68k_cannot_fetch_register): Turn into...
1635 (m68k_target::low_cannot_fetch_register): ...this.
1636 (m68k_cannot_store_register): Turn into...
1637 (m68k_target::low_cannot_store_register): ...this.
1638 (the_low_target): Remove the op fields.
1639 * linux-mips-low.cc (class mips_target)
1640 <low_cannot_fetch_register>
1641 <low_cannot_store_register>: Declare.
1642 (mips_cannot_fetch_register): Turn into...
1643 (mips_target::low_cannot_fetch_register): ...this.
1644 (mips_cannot_store_register): Turn into...
1645 (mips_target::low_cannot_store_register): ...this.
1646 (get_usrregs_info): Inline at the call sites in
1647 low_cannot_fetch_register and low_cannot_store_register,
1648 and remove.
1649 (the_low_target): Remove the op fields.
1650 * linux-nios2-low.cc (class nios2_target)
1651 <low_cannot_fetch_register>
1652 <low_cannot_store_register>: Declare.
1653 (nios2_cannot_fetch_register): Turn into...
1654 (nios2_target::low_cannot_fetch_register): ...this.
1655 (nios2_cannot_store_register): Turn into...
1656 (nios2_target::low_cannot_store_register): ...this.
1657 (the_low_target): Remove the op fields.
1658 * linux-ppc-low.cc (class ppc_target)
1659 <low_cannot_fetch_register>
1660 <low_cannot_store_register>: Declare.
1661 (ppc_cannot_fetch_register): Turn into...
1662 (ppc_target::low_cannot_fetch_register): ...this.
1663 (ppc_cannot_store_register): Turn into...
1664 (ppc_target::low_cannot_store_register): ...this.
1665 (the_low_target): Remove the op fields.
1666 * linux-riscv-low.cc (class riscv_target)
1667 <low_cannot_fetch_register>
1668 <low_cannot_store_register>: Declare.
1669 (riscv_target::low_cannot_fetch_register)
1670 (riscv_target::low_cannot_store_register): Define.
1671 (the_low_target): Remove the op fields.
1672 * linux-s390-low.cc (class s390_target)
1673 <low_cannot_fetch_register>
1674 <low_cannot_store_register>: Declare.
1675 (s390_cannot_fetch_register): Turn into...
1676 (s390_target::low_cannot_fetch_register): ...this.
1677 (s390_cannot_store_register): Turn into...
1678 (s390_target::low_cannot_store_register): ...this.
1679 (the_low_target): Remove the op fields.
1680 * linux-sh-low.cc (class sh_target)
1681 <low_cannot_fetch_register>
1682 <low_cannot_store_register>: Declare.
1683 (sh_cannot_fetch_register): Turn into...
1684 (sh_target::low_cannot_fetch_register): ...this.
1685 (sh_cannot_store_register): Turn into...
1686 (sh_target::low_cannot_store_register): ...this.
1687 (the_low_target): Remove the op fields.
1688 * linux-sparc-low.cc (class sparc_target)
1689 <low_cannot_fetch_register>
1690 <low_cannot_store_register>: Declare.
1691 (sparc_cannot_fetch_register): Turn into...
1692 (sparc_target::low_cannot_fetch_register): ...this.
1693 (sparc_cannot_store_register): Turn into...
1694 (sparc_target::low_cannot_store_register): ...this.
1695 (the_low_target): Remove the op fields.
1696 * linux-tic6x-low.cc (class tic6x_target)
1697 <low_cannot_fetch_register>
1698 <low_cannot_store_register>: Declare.
1699 (tic6x_cannot_fetch_register): Turn into...
1700 (tic6x_target::low_cannot_fetch_register): ...this.
1701 (tic6x_cannot_store_register): Turn into...
1702 (tic6x_target::low_cannot_store_register): ...this.
1703 (the_low_target): Remove the op fields.
1704 * linux-tile-low.cc (class tile_target)
1705 <low_cannot_fetch_register>
1706 <low_cannot_store_register>: Declare.
1707 (tile_cannot_fetch_register): Turn into...
1708 (tile_target::low_cannot_fetch_register): ...this.
1709 (tile_cannot_store_register): Turn into...
1710 (tile_target::low_cannot_store_register): ...this.
1711 (the_low_target): Remove the op fields.
1712 * linux-xtensa-low.cc (class xtensa_target)
1713 <low_cannot_fetch_register>
1714 <low_cannot_store_register>: Declare.
1715 (xtensa_target::low_cannot_fetch_register)
1716 (xtensa_target::low_cannot_store_register): Define.
1717 (the_low_target): Remove the op fields.
1718
1719 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1720
1721 Turn the 'regs_info' linux target op into a method of
1722 linux_process_target.
1723
1724 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1725 (class linux_process_target) <get_regs_info>: Define.
1726
1727 Update the callers below.
1728
1729 * linux-low.cc (linux_process_target::fetch_registers)
1730 (linux_process_target::store_registers)
1731 * proc-service.cc (gregset_info)
1732
1733 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1734 (x86_linux_regs_info): Turn into ...
1735 (x86_target::get_regs_info): ...this.
1736 (the_low_target): Remove the op field.
1737 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1738 Declare.
1739 (aarch64_regs_info): Turn into ...
1740 (aarch64_target::get_regs_info): ...this.
1741 (the_low_target): Remove the op field.
1742 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1743 (arm_regs_info): Turn into ...
1744 (arm_target::get_regs_info): ...this.
1745 (the_low_target): Remove the op field.
1746 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1747 (bfin_regs_info): Turn into ...
1748 (bfin_target::get_regs_info): ...this.
1749 (the_low_target): Remove the op field.
1750 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1751 (cris_regs_info): Turn into ...
1752 (cris_target::get_regs_info): ...this.
1753 (the_low_target): Remove the op field.
1754 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1755 Declare.
1756 (crisv32_regs_info): Turn into ...
1757 (crisv32_target::get_regs_info): ...this.
1758 (the_low_target): Remove the op field.
1759 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1760 (ia64_regs_info): Turn into ...
1761 (ia64_target::get_regs_info): ...this.
1762 (the_low_target): Remove the op field.
1763 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1764 (m32r_regs_info): Turn into ...
1765 (m32r_target::get_regs_info): ...this.
1766 (the_low_target): Remove the op field.
1767 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1768 (m68k_regs_info): Turn into ...
1769 (m68k_target::get_regs_info): ...this.
1770 (the_low_target): Remove the op field.
1771 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1772 (mips_regs_info): Turn into ...
1773 (mips_target::get_regs_info): ...this.
1774 (the_low_target): Remove the op field.
1775 (get_usrregs_info): Update the call to the op.
1776 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1777 (nios2_regs_info): Turn into ...
1778 (nios2_target::get_regs_info): ...this.
1779 (the_low_target): Remove the op field.
1780 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1781 (ppc_regs_info): Turn into ...
1782 (ppc_target::get_regs_info): ...this.
1783 (the_low_target): Remove the op field.
1784 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1785 (riscv_regs_info): Turn into ...
1786 (riscv_target::get_regs_info): ...this.
1787 (the_low_target): Remove the op field.
1788 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1789 (s390_regs_info): Turn into ...
1790 (s390_target::get_regs_info): ...this.
1791 (the_low_target): Remove the op field.
1792 (s390_collect_ptrace_register)
1793 (s390_supply_ptrace_register)
1794 (s390_fill_gregset): Update the call to the op.
1795 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1796 (sh_regs_info): Turn into ...
1797 (sh_target::get_regs_info): ...this.
1798 (the_low_target): Remove the op field.
1799 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1800 (sparc_regs_info): Turn into ...
1801 (sparc_target::get_regs_info): ...this.
1802 (the_low_target): Remove the op field.
1803 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1804 (tic6x_regs_info): Turn into ...
1805 (tic6x_target::get_regs_info): ...this.
1806 (the_low_target): Remove the op field.
1807 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1808 (tile_regs_info): Turn into ...
1809 (tile_target::get_regs_info): ...this.
1810 (the_low_target): Remove the op field.
1811 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1812 Declare.
1813 (xtensa_regs_info): Turn into ...
1814 (xtensa_target::get_regs_info): ...this.
1815 (the_low_target): Remove the op field.
1816
1817 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1818
1819 Turn the 'arch_setup' linux target op into a method of
1820 linux_process_target.
1821
1822 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1823 (class linux_process_target) <arch_setup_thread>
1824 <low_arch_setup>: New declarations.
1825 * linux-low.cc (linux_arch_setup): Delete.
1826 (linux_arch_setup_thread): Turn into...
1827 (linux_process_target::arch_setup_thread): ... this.
1828
1829 Update the callers below.
1830
1831 (linux_process_target::handle_extended_wait)
1832 (linux_process_target::post_create_inferior)
1833 (linux_process_target::filter_event)
1834
1835 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1836 declaration.
1837 (x86_linux_update_xmltarget): Turn into...
1838 (x86_target::update_xmltarget): ...this.
1839 (x86_linux_process_qsupported): Update the call to
1840 x86_linux_update_xmltarget.
1841 (x86_arch_setup): Turn into ...
1842 (x86_target::low_arch_setup): ...this.
1843 (the_low_target): Remove the op field.
1844 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1845 declaration.
1846 (aarch64_arch_setup): Turn into ...
1847 (aarch64_target::low_arch_setup): ...this.
1848 (the_low_target): Remove the op field.
1849 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1850 declaration.
1851 (arm_arch_setup): Turn into ...
1852 (arm_target::low_arch_setup): ...this.
1853 (the_low_target): Remove the op field.
1854 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1855 declaration.
1856 (bfin_arch_setup): Turn into ...
1857 (bfin_target::low_arch_setup): ...this.
1858 (the_low_target): Remove the op field.
1859 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1860 declaration.
1861 (cris_arch_setup): Turn into ...
1862 (cris_target::low_arch_setup): ...this.
1863 (the_low_target): Remove the op field.
1864 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1865 declaration.
1866 (crisv32_arch_setup): Turn into ...
1867 (crisv32_target::low_arch_setup): ...this.
1868 (the_low_target): Remove the op field.
1869 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1870 declaration.
1871 (ia64_arch_setup): Turn into ...
1872 (ia64_target::low_arch_setup): ...this.
1873 (the_low_target): Remove the op field.
1874 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1875 declaration.
1876 (m32r_arch_setup): Turn into ...
1877 (m32r_target::low_arch_setup): ...this.
1878 (the_low_target): Remove the op field.
1879 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1880 declaration.
1881 (m68k_arch_setup): Turn into ...
1882 (m68k_target::low_arch_setup): ...this.
1883 (the_low_target): Remove the op field.
1884 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1885 declaration.
1886 (mips_arch_setup): Turn into ...
1887 (mips_target::low_arch_setup): ...this.
1888 (the_low_target): Remove the op field.
1889 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1890 declaration.
1891 (nios2_arch_setup): Turn into ...
1892 (nios2_target::low_arch_setup): ...this.
1893 (the_low_target): Remove the op field.
1894 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1895 declaration.
1896 (ppc_arch_setup): Turn into ...
1897 (ppc_target::low_arch_setup): ...this.
1898 (the_low_target): Remove the op field.
1899 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1900 declaration.
1901 (riscv_arch_setup): Turn into ...
1902 (riscv_target::low_arch_setup): ...this.
1903 (the_low_target): Remove the op field.
1904 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1905 declaration.
1906 (s390_arch_setup): Turn into ...
1907 (s390_target::low_arch_setup): ...this.
1908 (the_low_target): Remove the op field.
1909 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1910 declaration.
1911 (sh_arch_setup): Turn into ...
1912 (sh_target::low_arch_setup): ...this.
1913 (the_low_target): Remove the op field.
1914 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1915 declaration.
1916 (sparc_arch_setup): Turn into ...
1917 (sparc_target::low_arch_setup): ...this.
1918 (the_low_target): Remove the op field.
1919 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1920 declaration.
1921 (tic6x_arch_setup): Turn into ...
1922 (tic6x_target::low_arch_setup): ...this.
1923 (the_low_target): Remove the op field.
1924 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1925 declaration.
1926 (tile_arch_setup): Turn into ...
1927 (tile_target::low_arch_setup): ...this.
1928 (the_low_target): Remove the op field.
1929 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1930 declaration.
1931 (xtensa_arch_setup): Turn into ...
1932 (xtensa_target::low_arch_setup): ...this.
1933 (the_low_target): Remove the op field.
1934
1935 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1936
1937 * linux-low.h (the_linux_target): New extern declaration.
1938 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1939 'the_target'.
1940 (the_linux_target): Remove.
1941 * linux-x86-low.cc (class x86_target): New class.
1942 (the_x86_target): New static object.
1943 (the_linux_target): Define as pointer to the_x86_target.
1944 * linux-aarch64-low.cc (class aarch64_target): New class.
1945 (the_aarch64_target): New static object.
1946 (the_linux_target): Define as pointer to the_aarch64_target.
1947 * linux-arm-low.cc (class arm_target): New class.
1948 (the_arm_target): New static object.
1949 (the_linux_target): Define as pointer to the_arm_target.
1950 * linux-bfin-low.cc (class bfin_target): New class.
1951 (the_bfin_target): New static object.
1952 (the_linux_target): Define as pointer to the_bfin_target.
1953 * linux-cris-low.cc (class cris_target): New class.
1954 (the_cris_target): New static object.
1955 (the_linux_target): Define as pointer to the_cris_target.
1956 * linux-crisv32-low.cc (class crisv32_target): New class.
1957 (the_crisv32_target): New static object.
1958 (the_linux_target): Define as pointer to the_crisv32_target.
1959 * linux-ia64-low.cc (class ia64_target): New class.
1960 (the_ia64_target): New static object.
1961 (the_linux_target): Define as pointer to the_ia64_target.
1962 * linux-m32r-low.cc (class m32r_target): New class.
1963 (the_m32r_target): New static object.
1964 (the_linux_target): Define as pointer to the_m32r_target.
1965 * linux-m68k-low.cc (class m68k_target): New class.
1966 (the_m68k_target): New static object.
1967 (the_linux_target): Define as pointer to the_m68k_target.
1968 * linux-mips-low.cc (class mips_target): New class.
1969 (the_mips_target): New static object.
1970 (the_linux_target): Define as pointer to the_mips_target.
1971 * linux-nios2-low.cc (class nios2_target): New class.
1972 (the_nios2_target): New static object.
1973 (the_linux_target): Define as pointer to the_nios2_target.
1974 * linux-ppc-low.cc (class ppc_target): New class.
1975 (the_ppc_target): New static object.
1976 (the_linux_target): Define as pointer to the_ppc_target.
1977 * linux-riscv-low.cc (class riscv_target): New class.
1978 (the_riscv_target): New static object.
1979 (the_linux_target): Define as pointer to the_riscv_target.
1980 * linux-s390-low.cc (class s390_target): New class.
1981 (the_s390_target): New static object.
1982 (the_linux_target): Define as pointer to the_s390_target.
1983 * linux-sh-low.cc (class sh_target): New class.
1984 (the_sh_target): New static object.
1985 (the_linux_target): Define as pointer to the_sh_target.
1986 * linux-sparc-low.cc (class sparc_target): New class.
1987 (the_sparc_target): New static object.
1988 (the_linux_target): Define as pointer to the_sparc_target.
1989 * linux-tic6x-low.cc (class tic6x_target): New class.
1990 (the_tic6x_target): New static object.
1991 (the_linux_target): Define as pointer to the_tic6x_target.
1992 * linux-tile-low.cc (class tile_target): New class.
1993 (the_tile_target): New static object.
1994 (the_linux_target): Define as pointer to the_tile_target.
1995 * linux-xtensa-low.cc (class xtensa_target): New class.
1996 (the_xtensa_target): New static object.
1997 (the_linux_target): Define as pointer to the_xtensa_target.
1998
1999 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2000
2001 Turn some static functions in linux-low.cc into private methods of
2002 linux_process_target.
2003
2004 * linux-low.cc (handle_extended_wait): Turn into ...
2005 (linux_process_target::handle_extended_wait): ...this. Call
2006 'mourn' on 'this' object instead of 'the_target'.
2007 (maybe_move_out_of_jump_pad): Turn into...
2008 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2009 (linux_low_filter_event): Turn into...
2010 (linux_process_target::filter_event): ...this.
2011 (linux_wait_for_event_filtered): Turn into...
2012 (linux_process_target::wait_for_event_filtered): ...this.
2013 (linux_wait_for_event): Turn into...
2014 (linux_process_target::wait_for_event): ...this.
2015 (linux_wait_1): Turn into...
2016 (linux_process_target::wait_1): ...this.
2017 (wait_for_sigstop): Turn into...
2018 (linux_process_target::wait_for_sigstop): ...this.
2019 (move_out_of_jump_pad_callback): Turn into...
2020 (linux_process_target::move_out_of_jump_pad): ...this.
2021 (stop_all_lwps): Turn into...
2022 (linux_process_target::stop_all_lwps): ...this.
2023 (start_step_over): Turn into...
2024 (linux_process_target::start_step_over): ...this.
2025 (complete_ongoing_step_over): Turn into...
2026 (linux_process_target::complete_ongoing_step_over): ...this.
2027 (proceed_all_lwps): Turn into...
2028 (linux_process_target::proceed_all_lwps): ...this.
2029 (unstop_all_lwps): Turn into...
2030 (linux_process_target::unstop_all_lwps): ...this.
2031
2032 * linux-low.h (class linux_process_target)
2033 <handle_extended_wait>
2034 <maybe_move_out_of_jump_pad>
2035 filter_event>
2036 <wait_for_event_filtered>
2037 <wait_for_event>
2038 <wait_1>
2039 <wait_for_sigstop>
2040 <move_out_of_jump_pad>
2041 <stop_all_lwps>
2042 <start_step_over>
2043 <complete_ongoing_step_over>
2044 <proceed_all_lwps>
2045 <unstop_all_lwps>: Declare.
2046
2047 Update the callers below.
2048
2049 * linux-low.cc (linux_process_target::attach): Update.
2050 (linux_process_target::stabilize_threads): Ditto.
2051 (linux_process_target::wait): Ditto.
2052
2053 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2054
2055 * linux-low.h (struct linux_target_ops): Update the comment for
2056 'cannot_store_register' to return 0 or 1.
2057 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2058 of 2.
2059
2060 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2061
2062 * config.in: Re-generate.
2063 * configure: Re-generate.
2064
2065 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2066
2067 * regcache.cc (find_register_by_number): Update.
2068 * tdesc.cc (init_target_desc): Likewise.
2069 * tdesc.h (target_desc::reg_defs): Likewise.
2070
2071 2020-03-12 Tom Tromey <tom@tromey.com>
2072
2073 * configure: Rebuild.
2074 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2075 (WIN32APILIBS): New subst.
2076 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2077 gdbsupport files.
2078 (gdbsupport/%.o): Remove target.
2079 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2080 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2081 (WIN32APILIBS): New variable.
2082 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2083 (gdbreplay$(EXEEXT)): Likewise.
2084
2085 2020-03-12 Tom Tromey <tom@tromey.com>
2086
2087 * config.in, configure: Rebuild.
2088 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2089 * acinclude.m4: Include gettext-sister.m4.
2090 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2091 variables.
2092 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2093 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2094
2095 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2096
2097 * acinclude.m4: Update path to selftest.m4.
2098
2099 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2100
2101 * configure.ac: Don't source bfd/development.sh, move
2102 GDB_AC_COMMON higher.
2103 * configure: Re-generate.
2104
2105 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2106
2107 * configure: Re-generate.
2108
2109 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2110
2111 * configure: Re-generate.
2112
2113 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2114
2115 * .dir-locals.el: New file.
2116
2117 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2118
2119 * .gitattributes: New file.
2120
2121 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2122
2123 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2124 reply into an S reply.
2125 * server.cc (disable_packet_T): New global.
2126 (captured_main): Set new global when appropriate.
2127 * server.h (disable_packet_T): Declare.
2128
2129 2020-02-21 Tom Tromey <tom@tromey.com>
2130
2131 * Makefile.in (mostlyclean): New target.
2132
2133 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2134
2135 * target.h (struct process_stratum_target): Remove.
2136 (class process_target): Rename to ...
2137 (class process_stratum_target): ... this.
2138 * linux-low.h (class linux_process_target): Derive from
2139 'process_stratum_target'.
2140 * linux-low.cc (linux_target_ops): Remove.
2141 (initialize_low): Set the_target to the singleton instance of
2142 linux_process_target.
2143 * lynx-low.h (class lynx_process_target): Derive from
2144 'process_stratum_target'.
2145 * lynx-low.cc (lynx_target_ops): Remove.
2146 (initialize_low): Set the_target to the singleton instance of
2147 lynx_process_target.
2148 * nto-low.h (class nto_process_target): Derive from
2149 'process_stratum_target'.
2150 * nto-low.cc (nto_target_ops): Remove.
2151 (initialize_low): Set the_target to the singleton instance of
2152 nto_process_target.
2153 * win32-low.h (class win32_process_target): Derive from
2154 'process_stratum_target'.
2155 * win32-low.cc (win32_target_ops): Remove.
2156 (initialize_low): Set the_target to the singleton instance of
2157 win32_process_target.
2158
2159 Replace 'the_target->pt' with 'the_target' in the uses below.
2160
2161 * hostio.cc (hostio_error)
2162 (handle_setfs)
2163 (handle_open)
2164 (handle_unlink)
2165 (handle_readlink)
2166 * linux-aarch32-low.cc (arm_breakpoint_at)
2167 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2168 * linux-arm-low.cc (arm_sigreturn_next_pc)
2169 (arm_get_hwcap)
2170 (arm_get_syscall_trapinfo)
2171 * linux-cris-low.cc (cris_breakpoint_at)
2172 * linux-crisv32-low.cc (cris_breakpoint_at)
2173 * linux-low.cc (handle_extended_wait)
2174 (linux_wait_1)
2175 (linux_read_memory)
2176 (linux_process_target::breakpoint_kind_from_pc)
2177 (linux_get_auxv)
2178 * linux-m32r-low.cc (m32r_breakpoint_at)
2179 * linux-mips-low.cc (mips_breakpoint_at)
2180 * linux-nios2-low.cc (nios2_breakpoint_at)
2181 * linux-ppc-low.cc (ppc_breakpoint_at)
2182 * linux-s390-low.cc (s390_get_hwcap)
2183 * linux-sh-low.cc (sh_breakpoint_at)
2184 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2185 (sparc_store_gregset_from_stack)
2186 (sparc_breakpoint_at)
2187 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2188 * linux-tile-low.cc (tile_breakpoint_at)
2189 * linux-x86-low.cc (x86_breakpoint_at)
2190 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2191 * mem-break.cc (bp_size)
2192 (bp_opcode)
2193 (insert_memory_breakpoint)
2194 (set_raw_breakpoint_at)
2195 (delete_raw_breakpoint)
2196 (z_type_supported)
2197 (uninsert_raw_breakpoint)
2198 (reinsert_raw_breakpoint)
2199 (validate_inserted_breakpoint)
2200 * regcache.cc (regcache_read_pc)
2201 (regcache_write_pc)
2202 * remote-utils.cc (putpkt_binary_1)
2203 (input_interrupt)
2204 (getpkt)
2205 (prepare_resume_reply)
2206 * server.cc (handle_general_set)
2207 (handle_detach)
2208 (handle_qxfer_auxv)
2209 (handle_qxfer_exec_file)
2210 (handle_qxfer_libraries_svr4)
2211 (handle_qxfer_osdata)
2212 (handle_qxfer_siginfo)
2213 (handle_qxfer_fdpic)
2214 (handle_query)
2215 (resume)
2216 (handle_v_requests)
2217 (queue_stop_reply_callback)
2218 (captured_main)
2219 * target.cc (prepare_to_access_memory)
2220 (done_accessing_memory)
2221 (read_inferior_memory)
2222 (target_write_memory)
2223 (target_stop_and_wait)
2224 (target_wait)
2225 (target_mourn_inferior)
2226 (target_continue_no_signal)
2227 (target_continue)
2228 (target_supports_multi_process)
2229 (kill_inferior)
2230 * target.h
2231 (target_create_inferior)
2232 (target_post_create_inferior)
2233 (myattach)
2234 (target_supports_fork_events)
2235 (target_supports_vfork_events)
2236 (target_supports_exec_events)
2237 (target_handle_new_gdb_connection)
2238 (detach_inferior)
2239 (mythread_alive)
2240 (fetch_inferior_registers)
2241 (store_inferior_registers)
2242 (join_inferior)
2243 (target_supports_non_stop)
2244 (target_async)
2245 (target_process_qsupported)
2246 (target_supports_catch_syscall)
2247 (target_get_ipa_tdesc_idx)
2248 (target_supports_tracepoints)
2249 (target_supports_fast_tracepoints)
2250 (target_get_min_fast_tracepoint_insn_len)
2251 (target_thread_stopped)
2252 (target_pause_all)
2253 (target_unpause_all)
2254 (target_stabilize_threads)
2255 (target_install_fast_tracepoint_jump_pad)
2256 (target_emit_ops)
2257 (target_supports_disable_randomization)
2258 (target_supports_agent)
2259 (target_enable_btrace)
2260 (target_disable_btrace)
2261 (target_read_btrace)
2262 (target_read_btrace_conf)
2263 (target_supports_range_stepping)
2264 (target_supports_stopped_by_sw_breakpoint)
2265 (target_stopped_by_sw_breakpoint)
2266 (target_supports_stopped_by_hw_breakpoint)
2267 (target_supports_hardware_single_step)
2268 (target_stopped_by_hw_breakpoint)
2269 (target_breakpoint_kind_from_pc)
2270 (target_breakpoint_kind_from_current_state)
2271 (target_supports_software_single_step)
2272 (target_core_of_thread)
2273 (target_thread_name)
2274 (target_thread_handle)
2275 * win32-low.cc (do_initial_child_stuff)
2276
2277 Rename target op default definitions listed below.
2278
2279 * target.cc (process_target::post_create_inferior): Rename as ...
2280 (process_stratum_target::post_create_inferior): ... this.
2281 (process_target::prepare_to_access_memory): Rename as ...
2282 (process_stratum_target::prepare_to_access_memory): ... this.
2283 (process_target::done_accessing_memory): Rename as ...
2284 (process_stratum_target::done_accessing_memory): ... this.
2285 (process_target::look_up_symbols): Rename as ...
2286 (process_stratum_target::look_up_symbols): ... this.
2287 (process_target::supports_read_auxv): Rename as ...
2288 (process_stratum_target::supports_read_auxv): ... this.
2289 (process_target::read_auxv): Rename as ...
2290 (process_stratum_target::read_auxv): ... this.
2291 (process_target::supports_z_point_type): Rename as ...
2292 (process_stratum_target::supports_z_point_type): ... this.
2293 (process_target::insert_point): Rename as ...
2294 (process_stratum_target::insert_point): ... this.
2295 (process_target::remove_point): Rename as ...
2296 (process_stratum_target::remove_point): ... this.
2297 (process_target::stopped_by_sw_breakpoint): Rename as ...
2298 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2299 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2300 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2301 (process_target::stopped_by_hw_breakpoint): Rename as ...
2302 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2303 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2304 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2305 (process_target::supports_hardware_single_step): Rename as ...
2306 (process_stratum_target::supports_hardware_single_step): ... this.
2307 (process_target::stopped_by_watchpoint): Rename as ...
2308 (process_stratum_target::stopped_by_watchpoint): ... this.
2309 (process_target::stopped_data_address): Rename as ...
2310 (process_stratum_target::stopped_data_address): ... this.
2311 (process_target::supports_read_offsets): Rename as ...
2312 (process_stratum_target::supports_read_offsets): ... this.
2313 (process_target::read_offsets): Rename as ...
2314 (process_stratum_target::read_offsets): ... this.
2315 (process_target::supports_get_tls_address): Rename as ...
2316 (process_stratum_target::supports_get_tls_address): ... this.
2317 (process_target::get_tls_address): Rename as ...
2318 (process_stratum_target::get_tls_address): ... this.
2319 (process_target::hostio_last_error): Rename as ...
2320 (process_stratum_target::hostio_last_error): ... this.
2321 (process_target::supports_qxfer_osdata): Rename as ...
2322 (process_stratum_target::supports_qxfer_osdata): ... this.
2323 (process_target::qxfer_osdata): Rename as ...
2324 (process_stratum_target::qxfer_osdata): ... this.
2325 (process_target::supports_qxfer_siginfo): Rename as ...
2326 (process_stratum_target::supports_qxfer_siginfo): ... this.
2327 (process_target::qxfer_siginfo): Rename as ...
2328 (process_stratum_target::qxfer_siginfo): ... this.
2329 (process_target::supports_non_stop): Rename as ...
2330 (process_stratum_target::supports_non_stop): ... this.
2331 (process_target::async): Rename as ...
2332 (process_stratum_target::async): ... this.
2333 (process_target::start_non_stop): Rename as ...
2334 (process_stratum_target::start_non_stop): ... this.
2335 (process_target::supports_multi_process): Rename as ...
2336 (process_stratum_target::supports_multi_process): ... this.
2337 (process_target::supports_fork_events): Rename as ...
2338 (process_stratum_target::supports_fork_events): ... this.
2339 (process_target::supports_vfork_events): Rename as ...
2340 (process_stratum_target::supports_vfork_events): ... this.
2341 (process_target::supports_exec_events): Rename as ...
2342 (process_stratum_target::supports_exec_events): ... this.
2343 (process_target::handle_new_gdb_connection): Rename as ...
2344 (process_stratum_target::handle_new_gdb_connection): ... this.
2345 (process_target::handle_monitor_command): Rename as ...
2346 (process_stratum_target::handle_monitor_command): ... this.
2347 (process_target::core_of_thread): Rename as ...
2348 (process_stratum_target::core_of_thread): ... this.
2349 (process_target::supports_read_loadmap): Rename as ...
2350 (process_stratum_target::supports_read_loadmap): ... this.
2351 (process_target::read_loadmap): Rename as ...
2352 (process_stratum_target::read_loadmap): ... this.
2353 (process_target::process_qsupported): Rename as ...
2354 (process_stratum_target::process_qsupported): ... this.
2355 (process_target::supports_tracepoints): Rename as ...
2356 (process_stratum_target::supports_tracepoints): ... this.
2357 (process_target::read_pc): Rename as ...
2358 (process_stratum_target::read_pc): ... this.
2359 (process_target::write_pc): Rename as ...
2360 (process_stratum_target::write_pc): ... this.
2361 (process_target::supports_thread_stopped): Rename as ...
2362 (process_stratum_target::supports_thread_stopped): ... this.
2363 (process_target::thread_stopped): Rename as ...
2364 (process_stratum_target::thread_stopped): ... this.
2365 (process_target::supports_get_tib_address): Rename as ...
2366 (process_stratum_target::supports_get_tib_address): ... this.
2367 (process_target::get_tib_address): Rename as ...
2368 (process_stratum_target::get_tib_address): ... this.
2369 (process_target::pause_all): Rename as ...
2370 (process_stratum_target::pause_all): ... this.
2371 (process_target::unpause_all): Rename as ...
2372 (process_stratum_target::unpause_all): ... this.
2373 (process_target::stabilize_threads): Rename as ...
2374 (process_stratum_target::stabilize_threads): ... this.
2375 (process_target::supports_fast_tracepoints): Rename as ...
2376 (process_stratum_target::supports_fast_tracepoints): ... this.
2377 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2378 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2379 (process_target::emit_ops): Rename as ...
2380 (process_stratum_target::emit_ops): ... this.
2381 (process_target::supports_disable_randomization): Rename as ...
2382 (process_stratum_target::supports_disable_randomization): ... this.
2383 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2384 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2385 (process_target::qxfer_libraries_svr4): Rename as ...
2386 (process_stratum_target::qxfer_libraries_svr4): ... this.
2387 (process_target::supports_agent): Rename as ...
2388 (process_stratum_target::supports_agent): ... this.
2389 (process_target::enable_btrace): Rename as ...
2390 (process_stratum_target::enable_btrace): ... this.
2391 (process_target::disable_btrace): Rename as ...
2392 (process_stratum_target::disable_btrace): ... this.
2393 (process_target::read_btrace): Rename as ...
2394 (process_stratum_target::read_btrace): ... this.
2395 (process_target::read_btrace_conf): Rename as ...
2396 (process_stratum_target::read_btrace_conf): ... this.
2397 (process_target::supports_range_stepping): Rename as ...
2398 (process_stratum_target::supports_range_stepping): ... this.
2399 (process_target::supports_pid_to_exec_file): Rename as ...
2400 (process_stratum_target::supports_pid_to_exec_file): ... this.
2401 (process_target::pid_to_exec_file): Rename as ...
2402 (process_stratum_target::pid_to_exec_file): ... this.
2403 (process_target::supports_multifs): Rename as ...
2404 (process_stratum_target::supports_multifs): ... this.
2405 (process_target::multifs_open): Rename as ...
2406 (process_stratum_target::multifs_open): ... this.
2407 (process_target::multifs_unlink): Rename as ...
2408 (process_stratum_target::multifs_unlink): ... this.
2409 (process_target::multifs_readlink): Rename as ...
2410 (process_stratum_target::multifs_readlink): ... this.
2411 (process_target::breakpoint_kind_from_pc): Rename as ...
2412 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2413 (process_target::breakpoint_kind_from_current_state): Rename as ...
2414 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2415 (process_target::thread_name): Rename as ...
2416 (process_stratum_target::thread_name): ... this.
2417 (process_target::thread_handle): Rename as ...
2418 (process_stratum_target::thread_handle): ... this.
2419 (process_target::supports_software_single_step): Rename as ...
2420 (process_stratum_target::supports_software_single_step): ... this.
2421 (process_target::supports_catch_syscall): Rename as ...
2422 (process_stratum_target::supports_catch_syscall): ... this.
2423 (process_target::get_ipa_tdesc_idx): Rename as ...
2424 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2425
2426 2020-02-20 Pedro Alves <palves@redhat.com>
2427
2428 * target.cc (set_target_ops): Simply copy the given target pointer
2429 instead of creating a copy of the pointed object.
2430
2431 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2432
2433 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2434 of process_target.
2435
2436 * target.h (struct process_stratum_target): Remove the target op.
2437 (class process_target): Add the target op.
2438 (target_get_ipa_tdesc_idx): Update the macro.
2439 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2440
2441 Update the derived classes and callers below.
2442
2443 * linux-low.cc (linux_target_ops): Update.
2444 (linux_get_ipa_tdesc_idx): Turn into ...
2445 (linux_process_target::get_ipa_tdesc_idx): ... this.
2446 * linux-low.h (class linux_process_target): Update.
2447 * lynx-low.cc (lynx_target_ops): Update.
2448 * nto-low.cc (nto_target_ops): Update.
2449 * win32-low.cc (win32_target_ops): Update.
2450
2451 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2452
2453 Turn process_stratum_target's supports_catch_syscall op into a
2454 method of process_target.
2455
2456 * target.h (struct process_stratum_target): Remove the target op.
2457 (class process_target): Add the target op.
2458 (target_supports_catch_syscall): Update the macro.
2459 * target.cc (process_target::supports_catch_syscall): Define.
2460
2461 Update the derived classes and callers below.
2462
2463 * linux-low.cc (linux_target_ops): Update.
2464 (linux_supports_catch_syscall): Turn into ...
2465 (linux_process_target::supports_catch_syscall): ... this.
2466 * linux-low.h (class linux_process_target): Update.
2467 * lynx-low.cc (lynx_target_ops): Update.
2468 * nto-low.cc (nto_target_ops): Update.
2469 * win32-low.cc (win32_target_ops): Update.
2470
2471 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2472
2473 Turn process_stratum_target's supports_software_single_step op
2474 into a method of process_target.
2475
2476 * target.h (struct process_stratum_target): Remove the target op.
2477 (class process_target): Add the target op.
2478 (target_supports_software_single_step): Update the macro.
2479 * target.cc (process_target::supports_software_single_step): Define.
2480
2481 Update the derived classes and callers below.
2482
2483 * linux-low.cc (linux_target_ops): Update.
2484 (linux_supports_software_single_step): Turn into ...
2485 (linux_process_target::supports_software_single_step): ... this.
2486 * linux-low.h (class linux_process_target): Update.
2487 * lynx-low.cc (lynx_target_ops): Update.
2488 * nto-low.cc (nto_target_ops): Update.
2489 * win32-low.cc (win32_target_ops): Update.
2490
2491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2492
2493 Turn process_stratum_target's thread_name and thread_handle ops
2494 into methods of process_target.
2495
2496 * target.h (struct process_stratum_target): Remove the target ops.
2497 (class process_target): Add the target ops.
2498 (target_thread_name): Update the macro.
2499 (target_thread_handle): Update the macro.
2500 * target.cc (process_target::thread_name): Define.
2501 (process_target::thread_handle): Define.
2502
2503 Update the derived classes and callers below.
2504
2505 * linux-low.cc (linux_target_ops): Update.
2506 (linux_process_target::thread_name): Define.
2507 (linux_process_target::thread_handle): Define.
2508 * linux-low.h (class linux_process_target): Update.
2509 * lynx-low.cc (lynx_target_ops): Update.
2510 * nto-low.cc (nto_target_ops): Update.
2511 * win32-low.cc (win32_target_ops): Update.
2512
2513 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2514
2515 Turn process_stratum_target's breakpoint_kind_from_pc,
2516 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2517 ops into methods of process_target.
2518
2519 * target.h (struct process_stratum_target): Remove the target op.
2520 (class process_target): Add the target op.
2521 (target_breakpoint_kind_from_pc): Update the macro.
2522 (target_breakpoint_kind_from_current_state): Update the macro.
2523 (default_breakpoint_kind_from_pc): Remove declaration.
2524 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2525 (process_target::breakpoint_kind_from_pc): ... this.
2526 (process_target::breakpoint_kind_from_current_state): Define.
2527
2528 Update the derived classes and callers below.
2529
2530 * mem-break.cc (bp_size): Update.
2531 (bp_opcode): Update.
2532 * linux-low.cc (linux_target_ops): Update.
2533 (linux_wait_1): Update.
2534 (linux_breakpoint_kind_from_pc): Turn into ...
2535 (linux_process_target::breakpoint_kind_from_pc): ... this.
2536 (linux_sw_breakpoint_from_kind): Turn into ...
2537 (linux_process_target::sw_breakpoint_from_kind): ... this.
2538 (linux_breakpoint_kind_from_current_state): Turn into ...
2539 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2540 * linux-low.h (class linux_process_target): Update.
2541 * lynx-low.cc (lynx_target_ops): Update.
2542 (lynx_process_target::sw_breakpoint_from_kind): Define.
2543 * lynx-low.h (class lynx_process_target): Update.
2544 * nto-low.cc (nto_target_ops): Update.
2545 (nto_sw_breakpoint_from_kind): Turn into ...
2546 (nto_process_target::sw_breakpoint_from_kind): ... this.
2547 * nto-low.h (class nto_process_target): Update.
2548 * win32-low.cc (win32_target_ops): Update.
2549 (win32_sw_breakpoint_from_kind): Turn into ...
2550 (win32_process_target::sw_breakpoint_from_kind): ... this.
2551 * win32-low.h (class win32_process_target): Update.
2552
2553 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2554
2555 Turn process_stratum_target's multifs_open, multifs_readlink,
2556 multifs_unlink ops into methods of process_target.
2557
2558 * target.h (struct process_stratum_target): Remove the target ops.
2559 (class process_target): Add the target ops. Also add
2560 'supports_multifs'.
2561 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2562 "sys/stat.h".
2563 (process_target::supports_multifs): Define.
2564 (process_target::multifs_open): Define.
2565 (process_target::multifs_readlink): Define.
2566 (process_target::multifs_unlink): Define.
2567
2568 Update the derived classes and callers below.
2569
2570 * hostio.cc (handle_setfs): Update.
2571 (handle_open): Update.
2572 (handle_unlink): Update.
2573 (handle_readlink): Update.
2574 * linux-low.cc (linux_target_ops): Update.
2575 (linux_process_target::supports_multifs): Define.
2576 (linux_process_target::multifs_open): Define.
2577 (linux_process_target::multifs_readlink): Define.
2578 (linux_process_target::multifs_unlink): Define.
2579 * linux-low.h (class linux_process_target): Update.
2580 * lynx-low.cc (lynx_target_ops): Update.
2581 * nto-low.cc (nto_target_ops): Update.
2582 * win32-low.cc (win32_target_ops): Update.
2583
2584 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2585
2586 Turn process_stratum_target's pid_to_exec_file op into a method
2587 of process_target.
2588
2589 * target.h (struct process_stratum_target): Remove the target op.
2590 (class process_target): Add the target op. Also add
2591 'supports_pid_to_exec_file'.
2592 * target.cc (process_target::pid_to_exec_file): Define.
2593 (process_target::supports_pid_to_exec_file): Define.
2594
2595 Update the derived classes and callers below.
2596
2597 * server.cc (handle_qxfer_exec_file): Update.
2598 (handle_query): Update.
2599 * linux-low.cc (linux_target_ops): Update.
2600 (linux_process_target::supports_pid_to_exec_file): Define.
2601 (linux_process_target::pid_to_exec_file): Define.
2602 * linux-low.h (class linux_process_target): Update.
2603 * lynx-low.cc (lynx_target_ops): Update.
2604 * nto-low.cc (nto_target_ops): Update.
2605 * win32-low.cc (win32_target_ops): Update.
2606
2607 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2608
2609 Turn process_stratum_target's supports_range_stepping op into a
2610 method of process_target.
2611
2612 * target.h (struct process_stratum_target): Remove the target op.
2613 (class process_target): Add the target op.
2614 (target_supports_range_stepping): Update the macro.
2615 * target.cc (process_target::supports_range_stepping): Define.
2616
2617 Update the derived classes and callers below.
2618
2619 * linux-low.cc (linux_target_ops): Update.
2620 (linux_supports_range_stepping): Turn into ...
2621 (linux_process_target::supports_range_stepping): ... this.
2622 * linux-low.h (class linux_process_target): Update.
2623 * lynx-low.cc (lynx_target_ops): Update.
2624 * nto-low.cc (nto_target_ops): Update.
2625 * win32-low.cc (win32_target_ops): Update.
2626
2627 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2628
2629 Turn process_stratum_target's btrace-related ops (enable_btrace,
2630 disable_btrace, read_btrace, read_btrace_conf) into methods of
2631 process_target.
2632
2633 * target.h (struct process_stratum_target): Remove the target ops.
2634 (class process_target): Add the target ops.
2635 (target_enable_btrace): Update.
2636 (target_disable_btrace): Update.
2637 (target_read_btrace): Update.
2638 (target_read_btrace_conf): Update.
2639 * target.cc (process_target::enable_btrace): Define.
2640 (process_target::disable_btrace): Define.
2641 (process_target::read_btrace): Define.
2642 (process_target::read_btrace_conf): Define.
2643
2644 Update the derived classes and callers below.
2645
2646 * linux-low.cc (linux_target_ops): Update.
2647 (linux_process_target:enable_btrace): Define as a wrapper around
2648 linux_enable_btrace.
2649 (linux_low_disable_btrace): Turn into ...
2650 (linux_process_target::disable_btrace): ... this.
2651 (linux_low_read_btrace): Turn into ...
2652 (linux_process_target::read_btrace): ... this.
2653 (linux_low_btrace_conf): Turn into ...
2654 (linux_process_target::read_btrace_conf): ... this.
2655 * linux-low.h (class linux_process_target): Update.
2656 * lynx-low.cc (lynx_target_ops): Update.
2657 * nto-low.cc (nto_target_ops): Update.
2658 * win32-low.cc (win32_target_ops): Update.
2659
2660 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2661
2662 Turn process_stratum_target's supports_agent op into a method of
2663 process_target.
2664
2665 * target.h (struct process_stratum_target): Remove the target op.
2666 (class process_target): Add the target op.
2667 (target_supports_agent): Update the macro.
2668 * target.cc (process_target::supports_agent): Define.
2669
2670 Update the derived classes and callers below.
2671
2672 * linux-low.cc (linux_target_ops): Update.
2673 (linux_supports_agent): Turn into ...
2674 (linux_process_target::supports_agent): ... this.
2675 * linux-low.h (class linux_process_target): Update.
2676 * lynx-low.cc (lynx_target_ops): Update.
2677 * nto-low.cc (nto_target_ops): Update.
2678 * win32-low.cc (win32_target_ops): Update.
2679
2680 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2681
2682 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2683 method of process_target.
2684
2685 * target.h (struct process_stratum_target): Remove the target op.
2686 (class process_target): Add the target op. Also add
2687 'supports_qxfer_libraries_svr4'.
2688 * target.cc (process_target::qxfer_libraries_svr4): Define.
2689 (process_target::supports_qxfer_libraries_svr4): Define.
2690
2691 Update the derived classes and callers below.
2692
2693 * server.cc (handle_qxfer_libraries_svr4): Update.
2694 (handle_query): Update.
2695 * linux-low.cc (linux_target_ops): Update.
2696 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2697 (linux_qxfer_libraries_svr4): Turn into ...
2698 (linux_process_target::qxfer_libraries_svr4): ... this.
2699 * linux-low.h (class linux_process_target): Update.
2700 * lynx-low.cc (lynx_target_ops): Update.
2701 * nto-low.cc (nto_target_ops): Update.
2702 * win32-low.cc (win32_target_ops): Update.
2703
2704 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2705
2706 Turn process_stratum_target's supports_disable_randomization op
2707 into a method of process_target.
2708
2709 * target.h (struct process_stratum_target): Remove the target op.
2710 (class process_target): Add the target op.
2711 (target_supports_disable_randomization): Update the macro.
2712 * target.cc (process_target::supports_disable_randomization): Define.
2713
2714 Update the derived classes and callers below.
2715
2716 * linux-low.cc (linux_target_ops): Update.
2717 (linux_supports_disable_randomization): Turn into ...
2718 (linux_process_target::supports_disable_randomization): ... this.
2719 * linux-low.h (class linux_process_target): Update.
2720 * lynx-low.cc (lynx_target_ops): Update.
2721 * nto-low.cc (nto_target_ops): Update.
2722 * win32-low.cc (win32_target_ops): Update.
2723
2724 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2725
2726 Turn process_stratum_target's emit_ops op into a method of
2727 process_target.
2728
2729 * target.h (struct process_stratum_target): Remove the target op.
2730 (class process_target): Add the target op.
2731 (target_emit_ops): Update the macro.
2732 * target.cc (process_target::emit_ops): Define.
2733
2734 Update the derived classes and callers below.
2735
2736 * linux-low.cc (linux_target_ops): Update.
2737 (linux_emit_ops): Turn into ...
2738 (linux_process_target::emit_ops): ... this.
2739 * linux-low.h (class linux_process_target): Update.
2740 * lynx-low.cc (lynx_target_ops): Update.
2741 * nto-low.cc (nto_target_ops): Update.
2742 * win32-low.cc (win32_target_ops): Update.
2743
2744 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2745
2746 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2747 and get_min_fast_tracepoint_insn_len ops into methods of
2748 process_target.
2749
2750 * target.h (struct process_stratum_target): Remove the target ops.
2751 (class process_target): Add the target ops. Also add
2752 'supports_fast_tracepoints'.
2753 (target_supports_fast_tracepoints): Update the macro.
2754 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2755 (install_fast_tracepoint_jump_pad): Update and rename the macro
2756 to ...
2757 (target_install_fast_tracepoint_jump_pad): ... this.
2758 * target.cc (process_target::supports_fast_tracepoints): Define.
2759 (process_target::install_fast_tracepoint_jump_pad): Define.
2760 (process_target::get_min_fast_tracepoint_insn_len): Define.
2761
2762 Update the derived classes and callers below.
2763
2764 * tracepoint.cc (install_fast_tracepoint): Update.
2765 * linux-low.cc (linux_target_ops): Update.
2766 (linux_process_target::supports_fast_tracepoints): Define.
2767 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2768 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2769 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2770 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2771 * linux-low.h (class linux_process_target): Update.
2772 * lynx-low.cc (lynx_target_ops): Update.
2773 * nto-low.cc (nto_target_ops): Update.
2774 * win32-low.cc (win32_target_ops): Update.
2775
2776 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2777
2778 Turn process_stratum_target's stabilize_threads op into a
2779 method of process_target.
2780
2781 * target.h (struct process_stratum_target): Remove the target op.
2782 (class process_target): Add the target op.
2783 (target_stabilize_threads): Update the macro.
2784 * target.cc (process_target::stabilize_threads): Define.
2785
2786 Update the derived classes and callers below.
2787
2788 * server.cc (handle_status): Update.
2789 * tracepoint.cc (cmd_qtdp): Update.
2790 (cmd_qtstart): Update.
2791 * linux-low.cc (linux_target_ops): Update.
2792 (linux_stabilize_threads): Turn into ...
2793 (linux_process_target::stabilize_threads): ... this.
2794 (linux_wait_1): Update.
2795 * linux-low.h (class linux_process_target): Update.
2796 * lynx-low.cc (lynx_target_ops): Update.
2797 * nto-low.cc (nto_target_ops): Update.
2798 * win32-low.cc (win32_target_ops): Update.
2799
2800 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2801
2802 Turn process_stratum_target's pause_all and unpause_all ops
2803 into methods of process_target.
2804
2805 * target.h (struct process_stratum_target): Remove the target ops.
2806 (class process_target): Add the target ops.
2807 (pause_all): Update the macro and rename to...
2808 (target_pause_all): ... this.
2809 (unpause_all): Update the macro and rename to...
2810 (target_unpause_all): ... this.
2811 * target.cc (process_target::pause_all): Define.
2812 (process_target::unpause_all): Define.
2813
2814 Update the derived classes and callers below.
2815
2816 * server.cc (handle_status): Update.
2817 * tracepoint.cc (clear_installed_tracepoints): Update.
2818 (cmd_qtdp): Update.
2819 (cmd_qtstart): Update.
2820 (stop_tracing): Update.
2821 (cmd_qtstatus): Update.
2822 (upload_fast_traceframes): Update.
2823 (run_inferior_command): Update.
2824 * linux-low.cc (linux_target_ops): Update.
2825 (linux_pause_all): Turn into ...
2826 (linux_process_target::pause_all): ... this.
2827 (linux_unpause_all): Turn into ...
2828 (linux_process_target::unpause_all): ... this.
2829 (linux_process_target::prepare_to_access_memory): Update.
2830 (linux_process_target::done_accessing_memory): Update.
2831 * linux-low.h (class linux_process_target): Update.
2832 * lynx-low.cc (lynx_target_ops): Update.
2833 * nto-low.cc (nto_target_ops): Update.
2834 * win32-low.cc (win32_target_ops): Update.
2835
2836 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2837
2838 Turn process_stratum_target's get_tib_address op into a method of
2839 process_target.
2840
2841 * target.h (struct process_stratum_target): Remove the target op.
2842 (class process_target): Add the target op. Also add
2843 'supports_get_tib_address'.
2844 * target.cc (process_target::get_tib_address): Define.
2845 (process_target::supports_get_tib_address): Define.
2846
2847 Update the derived classes and callers below.
2848
2849 * server.cc (handle_query): Update.
2850 * linux-low.cc (win32_target_ops): Update.
2851 * lynx-low.cc (lynx_target_ops): Update.
2852 * nto-low.cc (nto_target_ops): Update.
2853 * win32-low.cc (win32_target_ops): Update.
2854 (win32_process_target::supports_get_tib_address): Define.
2855 (win32_get_tib_address): Turn into ...
2856 (win32_process_target::get_tib_address): ... this.
2857 * win32-low.h (class win32_process_target): Update.
2858
2859 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2860
2861 Turn process_stratum_target's thread_stopped op into a method of
2862 process_target.
2863
2864 * target.h (struct process_stratum_target): Remove the target op.
2865 (class process_target): Add the target op. Also add
2866 'supports_thread_stopped'.
2867 (target_thread_stopped): Update the macro.
2868 * target.cc (process_target::thread_stopped): Define.
2869 (process_target::supports_thread_stopped): Define.
2870 (prepare_to_access_memory): Update.
2871
2872 Update the derived classes and callers below.
2873
2874 * server.cc (queue_stop_reply_callback): Update.
2875 * linux-low.cc (linux_target_ops): Update.
2876 (linux_process_target::supports_thread_stopped): Define.
2877 (linux_thread_stopped): Turn into ...
2878 (linux_process_target::thread_stopped): ... this.
2879 * linux-low.h (class linux_process_target): Update.
2880 * lynx-low.cc (lynx_target_ops): Update.
2881 * nto-low.cc (nto_target_ops): Update.
2882 * win32-low.cc (win32_target_ops): Update.
2883
2884 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2885
2886 Turn process_stratum_target's read_pc and write_pc ops into
2887 methods of process_target.
2888
2889 * target.h (struct process_stratum_target): Remove the target ops.
2890 (class process_target): Add the target ops.
2891 * target.cc (process_target::read_pc): Define.
2892 (process_target::write_pc): Define.
2893
2894 Update the derived classes and callers below.
2895
2896 * regcache.cc (regcache_read_pc): Update.
2897 (regcache_write_pc): Update.
2898 * linux-low.cc (linux_target_ops): Update.
2899 (linux_read_pc): Turn into ...
2900 (linux_process_target::read_pc): ... this.
2901 (linux_write_pc): Turn into ...
2902 (linux_process_target::write_pc): ... this.
2903 * linux-low.h (class linux_process_target): Update.
2904 * lynx-low.cc (lynx_target_ops): Update.
2905 * nto-low.cc (nto_target_ops): Update.
2906 * win32-low.cc (win32_target_ops): Update.
2907
2908 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2909
2910 Turn process_stratum_target's supports_tracepoints op into a
2911 method of process_target.
2912
2913 * target.h (struct process_stratum_target): Remove the target op.
2914 (class process_target): Add the target op.
2915 (target_supports_tracepoints): Update the macro.
2916 * target.cc (process_target::supports_tracepoints): Define.
2917
2918 Update the derived classes and callers below.
2919
2920 * linux-low.cc (linux_target_ops): Update.
2921 (linux_supports_tracepoints): Turn into ...
2922 (linux_process_target::supports_tracepoints): ... this.
2923 * linux-low.h (class linux_process_target): Update.
2924 * lynx-low.cc (lynx_target_ops): Update.
2925 * nto-low.cc (nto_target_ops): Update.
2926 * win32-low.cc (win32_target_ops): Update.
2927
2928 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2929
2930 Turn process_stratum_target's process_qsupported op into a method
2931 of process_target.
2932
2933 * target.h (struct process_stratum_target): Remove the target op.
2934 (class process_target): Add the target op.
2935 (target_process_qsupported): Update the macro.
2936 * target.cc (process_target::process_qsupported): Define.
2937
2938 Update the derived classes and callers below.
2939
2940 * linux-low.cc (linux_target_ops): Update.
2941 (linux_process_qsupported): Turn into ...
2942 (linux_process_target::process_qsupported): ... this.
2943 * linux-low.h (class linux_process_target): Update.
2944 * lynx-low.cc (lynx_target_ops): Update.
2945 * nto-low.cc (nto_target_ops): Update.
2946 * win32-low.cc (win32_target_ops): Update.
2947
2948 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2949
2950 Turn process_stratum_target's read_loadmap op into a method of
2951 process_target.
2952
2953 * target.h (struct process_stratum_target): Remove the target op.
2954 (class process_target): Add the target op. Also add
2955 'supports_read_loadmap'.
2956 * target.cc (process_target::read_loadmap): Define.
2957 (process_target::supports_read_loadmap): Define.
2958
2959 Update the derived classes and callers below.
2960
2961 * server.cc (handle_qxfer_fdpic): Update.
2962 (handle_query): Update.
2963 * linux-low.cc (linux_target_ops): Update.
2964 (linux_process_target::supports_read_loadmap): Define.
2965 (linux_read_loadmap): Turn into ...
2966 (linux_process_target::read_loadmap): ... this.
2967 * linux-low.h (class linux_process_target): Update.
2968 * lynx-low.cc (lynx_target_ops): Update.
2969 * nto-low.cc (nto_target_ops): Update.
2970 * win32-low.cc (win32_target_ops): Update.
2971
2972 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2973
2974 Turn process_stratum_target's core_of_thread op into a method of
2975 process_target.
2976
2977 * target.h (struct process_stratum_target): Remove the target op.
2978 (class process_target): Add the target op.
2979 (target_core_of_thread): Update the macro.
2980 * target.cc (process_target::core_of_thread): Define.
2981
2982 Update the derived classes and callers below.
2983
2984 * linux-low.cc (linux_target_ops): Update.
2985 (linux_process_target::core_of_thread): Define.
2986 * linux-low.h (class linux_process_target): Update.
2987 * lynx-low.cc (lynx_target_ops): Update.
2988 * nto-low.cc (nto_target_ops): Update.
2989 * win32-low.cc (win32_target_ops): Update.
2990
2991 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2992
2993 Turn process_stratum_target's handle_monitor_command op into a
2994 method of process_target.
2995
2996 * target.h (struct process_stratum_target): Remove the target op.
2997 (class process_target): Add the target op.
2998 (target_handle_monitor_command): Update the macro.
2999 * target.cc (process_target::handle_monitor_command): Define.
3000
3001 Update the derived classes and callers below.
3002
3003 * server.cc (handle_query): Update.
3004 * linux-low.cc (linux_target_ops): Update.
3005 (linux_process_target::handle_monitor_command): Define.
3006 * linux-low.h (class linux_process_target): Update.
3007 * lynx-low.cc (lynx_target_ops): Update.
3008 * nto-low.cc (nto_target_ops): Update.
3009 * win32-low.cc (win32_target_ops): Update.
3010
3011 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3012
3013 Turn process_stratum_target's handle_new_gdb_connection op into a
3014 method of process_target.
3015
3016 * target.h (struct process_stratum_target): Remove the target op.
3017 (class process_target): Add the target op.
3018 (target_handle_new_gdb_connection): Update the macro.
3019 * target.cc (process_target::handle_new_gdb_connection): Define.
3020
3021 Update the derived classes and callers below.
3022
3023 * linux-low.cc (linux_target_ops): Update.
3024 (linux_handle_new_gdb_connection): Turn into ...
3025 (linux_process_target::handle_new_gdb_connection): ... this.
3026 * linux-low.h (class linux_process_target): Update.
3027 * lynx-low.cc (lynx_target_ops): Update.
3028 * nto-low.cc (nto_target_ops): Update.
3029 * win32-low.cc (win32_target_ops): Update.
3030
3031 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3032
3033 Turn process_stratum_target's supports_fork_events,
3034 supports_vfork_events, and supports_exec_events ops into methods
3035 of process_target.
3036
3037 * target.h (struct process_stratum_target): Remove the target ops.
3038 (class process_target): Add the target ops.
3039 (target_supports_fork_events): Update the macro.
3040 (target_supports_vfork_events): Update the macro.
3041 (target_supports_exec_events): Update the macro.
3042 * target.cc (process_target::supports_fork_events): Define.
3043 (process_target::supports_vfork_events): Define.
3044 (process_target::supports_exec_events): Define.
3045
3046 Update the derived classes and callers below.
3047
3048 * linux-low.cc (linux_target_ops): Update.
3049 (linux_supports_fork_events): Turn into ...
3050 (linux_process_target::supports_fork_events): ... this.
3051 (linux_supports_vfork_events): Turn into ...
3052 (linux_process_target::supports_vfork_events): ... this.
3053 (linux_supports_exec_events): Turn into ...
3054 (linux_process_target::supports_exec_events): ... this.
3055 * linux-low.h (class linux_process_target): Update.
3056 * lynx-low.cc (lynx_target_ops): Update.
3057 * nto-low.cc (nto_target_ops): Update.
3058 * win32-low.cc (win32_target_ops): Update.
3059
3060 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3061
3062 Turn process_stratum_target's supports_multi_process op into a
3063 method of process_target.
3064
3065 * target.h (struct process_stratum_target): Remove the target op.
3066 (class process_target): Add the target op.
3067 * target.cc (process_target::supports_multi_process): Define.
3068 (target_supports_multi_process): Update.
3069
3070 Update the derived classes and callers below.
3071
3072 * linux-low.cc (linux_target_ops): Update.
3073 (linux_supports_multi_process): Turn into ...
3074 (linux_process_target::supports_multi_process): ... this.
3075 * linux-low.h (class linux_process_target): Update.
3076 * lynx-low.cc (lynx_target_ops): Update.
3077 * nto-low.cc (nto_target_ops): Update.
3078 * win32-low.cc (win32_target_ops): Update.
3079
3080 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3081
3082 Turn process_stratum_target's supports_non_stop, async, and
3083 start_non_stop ops into methods of process_target.
3084
3085 * target.h (struct process_stratum_target): Remove the target ops.
3086 (class process_target): Add the target ops.
3087 (target_supports_non_stop): Update the macro.
3088 (target_async): Update the macro.
3089 (start_non_stop): Remove declaration.
3090 * target.cc (process_target::supports_non_stop): Define.
3091 (process_target::async): Define.
3092 (process_target::start_non_stop): Define.
3093 (start_non_stop): Remove.
3094
3095 Update the derived classes and callers below.
3096
3097 * server.cc (handle_qxfer_siginfo): Update.
3098 (handle_query): Update.
3099 * linux-low.cc (linux_target_ops): Update.
3100 (linux_supports_non_stop): Turn into ...
3101 (linux_process_target::supports_non_stop): ... this.
3102 (linux_async): Turn into ...
3103 (linux_process_target::async): ... this.
3104 (linux_start_non_stop): Turn into ...
3105 (linux_process_target::start_non_stop): ... this.
3106 * linux-low.h (class linux_process_target): Update.
3107 * lynx-low.cc (lynx_target_ops): Update.
3108 * nto-low.cc (nto_target_ops): Update.
3109 (nto_supports_non_stop): Remove; rely on the default behavior
3110 instead.
3111 * win32-low.cc (win32_target_ops): Update.
3112
3113 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3114
3115 Turn process_stratum_target's qxfer_siginfo op into a method of
3116 process_target.
3117
3118 * target.h (struct process_stratum_target): Remove the target op.
3119 (class process_target): Add the target op. Also add
3120 'supports_qxfer_siginfo'.
3121 * target.cc (process_target::qxfer_siginfo): Define.
3122 (process_target::supports_qxfer_siginfo): Define.
3123
3124 Update the derived classes and callers below.
3125
3126 * server.cc (handle_qxfer_siginfo): Update.
3127 (handle_query): Update.
3128 * linux-low.cc (linux_target_ops): Update.
3129 (linux_process_target::supports_qxfer_siginfo): Define.
3130 (linux_xfer_siginfo): Turn into ...
3131 (linux_process_target::qxfer_siginfo): ... this.
3132 * linux-low.h (class linux_process_target): Update.
3133 * lynx-low.cc (lynx_target_ops): Update.
3134 * nto-low.cc (nto_target_ops): Update.
3135 * win32-low.cc (win32_target_ops): Update.
3136
3137 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3138
3139 Turn process_stratum_target's qxfer_osdata op into a method of
3140 process_target.
3141
3142 * target.h (struct process_stratum_target): Remove the target op.
3143 (class process_target): Add the target op. Also add
3144 'supports_qxfer_osdata'.
3145 * target.cc (process_target::qxfer_osdata): Define.
3146 (process_target::supports_qxfer_osdata): Define.
3147
3148 Update the derived classes and callers below.
3149
3150 * server.cc (handle_qxfer_osdata): Update.
3151 (handle_query): Update.
3152 * linux-low.cc (linux_target_ops): Update.
3153 (linux_process_target::supports_qxfer_osdata): Define.
3154 (linux_qxfer_osdata): Turn into ...
3155 (linux_process_target::qxfer_osdata): ... this.
3156 * linux-low.h (class linux_process_target): Update.
3157 * lynx-low.cc (lynx_target_ops): Update.
3158 * nto-low.cc (nto_target_ops): Update.
3159 * win32-low.cc (win32_target_ops): Update.
3160
3161 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3162
3163 Turn process_stratum_target's hostio_last_error op into a
3164 method of process_target.
3165
3166 * target.h (struct process_stratum_target): Remove the target op.
3167 (class process_target): Add the target op.
3168 * target.cc: Add "hostio.h" to includes.
3169 (process_target::hostio_last_error): Define.
3170
3171 Update the derived classes and callers below.
3172
3173 * hostio.cc (hostio_error): Update.
3174 * linux-low.cc: Remove "hostio.h" from includes.
3175 (linux_target_ops): Update.
3176 * lynx-low.cc (lynx_target_ops): Update.
3177 * nto-low.cc (nto_target_ops): Update.
3178 * win32-low.h (class win32_process_target): Update.
3179 * win32-low.cc (win32_target_ops): Update.
3180 (wince_hostio_last_error): Turn into ...
3181 (win32_process_target::hostio_last_error): ... this.
3182
3183 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3184
3185 Turn process_stratum_target's get_tls_address op into a method of
3186 process_target.
3187
3188 * target.h (struct process_stratum_target): Remove the target op.
3189 (class process_target): Add the target op. Also add
3190 'supports_get_tls_address'.
3191 * target.cc (process_target::get_tls_address): Define.
3192 (process_target::supports_get_tls_address): Define.
3193
3194 Update the derived classes and callers below.
3195
3196 * server.cc (handle_query): Update.
3197 * linux-low.cc (linux_target_ops): Update.
3198 (linux_process_target::supports_get_tls_address): Define.
3199 (linux_process_target::get_tls_address): Define.
3200 * linux-low.h (class linux_process_target): Update.
3201 * lynx-low.cc (lynx_target_ops): Update.
3202 * nto-low.cc (nto_target_ops): Update.
3203 * win32-low.cc (win32_target_ops): Update.
3204
3205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3206
3207 Turn process_stratum_target's read_offsets op into a method of
3208 process_target.
3209
3210 * target.h (struct process_stratum_target): Remove the target op.
3211 (class process_target): Add the target op. Also add
3212 'supports_read_offsets'.
3213 * target.cc (process_target::read_offsets): Define.
3214 (process_target::supports_read_offsets): Define.
3215
3216 Update the derived classes and callers below.
3217
3218 * server.cc (handle_query): Update.
3219 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3220 (linux_target_ops): Update.
3221 (linux_process_target::supports_read_offsets): Define.
3222 (linux_read_offsets): Turn into ...
3223 (linux_process_target::read_offsets): ... this.
3224 * linux-low.h (class linux_process_target): Update.
3225 * lynx-low.cc (lynx_target_ops): Update.
3226 * nto-low.cc (nto_target_ops): Update.
3227 * win32-low.cc (win32_target_ops): Update.
3228
3229 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3230
3231 Turn process_stratum_target's stopped_by_watchpoint and
3232 stopped_data_address ops into methods of process_target.
3233
3234 * target.h (struct process_stratum_target): Remove the target ops.
3235 (class process_target): Add the target ops.
3236 * target.cc (process_target::stopped_by_watchpoint): Define.
3237 (process_target::stopped_data_address): Define.
3238
3239 Update the derived classes and callers below.
3240
3241 * remote-utils.cc (prepare_resume_reply): Update.
3242 * linux-low.cc (linux_target_ops): Update.
3243 (linux_stopped_by_watchpoint): Turn into ...
3244 (linux_process_target::stopped_by_watchpoint): ... this.
3245 (linux_stopped_data_address): Turn into ...
3246 (linux_process_target::stopped_data_address): ... this.
3247 * linux-low.h (class linux_process_target): Update.
3248 * lynx-low.cc (lynx_target_ops): Update.
3249 * nto-low.cc (nto_target_ops): Update.
3250 (nto_stopped_by_watchpoint): Turn into ...
3251 (nto_process_target::stopped_by_watchpoint): ... this.
3252 (nto_stopped_data_address): Turn into ...
3253 (nto_process_target::stopped_data_address): ... this.
3254 * nto-low.h (class nto_process_target): Update.
3255 * win32-low.cc (win32_target_ops): Update.
3256 (win32_stopped_by_watchpoint): Turn into ...
3257 (win32_process_target::stopped_by_watchpoint): ... this.
3258 (win32_stopped_data_address): Turn into ...
3259 (win32_process_target::stopped_data_address): ... this.
3260 * win32-low.h (class win32_process_target): Update.
3261
3262 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3263
3264 Turn process_stratum_target's supports_hardware_single_step op into
3265 a method of process_target.
3266
3267 * target.h (struct process_stratum_target): Remove the target op.
3268 (class process_target): Add the target op.
3269 (target_supports_hardware_single_step): Update the macro.
3270 (target_can_do_hardware_single_step): Remove declaration.
3271 * target.cc (process_target::supports_hardware_single_step): Define.
3272 (target_can_do_hardware_single_step): Remove.
3273
3274 Update the derived classes and callers below.
3275
3276 * linux-low.h (class linux_process_target): Update.
3277 * linux-low.cc (linux_target_ops): Update.
3278 (linux_supports_hardware_single_step): Turn into ...
3279 (linux_process_target::supports_hardware_single_step): ... this.
3280 * lynx-low.h (class lynx_process_target): Update.
3281 * lynx-low.cc (lynx_target_ops): Update.
3282 (lynx_process_target::supports_hardware_single_step): Define.
3283 * nto-low.h (class nto_process_target): Update.
3284 * nto-low.cc (nto_target_ops): Update.
3285 (nto_process_target::supports_hardware_single_step): Define.
3286 * win32-low.h (class win32_process_target): Update.
3287 * win32-low.cc (win32_target_ops): Update.
3288 (win32_process_target::supports_hardware_single_step): Define.
3289
3290 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3291
3292 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3293 ops into methods of process_target.
3294
3295 * target.h (struct process_stratum_target): Remove the target ops.
3296 (class process_target): Add the target ops.
3297 (target_stopped_by_hw_breakpoint): Update the macro.
3298 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3299 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3300 (process_target::supports_stopped_by_hw_breakpoint): Define.
3301
3302 Update the derived classes and callers below.
3303
3304 * linux-low.cc (linux_target_ops): Update.
3305 (linux_stopped_by_hw_breakpoint): Turn into ...
3306 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3307 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3308 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3309 * linux-low.h (class linux_process_target): Update.
3310 * lynx-low.cc (lynx_target_ops): Update.
3311 * nto-low.cc (nto_target_ops): Update.
3312 * win32-low.cc (win32_target_ops): Update.
3313
3314 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3315
3316 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3317 ops into methods of process_target.
3318
3319 * target.h (struct process_stratum_target): Remove the target ops.
3320 (class process_target): Add the target ops.
3321 (target_stopped_by_sw_breakpoint): Update the macro.
3322 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3323 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3324 (process_target::supports_stopped_by_sw_breakpoint): Define.
3325
3326 Update the derived classes and callers below.
3327
3328 * linux-low.cc (linux_target_ops): Update.
3329 (linux_stopped_by_sw_breakpoint): Turn into ...
3330 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3331 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3332 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3333 * linux-low.h (class linux_process_target): Update.
3334 * lynx-low.cc (lynx_target_ops): Update.
3335 * nto-low.cc (nto_target_ops): Update.
3336 * win32-low.cc (win32_target_ops): Update.
3337
3338 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3339
3340 Turn process_stratum_target's insert_point and remove_point ops
3341 into methods of process_target.
3342
3343 * target.h (struct process_stratum_target): Remove the target ops.
3344 (class process_target): Add the target ops.
3345 * target.cc (process_target::insert_point): Define.
3346 (process_target::remove_point): Define.
3347
3348 Update the derived classes and callers below.
3349
3350 * mem-break.cc (set_raw_breakpoint_at): Update.
3351 (delete_raw_breakpoint): Update.
3352 (uninsert_raw_breakpoint): Update.
3353 (reinsert_raw_breakpoint): Update.
3354 * linux-low.cc (linux_target_ops): Update.
3355 (linux_insert_point): Turn into ...
3356 (linux_process_target::insert_point): ... this.
3357 (linux_remove_point): Turn into ...
3358 (linux_process_target::remove_point): ... this.
3359 * linux-low.h (class linux_process_target): Update.
3360 * lynx-low.cc (lynx_target_ops): Update.
3361 * nto-low.cc (nto_target_ops): Update.
3362 (nto_insert_point): Turn into ...
3363 (nto_process_target::insert_point): ... this.
3364 (nto_remove_point): Turn into ...
3365 (nto_process_target::remove_point): ... this.
3366 * nto-low.h (class nto_process_target): Update.
3367 * win32-low.cc (win32_target_ops): Update.
3368 (win32_insert_point): Turn into ...
3369 (win32_process_target::insert_point): ... this.
3370 (win32_remove_point): Turn into ...
3371 (win32_process_target::remove_point): ... this.
3372 * win32-low.h (class win32_process_target): Update.
3373
3374 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3375
3376 Turn process_stratum_target's supports_z_point_type op into a
3377 method of process_target.
3378
3379 * target.h (struct process_stratum_target): Remove the target op.
3380 (class process_target): Add the target op.
3381 * target.cc (process_target::supports_z_point_type): Define.
3382
3383 Update the derived classes and callers below.
3384
3385 * mem-break.cc (z_type_supported): Update.
3386 * linux-low.cc (linux_target_ops): Update.
3387 (linux_supports_z_point_type): Turn into ...
3388 (linux_process_target::supports_z_point_type): ... this.
3389 * linux-low.h (class linux_process_target): Update.
3390 * lynx-low.cc (lynx_target_ops): Update.
3391 * nto-low.cc (nto_target_ops): Update.
3392 (nto_supports_z_point_type): Turn into ...
3393 (nto_process_target::supports_z_point_type): ... this.
3394 * nto-low.h (class nto_process_target): Update.
3395 * win32-low.cc (win32_target_ops): Update.
3396 (win32_supports_z_point_type): Turn into ...
3397 (win32_process_target::supports_z_point_type): ... this.
3398 * win32-low.h (class win32_process_target): Update.
3399
3400 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3401
3402 Turn process_stratum_target's read_auxv op into a method of
3403 process_target.
3404
3405 * target.h (class process_stratum_target): Remove the target op.
3406 (struct process_target): Add the target op. Also add
3407 'supports_read_auxv'.
3408 * target.cc (process_target::read_auxv): Define.
3409 (process_target::supports_read_auxv): Define.
3410
3411 Update the derived classes and callers below.
3412
3413 * server.cc (handle_qxfer_auxv): Update.
3414 (handle_query): Update.
3415 * linux-low.cc (linux_target_ops): Update.
3416 (linux_process_target::supports_read_auxv): Define.
3417 (linux_read_auxv): Turn into ...
3418 (linux_process_target::read_auxv): ... this.
3419 * linux-low.h (class linux_process_target): Update.
3420 * lynx-low.cc (lynx_target_ops): Update.
3421 * nto-low.cc (nto_target_ops): Update.
3422 (nto_process_target::supports_read_auxv): Define.
3423 (nto_read_auxv): Turn into ...
3424 (nto_process_target::read_auxv): ... this.
3425 * nto-low.h (class nto_process_target): Update.
3426 * win32-low.cc (win32_target_ops): Update.
3427
3428 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3429
3430 Turn process_stratum_target's request_interrupt op into a method of
3431 process_target.
3432
3433 * target.h (struct process_stratum_target): Remove the target op.
3434 (class process_target): Add the target op.
3435
3436 Update the derived classes and callers below.
3437
3438 * remote-utils.cc (putpkt_binary_1): Update.
3439 (input_interrupt): Update.
3440 (getpkt): Update.
3441 * server.cc (handle_v_requests): Update.
3442 * linux-low.cc (linux_target_ops): Update.
3443 (linux_request_interrupt): Turn into ...
3444 (linux_process_target::request_interrupt): ... this.
3445 * linux-low.h (class linux_process_target): Update.
3446 * lynx-low.cc (lynx_target_ops): Update.
3447 (lynx_request_interrupt): Turn into ...
3448 (lynx_process_target::request_interrupt): ... this.
3449 * lynx-low.h (class lynx_process_target): Update.
3450 * nto-low.cc (nto_target_ops): Update.
3451 (nto_request_interrupt): Turn into ...
3452 (nto_process_target::request_interrupt): ... this.
3453 * nto-low.h (class nto_process_target): Update.
3454 * win32-low.cc (win32_target_ops): Update.
3455 (win32_request_interrupt): Turn into ...
3456 (win32_process_target::request_interrupt): ... this.
3457 * win32-low.h (class win32_process_target): Update.
3458
3459 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3460
3461 Turn process_stratum_target's look_up_symbols op into a method of
3462 process_target.
3463
3464 * target.h (struct process_stratum_target): Remove the target op.
3465 (class process_target): Add the target op.
3466 * target.cc (process_target::look_up_symbols): Define.
3467
3468 Update the derived classes and callers below.
3469
3470 * server.cc (handle_query): Update.
3471 * linux-low.cc (linux_target_ops): Update.
3472 (linux_look_up_symbols): Turn into ...
3473 (linux_process_target::look_up_symbols): ... this.
3474 * linux-low.h (class linux_process_target): Update.
3475 * lynx-low.cc (lynx_target_ops): Update.
3476 * nto-low.cc (nto_target_ops): Update.
3477 * win32-low.cc (win32_target_ops): Update.
3478
3479 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3480
3481 Turn process_stratum_target's read_memory and write_memory
3482 ops into methods of process_target.
3483
3484 * target.h (struct process_stratum_target): Remove the target ops.
3485 (class process_target): Add the target ops.
3486
3487 Update the derived classes and callers below.
3488
3489 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3490 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3491 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3492 (arm_get_syscall_trapinfo): Update.
3493 * linux-cris-low.cc (cris_breakpoint_at): Update.
3494 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3495 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3496 * linux-mips-low.cc (mips_breakpoint_at): Update.
3497 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3498 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3499 * linux-sh-low.cc (sh_breakpoint_at): Update.
3500 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3501 (sparc_store_gregset_from_stack): Update.
3502 (sparc_breakpoint_at): Update.
3503 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3504 * linux-tile-low.cc (tile_breakpoint_at): Update.
3505 * linux-x86-low.cc (x86_breakpoint_at): Update.
3506 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3507 * mem-brea.cc (insert_memory_breakpoint): Update.
3508 (validate_inserted_breakpoint): Update.
3509 * target.cc (read_inferior_memory): Update.
3510 (target_write_memory): Update.
3511 * linux-low.cc (linux_target_ops): Update.
3512 (linux_read_memory): Make a wrapper around the read_memory target
3513 op call.
3514 (linux_process_target::read_memory): Rename from linux_read_memory.
3515 (linux_write_memory): Turn into ...
3516 (linux_process_target::write_memory): ... this.
3517 * linux-low.h (class linux_process_target): Update.
3518 * lynx-low.cc (lynx_target_ops): Update.
3519 (lynx_read_memory): Turn into ...
3520 (lynx_process_target::read_memory): ... this.
3521 (lynx_write_memory): Turn into ...
3522 (lynx_process_target::write_memory): ... this.
3523 * lynx-low.h (class lynx_process_target): Update.
3524 * nto-low.cc (nto_target_ops): Update.
3525 (nto_read_memory): Turn into ...
3526 (nto_process_target::read_memory): ... this.
3527 (nto_write_memory): Turn into ...
3528 (nto_process_target::write_memory): ... this.
3529 * nto-low.h (class nto_process_target): Update.
3530 * win32-low.cc (win32_target_ops): Update.
3531 (win32_read_inferior_memory): Turn into ...
3532 (win32_process_target::read_memory): ... this.
3533 (win32_write_inferior_memory): Turn into ...
3534 (win32_process_target::write_memory): ... this.
3535 * win32-low.h (class win32_process_target): Update.
3536
3537 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3538
3539 Turn process_stratum_target's prepare_to_access_memory and
3540 done_accessing_memory ops into methods of process_target.
3541
3542 * target.h (struct process_stratum_target): Remove the target ops.
3543 (class process_target): Add the target ops.
3544 * target.cc (process_target::prepare_to_access_memory): Define.
3545 (process_target::done_accessing_memory): Define.
3546 (prepare_to_access_memory): Update.
3547 (done_accessing_memory): Update.
3548
3549 Update the derived classes and callers below.
3550
3551 * linux-low.cc (linux_target_ops): Update.
3552 (linux_prepare_to_access_memory): Turn into ...
3553 (linux_process_target::prepare_to_access_memory): ... this.
3554 (linux_done_accessing_memory): Turn into ...
3555 (linux_process_target::done_accessing_memory): ... this.
3556 * linux-low.h (class linux_process_target): Update.
3557 * lynx-low.cc (lynx_target_ops): Update.
3558 * nto-low.cc (nto_target_ops): Update.
3559 * win32-low.cc (win32_target_ops): Update.
3560
3561 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3562
3563 Turn process_stratum_target's fetch_registers and store_registers
3564 ops into methods of process_target.
3565
3566 * target.h (struct process_stratum_target): Remove the target ops.
3567 (class process_target): Add the target ops.
3568 (fetch_inferior_registers): Update the macro.
3569 (store_inferior_registers): Update the macro.
3570
3571 Update the derived classes and callers below.
3572
3573 * linux-low.cc (linux_target_ops): Update.
3574 (linux_fetch_registers): Turn into ...
3575 (linux_process_target::fetch_registers): ... this.
3576 (linux_store_registers): Turn into ...
3577 (linux_process_target::store_registers): ... this.
3578 * linux-low.h (class linux_process_target): Update.
3579 * lynx-low.cc (lynx_target_ops): Update.
3580 (lynx_fetch_registers): Turn into ...
3581 (lynx_process_target::fetch_registers): ... this.
3582 (lynx_store_registers): Turn into ...
3583 (lynx_process_target::store_registers): ... this.
3584 * lynx-low.h (class lynx_process_target): Update.
3585 * nto-low.cc (nto_target_ops): Update.
3586 (nto_fetch_registers): Turn into ...
3587 (nto_process_target::fetch_registers): ... this.
3588 (nto_store_registers): Turn into ...
3589 (nto_process_target::store_registers): ... this.
3590 * nto-low.h (class nto_process_target): Update.
3591 * win32-low.cc (win32_target_ops): Update.
3592 (win32_fetch_inferior_registers): Turn into ...
3593 (win32_process_target::fetch_registers): ... this.
3594 (win32_store_inferior_registers): Turn into ...
3595 (win32_process_target::store_registers): ... this.
3596 * win32-low.h (class win32_process_target): Update.
3597
3598 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3599
3600 Turn process_stratum_target's wait op into a method of
3601 process_target.
3602
3603 * target.h (struct process_stratum_target): Remove the target op.
3604 (class process_target): Add the target op.
3605
3606 Update the derived classes and callers below.
3607
3608 * target.cc (target_wait): Update.
3609 * linux-low.cc (linux_target_ops): Update.
3610 (linux_wait): Turn into ...
3611 (linux_process_target::wait): ... this.
3612 * linux-low.h (class linux_process_target): Update.
3613 * lynx-low.cc (lynx_target_ops): Update.
3614 (lynx_wait): Turn into ...
3615 (lynx_process_target::wait): ... this.
3616 * lynx-low.h (class lynx_process_target): Update.
3617 * nto-low.cc (nto_target_ops): Update.
3618 (nto_wait): Turn into ...
3619 (nto_process_target::wait): ... this.
3620 * nto-low.h (class nto_process_target): Update.
3621 * win32-low.cc (win32_target_ops): Update.
3622 (win32_wait): Turn into ...
3623 (win32_process_target::wait): ... this.
3624 (do_initial_child_stuff): Update.
3625 * win32-low.h (class win32_process_target): Update.
3626
3627 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3628
3629 Turn process_stratum_target's resume op into a method of
3630 process_target.
3631
3632 * target.h (struct process_stratum_target): Remove the target op.
3633 (class process_target): Add the target op.
3634
3635 Update the derived classes and callers below.
3636
3637 * server.cc (resume): Update.
3638 * target.cc (target_stop_and_wait): Update.
3639 (target_continue_no_signal): Update.
3640 (target_continue): Update.
3641 * linux-low.cc (linux_target_ops): Update.
3642 (linux_resume): Turn into ...
3643 (linux_process_target::resume): ... this.
3644 * linux-low.h (class linux_process_target): Update.
3645 * lynx-low.cc (lynx_target_ops): Update.
3646 (lynx_resume): Turn into ...
3647 (lynx_process_target::resume): ... this.
3648 * lynx-low.h (class lynx_process_target): Update.
3649 * nto-low.cc (nto_target_ops): Update.
3650 (nto_resume): Turn into ...
3651 (nto_process_target::resume): ... this.
3652 * nto-low.h (class nto_process_target): Update.
3653 * win32-low.cc (win32_target_ops): Update.
3654 (win32_resume): Turn into ...
3655 (win32_process_target::resume): ... this.
3656 (win32_process_target::detach): Update.
3657 (do_initial_child_stuff): Update.
3658 * win32-low.h (class win32_process_target): Update.
3659
3660 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3661
3662 Turn process_stratum_target's thread_alive op into a method of
3663 process_target.
3664
3665 * target.h (struct process_stratum_target): Remove the target op.
3666 (class process_target): Add the target op.
3667 (mythread_alive): Update the macro.
3668
3669 Update the derived classes and callers below.
3670
3671 * linux-low.cc (linux_target_ops): Update.
3672 (linux_thread_alive): Turn into ...
3673 (linux_process_target::thread_alive): ... this.
3674 (wait_for_sigstop): Update.
3675 * linux-low.h (class linux_process_target): Update.
3676 * lynx-low.cc (lynx_target_ops): Update.
3677 (lynx_thread_alive): Turn into ...
3678 (lynx_process_target::thread_alive): ... this.
3679 * lynx-low.h (class lynx_process_target): Update.
3680 * nto-low.cc (nto_target_ops): Update.
3681 (nto_thread_alive): Turn into ...
3682 (nto_process_target::thread_alive): ... this.
3683 * nto-low.h (class nto_process_target): Update.
3684 * win32-low.cc (win32_target_ops): Update.
3685 (win32_thread_alive): Turn into ...
3686 (win32_process_target::thread_alive): ... this.
3687 * win32-low.h (class win32_process_target): Update.
3688
3689 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3690
3691 Turn process_stratum_target's join op into a method of
3692 process_target.
3693
3694 * target.h (struct process_stratum_target): Remove the target op.
3695 (class process_target): Add the target op.
3696 (join_inferior): Update the macro.
3697
3698 Update the derived classes and callers below.
3699
3700 * linux-low.cc (linux_target_ops): Update.
3701 (linux_join): Turn into ...
3702 (linux_process_target::join): ... this.
3703 * linux-low.h (class linux_process_target): Update.
3704 * lynx-low.cc (lynx_target_ops): Update.
3705 (lynx_join): Turn into ...
3706 (lynx_process_target::join): ... this.
3707 * lynx-low.h (class lynx_process_target): Update.
3708 * nto-low.cc (nto_target_ops): Update.
3709 (nto_process_target::join): Define.
3710 * nto-low.h (class nto_process_target): Update.
3711 * win32-low.cc (win32_target_ops): Update.
3712 (win32_join): Turn into ...
3713 (win32_process_target::join): ... this.
3714 * win32-low.h (class win32_process_target): Update.
3715
3716 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3717
3718 Turn process_stratum_target's mourn op into a method of
3719 process_target.
3720
3721 * target.h (struct process_stratum_target): Remove the target op.
3722 (class process_target): Add the target op.
3723
3724 Update the derived classes and callers below.
3725
3726 * target.cc (target_mourn_inferior): Update.
3727 * linux-low.cc (linux_target_ops): Update.
3728 (linux_mourn): Turn into ...
3729 (linux_process_target::mourn): ... this.
3730 (handle_extended_wait): Update.
3731 (linux_process_target::kill): Update.
3732 (linux_process_target::detach): Update.
3733 * linux-low.h (class linux_process_target): Update.
3734 * lynx-low.cc (lynx_target_ops): Update.
3735 (lynx_mourn): Turn into ...
3736 (lynx_process_target::mourn): ... this.
3737 * lynx-low.h (class lynx_process_target): Update.
3738 * nto-low.cc (nto_target_ops): Update.
3739 (nto_mourn): Turn into ...
3740 (nto_process_target::mourn): ... this.
3741 * nto-low.h (class nto_process_target): Update.
3742 * win32-low.cc (win32_target_ops): Update.
3743 (win32_mourn): Turn into ...
3744 (win32_process_target::mourn): ... this.
3745 * win32-low.h (class win32_process_target): Update.
3746
3747 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3748
3749 Turn process_stratum_target's detach op into a method of
3750 process_target.
3751
3752 * target.h (struct process_stratum_target): Remove the target op.
3753 (class process_target): Add the target op.
3754 (detach_inferior): Update the macro.
3755
3756 Update the derived classes and callers below.
3757
3758 * linux-low.cc (linux_target_ops): Update.
3759 (linux_detach): Turn into ...
3760 (linux_process_target::detach): ... this.
3761 * linux-low.h (class linux_process_target): Update.
3762 * lynx-low.cc (lynx_target_ops): Update.
3763 (lynx_detach): Turn into ...
3764 (lynx_process_target::detach): ... this.
3765 * lynx-low.h (class lynx_process_target): Update.
3766 * nto-low.cc (nto_target_ops): Update.
3767 (nto_detach): Turn into ...
3768 (nto_process_target::detach): ... this.
3769 * nto-low.h (class nto_process_target): Update.
3770 * win32-low.cc (win32_target_ops): Update.
3771 (win32_detach): Turn into ...
3772 (win32_process_target::detach): ... this.
3773 * win32-low.h (class win32_process_target): Update.
3774
3775 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3776
3777 Turn process_stratum_target's kill op into a method of
3778 process_target.
3779
3780 * target.h (struct process_stratum_target): Remove the target op.
3781 (class process_target): Add the target op.
3782
3783 Update the derived classes and callers below.
3784
3785 * target.cc (kill_inferior): Update.
3786 * linux-low.cc (linux_target_ops): Update.
3787 (linux_kill): Turn into ...
3788 (linux_process_target::kill): ... this.
3789 * linux-low.h (class linux_process_target): Update.
3790 * lynx-low.cc (lynx_target_ops): Update.
3791 (lynx_kill): Turn into ...
3792 (lynx_process_target::kill): ... this.
3793 * lynx-low.h (class lynx_process_target): Update.
3794 * nto-low.cc (nto_target_ops): Update.
3795 (nto_kill): Turn into ...
3796 (nto_process_target::kill): ... this.
3797 * nto-low.h (class nto_process_target): Update.
3798 * win32-low.cc (win32_target_ops): Update.
3799 (win32_kill): Turn into ...
3800 (win32_process_target::kill): ... this.
3801 * win32-low.h (class win32_process_target): Update.
3802
3803 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3804
3805 Turn process_stratum_target's attach op into a method of
3806 process_target.
3807
3808 * target.h (struct process_stratum_target): Remove the target op.
3809 (class process_target): Add the target op.
3810 (myattach): Update the macro.
3811
3812 Update the derived classes and callers below.
3813
3814 * linux-low.cc (linux_target_ops): Update.
3815 (linux_attach): Turn into ...
3816 (linux_process_target::attach): ... this.
3817 * linux-low.h (class linux_process_target): Update.
3818 * lynx-low.cc (lynx_target_ops): Update.
3819 (lynx_attach): Turn into ...
3820 (lynx_process_target::attach): ... this.
3821 * lynx-low.h (class lynx_process_target): Update.
3822 * nto-low.cc (nto_target_ops): Update.
3823 (nto_attach): Turn into ...
3824 (nto_process_target::attach): ... this.
3825 * nto-low.h (class nto_process_target): Update.
3826 * win32-low.cc (win32_target_ops): Update.
3827 (win32_attach): Turn into ...
3828 (win32_process_target::attach): ... this.
3829 * win32-low.h (class win32_process_target): Update.
3830
3831 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3832
3833 Turn process_stratum_target's post_create_inferior op into a method
3834 of process_target.
3835
3836 * target.h (struct process_stratum_target): Remove the target op.
3837 (class process_target): Add the target op.
3838 (target_post_create_inferior): Update the macro.
3839 * target.cc (process_target::post_create_inferior): Define.
3840
3841 Update the derived classes and callers below.
3842
3843 * linux-low.cc (linux_target_ops): Update.
3844 (linux_post_create_inferior): Turn into ...
3845 (linux_process_target::post_create_inferior): ... this.
3846 * linux-low.h (class linux_process_target): Update.
3847 * lynx-low.cc (lynx_target_ops): Update.
3848 * nto-low.cc (nto_target_ops): Update.
3849 * win32-low.cc (win32_target_ops): Update.
3850
3851 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3852
3853 Turn process_stratum_target's create_inferior op into a method of
3854 process_target.
3855
3856 * target.h (struct process_stratum_target): Remove the target op.
3857 (class process_target): Add the target op.
3858 (create_inferior): Rename the macro to ...
3859 (target_create_inferior): ... this.
3860
3861 Update the derived classes and callers below.
3862
3863 * server.cc (handle_v_run): Update.
3864 (captured_main): Update.
3865 (process_serial_event): Update.
3866 * linux-low.cc (linux_target_ops): Update.
3867 (linux_create_inferior): Turn into ...
3868 (linux_process_target::create_inferior): ... this.
3869 * linux-low.h (class linux_process_target): Update.
3870 * lynx-low.cc (lynx_target_ops): Update.
3871 (lynx_create_inferior): Turn into ...
3872 (lynx_process_target::create_inferior): ... this.
3873 * lynx-low.h (class lynx_process_target): Update.
3874 * nto-low.cc (nto_target_ops): Update.
3875 (nto_create_inferior): Turn into ...
3876 (nto_process_target::create_inferior): ... this.
3877 * nto-low.h (class nto_process_target): Update.
3878 * win32-low.cc (win32_target_ops): Update.
3879 (win32_create_inferior): Turn into ...
3880 (win32_process_target::create_inferior): ... this.
3881 * win32-low.h (class win32_process_target): Update.
3882
3883 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3884
3885 * target.h (class process_target): New class definition.
3886 (struct process_stratum_target) <pt>: New field with type
3887 'process_target*'.
3888 * linux-low.h (class linux_process_target): Define as a derived
3889 class of 'process_target'.
3890 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3891 as the 'pt' field.
3892 * lynx-low.h (class lynx_process_target): Define as a derived
3893 class of 'process_target'.
3894 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3895 as the 'pt' field.
3896 * nto-low.h (class nto_process_target): Define as a derived
3897 class of 'process_target'.
3898 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3899 as the 'pt' field.
3900 * win32-low.h (class win32_process_target): Define as a derived
3901 class of 'process_target'.
3902 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3903 as the 'pt' field.
3904
3905 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3906
3907 * configure: Regenerate.
3908
3909 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3910 Andrew Burgess <andrew.burgess@embecosm.com>
3911
3912 * linux-riscv-low.cc: New file.
3913 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3914 and nat/riscv-linux-tdesc.c.
3915 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3916 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3917 Define.
3918
3919 2020-02-14 Tom Tromey <tom@tromey.com>
3920
3921 * acinclude.m4: Don't include acx_configure_dir.m4.
3922 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3923 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3924 (all, install-only, uninstall, clean-info, clean)
3925 (maintainer-clean): Don't recurse.
3926 (subdir_do, all-lib): Remove.
3927 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3928 (GNULIB_H): Remove.
3929 (generated_files): Update.
3930 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3931 * configure: Rebuild.
3932 * configure.ac: Don't configure gnulib or libiberty.
3933 (GNULIB): Update.
3934
3935 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3936
3937 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3938 preparing the command line for CreateProcess.
3939 (win32_create_inferior): Reflect the program name in debugging
3940 output that shows the process and its command line.
3941
3942 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3943
3944 * Makefile.in: Rename source files from .c to .cc.
3945 * %.c: Rename to %.cc.
3946 * configure.ac: Rename server.c to server.cc.
3947 * configure: Re-generate.
3948
3949 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3950
3951 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3952
3953 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3954
3955 * win32-low.c (win32_create_inferior): Set signal_pid.
3956
3957 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3958 Pedro Alves <palves@redhat.com>
3959
3960 Skip building gdbserver in a cross-configuration.
3961 * configure.srv: Set $gdbserver_host depending on whether $target
3962 is $host. Use $gdbserver_host instead of $host.
3963
3964 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3965
3966 * configure: Re-generate.
3967
3968 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3969
3970 * configure: Re-generate.
3971
3972 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3973
3974 * acinclude.m4: Update warning.m4 path.
3975
3976 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3977
3978 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3979 (handle_exception): Set siginfo_er.
3980 (win32_xfer_siginfo): New function.
3981
3982 2020-02-07 Tom Tromey <tom@tromey.com>
3983 Pedro Alves <palves@redhat.com>
3984
3985 * README: Update build documentation.
3986 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3987 host, not target.
3988 * configure.ac: Update paths.
3989 * configure: Rebuild.
3990 * acinclude.m4: Update paths.
3991 * Makefile.in: Update include paths.
3992 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3993 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3994 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3995 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3996 (%-generated.c): Update paths.
3997 * Move entire directory from ../gdb/gdbserver.
3998
3999 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4000
4001 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4002
4003 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4004
4005 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4006 assignment instead of srv_linux_obj.
4007
4008 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4009
4010 * server.c (handle_qxfer_libraries): Write segment-address with
4011 paddress.
4012
4013 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4014
4015 * Makefile.in (install-strip): New target.
4016 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4017 * aclocal.m4: Regenerate.
4018 * configure: Regenerate.
4019 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4020
4021 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4022
4023 * Makefile.in (SFILES): Adjust paths to point to real files.
4024 (OBS): Move waitstatus.o to target/waitstatus.o.
4025 (TAGS): Transform paths appropriately.
4026 (%.o): Rename to...
4027 (nat/%.o): ... this pattern rule.
4028 (%.o): Rename to...
4029 (target/%.o): ... this pattern rule.
4030 * configure.srv: Adjust paths throughout to include nat/ prefix
4031 with the revant files.
4032 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4033 * configure: Regenerate.
4034
4035 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4036
4037 * Makefile.in (TAGS): Remove config files from the recipe.
4038
4039 2020-01-14 Tom Tromey <tom@tromey.com>
4040
4041 * configure: Rebuild.
4042 * configure.ac: Remove any checks that were added to common.m4.
4043 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4044 lib-link.m4.
4045
4046 2020-01-14 Tom Tromey <tom@tromey.com>
4047
4048 * server.h: Include config.h.
4049 * gdbreplay.c: Include config.h.
4050 * configure: Rebuild.
4051 * configure.ac: Don't source common.host.
4052 * acinclude.m4: Update path.
4053 * Makefile.in (INCSUPPORT): New variable.
4054 (INCLUDE_CFLAGS): Add INCSUPPORT.
4055 (SFILES): Update paths.
4056 (version-generated.c): Update path to create-version.sh.
4057 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4058
4059 2020-01-14 Tom Tromey <tom@tromey.com>
4060
4061 * configure.ac (LIBS): Use WIN32APILIBS.
4062 (USE_WIN32API): Don't define.
4063 * configure: Rebuild.
4064
4065 2020-01-14 Tom Tromey <tom@tromey.com>
4066
4067 * configure: Rebuild.
4068
4069 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4070
4071 * Makefile.in (%-generated.c): Remove rule for files from
4072 regformats/i386.
4073
4074 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4075
4076 * configure: Re-generate.
4077
4078 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4079
4080 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4081 Define to static.
4082 * tracepoint.c (stop_tracing, flush_trace_buffer,
4083 about_to_request_buffer_space, get_trace_state_variable_value,
4084 set_trace_state_variable_value, gdb_collect): Add declaration.
4085
4086 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4087
4088 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4089 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4090 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4091 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4092 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4093 static.
4094
4095 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4096
4097 * inferiors.c: Include gdbsupport/common-inferior.h.
4098
4099 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4100
4101 * hostio-errno.c: Include hostio.h.
4102
4103 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4104
4105 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4106 prerequisite.
4107
4108 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4109
4110 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4111 * linux-arm-tdesc.h: Include arch/arm.h.
4112
4113 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4114
4115 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4116
4117 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4118
4119 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4120 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4121
4122 2020-01-10 Pedro Alves <palves@redhat.com>
4123
4124 * fork-child.c (post_fork_inferior): Pass target down to
4125 startup_inferior.
4126 * inferiors.c (switch_to_thread): Add process_stratum_target
4127 parameter.
4128 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4129 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4130 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4131 * remote-utils.c (prepare_resume_reply): Pass the target to
4132 switch_to_thread.
4133 * target.c (the_target): Now a process_stratum_target.
4134 (done_accessing_memory): Pass the target to switch_to_thread.
4135 (set_target_ops): Ajust to use process_stratum_target.
4136 * target.h (struct target_ops): Rename to ...
4137 (struct process_stratum_target): ... this.
4138 (the_target, set_target_ops): Adjust.
4139 (prepare_to_access_memory): Adjust comment.
4140 * win32-low.c (child_xfer_memory): Adjust to use
4141 process_stratum_target.
4142 (win32_target_ops): Now a process_stratum_target.
4143
4144 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4145 Pedro Alves <palves@redhat.com>
4146
4147 * win32-low.c (get_child_debug_event): Extract the fatal exception
4148 from the exit status and convert to the equivalent Posix signal
4149 number.
4150 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4151 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4152
4153 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4154
4155 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4156
4157 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4158
4159 * server.c (gdbserver_version): Change copyright year to 2020.
4160 * gdbreplay.c (gdbreplay_version): Likewise.
4161
4162 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4163
4164 * configure: Regenerate.
4165 * configure.ac: Quote variable arguments of test.
4166
4167 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4168
4169 * Makefile.in: Fix build with GNU Make 3.81
4170
4171 2019-12-16 Tom Tromey <tromey@adacore.com>
4172
4173 * server.c (get_exec_file): Constify result.
4174
4175 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4176
4177 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4178 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4179 * config.in: Regenerate.
4180 * configure: Regenerate.
4181 * configure.ac: Don't check for strerror.
4182 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4183 Call safe_strerror instead of strerror.
4184 * server.h (strerror): Remove this now-unnecessary declaration.
4185 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4186 strerror.
4187 (gdb_agent_helper_thread): Likewise.
4188 * utils.c (perror_with_name): Likewise.
4189
4190 2019-11-26 Tom Tromey <tom@tromey.com>
4191
4192 * configure, config.in: Rebuild.
4193
4194 2019-11-26 Tom Tromey <tom@tromey.com>
4195
4196 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4197 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4198 gdb_sigmask.
4199 * configure, config.in: Rebuild.
4200
4201 2019-11-26 Tom Tromey <tom@tromey.com>
4202
4203 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4204 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4205 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4206 * acinclude.m4: Include ax_pthread.m4.
4207 * config.in, configure: Rebuild.
4208
4209 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4210
4211 * debug.c (debug_set_output): Call safe_strerror instead of
4212 strerror.
4213 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4214 (linux_kill_one_lwp): Likewise.
4215 (linux_detach_one_lwp): Likewise.
4216 (linux_wait_for_event_filtered): Likewise.
4217 (store_register): Likewise.
4218 * lynx-low.c (lynx_attach): Likewise.
4219 * mem-break.c (insert_memory_breakpoint): Likewise.
4220 (remove_memory_breakpoint): Likewise.
4221 (delete_fast_tracepoint_jump): Likewise.
4222 (set_fast_tracepoint_jump): Likewise.
4223 (uninsert_fast_tracepoint_jumps_at): Likewise.
4224 (reinsert_fast_tracepoint_jumps_at): Likewise.
4225 * nto-low.c (nto_xfer_memory): Likewise.
4226 (nto_resume): Likewise.
4227
4228 2019-11-20 Luis Machado <luis.machado@linaro.org>
4229
4230 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4231 instead of register count.
4232 * tdesc.c (tdesc_contains_feature): New function.
4233 * tdesc.h (tdesc_contains_feature): New prototype.
4234
4235 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4236
4237 * Makefile.in: Add safe-strerror.c.
4238 * configure: Regenerate.
4239 * configure.ac: Don't source common.host.
4240
4241 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4242
4243 * config.in: Regenerate.
4244 * configure: Regenerate.
4245
4246 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4247
4248 * ax.c (ax_printf): Handle size_t_arg.
4249
4250 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4251
4252 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4253 * mi/mi-main.c (output_cores): Likewise.
4254 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4255 (linux_xfer_osdata_modules): Likewise.
4256 * remote.c (register_remote_support_xml): Likewise.
4257 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4258 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4259
4260 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4261
4262 * configure: Regenerate.
4263 * configure.ac: Remove check for strerror_r.
4264
4265 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4266
4267 * config.in: Regenerate.
4268 * configure: Regenerate.
4269 * configure.ac: Also check for strerror_r.
4270
4271 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4272
4273 * ax.h (debug_agent): Remove duplicate declaration.
4274
4275 2019-10-26 Tom de Vries <tdevries@suse.de>
4276
4277 * linux-aarch64-low.c: Fix typos in comments.
4278 * linux-arm-low.c: Same.
4279 * linux-low.c: Same.
4280 * linux-ppc-low.c: Same.
4281 * proc-service.c: Same.
4282 * regcache.h: Same.
4283 * server.c: Same.
4284 * tracepoint.c: Same.
4285 * win32-low.c: Same.
4286
4287 2019-10-25 Tom Tromey <tromey@adacore.com>
4288
4289 * utils.c (xstrdup): Remove.
4290
4291 2019-10-23 Tom Tromey <tom@tromey.com>
4292
4293 * configure, config.in: Rebuild.
4294
4295 2019-10-23 Tom Tromey <tom@tromey.com>
4296
4297 * configure: Rebuild.
4298 * acinclude.m4: Use m4_include, not sinclude.
4299
4300 2019-10-17 Tom Tromey <tromey@adacore.com>
4301
4302 * configure: Rebuild.
4303 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4304 in AC_CONFIG_FILES invocation.
4305 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4306 invocation.
4307
4308 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4309
4310 * server.c: Include xml-builtin.h.
4311 (get_xml_features): Don't declare xml_builtins here.
4312
4313 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4314
4315 * Makefile.in: Remove references to vec-ipa.o.
4316
4317 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4318
4319 * Makefile.in: Remove references to vec.c.
4320
4321 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4322
4323 * server.c (server_waiting): Change to bool.
4324 (extended_protocol): Likewise.
4325 (response_needed): Likewise.
4326 (exit_requested): Likewise.
4327 (run_once): Likewise.
4328 (report_no_resumed): Likewise.
4329 (non_stop): Likewise.
4330 (disable_packet_vCont): Likewise.
4331 (disable_packet_Tthread): Likewise.
4332 (disable_packet_qC): Likewise.
4333 (disable_packet_qfThreadInfo): Likewise.
4334 (handle_general_set): Update.
4335 (handle_detach): Update.
4336 (handle_monitor_command): Update.
4337 (handle_query): Update.
4338 (captured_main): Update.
4339 (process_serial_event): Update.
4340 * server.h (server_waiting): Change to bool.
4341 (disable_packet_vCont): Likewise.
4342 (disable_packet_Tthread): Likewise.
4343 (disable_packet_qC): Likewise.
4344 (disable_packet_qfThreadInfo): Likewise.
4345 (run_once): Likewise.
4346 (non_stop): Likewise.
4347 * target.c (target_stop_and_wait): Update.
4348
4349 2019-10-02 Tom Tromey <tromey@adacore.com>
4350
4351 * Makefile.in (SFILES): Add common-inferior.c.
4352 (OBS): Add common-inferior.o.
4353 * server.c (startup_with_shell): Don't define.
4354
4355 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4356
4357 * linux-low.c (linux_low_read_btrace): Update for change to
4358 std::vector.
4359
4360 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4361
4362 * debug.c (debug_threads): Remove comment in favor of the header.
4363 * debug.h (using_threads): Add declaration.
4364 (debug_threads): Add comment.
4365 * linux-aarch64-low.c: Include debug.h and remove declaration of
4366 debug_threads.
4367 * nto-low.c: Likewise.
4368 * remote-utils.c: Likewise.
4369 * thread-db.c: Likewise.
4370
4371 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4372
4373 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4374 and powerpc-cell64l-ipa.o.
4375 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4376 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4377 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4378 (spu*-*-*): Remove.
4379
4380 * spu-low.c: Remove file.
4381
4382 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4383 (parse_spufs_run): Remove.
4384 (ppc_get_pc): Remove Cell/B.E. support.
4385 (ppc_set_pc): Likewise.
4386 (ppc_breakpoint_at): Likewise.
4387 (ppc_arch_setup): Likewise.
4388 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4389 tdesc_powerpc_cell32l.
4390 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4391 or init_registers_powerpc_cell32l.
4392 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4393 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4394 or init_registers_powerpc_cell32l.
4395 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4396 (init_registers_powerpc_cell32l): Remove prototype.
4397 (init_registers_powerpc_cell64l): Likewise.
4398
4399 * target.h (struct target_ops): Remove qxfer_spu member.
4400 * server.c (handle_qxfer_spu): Remove.
4401 (qxfer_packets): Remove entry for "spu".
4402 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4403 * linux-low.c (SPUFS_MAGIC): Remove.
4404 (spu_enumerate_spu_ids): Remove.
4405 (linux_qxfer_spu): Remove.
4406 (linux_target_ops): Remove qxfer_spu member.
4407 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4408 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4409 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4410
4411 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4412
4413 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4414 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4415 * config.in: Regenerate.
4416 * configure: Regenerate.
4417
4418 2019-08-15 Tom Tromey <tromey@adacore.com>
4419
4420 * target.c (target_write_memory): Use gdb::byte_vector.
4421
4422 2019-08-15 Tom Tromey <tromey@adacore.com>
4423
4424 * tracepoint.c (write_inferior_data_pointer)
4425 (write_inferior_integer, write_inferior_int8)
4426 (write_inferior_uinteger, m_tracepoint_action_download)
4427 (r_tracepoint_action_download, x_tracepoint_action_download)
4428 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4429 (download_agent_expr, download_tracepoint_1)
4430 (download_trace_state_variables, upload_fast_traceframes): Update.
4431 * server.c (gdb_write_memory): Update.
4432 * remote-utils.c (relocate_instruction): Update.
4433 * proc-service.c (ps_pdwrite): Update.
4434 * mem-break.c (remove_memory_breakpoint)
4435 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4436 (uninsert_fast_tracepoint_jumps_at)
4437 (reinsert_fast_tracepoint_jumps_at): Update.
4438 * linux-x86-low.c (append_insns)
4439 (i386_install_fast_tracepoint_jump_pad)
4440 (amd64_write_goto_address, i386_write_goto_address): Update.
4441 * linux-s390-low.c (append_insns, s390_write_goto_address):
4442 Update.
4443 * linux-ppc-low.c (ppc_relocate_instruction)
4444 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4445 (ppc_write_goto_address): Update.
4446 * linux-aarch64-low.c (append_insns): Update.
4447 * target.h (struct target_ops): Update.
4448 (write_inferior_memory): Don't declare.
4449 * target.c (target_write_memory): Rename from
4450 write_inferior_memory. Remove old target_write_memory.
4451
4452 2019-08-15 Tom Tromey <tromey@adacore.com>
4453
4454 * target.c (write_inferior_memory): Use std::vector.
4455
4456 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4457
4458 PR build/24886
4459 * configure.ac: Drop enable-libmcheck support.
4460 * configure, config.in: Rebuild.
4461 * acinclude.m4: Don't include it.
4462
4463 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4464
4465 * configure.srv: Remove Arm xml files.
4466
4467 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4468
4469 * configure.srv: Add new files. Remove xml generated files.
4470 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4471 registers.
4472 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4473 * linux-aarch32-tdesc.c: New file.
4474 * linux-aarch32-tdesc.h: New file.
4475 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4476 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4477 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4478 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4479 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4480 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4481 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4482 (arm_read_description): Call arm_linux_read_description.
4483 (initialize_low_arch): Don't init registers.
4484 * linux-arm-tdesc.c: New file.
4485 * linux-arm-tdesc.h: New file.
4486
4487 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4488
4489 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4490 Move counter inside for.
4491 (arm_read_description): Check ptrace earlier.
4492 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4493
4494 2019-07-09 Tom Tromey <tom@tromey.com>
4495
4496 * configure: Rebuild.
4497 * configure.ac: Change common to gdbsupport.
4498 * acinclude.m4: Change common to gdbsupport.
4499 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4500 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4501 common to gdbsupport.
4502 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4503 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4504 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4505 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4506 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4507 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4508 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4509 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4510 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4511 common to gdbsupport.
4512
4513 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4514
4515 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4516 defines.
4517 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4518
4519 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4520
4521 * configure.srv: Remove legacy xml.
4522 * linux-aarch64-low.c (initialize_low_arch): Remove
4523 initialize_low_tdesc call.
4524 * linux-aarch64-tdesc-selftest.c: Remove file.
4525 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4526 * linux-x86-low.c (initialize_low_arch): Remove
4527 initialize_low_tdesc call.
4528 * linux-x86-tdesc-selftest.c: Remove file.
4529 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4530
4531 2019-06-20 Tom de Vries <tdevries@suse.de>
4532
4533 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4534 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4535
4536 2019-06-19 Tom de Vries <tdevries@suse.de>
4537
4538 * debug.h (debug_write): Change return type to ssize_t.
4539 * debug.c (debug_write): Same.
4540
4541 2019-06-14 Tom Tromey <tom@tromey.com>
4542
4543 * configure.ac: Use new path to gnulib.
4544 * configure: Rebuild.
4545 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4546 to gnulib.
4547
4548 2019-06-11 Tom Tromey <tom@tromey.com>
4549
4550 * Makefile.in (SFILES): Add alloc.c.
4551 (OBS): Add alloc.o.
4552 (IPA_OBJS): Add alloc-ipa.o.
4553 (alloc-ipa.o): New target.
4554 (%.o: ../%.c): New pattern rule.
4555
4556 2019-06-10 Tom Tromey <tromey@adacore.com>
4557
4558 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4559 end warning with a newline.
4560 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4561 newline.
4562 * thread-db.c (attach_thread): Don't end warning with a newline.
4563 (thread_db_notice_clone): Likewise.
4564 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4565 newline.
4566 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4567 end warning with a newline.
4568
4569 2019-06-04 Pedro Alves <palves@redhat.com>
4570
4571 * server.c (captured_main): Use make_unique_xstrdup.
4572
4573 2019-06-02 Tom Tromey <tom@tromey.com>
4574
4575 * gdbreplay.c (fromhex): Remove.
4576 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4577
4578 2019-05-29 Tom Tromey <tromey@adacore.com>
4579
4580 * configure: Rebuild.
4581
4582 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4583
4584 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4585 sign extension code on 32-bit builds.
4586
4587 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4588
4589 * remote-utils.c:
4590 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4591
4592 2019-04-19 Tom Tromey <tom@tromey.com>
4593
4594 * server.c (struct vstop_notif): Derive from notif_event.
4595 <base>: Remove.
4596 (queue_stop_reply): Update.
4597 (remove_all_on_match_ptid): Change type. Rewrite.
4598 (discard_queued_stop_replies): Rewrite.
4599 (in_queued_stop_replies_ptid): Change type.
4600 (in_queued_stop_replies): Rewrite.
4601 (notif_stop): Update.
4602 (queue_stop_reply_callback): Update.
4603 (captured_main): Don't call initialize_notif.
4604 (push_stop_notification): Update.
4605 * notif.c (notif_write_event, handle_notif_ack)
4606 (notif_event_enque, notif_push): Update.
4607 (notif_event_xfree, initialize_notif): Remove.
4608 * notif.h (struct notif_event): Include <list>, not
4609 "common/queue.h".
4610 (struct notif_server) <queue>: Now a std::list.
4611 (notif_event_p): Remove typedef.
4612 (initialize_notif): Don't declare.
4613 (struct notif_event): Add virtual destructor.
4614
4615 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4616
4617 * ax.c (ax_vdebug): Call debug_printf.
4618 * debug.c (debug_write): New function.
4619 * debug.h (debug_write): New declaration.
4620 * linux-low.c (sigchld_handler): Call debug_write.
4621
4622 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4623
4624 * debug.c (debug_set_output): New function.
4625 (debug_vprintf): Send output to debug_file.
4626 (debug_flush): Likewise.
4627 * debug.h (debug_set_output): New declaration.
4628 * server.c (handle_monitor_command): Add debug-file option.
4629 (captured_main): Likewise.
4630
4631 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4632
4633 * debug.c (remote_debug): Add definition.
4634 * debug.h (remote_debug): Add declaration.
4635 * hostio.c (remote_debug): Remove declaration.
4636 * remote-utils.c (struct ui_file): Likewise.
4637 (remote_debug): Likewise.
4638 * remote-utils.h (remote_debug): Likewise,
4639 * server.c (remote_debug): Remove definition.
4640
4641 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4642
4643 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4644 when using a 64-bit gdbserver.
4645
4646 2019-04-09 Tom Tromey <tromey@adacore.com>
4647
4648 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4649
4650 2019-04-08 Tom Tromey <tom@tromey.com>
4651
4652 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4653 throw.
4654 (linux_resume_one_lwp): Likewise.
4655
4656 2019-04-08 Tom Tromey <tom@tromey.com>
4657
4658 * gdbreplay.c: Update.
4659 * linux-low.c: Update.
4660 * server.c: Update.
4661
4662 2019-04-08 Tom Tromey <tom@tromey.com>
4663
4664 * server.c: Use C++ exception handling.
4665 * linux-low.c: Use C++ exception handling.
4666 * gdbreplay.c: Use C++ exception handling.
4667
4668 2019-04-08 Tom Tromey <tom@tromey.com>
4669
4670 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4671 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4672 (captured_main, main): Update.
4673 * gdbreplay.c (main): Update.
4674
4675 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4676
4677 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4678 value in argument pointer, return 1 if the entry is found and 0
4679 otherwise. Move comment.
4680 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4681 * linux-low.h (linux_get_auxv): Declare.
4682 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4683
4684 2019-04-05 Tom Tromey <tromey@adacore.com>
4685
4686 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4687 variables.
4688
4689 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4690
4691 * linux-low.c (AT_HWCAP2): Add define if not already included.
4692
4693 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4694
4695 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4696 (aarch64_arch_setup): Call linux_get_hwcap.
4697 * linux-arm-low.c (arm_get_hwcap): Remove function.
4698 (arm_read_description): Call linux_get_hwcap.
4699 * linux-low.c (linux_get_auxv): New function.
4700 (linux_get_hwcap): Likewise.
4701 (linux_get_hwcap2): Likewise.
4702 * linux-low.h (linux_get_hwcap): New declaration.
4703 (linux_get_hwcap2): Likewise.
4704 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4705 (ppc_arch_setup): Call linux_get_hwcap.
4706 * linux-s390-low.c (s390_get_hwcap): Remove function.
4707 (s390_arch_setup): Call linux_get_hwcap.
4708
4709 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4710 Jiong Wang <jiong.wang@arm.com>
4711
4712 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4713 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4714 to fail.
4715 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4716
4717 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4718 Jiong Wang <jiong.wang@arm.com>
4719
4720 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4721 (aarch64_get_hwcap): New function.
4722 (aarch64_arch_setup): Read APIA hwcap.
4723
4724 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4725 Jiong Wang <jiong.wang@arm.com>
4726
4727 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4728 (initialize_low_tracepoint): Likewise.
4729 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4730 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4731 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4732 (aarch64_linux_read_description): Likewise.
4733 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4734
4735 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4736
4737 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4738 i386_create_target_description for 'segments' parameter.
4739 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4740 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4741 * win32-i386-low.c (i386_arch_setup): Likewise.
4742
4743 2019-03-12 Tom Tromey <tromey@adacore.com>
4744
4745 * linux-low.c (iterate_over_lwps): Update.
4746
4747 2019-03-06 Tom Tromey <tom@tromey.com>
4748
4749 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4750 (captured_main): Use SCOPE_EXIT.
4751
4752 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4753
4754 * configure.srv: Use '$enable_unittest' instead of '$development'
4755 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4756 case.
4757
4758 2019-02-27 Tom Tromey <tromey@adacore.com>
4759
4760 * gdbreplay.c (logchar): Handle \r\n.
4761
4762 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4763
4764 * linux-low.c (linux_attach): Add process before lwp.
4765 * server.c (attach_inferior): Check if already attached.
4766
4767 2019-02-07 Tom Tromey <tom@tromey.com>
4768
4769 * x86-tdesc.h: Rename include guard.
4770 * x86-low.h: Add include guard.
4771 * wincecompat.h: Rename include guard.
4772 * win32-low.h: Add include guard.
4773 * utils.h: Rename include guard.
4774 * tracepoint.h: Rename include guard.
4775 * tdesc.h: Rename include guard.
4776 * target.h: Rename include guard.
4777 * server.h: Rename include guard.
4778 * remote-utils.h: Rename include guard.
4779 * regcache.h: Rename include guard.
4780 * nto-low.h: Rename include guard.
4781 * notif.h: Add include guard.
4782 * mem-break.h: Rename include guard.
4783 * lynx-low.h: Add include guard.
4784 * linux-x86-tdesc.h: Add include guard.
4785 * linux-s390-tdesc.h: Add include guard.
4786 * linux-ppc-tdesc-init.h: Add include guard.
4787 * linux-low.h: Add include guard.
4788 * linux-aarch64-tdesc.h: Add include guard.
4789 * linux-aarch32-low.h: Add include guard.
4790 * inferiors.h: Rename include guard.
4791 * i387-fp.h: Rename include guard.
4792 * hostio.h: Rename include guard.
4793 * gdbthread.h: Rename include guard.
4794 * gdb_proc_service.h: Rename include guard.
4795 * event-loop.h: Rename include guard.
4796 * dll.h: Rename include guard.
4797 * debug.h: Rename include guard.
4798 * ax.h: Rename include guard.
4799
4800 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4801
4802 PR gdb/23985
4803 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4804 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4805
4806 2019-01-25 Tom Tromey <tom@tromey.com>
4807
4808 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4809
4810 2019-01-25 Tom Tromey <tom@tromey.com>
4811
4812 * win32-low.c: Fix common/ includes.
4813 * win32-i386-low.c: Fix common/ includes.
4814 * tracepoint.c: Fix common/ includes.
4815 * thread-db.c: Fix common/ includes.
4816 * target.h: Fix common/ includes.
4817 * symbol.c: Fix common/ includes.
4818 * spu-low.c: Fix common/ includes.
4819 * server.h: Fix common/ includes.
4820 * server.c: Fix common/ includes.
4821 * remote-utils.c: Fix common/ includes.
4822 * regcache.h: Fix common/ includes.
4823 * regcache.c: Fix common/ includes.
4824 * nto-x86-low.c: Fix common/ includes.
4825 * notif.h: Fix common/ includes.
4826 * mem-break.h: Fix common/ includes.
4827 * lynx-low.c: Fix common/ includes.
4828 * lynx-i386-low.c: Fix common/ includes.
4829 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4830 * linux-x86-low.c: Fix common/ includes.
4831 * linux-low.c: Fix common/ includes.
4832 * inferiors.h: Fix common/ includes.
4833 * i387-fp.c: Fix common/ includes.
4834 * hostio.c: Fix common/ includes.
4835 * hostio-errno.c: Fix common/ includes.
4836 * gdbthread.h: Fix common/ includes.
4837 * gdbreplay.c: Fix common/ includes.
4838 * fork-child.c: Fix common/ includes.
4839 * event-loop.c: Fix common/ includes.
4840 * ax.c:
4841 (enum gdb_agent_op): Fix common/ includes.
4842
4843 2019-01-21 Tom Tromey <tom@tromey.com>
4844
4845 * tracepoint.c: Fix includes.
4846 * remote-utils.c: Fix includes.
4847 * linux-x86-low.c: Fix includes.
4848
4849 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4850
4851 * gdbreplay.c (gdbreplay_version): Update copyright year in
4852 version message.
4853 * server.c (gdbserver_version): Likewise.
4854
4855 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4856
4857 * linux-low.c (add_lwp): Switch ordering.
4858
4859 2018-11-29 Tom Tromey <tom@tromey.com>
4860
4861 * win32-low.c (win32_join): Take pid, not process.
4862 * target.h (struct target_ops) <join>: Change argument type.
4863 (join_inferior): Change argument name.
4864 * spu-low.c (spu_join): Take pid, not process.
4865 * server.c (handle_detach): Preserve pid before destroying
4866 process.
4867 * lynx-low.c (lynx_join): Take pid, not process.
4868 * linux-low.c (linux_join): Take pid, not process.
4869
4870 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4871
4872 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4873 (aarch64_cannot_fetch_register): Likewise.
4874 (struct linux_target_ops): Update references.
4875
4876 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4877
4878 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4879
4880 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4881
4882 * configure.srv (ipa_ppc_linux_regobj): Add
4883 powerpc-isa207-htm-vsx32l-ipa.o and
4884 powerpc-isa207-htm-vsx64l-ipa.o.
4885 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4886 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4887 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4888 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4889 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4890 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4891 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4892 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4893 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4894 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4895 (init_registers_powerpc_isa207_htm_vsx32l)
4896 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4897 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4898 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4899 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4900 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4901 (ppc_store_tm_ctarregset): New functions.
4902 (ppc_regsets): Add entries for HTM regsets.
4903 (ppc_arch_setup): Set htm in features struct when needed. Set
4904 sizes for the HTM regsets.
4905 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4906 (initialize_low_arch): Call
4907 init_registers_powerpc_isa207_htm_vsx32l and
4908 init_registers_powerpc_isa207_htm_vsx64l.
4909 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4910 PPC_TDESC_ISA207_HTM_VSX.
4911 (initialize_low_tracepoint): Call
4912 init_registers_powerpc_isa207_htm_vsx32l and
4913 init_registers_powerpc_isa207_htm_vsx64l.
4914
4915 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4916
4917 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4918 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4919 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4920 (ppc_store_pmuregset): New functions.
4921 (ppc_regsets): Add entries for ebb and pmu regsets.
4922 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4923 pmu regsets are available. Set sizes for these regsets.
4924
4925 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4926
4927 * configure.srv (ipa_ppc_linux_regobj): Add
4928 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4929 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4930 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4931 rs6000/powerpc-isa207-vsx32l.xml, and
4932 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4933 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4934 <PPC_TDESC_ISA207_VSX>: New enum value.
4935 (init_registers_powerpc_isa207_vsx32l): Declare.
4936 (init_registers_powerpc_isa207_vsx64l): Declare.
4937 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4938 (ppc_store_tarregset): New function.
4939 (ppc_regsets): Add entry for the TAR regset.
4940 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4941 size for the TAR regsets.
4942 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4943 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4944 and init_registers_powerpc_isa207_vsx64l.
4945 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4946 (initialize_low_tracepoint): Call
4947 init_registers_powerpc_isa207_vsx32l and
4948 init_registers_powerpc_isa207_vsx64l.
4949
4950 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4951 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4952
4953 * configure.srv (ipa_ppc_linux_regobj): Add
4954 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4955 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4956 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4957 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4958 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4959 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4960 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4961 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4962 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4963 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4964 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4965 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4966 (ppc_hwcap): Add comment.
4967 (ppc_hwcap2): New global.
4968 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4969 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4970 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4971 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4972 when needed. Set sizes for the the DSCR and PPR regsets.
4973 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4974 (initialize_low_arch): Call
4975 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4976 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4977 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4978 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4979 (initialize_low_tracepoint): Call
4980 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4981 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4982
4983 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4984
4985 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4986
4987 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4988 Simon Marchi <simark@simark.ca>
4989
4990 * acinclude.m4: Include "../selftest.m4".
4991 * configure: Regenerate.
4992 * configure.ac: Use "GDB_AC_SELFTEST".
4993 * configure.srv: Use "$enable_unittests" instead of
4994 "$development" when checking whether unit tests have been
4995 enabled.
4996 * server.c (captured_main): Update message informing that
4997 selftests have been disabled.
4998
4999 2018-10-04 Tom Tromey <tom@tromey.com>
5000
5001 * configure: Rebuild.
5002
5003 2018-10-04 Tom Tromey <tom@tromey.com>
5004
5005 * server.c (handle_status): Rename inner "thread".
5006 (process_serial_event): Declare "res" in 'm' case.
5007 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5008 (iterate_over_lwps): Rename inner "thread".
5009 (linux_qxfer_libraries_svr4): Rename inner "len".
5010 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5011
5012 2018-10-01 Gary Benson <gbenson@redhat.com>
5013
5014 * gdb_proc_service.h: Moved common code to
5015 common/gdb_proc_service.h.
5016
5017 2018-10-01 Gary Benson <gbenson@redhat.com>
5018
5019 * gdb_proc_service.h: Synchronize comments and whitespace with
5020 GDB's version of this file.
5021
5022 2018-09-25 Tom Tromey <tom@tromey.com>
5023
5024 * configure: Rebuild.
5025 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5026
5027 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5028
5029 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5030 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5031 ($(IPA_LIB)): Sort IPA_OBJS.
5032
5033 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5034
5035 * Makefile.in: Remove references to $(ADD_DEPS).
5036
5037 2018-09-16 Tom Tromey <tom@tromey.com>
5038
5039 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5040 variables.
5041 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5042 variables.
5043
5044 2018-09-05 Tom Tromey <tom@tromey.com>
5045
5046 * configure: Rebuild.
5047
5048 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5049
5050 PR build/23399
5051 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5052
5053 2018-08-27 Tom Tromey <tom@tromey.com>
5054
5055 PR build/23087:
5056 * configure: Rebuild.
5057
5058 2018-08-27 Tom Tromey <tom@tromey.com>
5059
5060 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5061 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5062 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5063 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5064 (s390x_emit_stack_adjust): Add casts to unsigned char.
5065
5066 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5067
5068 PR gdb/23374
5069 PR gdb/23375
5070 * server.h (struct client_state) <disable_randomization>:
5071 Initialize to 1.
5072
5073 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5074
5075 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5076 variable.
5077 (mips_supply_ptrace_register): Likewise.
5078
5079 2018-07-22 Tom Tromey <tom@tromey.com>
5080
5081 * configure: Rebuild.
5082
5083 2018-07-22 Tom Tromey <tom@tromey.com>
5084
5085 * win32-low.c (win32_create_inferior): Remove unused variables.
5086 * gdbreplay.c (remote_open): Remove unused variable.
5087 * remote-utils.c (remote_prepare): Remove unused variable.
5088 * x86-tdesc.h (X86_TDESC_H): Define.
5089 (amd64_expedite_regs): Define conditionally.
5090 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5091 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5092 * remote-utils.c (readchar): Remove unused variable.
5093
5094 2018-07-13 Pedro Alves <palves@redhat.com>
5095
5096 * linux-low.c (linux_kill): Change parameter to process_info
5097 pointer instead of pid. Adjust.
5098 * lynx-low.c (lynx_kill): Likewise.
5099 * nto-low.c (nto_kill): Likewise.
5100 * spu-low.c (spu_kill): Likewise.
5101 * win32-low.c (win32_kill): Likewise.
5102 * server.c (handle_v_kill, kill_inferior_callback)
5103 (detach_or_kill_for_exit): Adjust.
5104 * target.c (kill_inferior): Change parameter to process_info
5105 pointer instead of pid. Adjust.
5106 * target.h (struct target_ops) <kill>: Change parameter to
5107 process_info pointer instead of pid. Adjust all implementations
5108 and callers.
5109 (kill_inferior): Likewise.
5110
5111 2018-07-13 Pedro Alves <palves@redhat.com>
5112
5113 * linux-low.c (linux_detach, linux_join): Change parameter to
5114 process_info pointer instead of pid. Adjust.
5115 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5116 * nto-low.c (nto_detach): Likewise.
5117 * spu-low.c (spu_detach, spu_join): Likewise.
5118 * win32-low.c (win32_detach, win32_join): Likewise.
5119 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5120 * target.h (struct target_ops) <detach, join>: Change parameter to
5121 process_info pointer instead of pid. Adjust all implementations
5122 and callers.
5123 (detach_inferior, join_inferior): Rename 'pid' parameter to
5124 'proc'.
5125
5126 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5127 Jan Kratochvil <jan.kratochvil@redhat.com>
5128 Paul Fertser <fercerpav@gmail.com>
5129 Tsutomu Seki <sekiriki@gmail.com>
5130
5131 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5132 (OBS): Add 'common/netstuff.o'.
5133 (GDBREPLAY_OBS): Likewise.
5134 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5135 (remote_open): Implement support for IPv6
5136 connections.
5137 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5138 and 'wspiapi.h'.
5139 (handle_accept_event): Accept connections from IPv6 sources.
5140 (remote_prepare): Handle IPv6-style hostnames; implement
5141 support for IPv6 connections.
5142 (remote_open): Implement support for printing connections from
5143 IPv6 sources.
5144
5145 2018-07-11 Pedro Alves <palves@redhat.com>
5146
5147 PR gdb/23377
5148 * mem-break.c (any_persistent_commands): Add process_info
5149 parameter and use it instead of relying on the current process.
5150 Change return type to bool.
5151 * mem-break.h (any_persistent_commands): Add process_info
5152 parameter and change return type to bool.
5153 * server.c (handle_detach): Remove require_running_or_return call.
5154 Look up the process_info for the process we're about to detach.
5155 If not found, return back error to GDB. Adjust
5156 any_persistent_commands call to pass down a process pointer.
5157
5158 2018-07-11 Pedro Alves <palves@redhat.com>
5159
5160 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5161 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5162 instead of collect_register_by_name.
5163 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5164 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5165
5166 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5167 Pedro Alves <palves@redhat.com>
5168
5169 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5170
5171 2018-07-03 Tom Tromey <tom@tromey.com>
5172
5173 * linux-low.c: Update.
5174 * lynx-low.c: Update.
5175 * mem-break.c: Update.
5176 * nto-low.c: Update.
5177 * remote-utils.c: Update.
5178 * server.c: Update.
5179 * spu-low.c: Update.
5180 * target.c: Update.
5181 * win32-low.c: Update.
5182
5183 2018-07-03 Tom Tromey <tom@tromey.com>
5184
5185 * server.c: Update.
5186
5187 2018-07-03 Tom Tromey <tom@tromey.com>
5188
5189 * linux-low.c: Update.
5190
5191 2018-07-03 Tom Tromey <tom@tromey.com>
5192
5193 * target.c: Update.
5194
5195 2018-07-03 Tom Tromey <tom@tromey.com>
5196
5197 * linux-low.c: Update.
5198 * linux-mips-low.c: Update.
5199 * lynx-low.c: Update.
5200 * nto-low.c: Update.
5201 * remote-utils.c: Update.
5202 * server.c: Update.
5203 * spu-low.c: Update.
5204 * target.c: Update.
5205 * thread-db.c: Update.
5206
5207 2018-07-03 Tom Tromey <tom@tromey.com>
5208
5209 * linux-low.c: Update.
5210 * linux-mips-low.c: Update.
5211 * lynx-low.c: Update.
5212 * mem-break.c: Update.
5213 * nto-low.c: Update.
5214 * remote-utils.c: Update.
5215 * server.c: Update.
5216 * spu-low.c: Update.
5217 * target.c: Update.
5218 * tracepoint.c: Update.
5219
5220 2018-07-03 Tom Tromey <tom@tromey.com>
5221
5222 * linux-low.c: Update.
5223 * linux-ppc-low.c: Update.
5224 * linux-x86-low.c: Update.
5225 * proc-service.c: Update.
5226 * server.c: Update.
5227 * spu-low.c: Update.
5228 * thread-db.c: Update.
5229 * win32-low.c: Update.
5230
5231 2018-07-03 Tom Tromey <tom@tromey.com>
5232
5233 * linux-low.c: Update.
5234 * lynx-low.c: Update.
5235 * nto-low.c: Update.
5236 * remote-utils.c: Update.
5237 * spu-low.c: Update.
5238 * thread-db.c: Update.
5239 * win32-low.c: Update.
5240
5241 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5242
5243 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5244 parameter in call to 'amd64_create_target_description'.
5245
5246 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5247
5248 * x86-tdesc.h: Remove executable permission flag.
5249
5250 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5251
5252 * configure.ac: Remove AC_PREREQ, add missing quoting.
5253 * configure: Re-generate.
5254 * config.in: Re-generate.
5255 * aclocal.m4: Re-generate.
5256
5257 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5258
5259 * tracepoint.h (current_traceframe): Remove declaration.
5260
5261 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5262
5263 * linux-aarch64-low.c (is_sve_tdesc): New function.
5264 (aarch64_sve_regs_copy_to_regcache): Likewise.
5265 (aarch64_sve_regs_copy_from_regcache): Likewise.
5266 (aarch64_regs_info): Add SVE checks.
5267 (initialize_low_arch): Initialize SVE.
5268
5269 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5270
5271 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5272
5273 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5274
5275 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5276 (initialize_low_tracepoint): Likewise
5277 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5278 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5279 param.
5280 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5281 checks.
5282 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5283
5284 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5285
5286 * server.h (PBUFSIZ): Increase size
5287
5288 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5289
5290 * regcache.c (regcache::raw_compare): New function.
5291 * regcache.h (regcache::raw_compare): New declaration.
5292
5293 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5294
5295 * regcache.c (new_register_cache): Use new.
5296 (free_register_cache): Use delete.
5297 (register_data): Use const.
5298 (supply_register): Move body inside regcache.
5299 (regcache::raw_supply): New override function.
5300 (collect_register): Move body inside regcache.
5301 (regcache::raw_collect): New override function.
5302 (regcache::get_register_status): New override function.
5303 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5304
5305 2018-06-09 Tom Tromey <tom@tromey.com>
5306
5307 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5308 declare queue.
5309 (event_queue): Use std::queue.
5310 (gdb_event_xfree): Remove.
5311 (initialize_event_loop, process_event, wait_for_event): Update.
5312
5313 2018-06-08 Stan Cox <scox@redhat.com>
5314
5315 * win32-low.c (win32_create_inferior): last_ptid and last_status
5316 moved to client_state.
5317
5318 2018-06-08 Pedro Alves <palves@redhat.com>
5319
5320 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5321 common/common-exceptions.o, common/common-utils.o,
5322 common/errors.o, common/print-utils.o and utils.o.
5323 * gdbreplay.c: Include "common-defs.h" instead of the two
5324 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5325 string.h or alloca.h.
5326 (perror_with_name): Delete.
5327 (remote_open): Use xstrdup instead of strdup.
5328 (main): Rename to ...
5329 (captured_main): ... this.
5330 (main): New.
5331
5332 2018-06-08 Tom Tromey <tom@tromey.com>
5333
5334 * linux-low.c (linux_low_read_btrace): Update.
5335
5336 2018-06-04 Stan Cox <scox@redhat.com>
5337
5338 * server.h (struct client_state): New.
5339 * server.c (cont_thread, general_thread, multi_process)
5340 (report_fork_events, report_vfork_events, report_exec_events)
5341 (report_thread_events, swbreak_feature, hwbreak_feature)
5342 (vCont_supported, disable_randomization, pass_signals)
5343 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5344 Moved to client_state.
5345 * remote-utils.c (remote_debug, noack_mode)
5346 (transport_is_reliable): Moved to client_state.
5347 * tracepoint.c (current_traceframe): Moved to client_state.
5348
5349 Update all callers.
5350 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5351 linux-low.c, remote-utils.h, target.c: Use client_state.
5352
5353 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5354
5355 * configure.srv: Add new c/h file.
5356
5357 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5358
5359 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5360 null VQ.
5361
5362 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5363
5364 * gdb.arch/mips-fpregset-core.exp: New test.
5365 * gdb.arch/mips-fpregset-core.c: New test source.
5366
5367 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5368
5369 PR server/23198
5370 * hostio.c (require_int): Do not report overflow for integers
5371 between 0xfffffff and 0x7fffffff.
5372
5373 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5374
5375 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5376 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5377 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5378 functions.
5379 (the_low_target): Wire them.
5380
5381 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5382
5383 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5384 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5385 mode. Call collect_register_by_name with vscr using
5386 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5387 (ppc_store_vrregset): Add and set vscr_offset variable as in
5388 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5389 vscr_offset.
5390
5391 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5392
5393 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5394 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5395 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5396
5397 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5398
5399 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5400 (ppc_store_vsxregset): Likewise.
5401 (ppc_fill_vrregset): Likewise.
5402 (ppc_store_vrregset): Likewise.
5403 (ppc_fill_evrregset): Likewise.
5404 (ppc_store_evrregset): Likewise.
5405 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5406 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5407 needed.
5408
5409 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5410
5411 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5412 wordsize of the inferior. Call ppc_linux_target_wordsize.
5413
5414 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5415
5416 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5417 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5418 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5419 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5420 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5421 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5422 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5423 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5424 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5425 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5426 (tdesc_powerpc_e500l): Remove.
5427 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5428 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5429 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5430 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5431 linux-ppc-tdesc.h.
5432 (ppc_arch_setup): Remove target description matching code. Fill a
5433 ppc_linux_features struct and call ppc_linux_match_description
5434 with it.
5435
5436 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5437
5438 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5439 width of the requested register exceeds the width of the
5440 `ptrace' data type.
5441 (mips_cannot_store_register): Likewise.
5442
5443 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5444
5445 * linux-mips-low.c (mips_fetch_register): New function. Update
5446 preceding comment.
5447 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5448 (the_low_target): Wire `mips_fetch_register'.
5449
5450 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5451
5452 * lynx-i386-low.c (LYNXOS_178): New macro.
5453 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5454 the layout on LynxOS-178.
5455 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5456 handle floating point registers that are not supported by
5457 LynxOS-178.
5458
5459 2018-05-10 Tom Tromey <tom@tromey.com>
5460
5461 * configure: Rebuild.
5462
5463 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5464
5465 PR server/23158:
5466 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5467 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5468 Use it to set the expedite_regs field in the given tdesc.
5469 * x86-tdesc.h: New file.
5470 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5471 Adjust following the addition of the new expedite_regs parameter
5472 to init_target_desc.
5473 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5474 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5475 (i386_linux_read_description, amd64_linux_read_description):
5476 Adjust following the addition of the new expedite_regs parameter
5477 to init_target_desc.
5478 * lynx-i386-low.c: #include "x86-tdesc.h".
5479 (lynx_i386_arch_setup): Adjust following the addition of the new
5480 expedite_regs parameter to init_target_desc.
5481 * nto-x86-low.c: #include "x86-tdesc.h".
5482 (nto_x86_arch_setup): Adjust following the addition of the new
5483 expedite_regs parameter to init_target_desc.
5484 * win32-i386-low.c: #include "x86-tdesc.h".
5485 (i386_arch_setup): Adjust following the addition of the new
5486 expedite_regs parameter to init_target_desc.
5487
5488 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5489
5490 PR server/23158:
5491 * win32-low.c (win32_create_inferior): Add call to my_wait
5492 setting last_status global.
5493
5494 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5495
5496 PR server/23158:
5497 * win32-low.c (create_process): Only call gdb_tilde_expand if
5498 inferior_cwd is not NULL.
5499
5500 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5501
5502 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5503 registers to the cache if their values have changed.
5504 (i387_xsave_to_cache): Provide default values for x87 control
5505 registers when these features are available, but disabled.
5506 * regcache.c (supply_register_by_name_zeroed): New function.
5507 * regcache.h (supply_register_by_name_zeroed): Declare new
5508 function.
5509
5510 2018-05-07 Tom Tromey <tom@tromey.com>
5511
5512 * configure: Rebuild.
5513
5514 2018-05-04 Tom Tromey <tom@tromey.com>
5515
5516 * configure: Rebuild.
5517
5518 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5519 Pedro Alves <palves@redhat.com>
5520
5521 * linux-aarch64-low.c (aarch64_stopped_data_address):
5522 Likewise.
5523
5524 2018-04-27 Tom Tromey <tom@tromey.com>
5525
5526 * configure: Rebuild.
5527
5528 2018-04-23 Tom Tromey <tom@tromey.com>
5529
5530 * configure: Rebuild.
5531
5532 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5533
5534 * Makefile.in (depcomp): Add "..".
5535 (all_deps_files): New and use it.
5536
5537 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5538
5539 * configure.srv (aarch64*-*-linux*): Don't include xml.
5540 (i[34567]86-*-cygwin*): Likewise.
5541 (i[34567]86-*-linux*): Likewise.
5542 (i[34567]86-*-lynxos*): Likewise.
5543 (i[34567]86-*-mingw32ce*): Likewise.
5544 (i[34567]86-*-mingw*): Likewise.
5545 (i[34567]86-*-nto*): Likewise.
5546 (tic6x-*-uclinux): Likewise.
5547 (x86_64-*-linux*): Likewise.
5548 (x86_64-*-mingw*): Likewise.
5549 (x86_64-*-cygwin*): Likewise.
5550
5551 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5552
5553 * tdesc.c: Remove xml parameter.
5554
5555 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5556
5557 * server.c (get_features_xml): Remove cast.
5558 * tdesc.c (void target_desc::accept): Fill in function.
5559 (tdesc_get_features_xml): Remove old xml creation.
5560 (print_xml_feature::visit_pre): Add xml vistor.
5561 * tdesc.h (struct target_desc): Make xmltarget mutable.
5562 (tdesc_get_features_xml): Remove declaration.
5563
5564 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5565
5566 * tdesc.c (tdesc_architecture_name): Add new function.
5567 (tdesc_osabi_name): Likewise.
5568 (tdesc_get_features_xml): Use new functions.
5569
5570 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5571
5572 * tdesc.c (tdesc_create_flags): Remove.
5573 (tdesc_add_flag): Likewise.
5574 (tdesc_named_type): Likewise.
5575 (tdesc_create_union): Likewise.
5576 (tdesc_create_struct): Likewise.
5577 (tdesc_create_vector): Likewise.
5578 (tdesc_add_bitfield): Likewise.
5579 (tdesc_add_field): Likewise.
5580 (tdesc_set_struct_size): Likewise.
5581
5582 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5583
5584 * tdesc.c (~target_desc): Remove implictly deleted items.
5585 (init_target_desc): Iterate all features.
5586 (tdesc_get_features_xml): Use vector.
5587 (tdesc_create_feature): Create feature.
5588 * tdesc.h (tdesc_feature) Remove
5589 (target_desc): Add features.
5590
5591 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5592
5593 * Makefile.in: Add common/tdesc.c
5594 * tdesc.c (init_target_desc): init all reg_defs from register
5595 vector.
5596 (tdesc_create_reg): Create tdesc_reg.
5597 * tdesc.h (tdesc_feature): Add register vector.
5598
5599 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5600
5601 * tdesc.h (struct target_desc) <features>: Change type to
5602 std::vector<std::string>.
5603 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5604 changes.
5605 (tdesc_get_features_xml): Likewise.
5606 (tdesc_create_feature): Likewise.
5607
5608 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5609
5610 * regcache.c (find_register_by_number): Return a ref.
5611 (find_regno): Use references.
5612 (register_size): Likewise.
5613 (register_data): Likewise.
5614 * tdesc.c (target_desc::~target_desc): Remove free calls.
5615 (target_desc::operator==): Use std::vector compare.
5616 (init_target_desc): Use reference.
5617 (tdesc_create_reg): Use reg constructors.
5618 * tdesc.h (struct target_desc): Replace pointer with object.
5619
5620 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5621
5622 * regcache.c (find_register_by_number): Make static.
5623 (find_regno): Use find_register_by_number
5624 * regcache.h (struct reg): Remove declaration.
5625
5626 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5627
5628 * tdesc.c (target_desc::~target_desc): Move to here.
5629 (target_desc::operator==): Likewise.
5630 * tdesc.h (target_desc::~target_desc): Move from here.
5631 (target_desc::operator==): Likewise.
5632
5633 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5634
5635 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5636
5637 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5638
5639 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5640 S390_TDESC_GS.
5641 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5642 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5643 and init_registers_s390_gs_linux64.
5644
5645 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5646
5647 * linux-s390-low.c (s390_fill_gs): Remove function.
5648 (s390_fill_gsbc): Remove function.
5649 (s390_regsets): Set fill functions for the guarded storage regsets
5650 to NULL.
5651
5652 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5653
5654 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5655 the word size. Add comment.
5656 (s390_get_wordsize): New function.
5657 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5658 pswm with it. Instead, use s390_get_wordsize to determine the
5659 word size first and derive the correct tdesc from that directly.
5660
5661 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5662
5663 * Makefile.in: Include silent-rules.mk.
5664 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5665 (COMPILE): Add ECHO_CXX.
5666 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5667 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5668 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5669 (version-generated.c): Add ECHO_GEN.
5670 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5671 (IPAGENT_COMPILE): Add ECHO_CXX.
5672 (%-generated.c): Add ECHO_REGDAT.
5673
5674 2018-03-14 Tom Tromey <tom@tromey.com>
5675
5676 PR cli/14977:
5677 * ax.c (ax_printf): Special case for NULL.
5678
5679 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5680
5681 * linux-low.c (linux_qxfer_libraries_svr4): Use
5682 xml_escape_text_append.
5683
5684 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5685
5686 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5687
5688 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5689
5690 * server.c (handle_general_set): Remove unnecessary xstrdup.
5691
5692 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5693
5694 * server.c (parse_debug_format_options): Adjust to
5695 delim_string_to_char_ptr_vec changes.
5696 * thread-db.c (thread_db_load_search): Adjust to
5697 dirnames_to_char_ptr_vec changes.
5698
5699 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5700
5701 * target.h (target_enable_btrace, target_disable_btrace)
5702 (target_read_btrace, target_read_btrace_conf): Turn macro into
5703 inline function. Throw error if target method is not defined.
5704 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5705 check for btrace target method. Be prepared to handle exceptions
5706 from btrace target methods.
5707
5708 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5709
5710 * server.c (captured_main): Change order of error message printed
5711 when the current working directory cannot be found.
5712
5713 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5714
5715 * server.c: Include "filenames.h" and "pathstuff.h".
5716 (program_name): Delete variable.
5717 (program_path): New anonymous class.
5718 (get_exec_wrapper): Use "program_path" instead of
5719 "program_name".
5720 (handle_v_run): Likewise.
5721 (captured_main): Likewise.
5722 (process_serial_event): Likewise.
5723
5724 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5725
5726 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5727 (OBJS): Add "pathstuff.o".
5728 * server.c (current_directory): New global variable.
5729 (captured_main): Initialize "current_directory".
5730
5731 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5732
5733 * tdesc.c: Use common/tdesc.h.
5734 * tdesc.h: Likewise.
5735
5736 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5737 Simon Marchi <simon.marchi@ericsson.com>
5738
5739 * Makefile.in: Switch order of make rules.
5740
5741 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5742
5743 * Makefile.in: Add common directory in build.
5744 * configure.ac: Add common reference.
5745 * configure: Regenerate.
5746
5747 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5748
5749 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5750 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5751 * spu-low.c (spu_target_ops): Likewise.
5752 * win32-low.c (win32_target_ops): Likewise.
5753 * server.c (supported_btrace_packets): Report packets unconditionally.
5754 * target.h (target_ops) <supports_btrace>: Remove.
5755 (target_supports_btrace): Remove.
5756
5757 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5758
5759 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5760 (handle_btrace_disable): Change return type to void. Use exceptions
5761 to report errors.
5762 (handle_btrace_general_set): Catch exception and copy message to
5763 return message.
5764
5765 2018-02-08 Tom Tromey <tom@tromey.com>
5766
5767 * linux-low.c (install_software_single_step_breakpoints): Use
5768 make_scoped_restore.
5769 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5770 (do_restore_current_thread_cleanup): Remove.
5771 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5772 declare.
5773
5774 2018-02-08 Tom Tromey <tom@tromey.com>
5775
5776 * mem-break.c (set_raw_breakpoint_at): Use
5777 gdb::unique_xmalloc_ptr.
5778
5779 2018-01-30 Pedro Alves <palves@redhat.com>
5780
5781 PR gdb/13211
5782 * target.c (target_terminal::terminal_state): Rename to ...
5783 (target_terminal::m_terminal_state): ... this.
5784
5785 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5786
5787 * linux-low.c (handle_extended_wait): Surround call to
5788 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5789
5790 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5791
5792 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5793 linux_ptrace_attach_fail_reason_string now returning an
5794 std::string.
5795 (linux_attach): Likewise.
5796 * thread-db.c (attach_thread): Likewise.
5797
5798 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5799
5800 PR gdb/21559
5801 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5802 checking for fs_base/gs_base fields in struct user_regs_struct.
5803 * configure: Regenerate.
5804
5805 2018-01-16 Yao Qi <yao.qi@linaro.org>
5806
5807 PR gdb/18749
5808 * linux-low.c (fetch_register): Call supply_register instead of
5809 error.
5810
5811 2018-01-08 Yao Qi <yao.qi@linaro.org>
5812 Simon Marchi <simon.marchi@ericsson.com>
5813
5814 * Makefile.in (OBS): Remove selftest.o.
5815 * configure.ac: Set srv_selftest_objs if $development is true.
5816 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5817 * configure: Re-generated.
5818 * server.c (captured_main): Wrap variable selftest_filter with
5819 GDB_SELF_TEST.
5820
5821 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5822
5823 * server.c (parse_debug_format_options): Return std::string.
5824 (handle_monitor_command, captured_main): Adjust.
5825
5826 2018-01-05 Pedro Alves <palves@redhat.com>
5827
5828 PR gdb/18653
5829 * server.c (captured_main): Pass quiet=false to
5830 save_original_signals_state.
5831
5832 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5833
5834 * gdbreplay.c (gdbreplay_version): Update copyright year in
5835 version message.
5836 * server.c (gdbserver_version): Likewise.
5837
5838 2017-12-08 Tom Tromey <tom@tromey.com>
5839
5840 * ax.c (ax_printf): Update.
5841
5842 2017-12-07 Yao Qi <yao.qi@linaro.org>
5843
5844 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5845 aarch64_linux_read_description.
5846 * linux-amd64-ipa.c (idx2mask): New array.
5847 (get_ipa_tdesc): Move idx2mask out.
5848 (initialize_low_tracepoint): Initialize target descriptions.
5849 * linux-i386-ipa.c (idx2mask): New array.
5850 (get_ipa_tdesc): Move idx2mask out.
5851 (initialize_low_tracepoint): Initialize target descriptions.
5852
5853 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5854
5855 * tdesc.c (struct tdesc_type): Change return type.
5856 (tdesc_add_flag): Change parameter type.
5857 (tdesc_add_bitfield): Likewise.
5858 (tdesc_add_field): Likewise.
5859 (tdesc_set_struct_size): Likewise.
5860
5861 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5862
5863 * regcache.c (registers_to_string): Remove unused variable.
5864
5865 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5866
5867 * inferiors.c (for_each_inferior_with_data): Remove.
5868 * inferiors.h (for_each_inferior_with_data): Remove.
5869 * server.c (handle_qxfer_threads_worker): Change parameter type.
5870 (handle_qxfer_threads_proper): Use for_each_thread.
5871
5872 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5873
5874 * inferiors.c (for_each_inferior): Remove.
5875 (clear_inferiors): Use for_each_thread.
5876 * inferiors.h (for_each_inferior): Remove.
5877 * linux-low.c (linux_wait_for_event_filtered): Use
5878 for_each_thread.
5879 (linux_stabilize_threads): Likewise.
5880 * regcache.c (regcache_release): Likewise.
5881 * server.c (gdb_wants_all_threads_stopped): Likewise.
5882 (clear_pending_status_callback): Remove.
5883 (handle_status): Use for_each_thread.
5884 (captured_main): Likewise.
5885 * win32-low.c (child_init_thread_list): Likewise.
5886 (win32_clear_inferiors): Likewise.
5887 (fake_breakpoint_event): Likewise.
5888
5889 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5890
5891 * inferiors.h (find_inferior): Remove.
5892 * inferiors.c (find_inferior): Remove.
5893
5894 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5895
5896 * linux-low.c (resume_status_pending_p): Update comment.
5897 (need_step_over_p): Update comment.
5898
5899 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5900
5901 * linux-low.c (proceed_one_lwp): Return void, change parameter
5902 type.
5903 (unsuspend_and_proceed_one_lwp): Likewise.
5904 (proceed_all_lwps): Use for_each_thread.
5905 (unstop_all_lwps): Likewise.
5906
5907 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5908
5909 * linux-low.c (linux_resume_one_thread): Return void, take
5910 parameter directly.
5911 (linux_resume): Use for_each_thread.
5912
5913 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5914
5915 * linux-low.c (send_sigstop_callback): Return void, change
5916 parameter type. Rename to...
5917 (send_sigstop): ... this.
5918 (suspend_and_send_sigstop_callback): Return void, change parameter
5919 type. Rename to...
5920 (suspend_and_send_sigstop): ... this.
5921 (stop_all_lwps): Use for_each_thread.
5922
5923 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5924
5925 * linux-low.c (lwp_running): Return bool, remove unused
5926 argument.
5927 (linux_stabilize_threads): Use find_thread.
5928
5929 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5930
5931 * linux-low.c (select_singlestep_lwp_callback): Remove.
5932 (count_events_callback): Remove.
5933 (select_event_lwp_callback): Remove.
5934 (select_event_lwp): Use find_thread/for_each_thread.
5935
5936 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5937
5938 * linux-low.c (not_stopped_callback): Return bool, take filter
5939 argument directly.
5940 (linux_wait_for_event_filtered): Use find_thread.
5941 (linux_wait_1): Likewise.
5942
5943 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5944
5945 * linux-low.c (same_lwp): Remove.
5946 (find_lwp_pid): Use find_thread.
5947
5948 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5949
5950 * linux-low.c (delete_lwp_callback): Remove.
5951 (linux_mourn): Use for_each_thread.
5952
5953 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5954
5955 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5956 args parameter, don't check for pid.
5957 (linux_detach): Use for_each_thread.
5958
5959 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5960
5961 * linux-low.c (struct counter): Remove.
5962 (second_thread_of_pid_p): Remove.
5963 (last_thread_of_process_p): Use find_thread.
5964
5965 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5966
5967 * inferiors.c (find_inferior_in_random): Remove.
5968 * inferiors.h (find_inferior_in_random): Remove.
5969 * linux-low.c (status_pending_p_callback): Return bool, accept
5970 parameter ptid directly.
5971 (linux_wait_for_event_filtered): Use find_thread_in_random.
5972 (linux_wait_1): Likewise.
5973
5974 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5975
5976 * inferiors.c (find_inferior_id): Remove.
5977 (find_thread_ptid): Move implemention from find_inferior_id to
5978 here.
5979 * inferiors.h (find_inferior_id): Remove.
5980 * server.c (handle_status): Use find_thread_ptid.
5981 (process_serial_event): Likewise.
5982 * thread-db.c (find_one_thread): Likewise.
5983 (thread_db_thread_handle): Likewise.
5984 * win32-low.c (thread_rec): Likewise.
5985 (child_delete_thread): Likewise.
5986 (win32_thread_alive): Likewise.
5987 (get_child_debug_event): Likewise.
5988
5989 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5990
5991 * linux-mips-low.c (update_watch_registers_callback): Return
5992 void, remove pid_p parameter, don't check for pid.
5993 (mips_insert_point, mips_remove_point): Use for_each_thread.
5994
5995 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5996
5997 * lynx.low (lynx_delete_thread_callback): Remove.
5998 (lynx_mourn): Use for_each_thread.
5999
6000 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6001
6002 * regcache.c (regcache_invalidate_one): Remove.
6003 (regcache_invalidate_pid): use for_each_thread.
6004
6005 2017-11-26 Tom Tromey <tom@tromey.com>
6006
6007 * linux-low.c (linux_create_inferior): Update.
6008
6009 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6010
6011 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6012
6013 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6014
6015 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6016 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6017 * linux-aarch64-tdesc-selftest.c: New file.
6018 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6019
6020 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6021
6022 * configure.srv: Add new file.
6023 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6024 * linux-aarch64-tdesc-selftest.c: New file.
6025 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6026
6027 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6028
6029 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6030 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6031 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6032
6033 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6034
6035 * configure.srv: Add new files.
6036 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6037 aarch64_linux_read_description.
6038 * linux-aarch64-low.c (aarch64_linux_read_description):
6039 Merge with aarch64_arch_setup.
6040 (aarch64_arch_setup): Call aarch64_linux_read_description.
6041 * linux-aarch64-tdesc.c: New file.
6042 * linux-aarch64-tdesc.h: New file.
6043
6044 2017-11-24 Yao Qi <yao.qi@linaro.org>
6045
6046 * configure.srv: Set $srv_regobj for tic6x-linux.
6047 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6048 (tic6x_read_description): Move some code to tic6x_arch_setup.
6049 (tic6x_tdesc_test): New function.
6050 (initialize_low_arch): Call selftests::register_test.
6051
6052 2017-11-22 Yao Qi <yao.qi@linaro.org>
6053
6054 * remote-utils.c (prepare_resume_reply): Use memcpy.
6055
6056 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6057
6058 * linux-low.c (kill_one_lwp_callback): Return void, take
6059 argument directly, don't filter on pid.
6060 (linux_kill): Use for_each_thread.
6061
6062 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6063
6064 * linux-low.c (need_step_over_p): Return bool, remove dummy
6065 argument.
6066 (linux_resume, proceed_all_lwps): Use find_thread.
6067
6068 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6069
6070 * linux-low.c (resume_status_pending_p): Return bool, remove
6071 flag_p argument.
6072 (linux_resume): Use find_thread.
6073
6074 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6075
6076 * linux-low.c (struct thread_resume_array): Remove.
6077 (linux_set_resume_request): Return void, take arguments
6078 directly.
6079 (linux_resume): Use for_each_thread.
6080
6081 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6082
6083 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6084 return bool, remove data argument.
6085 (linux_stabilize_threads): Use find_thread.
6086
6087 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6088
6089 * linux-low.c (unsuspend_one_lwp): Remove.
6090 (unsuspend_all_lwps): Use for_each_thread, inline code from
6091 unsuspend_one_lwp.
6092
6093 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6094
6095 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6096 * linux-low.c (struct iterate_over_lwps_args): Remove.
6097 (iterate_over_lwps_filter): Remove.
6098 (iterate_over_lwps): Use find_thread.
6099
6100 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6101
6102 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6103 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6104 code from reset_lwp_ptrace_options_callback.
6105
6106 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6107
6108 * linux-arm-low.c (struct update_registers_data): Remove.
6109 (update_registers_callback): Return void, take arguments
6110 directly, don't check thread's pid.
6111 (arm_insert_point, arm_remove_point): Use for_each_thread.
6112
6113 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6114
6115 * win32-low.c (continue_one_thread): Return void, take argument
6116 directly.
6117 (child_continue): Use for_each_thread.
6118
6119 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6120
6121 * win32-i386-low.c (update_debug_registers_callback): Rename
6122 to ...
6123 (update_debug_registers): ... this, return void, remove pid_p arg.
6124 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6125
6126 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6127
6128 * inferiors.h (struct process_info): Add constructor, initialize
6129 fields..
6130 <syscalls_to_catch>: Change type to std::vector<int>.
6131 * inferiors.c (add_process): Allocate process_info with new.
6132 (remove_process): Free process_info with delete.
6133 * linux-low.c (handle_extended_wait): Adjust.
6134 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6135 * server.c (handle_general_set): Adjust.
6136
6137 2017-11-16 Pedro Alves <palves@redhat.com>
6138
6139 * remote-utils.c (remote_close): Block SIGIO signals instead of
6140 uninstalling the SIGIO handler.
6141
6142 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6143
6144 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6145
6146 2017-11-16 Yao Qi <yao.qi@linaro.org>
6147
6148 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6149 (tic6x_store_gregset): Likewise.
6150 (tic6x_usrregs_info): Move it up.
6151
6152 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6153
6154 * Makefile.in: Update arch rules.
6155 * configure.srv: Explicitly mark arch/ files.
6156
6157 2017-11-13 Andreas Schwab <schwab@suse.de>
6158
6159 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6160 function.
6161 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6162
6163 2017-11-06 Pedro Alves <palves@redhat.com>
6164
6165 * config.in, configure: Regenerate.
6166
6167 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6168
6169 * target.c (struct thread_search): Remove.
6170 (thread_search_callback): Remove.
6171 (prepare_to_access_memory): Use for_each_thread instead of
6172 find_inferior. Inline code from thread_search_callback.
6173
6174 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6175
6176 * server.c (struct visit_actioned_threads_data): Remove.
6177 (visit_actioned_threads): Change prototype to take arguments
6178 directly.
6179 (resume): Use find_thread instead of find_inferior.
6180
6181 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6182
6183 * server.c (queue_stop_reply_callback): Change prototype, return
6184 void.
6185 (find_status_pending_thread_callback): Remove.
6186 (handle_status): Replace find_inferior with find_thread and
6187 for_each_thread.
6188
6189 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6190
6191 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6192 with REGNO.
6193 (aarch64_store_gregset): Likewise.
6194 (aarch64_fill_fpregset): Likewise.
6195 (aarch64_store_fpregset): Likewise.
6196
6197 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6198
6199 * gdbthread.h (find_thread, for_each_thread): New functions.
6200 * inferiors.c (thread_of_pid): Remove.
6201 (find_any_thread_of_pid): Use find_thread.
6202 * linux-low.c (num_lwps): Use for_each_thread.
6203
6204 2017-10-17 Yao Qi <yao.qi@linaro.org>
6205
6206 * Makefile.in: Remove one rule.
6207 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6208
6209 2017-10-17 Yao Qi <yao.qi@linaro.org>
6210
6211 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6212 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6213
6214 2017-10-17 Yao Qi <yao.qi@linaro.org>
6215
6216 * configure.srv: Rename arm.o with arch/arm.o.
6217
6218 2017-10-17 Yao Qi <yao.qi@linaro.org>
6219
6220 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6221 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6222 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6223 (arch-i386.o, arch-amd64.o): Remove rules.
6224 (arch/%.o): New rule.
6225 Update POSTCOMPILE and COMPILE.pre.
6226 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6227 * configure: Re-generated.
6228 * configure.srv: Replace arch-i386.o with arch/i386.o.
6229 Replace arch-amd64.o with arch/amd64.o.
6230
6231 2017-10-16 Yao Qi <yao.qi@linaro.org>
6232
6233 * configure: Regenerated.
6234
6235 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6236
6237 * inferiors.h: (struct inferior_list): Remove.
6238 (struct inferior_list_entry); Remove.
6239 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6240 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6241 get_first_inferior): Remove.
6242 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6243 find_inferior_id, find_inferior_in_random): Change signature.
6244 * inferiors.c (all_threads): Change type to
6245 std::list<thread_info *>.
6246 (get_thread): Remove macro.
6247 (find_inferior, find_inferior_id): Change signature, implement
6248 using find_thread.
6249 (find_inferior_in_random): Change signature, implement using
6250 find_thread_in_random.
6251 (for_each_inferior, for_each_inferior_with_data): Change
6252 signature, implement using for_each_thread.
6253 (add_inferior_to_list, remove_inferior): Remove.
6254 (add_thread, get_first_thread, thread_of_pid,
6255 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6256 (get_first_inferior, one_inferior_p, clear_inferior_list):
6257 Remove.
6258 (clear_inferiors, get_thread_process): Update.
6259 * gdbthread.h: Include <list>.
6260 (struct thread_info) <entry>: Remove field.
6261 <id>: New field.
6262 (all_threads): Change type to std::list<thread_info *>.
6263 (get_first_inferior): Add doc.
6264 (find_thread, for_each_thread, find_thread_in_random): New
6265 functions.
6266 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6267 * linux-arm-low.c (update_registers_callback): Update.
6268 * linux-low.c (second_thread_of_pid_p): Update.
6269 (kill_one_lwp_callback, linux_detach_lwp_callback,
6270 delete_lwp_callback, status_pending_p_callback, same_lwp,
6271 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6272 iterate_over_lwps, not_stopped_callback,
6273 resume_stopped_resumed_lwps, count_events_callback,
6274 select_singlestep_lwp_callback, select_event_lwp_callback,
6275 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6276 suspend_and_send_sigstop_callback, wait_for_sigstop,
6277 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6278 lwp_running, linux_set_resume_request, resume_status_pending_p,
6279 need_step_over_p, start_step_over, linux_resume_one_thread,
6280 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6281 reset_lwp_ptrace_options_callback): Update.
6282 * linux-mips-low.c (update_watch_registers_callback): Update.
6283 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6284 Update.
6285 (free_register_cache_thread_one): Remove.
6286 (regcache_release): Update.
6287 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6288 handle_qxfer_threads_worker): Update.
6289 (handle_query): Update, use list iterator.
6290 (visit_actioned_threads, handle_pending_status,
6291 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6292 clear_pending_status_callback, set_pending_status_callback,
6293 find_status_pending_thread_callback, handle_status,
6294 process_serial_event): Update.
6295 * target.c (thread_search_callback): Update.
6296 * thread-db.c (thread_db_get_tls_address): Update.
6297 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6298 Update.
6299 * win32-i386-low.c (update_debug_registers_callback): Update.
6300 * win32-low.c (delete_thread_info, child_delete_thread,
6301 continue_one_thread, suspend_one_thread,
6302 get_child_debug_event): Adjust.
6303
6304 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6305
6306 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6307 * inferiors.h: Include <list>.
6308 (struct process_info) <entry>: Remove field.
6309 <pid>: New field.
6310 (pid_of): Change macro to function.
6311 (ptid_of, lwpid_of): Remove macro.
6312 (all_processes): Change type to std::list<process_info *>.
6313 (ALL_PROCESSES): Remove macro.
6314 (for_each_process, find_process): New function.
6315 * inferiors.c (all_processes): Change type to
6316 std::list<process_info *>.
6317 (find_thread_process): Adjust.
6318 (add_process): Likewise.
6319 (remove_process): Likewise.
6320 (find_process_pid): Likewise.
6321 (get_first_process): Likewise.
6322 (started_inferior_callback): Remove.
6323 (have_started_inferiors_p): Adjust.
6324 (attached_inferior_callback): Remove.
6325 (have_attached_inferiors_p): Adjust.
6326 * linux-low.c (check_zombie_leaders): Likewise.
6327 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6328 (x86_linux_update_xmltarget): Adjust.
6329 * server.c (handle_query): Likewise.
6330 (gdb_reattached_process): Remove.
6331 (handle_status): Adjust.
6332 (kill_inferior_callback): Likewise.
6333 (detach_or_kill_inferior): Remove.
6334 (print_started_pid): Likewise.
6335 (print_attached_pid): Likewise.
6336 (detach_or_kill_for_exit): Update.
6337 (process_serial_event): Likewise.
6338 * linux-arm-low.c (arm_new_fork): Likewise.
6339
6340 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6341
6342 * dll.h: Include <list>.
6343 (struct dll_info): Add constructor.
6344 <entry>: Remove field.
6345 (all_dlls): Change type to std::list<dll_info>.
6346 * dll.c: Include <algorithm>.
6347 (get_dll): Remove macro.
6348 (all_dlls): Change type to std::list<dll_info *>.
6349 (free_one_dll): Remove.
6350 (match_dll): Likewise.
6351 (loaded_dll): Adjust.
6352 (unloaded_dll): Adjust to all_dlls type change, use
6353 std::find_if. Inline code from match_dll.
6354 (clear_dlls): Adjust to all_dlls type change.
6355 * server.c (emit_dll_description): Remove.
6356 (handle_qxfer_libraries): Adjust to all_dlls type change,
6357 integrate emit_dll_description's functionality.
6358
6359 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6360
6361 * linux-low.h (struct linux_target_ops) <delete_process>: New
6362 field.
6363 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6364 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6365 (struct linux_target_ops): Add delete_process callback.
6366 * linux-arm-low.c (arm_delete_process): New.
6367 (struct linux_target_ops): Add delete_process callback.
6368 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6369 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6370 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6371 * linux-mips-low.c (mips_linux_delete_process): New.
6372 (struct linux_target_ops): Add delete_process callback.
6373 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6374 * linux-s390-low.c (struct linux_target_ops): Likewise.
6375 * linux-sh-low.c (struct linux_target_ops): Likewise.
6376 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6377 * linux-tile-low.c (struct linux_target_ops): Likewise.
6378 * linux-x86-low.c (x86_linux_delete_process): New.
6379 (struct linux_target_ops): Add delete_process callback.
6380 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6381
6382 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6383
6384 * linux-aarch64-low.c (the_low_target): Add thread delete
6385 callback.
6386 * linux-arm-low.c (arm_delete_thread): New function.
6387 (the_low_target): Add thread delete callback.
6388 * linux-bfin-low.c (the_low_target): Likewise.
6389 * linux-crisv32-low.c (the_low_target): Likewise.
6390 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6391 set.
6392 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6393 field.
6394 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6395 * linux-mips-low.c (mips_linux_delete_thread): New function.
6396 (the_low_target): Add thread delete callback.
6397 * linux-ppc-low.c (the_low_target): Likewise.
6398 * linux-s390-low.c (the_low_target): Likewise.
6399 * linux-sh-low.c (the_low_target): Likewise.
6400 * linux-tic6x-low.c (the_low_target): Likewise.
6401 * linux-tile-low.c (the_low_target): Likewise.
6402 * linux-x86-low.c (the_low_target): Likewise.
6403 * linux-xtensa-low.c (the_low_target): Likewise.
6404
6405 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6406
6407 * win32-low.c: Include "common-inferior.h".
6408
6409 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6410
6411 * inferiors.c (set_inferior_cwd): New function.
6412 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6413 (handle_query): Inform that QSetWorkingDir is supported.
6414 * win32-low.c (create_process): Pass the inferior's cwd to
6415 CreateProcess.
6416
6417 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6418
6419 * inferiors.c (current_inferior_cwd): New global variable.
6420 (get_inferior_cwd): New function.
6421 * inferiors.h (struct process_info) <cwd>: New field.
6422
6423 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6424
6425 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6426 (OBS): Add gdb_tilde_expand.o.
6427
6428 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6429
6430 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6431 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6432
6433 2017-09-29 Pedro Alves <palves@redhat.com>
6434
6435 * ax.c (gdb_parse_agent_expr): Constify.
6436 * ax.h (gdb_parse_agent_expr): Constify.
6437 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6438 Constify.
6439 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6440 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6441 * remote-utils.h (read_ptid): Constify.
6442 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6443 (process_point_options, process_serial_event): Constify.
6444 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6445 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6446 (cmd_qtbuffer): Constify.
6447
6448 2017-09-29 Pedro Alves <palves@redhat.com>
6449
6450 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6451 fails.
6452
6453 2017-09-29 Pedro Alves <palves@redhat.com>
6454
6455 * linux-low.c (handle_extended_wait): Pass parent thread instead
6456 of process to thread_db_notice_clone.
6457 * linux-low.h (thread_db_notice_clone): Replace parent process
6458 parameter with parent thread parameter.
6459 * thread-db.c (find_one_thread): Add comment.
6460 (thread_db_notice_clone): Replace parent process parameter with
6461 parent thread parameter. Temporarily switch to the parent thread.
6462
6463 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6464
6465 * gdbthread.h: Include "common-gdbthread.h".
6466 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6467 "if" when validating the ptid.
6468 * remote-utils.c: Include "gdbthread.h".
6469 (prepare_resume_reply): Use "switch_to_thread".
6470 * target.c (done_accessing_memory): Likewise.
6471
6472 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6473
6474 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6475 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6476 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6477 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6478 s390x-gs-linux64-ipa.o to ipa_obj.
6479 * linux-s390-low.c (HWCAP_S390_GS): New define.
6480 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6481 New functions.
6482 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6483 (s390_arch_setup): Check for guarded-storage support and choose
6484 appropriate tdesc.
6485 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6486 init_registers_s390x_gs_linux64.
6487 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6488 enum value.
6489 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6490 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6491
6492 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6493
6494 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6495
6496 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6497
6498 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6499 (thread_db_thread_handle): Declare.
6500 * linux-low.c (linux_target_ops): Initialize thread_handle.
6501 * server.c (handle_qxfer_threads_worker): Add support for
6502 "handle" attribute.
6503 * target.h (struct target_ops): Add new function pointer,
6504 thread_handle.
6505 (target_thread_handle): Define.
6506 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6507 field in lwp.
6508 (thread_db_thread_handle): New function.
6509
6510 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6511
6512 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6513 * linux-low.h (thread_db_notice_clone): Declare.
6514 * thread-db.c (thread_db_notice_clone): New function.
6515
6516 2017-09-21 Pedro Alves <palves@redhat.com>
6517
6518 * server.c (gdb_read_memory, handle_status, process_serial_event)
6519 (handle_serial_event, handle_target_event): Adjust to
6520 set_desired_thread prototype change.
6521 * target.c (set_desired_thread): Remove 'use_general' parameter
6522 and adjust.
6523 * target.h (set_desired_thread): Remove 'use_general' parameter.
6524
6525 2017-09-20 Tom Tromey <tom@tromey.com>
6526
6527 * target.c (target_terminal::terminal_state): Define.
6528 (target_terminal::init): Rename from target_terminal_init.
6529 (target_terminal::inferior): Rename from
6530 target_terminal_inferior.
6531 (target_terminal::ours): Rename from target_terminal_ours.
6532 (target_terminal::ours_for_output, target_terminal::info): New.
6533
6534 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6535
6536 * server.c (accumulate_file_name_length): Remove.
6537 (emit_dll_description): Adjust to std::string change.
6538 (handle_qxfer_libraries): Use std::string to hold document.
6539
6540 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6541
6542 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6543 return type of xml_escape_text.
6544 * server.c (emit_dll_description): Likewise.
6545
6546 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6547
6548 * server.c (captured_main): Accept argument for --selftest.
6549 Update run_tests call.
6550 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6551 when registering selftests.
6552
6553 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6554
6555 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6556 instead of "VEC" for "target_desc.reg_defs".
6557 (regcache_cpy): Likewise.
6558 (registers_to_string): Likewise.
6559 (registers_from_string): Likewise.
6560 (find_regno): Likewise.
6561 (supply_regblock): Likewise.
6562 (regcache_raw_read_unsigned): Likewise.
6563 * tdesc.c (init_target_desc): Likewise.
6564 (tdesc_create_reg): Likewise.
6565 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6566 (struct target_desc) <reg_defs>: Convert to "std::vector".
6567 (target_desc): Do not initialize "reg_defs".
6568 (~target_desc): Update code to use "std::vector" instead of "VEC"
6569 for "target_desc.reg_defs".
6570 (operator==): Likewise.
6571
6572 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6573
6574 * inferiors.h (thread_to_gdb_id): Remove.
6575 * inferiors.c (thread_to_gdb_id): Remove.
6576 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6577 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6578 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6579 Likewise.
6580 * nto-low.c (nto_fetch_registers, nto_store_registers,
6581 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6582
6583 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6584
6585 * inferiors.h (gdb_id_to_thread_id): Remove.
6586 * inferiors.c (gdb_id_to_thread_id): Remove.
6587 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6588 removal. Move pid declaration closer to where it's used.
6589
6590 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6591
6592 * server.c (handle_detach): New function.
6593 (process_serial_event): Move code out, call handle_detach.
6594
6595 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6596
6597 * server.c (require_running): Rename to ...
6598 (require_running_or_return): ... this ...
6599 (require_running_or_break): ... and this.
6600 (handle_query, process_serial_event): Adjust.
6601
6602 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6603
6604 * linux-low.c (linux_set_resume_request): Remove unused
6605 variables.
6606
6607 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6608
6609 * server.c (first_thread_of): Remove.
6610 (process_serial_event): Replace usage of first_thread_of with
6611 find_any_thread_of_pid.
6612 * tracepoint.c (same_process_p): Remove.
6613 (gdb_agent_about_to_close): Replace usage of same_process_p with
6614 find_any_thread_of_pid.
6615 * linux-x86-low.c (same_process_callback): Remove.
6616 (x86_arch_setup_process_callback): Replace usage of
6617 same_process_callback with find_any_thread_of_pid.
6618 * thread-db.c (any_thread_of): Remove.
6619 (switch_to_process): Replace usage of any_thread_of with
6620 find_any_thread_of_pid.
6621 * inferiors.c (thread_pid_matches_callback): Remove.
6622 (find_thread_process): Adjust to use find_any_thread_of_pid.
6623
6624 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6625
6626 * regcache.c (get_thread_regcache): Guard calls to "memset"
6627 with "!VEC_empty".
6628
6629 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6630
6631 * linux-low.c (handle_extended_wait): Use
6632 "allocate_target_description" instead of "XNEW".
6633 * linux-x86-low.c (initialize_low_arch): Likewise.
6634
6635 2017-09-05 Yao Qi <yao.qi@linaro.org>
6636
6637 * configure.srv (srv_i386_regobj): Remove.
6638 (srv_amd64_regobj): Remove.
6639 (srv_regobj): Set it to "" for x86 non-linux targets.
6640 * linux-x86-tdesc.c (i386_linux_read_description):
6641 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6642 (init_registers_i386): Remove the declaration.
6643 (tdesc_i386): Remove the declaration.
6644 (lynx_i386_arch_setup): Call i386_create_target_description.
6645 * nto-x86-low.c: Likewise.
6646 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6647 [!__x86_64__]: include arch/i386.h.
6648 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6649
6650 2017-09-05 Yao Qi <yao.qi@linaro.org>
6651
6652 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6653 i386/amd64-XXX-linux from it.
6654
6655 2017-09-05 Yao Qi <yao.qi@linaro.org>
6656
6657 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6658 false.
6659 (ipa_amd64_linux_regobj): Remove.
6660 (ipa_x32_linux_regobj): Remove.
6661
6662 2017-09-05 Yao Qi <yao.qi@linaro.org>
6663
6664 * Makefile.in (arch-amd64.o): New rule.
6665 * configure.srv: Append arch-amd64.o.
6666 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6667 (get_ipa_tdesc): Call amd64_linux_read_description.
6668 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6669 and init_registers_amd64_XXX.
6670 * linux-x86-low.c (x86_linux_read_description): Call
6671 amd64_linux_read_description.
6672 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6673 (initialize_low_arch): Don't call init_registers_x32_XXX and
6674 init_registers_amd64_XXX.
6675 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6676 and tdesc_amd64_XXX.
6677 [__x86_64__] (amd64_tdesc_test): New function.
6678 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6679 and init_registers_amd64_XXX.
6680 * linux-x86-tdesc.c: Include arch/amd64.h.
6681 (xcr0_to_tdesc_idx): New function.
6682 (i386_linux_read_description): New function.
6683 (amd64_get_ipa_tdesc_idx): New function.
6684 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6685 (amd64_get_ipa_tdesc): Declare.
6686
6687 2017-09-05 Yao Qi <yao.qi@linaro.org>
6688
6689 * configure.srv (srv_i386_linux_xmlfiles): Remove
6690 i386/i386-XXX-linux.xml from it.
6691
6692 2017-09-05 Yao Qi <yao.qi@linaro.org>
6693
6694 * configure.srv: Set srv_i386_linux_regobj empty if $development
6695 is false.
6696 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6697 initialize_low_tdesc.
6698 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6699 with #if initialize_low_tdesc.
6700 * linux-x86-tdesc-selftest.c: New file.
6701 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6702
6703 2017-09-05 Yao Qi <yao.qi@linaro.org>
6704
6705 * Makefile.in (arch-i386.o): New rule.
6706 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6707 (x86_64-*-linux*): Likewise.
6708 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6709 include arch/i386.h.
6710 (i386_linux_read_description): Remove code and call
6711 i386_create_target_description.
6712 * tdesc.c (allocate_target_description): New function.
6713 * tdesc.h (set_tdesc_architecture): Remove declaration.
6714 (set_tdesc_osabi): Likewise.
6715
6716 2017-09-05 Yao Qi <yao.qi@linaro.org>
6717
6718 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6719 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6720 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6721 .xmltarget.
6722 * server.c (get_features_xml): Call tdesc_get_features_xml.
6723 * tdesc.c (set_tdesc_architecture): New function.
6724 (set_tdesc_osabi): New function.
6725 (tdesc_get_features_xml): New function.
6726 (tdesc_create_feature): Add an argument.
6727 * tdesc.h (struct target_desc) <features>: New field.
6728 <arch, osabi>: New field.
6729 (~target_desc): xfree features, arch, and osabi.
6730 (target_desc::oerator==): Don't compare .xmltarget.
6731 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6732 (set_tdesc_osabi): Likewise.
6733 (tdesc_get_features_xml): Likewise.
6734
6735 2017-09-05 Yao Qi <yao.qi@linaro.org>
6736
6737 * linux-x86-tdesc.c: Include selftest.h.
6738 (i386_tdesc_test): New function.
6739 (initialize_low_tdesc): Call selftests::register_test.
6740 * tdesc.h: Include regdef.h.
6741 (target_desc): Override operator == and !=.
6742
6743 2017-09-05 Yao Qi <yao.qi@linaro.org>
6744
6745 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6746 (ipa_obj): Likewise.
6747 * linux-i386-ipa.c: Include common/x86-xstate.h
6748 (get_ipa_tdesc): Call i386_linux_read_description.
6749 (initialize_low_tracepoint): Don't call init_registers_XXX
6750 functions, call initialize_low_tdesc instead.
6751 * linux-x86-low.c (x86_linux_read_description): Call
6752 i386_linux_read_description.
6753 (initialize_low_arch): Don't call init_registers_i386_XXX
6754 functions, call initialize_low_tdesc.
6755 * linux-x86-tdesc.c: New file.
6756 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6757 (i386_get_ipa_tdesc_idx): Declare.
6758 (i386_get_ipa_tdesc): Declare.
6759 (initialize_low_tdesc): Declare.
6760
6761 2017-09-05 Yao Qi <yao.qi@linaro.org>
6762
6763 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6764 instead of 0.
6765
6766 2017-09-05 Yao Qi <yao.qi@linaro.org>
6767
6768 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6769 * regcache.c (get_thread_regcache): Use VEC_length.
6770 (init_register_cache): Likewise.
6771 (regcache_cpy): Likewise.
6772 (registers_to_string): Iterate reg_defs via VEC_iterate.
6773 (find_regno): Likewise.
6774 (find_register_by_number): Use VEC_index.
6775 (register_size): Call find_register_by_number.
6776 (register_data): Call find_register_by_number.
6777 (supply_regblock): Use VEC_length.
6778 (regcache_raw_read_unsigned): Likewise.
6779 * tdesc.c (init_target_desc): Iterate reg_defs via
6780 VEC_iterate.
6781 (default_description): Update initializer.
6782 (copy_target_description): Don't update field num_registers.
6783 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6784 <num_registers>: Remove.
6785
6786 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6787
6788 * Makefile.in (.SECONDARY): Define target.
6789
6790 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6791
6792 * linux-low.c (linux_wait_1): Adjust.
6793 * server.c (queue_stop_reply_callback): Adjust.
6794
6795 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6796
6797 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6798 QEnvironmentUnset and QEnvironmentReset packets.
6799 (handle_query): Inform remote that QEnvironmentHexEncoded,
6800 QEnvironmentUnset and QEnvironmentReset are supported.
6801
6802 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6803
6804 * inferiors.h (inferior_target_data): Rename to ...
6805 (thread_target_data): ... this.
6806 (inferior_regcache_data): Rename to ...
6807 (thread_regcache_data): ... this.
6808 (set_inferior_regcache_data): Rename to ...
6809 (set_thread_regcache_data): ... this.
6810 * inferiors.c (inferior_target_data): Rename to ...
6811 (thread_target_data): ... this.
6812 (inferior_regcache_data): Rename to ...
6813 (thread_regcache_data): ... this.
6814 (set_inferior_regcache_data): Rename to ...
6815 (set_thread_regcache_data): ... this.
6816 (free_one_thread): Update.
6817 * linux-low.h (get_thread_lwp): Update.
6818 * regcache.c (get_thread_regcache): Update.
6819 (regcache_invalidate_thread): Update.
6820 (free_register_cache_thread): Update.
6821 * win32-i386-low.c (update_debug_registers_callback): Update.
6822 (win32_get_current_dr): Update.
6823 * win32-low.c (thread_rec): Update.
6824 (delete_thread_info): Update.
6825 (continue_one_thread): Update.
6826 (suspend_one_thread): Update.
6827
6828 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6829
6830 * inferiors.c (set_inferior_target_data): Remove.
6831 * inferiors.h (set_inferior_target_data): Remove.
6832
6833 2017-08-18 Yao Qi <yao.qi@linaro.org>
6834
6835 * Makefile.in (OBS): Add selftest.o.
6836 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6837 * configure, config.in: Re-generated.
6838 * server.c: Include common/sefltest.h.
6839 (captured_main): Handle option --selftest.
6840
6841 2017-08-09 Yao Qi <yao.qi@linaro.org>
6842
6843 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6844 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6845 i386-avx-mpx.o and i386-mmx.o.
6846 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6847 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6848 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6849 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6850 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6851 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6852 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6853 i386/amd64-avx-mpx.xml.
6854
6855 2017-08-09 Yao Qi <yao.qi@linaro.org>
6856
6857 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6858 and x32-avx-avx512.o.
6859 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6860 i386/x32-avx-avx512.xml.
6861
6862 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6863
6864 * tracepoint.h (enum class fast_tpoint_collect_result): New
6865 enumeration.
6866 (fast_tracepoint_collecting): Change return type to
6867 fast_tpoint_collect_result.
6868 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6869 * linux-low.h: Include tracepoint.h.
6870 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6871 fast_tpoint_collect_result.
6872 * linux-low.c (handle_tracepoints): Adjust.
6873 (linux_fast_tracepoint_collecting): Change return type to
6874 fast_tpoint_collect_result.
6875 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6876 linux_wait_1, stuck_in_jump_pad_callback,
6877 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6878 proceed_one_lwp): Adjust to type change.
6879
6880 2017-07-10 Yao Qi <yao.qi@linaro.org>
6881
6882 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6883
6884 2017-06-29 Yao Qi <yao.qi@linaro.org>
6885
6886 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6887 Remove.
6888 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6889
6890 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6891
6892 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6893
6894 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6895
6896 * linux-low.c (linux_create_inferior): Adjust code to access the
6897 environment information via 'gdb_environ' class.
6898 * lynx-low.c (lynx_create_inferior): Likewise.
6899 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6900 (get_environ): Return a pointer to 'our_environ'.
6901 (captured_main): Initialize 'our_environ'.
6902 * server.h (get_environ): Adjust prototype.
6903 * spu-low.c (spu_create_inferior): Adjust code to access the
6904 environment information via 'gdb_environ' class.
6905
6906 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6907
6908 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6909 usage of "register" keyword.
6910
6911 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6912
6913 * configure: Re-generate.
6914
6915 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6916
6917 * configure: Re-generate.
6918
6919 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6920
6921 * Makefile.in (COMPILE.pre): Add "-x c++".
6922
6923 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6924
6925 * fork-child.c: Conditionally include <signal.h>.
6926
6927 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6928
6929 * server.c (handle_general_set): Handle new packet
6930 "QStartupWithShell".
6931 (handle_query): Add "QStartupWithShell" to the list of supported
6932 packets.
6933 (gdbserver_usage): Add help text explaining the
6934 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6935 options.
6936 (captured_main): Recognize and act upon the presence of the new
6937 CLI options.
6938
6939 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6940 Pedro Alves <palves@redhat.com>
6941
6942 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6943 * configure: Regenerate.
6944 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6945 "fork-inferior.o".
6946 (i[34567]86-*-lynxos*): Likewise.
6947 (spu*-*-*): Likewise.
6948 * fork-child.c: New file.
6949 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6950 and "environ.h".
6951 (linux_ptrace_fun): New function.
6952 (linux_create_inferior): Adjust function prototype to reflect
6953 change on "target.h". Adjust function code to use
6954 "fork_inferior".
6955 (linux_request_interrupt): Delete "signal_pid".
6956 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6957 (lynx_ptrace_fun): New function.
6958 (lynx_create_inferior): Adjust function prototype to reflect
6959 change on "target.h". Adjust function code to use
6960 "fork_inferior".
6961 * nto-low.c (nto_create_inferior): Adjust function prototype and
6962 code to reflect change on "target.h". Update comments.
6963 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6964 "common-terminal.h" and "environ.h".
6965 (terminal_fd): Moved to fork-child.c.
6966 (old_foreground_pgrp): Likewise.
6967 (restore_old_foreground_pgrp): Likewise.
6968 (last_status): Make it global.
6969 (last_ptid): Likewise.
6970 (our_environ): New variable.
6971 (startup_with_shell): Likewise.
6972 (program_name): Likewise.
6973 (program_argv): Rename to...
6974 (program_args): ...this.
6975 (wrapper_argv): New variable.
6976 (start_inferior): Delete function.
6977 (get_exec_wrapper): New function.
6978 (get_exec_file): Likewise.
6979 (get_environ): Likewise.
6980 (prefork_hook): Likewise.
6981 (post_fork_inferior): Likewise.
6982 (postfork_hook): Likewise.
6983 (postfork_child_hook): Likewise.
6984 (handle_v_run): Update code to deal with arguments coming from the
6985 remote host. Update calls from "start_inferior" to
6986 "create_inferior".
6987 (captured_main): Likewise. Initialize environment variable. Call
6988 "have_job_control".
6989 * server.h (post_fork_inferior): New prototype.
6990 (get_environ): Likewise.
6991 (last_status): Declare.
6992 (last_ptid): Likewise.
6993 (signal_pid): Likewise.
6994 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6995 (spu_ptrace_fun): New function.
6996 (spu_create_inferior): Adjust function prototype to reflect change
6997 on "target.h". Adjust function code to use "fork_inferior".
6998 * target.c (target_terminal_init): New function.
6999 (target_terminal_inferior): Likewise.
7000 (target_terminal_ours): Likewise.
7001 * target.h: Include <vector>.
7002 (struct target_ops) <create_inferior>: Update prototype.
7003 (create_inferior): Update macro.
7004 * utils.c (gdb_flush_out_err): New function.
7005 * win32-low.c (win32_create_inferior): Adjust function prototype
7006 and code to reflect change on "target.h".
7007
7008 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7009
7010 * inferiors.c (switch_to_thread): New function.
7011
7012 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7013
7014 * Makefile.in (SFILE): Add "common/job-control.c".
7015 (OBS): Add "job-control.o".
7016
7017 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7018
7019 * Makefile: Remove "@host_makefile_frag@".
7020
7021 2017-05-05 Pedro Alves <palves@redhat.com>
7022
7023 * configure: Regenerate.
7024
7025 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7026
7027 * configure: Regenerate.
7028
7029 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7030
7031 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7032 software_single_step change of return type to
7033 std::vector<CORE_ADDR>.
7034 * linux-low.c (install_software_single_step_breakpoints):
7035 Likewise.
7036 * linux-low.h (install_software_single_step_breakpoints):
7037 Likewise.
7038
7039 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7040
7041 * remote-utils.c: Include "gdb_termios.h" instead of
7042 "terminal.h".
7043 * terminal.h: Delete file.
7044
7045 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7046
7047 * server.c: Include <vector>.
7048 <program_argv, wrapper_argv>: Convert to std::vector.
7049 (start_inferior): Rewrite function to use C++.
7050 (handle_v_run): Likewise. Update code that calculates the argv
7051 based on the vRun packet; use C++.
7052 (captured_main): Likewise.
7053
7054 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7055
7056 * server.c (handle_v_cont): Initialize thread_resume::thread
7057 with null_ptid.
7058
7059 2017-04-05 Pedro Alves <palves@redhat.com>
7060
7061 * configure: Regenerate.
7062
7063 2017-04-05 Pedro Alves <palves@redhat.com>
7064
7065 * gdbreplay.c (sync_error): Constify.
7066 * linux-x86-low.c (push_opcode): Constify.
7067
7068 2017-04-05 Pedro Alves <palves@redhat.com>
7069
7070 * win32-low.c (get_child_debug_event)
7071 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7072 Report TARGET_WAITKIND_SPURIOUS instead.
7073
7074 2017-04-05 Pedro Alves <palves@redhat.com>
7075
7076 * remote-utils.c (remote_prepare, remote_open): Constify.
7077 * remote-utils.h (remote_prepare, remote_open): Constify.
7078 * server.c (captured_main): Constify 'port' handling.
7079
7080 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7081
7082 * Makefile.in (clean): Clear .deps.
7083
7084 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7085
7086 * .gitignore: Remove generated files, replace with wildcard.
7087 * (clean): Replace removal of generated files with wildcard.
7088 (version.c): Replace with...
7089 (version-generated.c): ...this.
7090 (xml-builtin.c): Replace with...
7091 (xml-builtin-generated.c): ...this.
7092 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7093 (%.c: *regformats*): Replace with...
7094 (%-generated.c: *regformats*): ...this.
7095
7096 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7097
7098 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7099 (xtensa_fill_gregset): Call collect_register_by_name for
7100 threadptr register.
7101 (xtensa_store_gregset): Call supply_register_by_name for
7102 threadptr register.
7103
7104 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7105
7106 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7107 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7108 (xtensa_store_gregset): Call supply_register for all registers in
7109 a0_regnum..a0_regnum + C0_NREGS range.
7110
7111 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7112
7113 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7114 (ax-ipa.o: ax.c): Remove.
7115 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7116 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7117 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7118 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7119 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7120
7121 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7122
7123 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7124 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7125 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7126 (errors-ipa.o: ../common/errors.c): Remove.
7127 (format-ipa.o: ../common/format.c): Remove.
7128 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7129
7130 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7131
7132 * Makefile.in (%-ipa.o: %.c): New rule.
7133 (tracepoint-ipa.o: tracepoint.c): Remove.
7134 (utils-ipa.o: utils.c): Remove.
7135 (remote-utils-ipa.o: remote-utils.c): Remove.
7136 (regcache-ipa.o: regcache.c): Remove.
7137 (i386-linux-ipa.o: i386-linux.c): Remove.
7138 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7139 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7140 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7141 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7142 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7143 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7144 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7145 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7146 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7147 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7148 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7149 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7150 (aarch64-ipa.o: aarch64.c): Remove.
7151 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7152 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7153 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7154 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7155 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7156 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7157 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7158 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7159 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7160 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7161 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7162 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7163 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7164 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7165 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7166 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7167 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7168 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7169 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7170 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7171 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7172 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7173 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7174 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7175 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7176 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7177 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7178 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7179 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7180 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7181 (tdesc-ipa.o: tdesc.c): Remove.
7182 (x32-linux-ipa.o: x32-linux.c): Remove.
7183 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7184 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7185
7186 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7187
7188 * Makefile.in (%.o: ../arch/%.c): New rule.
7189 (arm.o: ../arch/arm.c): Remove.
7190 (arm-linux.o: ../arch/arm-linux.c): Remove.
7191 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7192 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7193
7194 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7195
7196 * Makefile.in (%.o: ../nat/%.c): New rule.
7197 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7198 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7199 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7200 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7201 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7202 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7203 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7204 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7205 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7206 (linux-personality.o: ../nat/linux-personality.c): Remove.
7207 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7208 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7209 (x86-linux.o: ../nat/x86-linux.c): Remove.
7210 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7211 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7212
7213 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7214
7215 * Makefile.in (%.o: ../common/%.c): New rule.
7216 (signals.o: ../common/signals.c): Remove.
7217 (print-utils.o: ../common/print-utils.c): Remove.
7218 (rsp-low.o: ../common/rsp-low.c): Remove.
7219 (common-utils.o: ../common/common-utils.c): Remove.
7220 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7221 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7222 (vec.o: ../common/vec.c): Remove.
7223 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7224 (xml-utils.o: ../common/xml-utils.c): Remove.
7225 (ptid.o: ../common/ptid.c): Remove.
7226 (buffer.o: ../common/buffer.c): Remove.
7227 (format.o: ../common/format.c): Remove.
7228 (filestuff.o: ../common/filestuff.c): Remove.
7229 (agent.o: ../common/agent.c): Remove.
7230 (errors.o: ../common/errors.c): Remove.
7231 (environ.o: ../common/environ.c): Remove.
7232 (common-debug.o: ../common/common-debug.c): Remove.
7233 (cleanups.o: ../common/cleanups.c): Remove.
7234 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7235 (fileio.o: ../common/fileio.c): Remove.
7236 (common-regcache.o: ../common/common-regcache.c): Remove.
7237 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7238 (new-op.o: ../common/new-op.c): Remove.
7239 (btrace-common.o: ../common/btrace-common.c): Remove.
7240
7241 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7242
7243 * Makefile.in (%.o: ../target/%.c): New rule.
7244 (waitstatus.o: ../target/waitstatus.c): Remove.
7245
7246 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7247
7248 * Makefile.in
7249 (%.c: ../regformats/%.dat,
7250 (%.c: ../regformats/arm/%.dat,
7251 (%.c: ../regformats/i386/%.dat,
7252 (%.c: ../regformats/rs6000/%.dat): New rules.
7253 (aarch64.c): Remove.
7254 (reg-arm.c): Remove.
7255 (arm-with-iwmmxt.c): Remove.
7256 (arm-with-vfpv2.c): Remove.
7257 (arm-with-vfpv3.c): Remove.
7258 (arm-with-neon.c): Remove.
7259 (reg-bfin.c): Remove.
7260 (reg-cris.c): Remove.
7261 (reg-crisv32.c): Remove.
7262 (i386.c): Remove.
7263 (i386-linux.c): Remove.
7264 (i386-avx.c): Remove.
7265 (i386-avx-linux.c): Remove.
7266 (i386-avx-avx512.c): Remove.
7267 (i386-avx-avx512-linux.c): Remove.
7268 (i386-mpx.c): Remove.
7269 (i386-mpx-linux.c): Remove.
7270 (i386-avx-mpx-avx512-pku.c): Remove.
7271 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7272 (i386-avx-mpx.c): Remove.
7273 (i386-avx-mpx-linux.c): Remove.
7274 (i386-mmx.c): Remove.
7275 (i386-mmx-linux.c): Remove.
7276 (reg-ia64.c): Remove.
7277 (reg-m32r.c): Remove.
7278 (reg-m68k.c): Remove.
7279 (reg-cf.c): Remove.
7280 (mips-linux.c): Remove.
7281 (mips-dsp-linux.c): Remove.
7282 (mips64-linux.c): Remove.
7283 (mips64-dsp-linux.c): Remove.
7284 (nios2-linux.c): Remove.
7285 (powerpc-32.c): Remove.
7286 (powerpc-32l.c): Remove.
7287 (powerpc-altivec32l.c): Remove.
7288 (powerpc-cell32l.c): Remove.
7289 (powerpc-vsx32l.c): Remove.
7290 (powerpc-isa205-32l.c): Remove.
7291 (powerpc-isa205-altivec32l.c): Remove.
7292 (powerpc-isa205-vsx32l.c): Remove.
7293 (powerpc-e500l.c): Remove.
7294 (powerpc-64l.c): Remove.
7295 (powerpc-altivec64l.c): Remove.
7296 (powerpc-cell64l.c): Remove.
7297 (powerpc-vsx64l.c): Remove.
7298 (powerpc-isa205-64l.c): Remove.
7299 (powerpc-isa205-altivec64l.c): Remove.
7300 (powerpc-isa205-vsx64l.c): Remove.
7301 (s390-linux32.c): Remove.
7302 (s390-linux32v1.c): Remove.
7303 (s390-linux32v2.c): Remove.
7304 (s390-linux64.c): Remove.
7305 (s390-linux64v1.c): Remove.
7306 (s390-linux64v2.c): Remove.
7307 (s390-te-linux64.c): Remove.
7308 (s390-vx-linux64.c): Remove.
7309 (s390-tevx-linux64.c): Remove.
7310 (s390x-linux64.c): Remove.
7311 (s390x-linux64v1.c): Remove.
7312 (s390x-linux64v2.c): Remove.
7313 (s390x-te-linux64.c): Remove.
7314 (s390x-vx-linux64.c): Remove.
7315 (s390x-tevx-linux64.c): Remove.
7316 (tic6x-c64xp-linux.c): Remove.
7317 (tic6x-c64x-linux.c): Remove.
7318 (tic6x-c62x-linux.c): Remove.
7319 (reg-sh.c): Remove.
7320 (reg-sparc64.c): Remove.
7321 (reg-spu.c): Remove.
7322 (amd64.c): Remove.
7323 (amd64-linux.c): Remove.
7324 (amd64-avx.c): Remove.
7325 (amd64-avx-linux.c): Remove.
7326 (amd64-avx-avx512.c): Remove.
7327 (amd64-avx-avx512-linux.c): Remove.
7328 (amd64-mpx.c): Remove.
7329 (amd64-mpx-linux.c): Remove.
7330 (amd64-avx-mpx-avx512-pku.c): Remove.
7331 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7332 (amd64-avx-mpx.c): Remove.
7333 (amd64-avx-mpx-linux.c): Remove.
7334 (x32.c): Remove.
7335 (x32-linux.c): Remove.
7336 (x32-avx.c): Remove.
7337 (x32-avx-linux.c): Remove.
7338 (x32-avx-avx512.c): Remove.
7339 (x32-avx-avx512-linux.c): Remove.
7340 (reg-xtensa.c): Remove.
7341 (reg-tilegx.c): Remove.
7342 (reg-tilegx32.c): Remove.
7343
7344 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7345
7346 * Makefile.in (SFILES): Add "common/environ.c".
7347 (OBJS): Add "common/environ.h".
7348
7349 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7350
7351 * configure.ac: Check if the fs_base and gs_base members of
7352 `struct user_regs_struct' exist.
7353 * config.in: Regenerated.
7354 * configure: Likewise.
7355
7356 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7357
7358 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7359 target_read_memory.
7360 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7361 (get_next_pcs_syscall_next_pc): Likewise.
7362
7363 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7364
7365 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7366 * nto-x86-low.c: Likewise.
7367
7368 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7369
7370 * Makefile.in: Include disable-implicit-rules.mk.
7371
7372 2016-11-23 Pedro Alves <palves@redhat.com>
7373
7374 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7375 (debug_vprintf): Use std::chrono::steady_clock instead of
7376 gettimeofday. Use '.' instead of ':'.
7377 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7378 (get_timestamp): Use std::chrono::steady_clock instead of
7379 gettimeofday.
7380
7381 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7382
7383 * Makefile.in: Fix whitespace formatting.
7384
7385 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7386
7387 * Makefile.in (SFILES, OBS): Flatten list and order
7388 alphabetically.
7389
7390 2016-11-23 Pedro Alves <palves@redhat.com>
7391
7392 * event-loop.c (handle_file_event): Use warning.
7393 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7394 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7395 Use warning.
7396
7397 2016-11-23 Pedro Alves <palves@redhat.com>
7398
7399 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7400 output.
7401 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7402 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7403 debug_printf and debug_flush for debug output.
7404 * server.c (handle_general_set): Likewise.
7405 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7406 output.
7407
7408 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7409
7410 * Makefile.in (.c.o): Replace rule with ...
7411 (%.o: %.c): ... this one.
7412
7413 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7414
7415 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7416 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7417 make.
7418 * configure.ac: Remove checks for the make program.
7419 * configure: Re-generate.
7420
7421 2016-10-28 Pedro Alves <palves@redhat.com>
7422
7423 * Makefile.in (CXX_DIALECT): Get from configure.
7424 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7425 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7426 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7427 * config.in: Regenerate.
7428 * configure: Regenerate.
7429
7430 2016-10-27 Yao Qi <yao.qi@linaro.org>
7431
7432 * linux-low.c (linux_supports_range_stepping): Return true if
7433 can_software_single_step return true.
7434
7435 2016-10-27 Yao Qi <yao.qi@linaro.org>
7436
7437 * inferiors.c (find_inferior_in_random): New function.
7438 * inferiors.h (find_inferior_in_random): Declare.
7439 * linux-low.c (linux_wait_for_event_filtered): Call
7440 find_inferior_in_random instead of find_inferior.
7441
7442 2016-10-27 Yao Qi <yao.qi@linaro.org>
7443
7444 * linux-low.c (linux_wait_1): If single-step breakpoints are
7445 inserted, remove them.
7446
7447 2016-10-26 Pedro Alves <palves@redhat.com>
7448
7449 * linux-low.c (handle_extended_wait): Link parent/child fork
7450 threads.
7451 (linux_wait_1): Unlink them.
7452 (linux_set_resume_request): Ignore resume requests for
7453 already-resumed and unhandled fork child threads.
7454 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7455 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7456 New functions.
7457 (handle_v_requests) <vCont>: Don't call require_running.
7458 * server.h (in_queued_stop_replies): New declaration.
7459
7460 2016-10-24 Yao Qi <yao.qi@linaro.org>
7461
7462 PR server/20733
7463 * linux-aarch64-low.c (append_insns): Cast the return value to
7464 'uint32_t *'.
7465
7466 2016-10-10 Yao Qi <yao.qi@linaro.org>
7467
7468 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7469
7470 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7471
7472 * target.c (target_supports_multi_process): New function, moved
7473 from...
7474 * target.h (target_supports_multi_process): ... here. Remove
7475 macro.
7476
7477 2016-10-05 Tom Tromey <tom@tromey.com>
7478
7479 PR remote/20655:
7480 * tracepoint.c (handle_tracepoint_bkpts): Check
7481 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7482
7483 2016-10-05 Yao Qi <yao.qi@linaro.org>
7484
7485 * configure.srv: Update the path of arm-*.xml files.
7486
7487 2016-10-05 Terry Guo <terry.guo@arm.com>
7488 Yao Qi <yao.qi@linaro.org>
7489
7490 * Makefile.in: Adjust the path of rules.
7491 * configure.srv: Update the path of xml files.
7492 * regformats/arm-with-iwmmxt.dat: Regenerated.
7493 * regformats/arm-with-neon.dat: Likewise.
7494 * regformats/arm-with-vfpv2.dat: Likewise.
7495 * regformats/arm-with-vfpv3.dat Likewise.
7496
7497 2016-09-30 Yao Qi <yao.qi@linaro.org>
7498
7499 PR gdbserver/20627
7500 * target.c (target_stop_and_wait): Don't call
7501 target_continue_no_signal, use resume_stop instead.
7502
7503 2016-09-26 Yao Qi <yao.qi@linaro.org>
7504
7505 * linux-low.c (linux_wait_1): Call debug_exit.
7506
7507 2016-09-23 Pedro Alves <palves@redhat.com>
7508
7509 * Makefile.in (SFILES): Add common/new-op.c.
7510 (OBS): Add common/new-op.o.
7511 (new-op.o): New rule.
7512
7513 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7514
7515 * .gitinore: Ignore more files.
7516
7517 2016-09-21 Yao Qi <yao.qi@linaro.org>
7518
7519 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7520 23.
7521
7522 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7523
7524 * server.c (start_inferior): Call target_mourn_inferior instead of
7525 mourn_inferior; pass ptid_t argument to it.
7526 (resume): Likewise.
7527 (handle_target_event): Likewise.
7528 * target.c (target_mourn_inferior): New function.
7529 * target.h (mourn_inferior): Delete macro.
7530
7531 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7532
7533 * linux-low.c (lwp_is_stepping): New function.
7534
7535 2016-09-06 Carl Love <cel@us.ibm.com>
7536
7537 * server.c (start_inferior): Fixed comment, requested comment change
7538 didn't get updated correctly. Removed reference to ptrace () call as
7539 it is only true on Linux systems.
7540
7541 2016-09-06 Carl Love <cel@us.ibm.com>
7542
7543 * server.c (start_inferior): Do not call
7544 function target_post_create_inferior () if the
7545 inferior process has already exited.
7546
7547 2016-09-05 Pedro Alves <palves@redhat.com>
7548
7549 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7550 (COMPILE.pre, CC_LD): Use CXX directly.
7551 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7552 * acinclude.m4: Don't include build-with-cxx.m4.
7553 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7554 * configure: Regenerate.
7555
7556 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7557
7558 PR gdb/19495
7559 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7560 call writing data to own_buf.
7561
7562 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7563
7564 * target.c (mywait): Call target_wait instead of
7565 the_target->wait.
7566 (target_wait): New function.
7567
7568 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7569
7570 * server.c (start_inferior): New variable 'ptid'. Replace calls
7571 to the_target->resume by target_continue{,_no_signal}, depending
7572 on the case.
7573 * target.c (target_stop_and_wait): Call target_continue_no_signal
7574 instead of the_target->resume.
7575 (target_continue): New function.
7576
7577 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7578
7579 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7580
7581 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7582
7583 PR server/20491
7584 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7585 ps_prochandle.
7586 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7587 * linux-arm-low.c (ps_get_thread_area): Likewise.
7588 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7589 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7590 * linux-mips-low.c (ps_get_thread_area): Likewise.
7591 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7592 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7593 * linux-x86-low.c (ps_get_thread_area): Likewise.
7594 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7595
7596 2016-08-19 Pedro Alves <palves@redhat.com>
7597
7598 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7599
7600 2016-08-19 Pedro Alves <palves@redhat.com>
7601
7602 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7603 comment. Use memcpy instead of casting through unsigned long.
7604
7605 2016-08-19 Pedro Alves <palves@redhat.com>
7606
7607 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7608 allocating around 0x80000000.
7609
7610 2016-08-19 Pedro Alves <palves@redhat.com>
7611
7612 PR gdb/20415
7613 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7614 (x32-avx512-linux-ipa.o): New rules.
7615 * configure.ac (x86_64-*-linux*): New x32 check.
7616 * configure.srv (ipa_x32_linux_regobj): New.
7617 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7618 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7619 descriptions.
7620 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7621 descriptions.
7622 * configure: Regenerate.
7623
7624 2016-08-09 Pedro Alves <palves@redhat.com>
7625
7626 PR gdb/18653
7627 * Makefile.in (OBS): Add signals-state-save-restore.o.
7628 (signals-state-save-restore.o): New rule.
7629 * config.in: Regenerate.
7630 * configure: Regenerate.
7631 * linux-low.c: Include "signals-state-save-restore.h".
7632 (linux_create_inferior): Call
7633 restore_original_signals_state.
7634 * server.c: Include "dispositions-save-restore.h".
7635 (captured_main): Call save_original_signals_state.
7636
7637 2016-08-05 Pedro Alves <palves@redhat.com>
7638
7639 * configure: Regenerate.
7640
7641 2016-08-04 Yao Qi <yao.qi@linaro.org>
7642
7643 * linux-low.c (regsets_fetch_inferior_registers): Check
7644 errno is ESRCH or not.
7645
7646 2016-08-02 Yao Qi <yao.qi@linaro.org>
7647
7648 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7649 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7650 (thread_db_load_search): Update.
7651 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7652 td_ta_set_event and td_ta_event_getmsg.
7653
7654 2016-07-26 Pedro Alves <palves@redhat.com>
7655
7656 PR server/20414
7657 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7658 of unsigned long for 64-bit registers and use uint32_t instead of
7659 unsigned int for 32-bit registers.
7660
7661 2016-07-26 Pedro Alves <palves@redhat.com>
7662
7663 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7664 to 'ptrace'.
7665
7666 2016-07-21 Tom Tromey <tom@tromey.com>
7667
7668 * configure: Rebuild.
7669
7670 2016-07-21 Yao Qi <yao.qi@linaro.org>
7671
7672 * mem-break.c (find_gdb_breakpoint): Cast bp to
7673 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7674
7675 2016-07-21 Yao Qi <yao.qi@linaro.org>
7676
7677 * server.c (handle_v_requests): Support s and S actions
7678 if target_supports_software_single_step return true.
7679
7680 2016-07-21 Yao Qi <yao.qi@linaro.org>
7681
7682 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7683 is resume_step, call maybe_hw_step.
7684 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7685 and unstop them.
7686 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7687 breakpoints or not.
7688 (proceed_one_lwp): If resume request is resume_step, install
7689 reinsert breakpoints and call maybe_hw_step.
7690
7691 2016-07-21 Yao Qi <yao.qi@linaro.org>
7692
7693 * linux-low.c (proceed_one_lwp): Declare.
7694 (linux_resume_one_thread): Remove local variable 'step'.
7695 Lift code enqueue signal. Call proceed_one_lwp instead of
7696 linux_resume_one_lwp.
7697
7698 2016-07-21 Yao Qi <yao.qi@linaro.org>
7699
7700 * linux-low.c (linux_resume_one_thread): Call
7701 enqueue_pending_signal.
7702
7703 2016-07-21 Yao Qi <yao.qi@linaro.org>
7704
7705 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7706 * inferiors.c (do_restore_current_thread_cleanup): New function.
7707 (make_cleanup_restore_current_thread): Likewise.
7708 * linux-low.c (install_software_single_step_breakpoints): Call
7709 make_cleanup_restore_current_thread. Switch current_thread to
7710 thread.
7711
7712 2016-07-21 Yao Qi <yao.qi@linaro.org>
7713
7714 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7715 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7716 (clone_one_breakpoint): Likewise.
7717 (delete_reinsert_breakpoints): Change parameter to thread.
7718 Callers updated.
7719 (has_reinsert_breakpoints): Likewise.
7720 (uninsert_reinsert_breakpoints): Likewise.
7721 (reinsert_reinsert_breakpoints): Likewise.
7722 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7723 (delete_reinsert_breakpoints): Likewise.
7724 (reinsert_reinsert_breakpoints): Likewise.
7725 (uninsert_reinsert_breakpoints): Likewise.
7726 (has_reinsert_breakpoints): Likewise.
7727
7728 2016-07-21 Yao Qi <yao.qi@linaro.org>
7729
7730 * inferiors.c (get_thread_process): Make parameter const.
7731 * inferiors.h (get_thread_process): Update declaration.
7732 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7733 Add new parameters child_thread and parent_thread. Callers
7734 updated.
7735 * mem-break.h (clone_all_breakpoints): Update declaration.
7736
7737 2016-07-21 Yao Qi <yao.qi@linaro.org>
7738
7739 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7740 <command_list, handler>: Remove.
7741 (struct gdb_breakpoint): New.
7742 (struct other_breakpoint): New.
7743 (struct reinsert_breakpoint): New.
7744 (is_gdb_breakpoint): New function.
7745 (any_persistent_commands): Update command_list if
7746 is_gdb_breakpoint returns true.
7747 (set_breakpoint): Create breakpoints according to their types.
7748 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7749 (set_gdb_breakpoint_1): Likewise.
7750 (set_gdb_breakpoint): Likewise.
7751 (clear_breakpoint_conditions): Change parameter type to
7752 'struct gdb_breakpoint *'.
7753 (clear_breakpoint_commands): Likewise.
7754 (clear_breakpoint_conditions_and_commands): Likewise.
7755 (add_condition_to_breakpoint): Likewise.
7756 (add_breakpoint_condition): Likewise.
7757 (add_commands_to_breakpoint): Likewise.
7758 (check_breakpoints): Check other_breakpoint.
7759 (clone_one_breakpoint): Clone breakpopint according to its type.
7760 * mem-break.h (struct gdb_breakpoint): Declare.
7761 (set_gdb_breakpoint): Update declaration.
7762 (clear_breakpoint_conditions_and_commands): Likewise.
7763 (add_breakpoint_condition): Likewise.
7764 (add_breakpoint_commands): Likewise.
7765 * server.c (process_point_options): Change parameter type to
7766 'struct gdb_breakpoint *'.
7767
7768 2016-07-21 Yao Qi <yao.qi@linaro.org>
7769
7770 * mem-break.c (set_breakpoint_at): Rename it to ...
7771 (set_breakpoint_type_at): ... it.
7772 (set_breakpoint_at): Call set_breakpoint_type_at.
7773 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7774 * mem-break.h (set_breakpoint_at): Update comments.
7775
7776 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7777
7778 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7779 to buf parameter.
7780 (nios2_store_gregset): Likewise.
7781
7782 2016-07-01 Pedro Alves <palves@redhat.com>
7783 Antoine Tremblay <antoine.tremblay@ericsson.com>
7784
7785 * linux-low.c: Change interface to take the target lwp_info
7786 pointer directly and return void. Handle detaching from a zombie
7787 thread.
7788 (linux_detach_lwp_callback): New function.
7789 (linux_detach): Detach from the leader thread after detaching from
7790 the clone threads.
7791
7792 2016-06-28 Yao Qi <yao.qi@linaro.org>
7793
7794 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7795 for variable new_offset.
7796 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7797 (aarch64_ftrace_insn_reloc_cb): Likewise.
7798 (aarch64_ftrace_insn_reloc_tb): Likewise.
7799 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7800 PRIx64 instead of PRIx32.
7801
7802 2016-06-28 Yao Qi <yao.qi@linaro.org>
7803
7804 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7805 (the_low_target): Install arm_get_syscall_trapinfo.
7806
7807 2016-06-28 Yao Qi <yao.qi@linaro.org>
7808
7809 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7810 function.
7811 (the_low_target): Install aarch64_get_syscall_trapinfo.
7812
7813 2016-06-28 Yao Qi <yao.qi@linaro.org>
7814
7815 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7816 Callers updated.
7817 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7818 Remove parameter sysno.
7819 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7820 sysret.
7821
7822 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7823
7824 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7825 (s390_emit_ne_goto): Likewise.
7826 (s390_emit_lt_goto): Likewise.
7827 (s390_emit_le_goto): Likewise.
7828 (s390_emit_gt_goto): Likewise.
7829 (s390_emit_ge_goto): Likewise.
7830 (s390x_emit_eq_goto): Likewise.
7831 (s390x_emit_ne_goto): Likewise.
7832 (s390x_emit_lt_goto): Likewise.
7833 (s390x_emit_le_goto): Likewise.
7834 (s390x_emit_gt_goto): Likewise.
7835 (s390x_emit_ge_goto): Likewise.
7836 (s390_emit_ops_impl): Mark variable static.
7837 (s390x_emit_ops): Likewise.
7838
7839 2016-06-17 Yao Qi <yao.qi@linaro.org>
7840
7841 * linux-low.c (handle_extended_wait): Call
7842 uninsert_reinsert_breakpoints for the parent process. Remove
7843 reinsert breakpoints from the child process. Reinsert them to
7844 the parent process when vfork is done.
7845 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7846 (reinsert_reinsert_breakpoints): New function.
7847 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7848 (reinsert_reinsert_breakpoints): Declare.
7849
7850 2016-06-17 Yao Qi <yao.qi@linaro.org>
7851
7852 * linux-low.c (handle_extended_wait): If the parent is doing
7853 step-over, remove the reinsert breakpoints from the forked child.
7854
7855 2016-06-17 Yao Qi <yao.qi@linaro.org>
7856
7857 * linux-low.c (unsuspend_all_lwps): Declare.
7858 (linux_low_filter_event): If thread exited, call finish_step_over.
7859 If step-over is finished, unsuspend other threads.
7860
7861 2016-06-17 Yao Qi <yao.qi@linaro.org>
7862
7863 * linux-low.c (linux_resume_one_lwp_throw): Assert
7864 has_reinsert_breakpoints returns false.
7865 * mem-break.c (delete_disabled_breakpoints): Assert
7866 bp type isn't reinsert_breakpoint.
7867
7868 2016-06-17 Yao Qi <yao.qi@linaro.org>
7869
7870 * linux-low.c (maybe_hw_step): New function.
7871 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7872 (finish_step_over): Switch current_thread to lwp temporarily,
7873 and assert has_reinsert_breakpoints returns true.
7874 (proceed_one_lwp): Call maybe_hw_step.
7875 * mem-break.c (has_reinsert_breakpoints): New function.
7876 * mem-break.h (has_reinsert_breakpoints): Declare.
7877
7878 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7879
7880 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7881
7882 2016-05-17 Yao Qi <yao.qi@linaro.org>
7883
7884 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7885 instead of find_inferior.
7886
7887 2016-05-05 Yao Qi <yao.qi@linaro.org>
7888
7889 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7890 Initialize res to zero.
7891
7892 2016-05-05 Yao Qi <yao.qi@linaro.org>
7893
7894 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7895 to uint32_t.
7896
7897 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7898
7899 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7900 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7901 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7902
7903 2016-04-28 Par Olsson <par.olsson@windriver.com>
7904 Simon Marchi <simon.marchi@ericsson.com>
7905
7906 * tracepoint.c (write_inferior_int8): New function.
7907 (cmd_qtenable_disable): Write enable flag using
7908 write_inferior_int8.
7909
7910 2016-04-25 Yao Qi <yao.qi@linaro.org>
7911
7912 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7913 (need_step_over_p): Return zero if the LWP has pending signals
7914 can be delivered on software single step target.
7915
7916 2016-04-25 Yao Qi <yao.qi@linaro.org>
7917
7918 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7919 return instead of error.
7920
7921 2016-04-22 Yao Qi <yao.qi@linaro.org>
7922
7923 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7924 to 23.
7925
7926 2016-04-22 Yao Qi <yao.qi@linaro.org>
7927
7928 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7929 signal when stepping over breakpoint with software single
7930 step.
7931
7932 2016-04-21 Pedro Alves <palves@redhat.com>
7933
7934 * linux-s390-low.c (s390_collect_ptrace_register)
7935 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7936 add casts.
7937 (s390_check_regset): Use void * instead of gdb_byte *.
7938
7939 2016-04-20 Pedro Alves <palves@redhat.com>
7940
7941 * configure: Renegerate.
7942
7943 2016-04-20 Yao Qi <yao.qi@linaro.org>
7944
7945 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7946 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7947 number 16.
7948 (arm_store_gregset): Likewise.
7949
7950 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7951
7952 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7953 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7954 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7955 (amd64-avx-mpx-linux.c): New rules.
7956 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7957 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7958 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7959 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7960 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7961 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7962 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7963 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7964 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7965 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7966 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7967 * linux-x86-low.c (x86_linux_read_description): Add case for
7968 X86_XSTATE_AVX_MPX_MASK.
7969 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7970 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7971 init_registers_i386_avx_mpx_linux.
7972 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7973 (initialize_low_tracepoint): Call
7974 init_registers_i386_avx_mpx_linux.
7975 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7976 (initialize_low_tracepoint): Call
7977 init_registers_amd64_avx_mpx_linux.
7978 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7979 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7980 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7981 declarations.
7982
7983 2016-04-18 Pedro Alves <palves@redhat.com>
7984
7985 * configure: Regenerate.
7986
7987 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7988
7989 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7990 (aarch64_emit_sub): Likewise.
7991
7992 2016-04-12 Pedro Alves <palves@redhat.com>
7993
7994 * utils.c (prepare_to_throw_exception): Delete.
7995
7996 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7997
7998 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7999
8000 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8001
8002 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8003
8004 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8005
8006 * linux-aarch64-ipa.c: Add <elf.h> include.
8007 * linux-ppc-ipa.c: Add <elf.h> include.
8008 * linux-s390-ipa.c: Add <elf.h> include.
8009
8010 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8011
8012 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8013 (get_raw_reg_ptr): Likewise.
8014 (get_trace_state_variable_value_ptr): Likewise.
8015 (set_trace_state_variable_value_ptr): Likewise.
8016 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8017 char *.
8018
8019 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8020 Marcin Kościelnicki <koriakin@0x04.net>
8021
8022 PR/17221
8023 * linux-ppc-low.c (emit_insns): New function.
8024 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8025 (ppc_emit_prologue): New function.
8026 (ppc_emit_epilogue): New function.
8027 (ppc_emit_add): New function.
8028 (ppc_emit_sub): New function.
8029 (ppc_emit_mul): New function.
8030 (ppc_emit_lsh): New function.
8031 (ppc_emit_rsh_signed): New function.
8032 (ppc_emit_rsh_unsigned): New function.
8033 (ppc_emit_ext): New function.
8034 (ppc_emit_zero_ext): New function.
8035 (ppc_emit_log_not): New function.
8036 (ppc_emit_bit_and): New function.
8037 (ppc_emit_bit_or): New function.
8038 (ppc_emit_bit_xor): New function.
8039 (ppc_emit_bit_not): New function.
8040 (ppc_emit_equal): New function.
8041 (ppc_emit_less_signed): New function.
8042 (ppc_emit_less_unsigned): New function.
8043 (ppc_emit_ref): New function.
8044 (ppc_emit_const): New function.
8045 (ppc_emit_reg): New function.
8046 (ppc_emit_pop): New function.
8047 (ppc_emit_stack_flush): New function.
8048 (ppc_emit_swap): New function.
8049 (ppc_emit_stack_adjust): New function.
8050 (ppc_emit_call): New function.
8051 (ppc_emit_int_call_1): New function.
8052 (ppc_emit_void_call_2): New function.
8053 (ppc_emit_if_goto): New function.
8054 (ppc_emit_goto): New function.
8055 (ppc_emit_eq_goto): New function.
8056 (ppc_emit_ne_goto): New function.
8057 (ppc_emit_lt_goto): New function.
8058 (ppc_emit_le_goto): New function.
8059 (ppc_emit_gt_goto): New function.
8060 (ppc_emit_ge_goto): New function.
8061 (ppc_write_goto_address): New function.
8062 (ppc_emit_ops_impl): New static variable.
8063 (ppc64v1_emit_prologue): New function.
8064 (ppc64v2_emit_prologue): New function.
8065 (ppc64_emit_epilogue): New function.
8066 (ppc64_emit_add): New function.
8067 (ppc64_emit_sub): New function.
8068 (ppc64_emit_mul): New function.
8069 (ppc64_emit_lsh): New function.
8070 (ppc64_emit_rsh_signed): New function.
8071 (ppc64_emit_rsh_unsigned): New function.
8072 (ppc64_emit_ext): New function.
8073 (ppc64_emit_zero_ext): New function.
8074 (ppc64_emit_log_not): New function.
8075 (ppc64_emit_bit_and): New function.
8076 (ppc64_emit_bit_or): New function.
8077 (ppc64_emit_bit_xor): New function.
8078 (ppc64_emit_bit_not): New function.
8079 (ppc64_emit_equal): New function.
8080 (ppc64_emit_less_signed): New function.
8081 (ppc64_emit_less_unsigned): New function.
8082 (ppc64_emit_ref): New function.
8083 (ppc64_emit_const): New function.
8084 (ppc64v1_emit_reg): New function.
8085 (ppc64v2_emit_reg): New function.
8086 (ppc64_emit_pop): New function.
8087 (ppc64_emit_stack_flush): New function.
8088 (ppc64_emit_swap): New function.
8089 (ppc64v1_emit_call): New function.
8090 (ppc64v2_emit_call): New function.
8091 (ppc64v1_emit_int_call_1): New function.
8092 (ppc64v2_emit_int_call_1): New function.
8093 (ppc64v1_emit_void_call_2): New function.
8094 (ppc64v2_emit_void_call_2): New function.
8095 (ppc64_emit_if_goto): New function.
8096 (ppc64_emit_eq_goto): New function.
8097 (ppc64_emit_ne_goto): New function.
8098 (ppc64_emit_lt_goto): New function.
8099 (ppc64_emit_le_goto): New function.
8100 (ppc64_emit_gt_goto): New function.
8101 (ppc64_emit_ge_goto): New function.
8102 (ppc64v1_emit_ops_impl): New static variable.
8103 (ppc64v2_emit_ops_impl): New static variable.
8104 (ppc_emit_ops): New function.
8105 (linux_low_target): Wire in ppc_emit_ops.
8106
8107 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8108 Marcin Kościelnicki <koriakin@0x04.net>
8109
8110 PR/17221
8111 * Makefile.in: Add powerpc-*-ipa.o
8112 * configure.srv: Add ipa_obj for powerpc*-linux.
8113 * linux-ppc-ipa.c: New file.
8114 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8115 includes.
8116 (PPC_FIELD): New macro.
8117 (PPC_SEXT): New macro.
8118 (PPC_OP6): New macro.
8119 (PPC_BO): New macro.
8120 (PPC_LI): New macro.
8121 (PPC_BD): New macro.
8122 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8123 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8124 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8125 (ppc_get_thread_area): New function.
8126 (is_elfv2_inferior): New function.
8127 (gen_ds_form): New function.
8128 (GEN_STD): New macro.
8129 (GEN_STDU): New macro.
8130 (GEN_LD): New macro.
8131 (GEN_LDU): New macro.
8132 (gen_d_form): New function.
8133 (GEN_ADDI): New macro.
8134 (GEN_ADDIS): New macro.
8135 (GEN_LI): New macro.
8136 (GEN_LIS): New macro.
8137 (GEN_ORI): New macro.
8138 (GEN_ORIS): New macro.
8139 (GEN_LWZ): New macro.
8140 (GEN_STW): New macro.
8141 (GEN_STWU): New macro.
8142 (gen_xfx_form): New function.
8143 (GEN_MFSPR): New macro.
8144 (GEN_MTSPR): New macro.
8145 (GEN_MFCR): New macro.
8146 (GEN_MTCR): New macro.
8147 (GEN_SYNC): New macro.
8148 (GEN_LWSYNC): New macro.
8149 (gen_x_form): New function.
8150 (GEN_OR): New macro.
8151 (GEN_MR): New macro.
8152 (GEN_LWARX): New macro.
8153 (GEN_STWCX): New macro.
8154 (GEN_CMPW): New macro.
8155 (gen_md_form): New function.
8156 (GEN_RLDICL): New macro.
8157 (GEN_RLDICR): New macro.
8158 (gen_i_form): New function.
8159 (GEN_B): New macro.
8160 (GEN_BL): New macro.
8161 (gen_b_form): New function.
8162 (GEN_BNE): New macro.
8163 (GEN_LOAD): New macro.
8164 (GEN_STORE): New macro.
8165 (gen_limm): New function.
8166 (gen_atomic_xchg): New function.
8167 (gen_call): New function.
8168 (ppc_relocate_instruction): New function.
8169 (ppc_install_fast_tracepoint_jump_pad): New function.
8170 (ppc_get_min_fast_tracepoint_insn_len): New function.
8171 (ppc_get_ipa_tdesc_idx): New function.
8172 (the_low_target): Wire in the new functions.
8173 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8174 tdescs.
8175 * linux-ppc-tdesc.h: New file.
8176
8177 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8178
8179 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8180 (alloc_jump_pad_buffer): New function.
8181 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8182 (alloc_jump_pad_buffer): New function.
8183 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8184 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8185 (alloc_jump_pad_buffer): New function.
8186 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8187 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8188 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8189 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8190
8191 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8192
8193 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8194 * linux-amd64-ipa.c: Likewise.
8195 * linux-i386-ipa.c: Likewise.
8196 * linux-s390-ipa.c: Likewise.
8197 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8198 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8199 set_trace_state_variable_value_ptr.
8200 (struct ipa_sym_addresses): Likewise.
8201 (symbol_list): Likewise.
8202 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8203 accessing gdb_collect directly.
8204 (gdb_collect_ptr_type): New typedef.
8205 (get_raw_reg_ptr_type): New typedef.
8206 (get_trace_state_variable_value_ptr_type): New typedef.
8207 (set_trace_state_variable_value_ptr_type): New typedef.
8208 (gdb_collect_ptr): New global.
8209 (get_raw_reg_ptr): New global.
8210 (get_trace_state_variable_value_ptr): New global.
8211 (set_trace_state_variable_value_ptr): New global.
8212 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8213 accessing get_raw_reg directly.
8214 (get_get_tsv_func_addr): Likewise for
8215 get_trace_state_variable_value_ptr.
8216 (get_set_tsv_func_addr): Likewise for
8217 set_trace_state_variable_value_ptr.
8218 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8219
8220 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8221
8222 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8223
8224 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8225
8226 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8227 packets.
8228 (relocate_instruction): Remove own_buf.
8229 * server.c (own_buf): Make global.
8230 (handle_v_requests): Make global.
8231 * server.h (own_buf): New declaration.
8232 (handle_v_requests): New prototype.
8233
8234 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8235
8236 PR 18377
8237 * linux-s390-low.c (add_insns): New function.
8238 (s390_emit_prologue): New function.
8239 (s390_emit_epilogue): New function.
8240 (s390_emit_add): New function.
8241 (s390_emit_sub): New function.
8242 (s390_emit_mul): New function.
8243 (s390_emit_lsh): New function.
8244 (s390_emit_rsh_signed): New function.
8245 (s390_emit_rsh_unsigned): New function.
8246 (s390_emit_ext): New function.
8247 (s390_emit_log_not): New function.
8248 (s390_emit_bit_and): New function.
8249 (s390_emit_bit_or): New function.
8250 (s390_emit_bit_xor): New function.
8251 (s390_emit_bit_not): New function.
8252 (s390_emit_equal): New function.
8253 (s390_emit_less_signed): New function.
8254 (s390_emit_less_unsigned): New function.
8255 (s390_emit_ref): New function.
8256 (s390_emit_if_goto): New function.
8257 (s390_emit_goto): New function.
8258 (s390_write_goto_address): New function.
8259 (s390_emit_litpool): New function.
8260 (s390_emit_const): New function.
8261 (s390_emit_call): New function.
8262 (s390_emit_reg): New function.
8263 (s390_emit_pop): New function.
8264 (s390_emit_stack_flush): New function.
8265 (s390_emit_zero_ext): New function.
8266 (s390_emit_swap): New function.
8267 (s390_emit_stack_adjust): New function.
8268 (s390_emit_set_r2): New function.
8269 (s390_emit_int_call_1): New function.
8270 (s390_emit_void_call_2): New function.
8271 (s390_emit_eq_goto): New function.
8272 (s390_emit_ne_goto): New function.
8273 (s390_emit_lt_goto): New function.
8274 (s390_emit_le_goto): New function.
8275 (s390_emit_gt_goto): New function.
8276 (s390_emit_ge_goto): New function.
8277 (s390x_emit_prologue): New function.
8278 (s390x_emit_epilogue): New function.
8279 (s390x_emit_add): New function.
8280 (s390x_emit_sub): New function.
8281 (s390x_emit_mul): New function.
8282 (s390x_emit_lsh): New function.
8283 (s390x_emit_rsh_signed): New function.
8284 (s390x_emit_rsh_unsigned): New function.
8285 (s390x_emit_ext): New function.
8286 (s390x_emit_log_not): New function.
8287 (s390x_emit_bit_and): New function.
8288 (s390x_emit_bit_or): New function.
8289 (s390x_emit_bit_xor): New function.
8290 (s390x_emit_bit_not): New function.
8291 (s390x_emit_equal): New function.
8292 (s390x_emit_less_signed): New function.
8293 (s390x_emit_less_unsigned): New function.
8294 (s390x_emit_ref): New function.
8295 (s390x_emit_if_goto): New function.
8296 (s390x_emit_const): New function.
8297 (s390x_emit_call): New function.
8298 (s390x_emit_reg): New function.
8299 (s390x_emit_pop): New function.
8300 (s390x_emit_stack_flush): New function.
8301 (s390x_emit_zero_ext): New function.
8302 (s390x_emit_swap): New function.
8303 (s390x_emit_stack_adjust): New function.
8304 (s390x_emit_int_call_1): New function.
8305 (s390x_emit_void_call_2): New function.
8306 (s390x_emit_eq_goto): New function.
8307 (s390x_emit_ne_goto): New function.
8308 (s390x_emit_lt_goto): New function.
8309 (s390x_emit_le_goto): New function.
8310 (s390x_emit_gt_goto): New function.
8311 (s390x_emit_ge_goto): New function.
8312 (s390_emit_ops): New function.
8313 (struct linux_target_ops): Fill in emit_ops hook.
8314
8315 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8316
8317 PR 18377
8318 * Makefile.in: Add s390 IPA files.
8319 * configure.srv: Build IPA for s390.
8320 * linux-s390-ipa.c: New file.
8321 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8322 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8323 (tdesc_s390_linux32): Likewise.
8324 (init_registers_s390_linux32v1): Likewise.
8325 (tdesc_s390_linux32v1): Likewise.
8326 (init_registers_s390_linux32v2): Likewise.
8327 (tdesc_s390_linux32v2): Likewise.
8328 (init_registers_s390_linux64): Likewise.
8329 (tdesc_s390_linux64): Likewise.
8330 (init_registers_s390_linux64v1): Likewise.
8331 (tdesc_s390_linux64v1): Likewise.
8332 (init_registers_s390_linux64v2): Likewise.
8333 (tdesc_s390_linux64v2): Likewise.
8334 (init_registers_s390_te_linux64): Likewise.
8335 (tdesc_s390_te_linux64): Likewise.
8336 (init_registers_s390_vx_linux64): Likewise.
8337 (tdesc_s390_vx_linux64): Likewise.
8338 (init_registers_s390_tevx_linux64): Likewise.
8339 (tdesc_s390_tevx_linux64): Likewise.
8340 (init_registers_s390x_linux64): Likewise.
8341 (tdesc_s390x_linux64): Likewise.
8342 (init_registers_s390x_linux64v1): Likewise.
8343 (tdesc_s390x_linux64v1): Likewise.
8344 (init_registers_s390x_linux64v2): Likewise.
8345 (tdesc_s390x_linux64v2): Likewise.
8346 (init_registers_s390x_te_linux64): Likewise.
8347 (tdesc_s390x_te_linux64): Likewise.
8348 (init_registers_s390x_vx_linux64): Likewise.
8349 (tdesc_s390x_vx_linux64): Likewise.
8350 (init_registers_s390x_tevx_linux64): Likewise.
8351 (tdesc_s390x_tevx_linux64): Likewise.
8352 (have_hwcap_s390_vx): New static variable.
8353 (s390_arch_setup): Fill have_hwcap_s390_vx.
8354 (s390_get_thread_area): New function.
8355 (s390_ft_entry_gpr_esa): New const.
8356 (s390_ft_entry_gpr_zarch): New const.
8357 (s390_ft_entry_misc): New const.
8358 (s390_ft_entry_fr): New const.
8359 (s390_ft_entry_vr): New const.
8360 (s390_ft_main_31): New const.
8361 (s390_ft_main_64): New const.
8362 (s390_ft_exit_fr): New const.
8363 (s390_ft_exit_vr): New const.
8364 (s390_ft_exit_misc): New const.
8365 (s390_ft_exit_gpr_esa): New const.
8366 (s390_ft_exit_gpr_zarch): New const.
8367 (append_insns): New function.
8368 (s390_relocate_instruction): New function.
8369 (s390_install_fast_tracepoint_jump_pad): New function.
8370 (s390_get_min_fast_tracepoint_insn_len): New function.
8371 (s390_get_ipa_tdesc_idx): New function.
8372 (struct linux_target_ops): Wire in the above functions.
8373 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8374 * linux-s390-tdesc.h: New file.
8375
8376 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8377
8378 * linux-s390-low.c (s390_supports_tracepoints): New function.
8379 (struct linux_target_ops): Fill supports_tracepoints hook.
8380
8381 2016-03-18 Yao Qi <yao.qi@linaro.org>
8382
8383 * linux-low.c (lwp_signal_can_be_delivered): New function.
8384 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8385
8386 2016-03-18 Yao Qi <yao.qi@linaro.org>
8387
8388 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8389 0 if signal is enqueued. Remove 'signal' from one debugging
8390 message. Move one debugging message to some lines below.
8391 Remove code setting 'signal' to 0.
8392
8393 2016-03-18 Yao Qi <yao.qi@linaro.org>
8394
8395 * linux-low.c (linux_low_filter_event): Remove redundant
8396 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8397
8398 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8399
8400 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8401 (struct linux_target_ops): Wire in the above.
8402
8403 2016-03-03 Yao Qi <yao.qi@linaro.org>
8404
8405 * linux-low.c: Update comments to start_step_over.
8406
8407 2016-03-03 Yao Qi <yao.qi@linaro.org>
8408
8409 PR server/19736
8410 * linux-low.c (handle_extended_wait): Set child suspended
8411 if event_lwp->bp_reinsert isn't zero.
8412
8413 2016-03-02 Yao Qi <yao.qi@linaro.org>
8414
8415 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8416 enqueue_pending_signal.
8417
8418 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8419
8420 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8421 is actually loaded.
8422
8423 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8424
8425 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8426 (s390_regmap_3264) [!__s390x__]: New global.
8427 (s390_collect_ptrace_register): Skip map entries containing -1.
8428 (s390_supply_ptrace_register): Ditto.
8429 (s390_fill_gprs_high): New function.
8430 (s390_store_gprs_high): New function.
8431 (s390_regsets): Add NT_S390_HIGH_GPRS.
8432 (s390_get_hwcap): Enable on 31-bit.
8433 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8434 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8435 Detect NT_S390_HIGH_GPRS.
8436 (s390_usrregs_info_3264): Enable on 31-bit.
8437 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8438 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8439
8440 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8441
8442 PR gdb/13808
8443 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8444 * configure.srv: Ditto.
8445 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8446 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8447 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8448 (init_registers_amd64_linux): Remove prototype.
8449 (tdesc_amd64_linux): Remove declaration.
8450 (get_ipa_tdesc): New function.
8451 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8452 initialize remaining tdescs.
8453 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8454 (init_registers_i386_linux): Remove prototype.
8455 (tdesc_i386_linux): Remove declaration.
8456 (get_ipa_tdesc): New function.
8457 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8458 initialize remaining tdescs.
8459 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8460 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8461 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8462 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8463 (x86_get_ipa_tdesc_idx): New function.
8464 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8465 * linux-x86-tdesc.h: New file.
8466 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8467 (target_get_ipa_tdesc_idx): New macro.
8468 * tracepoint.c (ipa_tdesc_idx): New macro.
8469 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8470 (symbol_list): Add ipa_tdesc_idx.
8471 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8472 (ipa_tdesc): Remove.
8473 (ipa_tdesc_idx): New variable.
8474 (get_context_regcache): Use get_ipa_tdesc.
8475 (gdb_collect): Ditto.
8476 (gdb_probe): Ditto.
8477 * tracepoint.h (get_ipa_tdesc): New prototype.
8478 (ipa_tdesc): Remove.
8479
8480 2016-02-24 Pedro Alves <palves@redhat.com>
8481
8482 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8483 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8484 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8485 Factor out common code between the USE_SIGTRAP_SIGINFO and
8486 !USE_SIGTRAP_SIGINFO blocks.
8487 (linux_low_filter_event): Call save_stop_reason instead of
8488 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8489 Update comments.
8490 (linux_wait_1): Update comments.
8491
8492 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8493
8494 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8495 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8496 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8497 ppc_insert_point, ppc_remove_point.
8498
8499 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8500
8501 * linux-s390-low.c (s390_supports_z_point_type): New function.
8502 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8503
8504 2016-02-16 Yao Qi <yao.qi@linaro.org>
8505
8506 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8507 PC. Get pc from regcache_read_pc.
8508
8509 2016-02-12 Yao Qi <yao.qi@linaro.org>
8510
8511 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8512 or linux_get_pc_32bit.
8513 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8514
8515 2016-02-12 Yao Qi <yao.qi@linaro.org>
8516
8517 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8518 arm_linux_get_next_pcs_fixup.
8519
8520 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8521
8522 * tracepoint.c (x_tracepoint_action_download): Change
8523 write_inferior_data_ptr to write_inferior_data_pointer.
8524 (cmd_qtstart): Likewise.
8525 (write_inferior_data_ptr): Remove.
8526 (download_agent_expr): Change write_inferior_data_ptr to
8527 write_inferior_data_pointer.
8528 (download_tracepoint_1): Likewise.
8529 (download_tracepoint): Likewise.
8530 (download_trace_state_variables): Likewise.
8531
8532 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8533 Marcin Kościelnicki <koriakin@0x04.net>
8534
8535 * tracepoint.c (struct tracepoint_action_ops): Remove.
8536 (struct tracepoint_action): Remove ops.
8537 (m_tracepoint_action_download, r_tracepoint_action_download)
8538 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8539 size and offset accordingly.
8540 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8541 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8542 (tracepoint_action_send, tracepoint_action_download): New functions.
8543 Helpers for trace action handlers.
8544 (add_tracepoint_action): Remove setup actions ops.
8545 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8546
8547 2016-02-10 Yao Qi <yao.qi@linaro.org>
8548
8549 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8550
8551 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8552
8553 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8554 to AC_OUTPUT.
8555 * configure: Regenerate.
8556
8557 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8558
8559 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8560 void * to gdb_byte *.
8561 * linux-low.c (siginfo_fixup): Likewise.
8562 (linux_xfer_siginfo): Likewise.
8563 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8564 Likewise.
8565 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8566
8567 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8568
8569 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8570 to srv_tgtobj.
8571 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8572 to srv_tgtobj.
8573 * linux-x86-low.c [__x86_64__]: Include
8574 "nat/amd64-linux-siginfo.h".
8575 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8576 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8577 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8578 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8579 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8580 (cpt_si_fd, si_timerid, si_overrun): Move from
8581 nat/amd64-linux-siginfo.c.
8582 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8583
8584 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8585
8586 * server.c (skip_to_semicolon): Remove.
8587 (process_point_options): Use strchrnul instead of
8588 skip_to_semicolon.
8589
8590 2016-01-26 Yao Qi <yao.qi@linaro.org>
8591
8592 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8593 * linux-low.c (install_software_single_step_breakpoints): Don't
8594 call regcache_read_pc.
8595 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8596 argument pc.
8597
8598 2016-01-26 Yao Qi <yao.qi@linaro.org>
8599
8600 * linux-low.c (install_software_single_step_breakpoints): Call
8601 regcache_read_pc instead of get_pc.
8602
8603 2016-01-26 Yao Qi <yao.qi@linaro.org>
8604
8605 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8606 (unblock_async_io): Rename to ...
8607 (block_unblock_async_io): ... it. New function.
8608 (enable_async_io): Don't install SIGIO handler. Unblock it
8609 instead.
8610 (disable_async_io): Don't ignore SIGIO. Block it instead.
8611 (initialize_async_io): Install SIGIO handler. Don't call
8612 unblock_async_io.
8613
8614 2016-01-26 Yao Qi <yao.qi@linaro.org>
8615
8616 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8617 first character is '\003', call *the_target->request_interrupt.
8618
8619 2016-01-25 Yao Qi <yao.qi@linaro.org>
8620
8621 * remote-utils.c (new_thread_notify): Remove.
8622 (dead_thread_notify): Likewise.
8623 * remote-utils.h (new_thread_notify): Remove declaration.
8624 (dead_thread_notify): Likewise.
8625
8626 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8627
8628 * gdb.trace/pending.exp: Fix expected message on continue.
8629
8630 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8631
8632 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8633 it works properly on big-endian machines where sizeof (CORE_ADDR)
8634 != sizeof (void *).
8635
8636 2016-01-21 Pedro Alves <palves@redhat.com>
8637
8638 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8639 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8640 * configure: Regenerate.
8641
8642 2016-01-21 Yao Qi <yao.qi@linaro.org>
8643
8644 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8645 is_thumb and set it according to CPSR saved on the stack.
8646 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8647 arm_sigreturn_next_pc.
8648
8649 2016-01-18 Yao Qi <yao.qi@linaro.org>
8650
8651 * linux-low.c (linux_set_pc_64bit): New function.
8652 (linux_get_pc_64bit): New function.
8653 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8654 Declare.
8655 * linux-sparc-low.c (debug_threads): Remove declaration.
8656 (sparc_get_pc): Remove.
8657 (the_low_target): Use linux_get_pc_64bit instead of
8658 sparc_get_pc.
8659 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8660 (the_low_target): Use linux_get_pc_64bit and
8661 linux_set_pc_64bit.
8662
8663 2016-01-18 Yao Qi <yao.qi@linaro.org>
8664
8665 * linux-arm-low.c (debug_threads): Remove declaration.
8666 (arm_get_pc, arm_set_pc): Remove.
8667 (the_low_target): Use linux_get_pc_32bit and
8668 linux_set_pc_32bit.
8669 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8670 (the_low_target): Use linux_get_pc_32bit and
8671 linux_set_pc_32bit.
8672 * linux-cris-low.c (debug_threads): Remove declaration.
8673 (cris_get_pc, cris_set_pc,): Remove.
8674 (the_low_target): Use linux_get_pc_32bit and
8675 linux_set_pc_32bit.
8676 * linux-crisv32-low.c (debug_threads): Remove declaration.
8677 (cris_get_pc, cris_set_pc): Remove.
8678 (the_low_target): Use linux_get_pc_32bit and
8679 linux_set_pc_32bit.
8680 * linux-low.c: Include inttypes.h.
8681 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8682 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8683 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8684 (the_low_target): Use linux_get_pc_32bit and
8685 linux_set_pc_32bit.
8686 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8687 (the_low_target): Use linux_get_pc_32bit and
8688 linux_set_pc_32bit.
8689 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8690 (the_low_target): Use linux_get_pc_32bit and
8691 linux_set_pc_32bit.
8692 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8693 (the_low_target): Use linux_get_pc_32bit and
8694 linux_set_pc_32bit.
8695 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8696 (the_low_target): Use linux_get_pc_32bit and
8697 linux_set_pc_32bit.
8698
8699 2016-01-18 Gary Benson <gbenson@redhat.com>
8700
8701 * configure.ac (AC_FUNC_FORK): New check.
8702 * config.in: Regenerate.
8703 * configure: Likewise.
8704
8705 2016-01-14 Yao Qi <yao.qi@linaro.org>
8706
8707 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8708 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8709 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8710 arm_get_next_pcs_ctor.
8711
8712 2016-01-12 Josh Stone <jistone@redhat.com>
8713 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8714
8715 * inferiors.h: Include "gdb_vecs.h".
8716 (struct process_info): Add syscalls_to_catch.
8717 * inferiors.c (remove_process): Free syscalls_to_catch.
8718 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8719 syscall_return stops.
8720 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8721 * server.c (handle_general_set): Handle QCatchSyscalls.
8722 (handle_query): Report support for QCatchSyscalls.
8723 * target.h (struct target_ops): Add supports_catch_syscall.
8724 (target_supports_catch_syscall): New macro.
8725 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8726 (struct lwp_info): Add syscall_state.
8727 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8728 Maintain syscall_state and syscalls_to_catch across exec.
8729 (get_syscall_trapinfo): New function, proxy to the_low_target.
8730 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8731 (linux_low_filter_event): Toggle syscall_state entry/return for
8732 syscall traps, and set it ignored for all others.
8733 (gdb_catching_syscalls_p): New function.
8734 (gdb_catch_this_syscall_p): New function.
8735 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8736 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8737 (linux_supports_catch_syscall): New function.
8738 (linux_target_ops): Install it.
8739 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8740 (the_low_target): Install it.
8741
8742 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8743
8744 * acinclude.m4: Include new ../warning.m4 file.
8745 * configure: Regenerated.
8746 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8747
8748 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8749
8750 * ax.c (is_goto_target): Mark static.
8751 * linux-low.c (register_addr): Likewise.
8752 (linux_fetch_registers, linux_store_registers): Likewise.
8753 * mem-break.c (any_persistent_commands): Fix old prototype.
8754 (add_commands_to_breakpoint): Mark static.
8755 * regcache.c (find_register_by_name): Delete unused func.
8756 * remote-utils.c (hex_or_minus_one): Mark static.
8757 * server.c (monitor_show_help): Mark static.
8758 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8759 handle_v_requests): Likewise.
8760
8761 2016-01-12 Pedro Alves <palves@redhat.com>
8762
8763 Remove use of the registered trademark symbol throughout.
8764
8765 2016-01-08 Yao Qi <yao.qi@linaro.org>
8766
8767 * remote-utils.c (getpkt): If c is '\003', call target hook
8768 request_interrupt.
8769
8770 2016-01-06 Yao Qi <yao.qi@linaro.org>
8771
8772 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8773 linux-aarch32-low.c.
8774 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8775 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8776 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8777 (thumb2_breakpoint): Declare.
8778 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8779 linux-aarch32-low.h.
8780 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8781 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8782 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8783
8784 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8785
8786 * gdbreplay.c (gdbreplay_version): Change copyright year in
8787 version message.
8788 * server.c (gdbserver_version): Likewise.
8789
8790 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8791
8792 * server.c (crc32_table): Delete.
8793 (crc32): Use libiberty's xcrc32 function.
8794
8795 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8796
8797 * lynx-low.c (lynx_delete_thread_callback): New function.
8798 (lynx_mourn): Properly delete our process and all of its
8799 threads. Remove call to clear_inferiors.
8800
8801 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8802
8803 * target.c (thread_search_callback): Add check that
8804 the thread_stopped target callback is not NULL before
8805 calling it.
8806
8807 2015-12-21 Yao Qi <yao.qi@linaro.org>
8808
8809 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8810 arm breakpoint.
8811
8812 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8813
8814 * server.c (handle_query): Call target_supports_software_single_step.
8815
8816 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8817
8818 * linux-low.c (single_step): New function.
8819 (linux_resume_one_lwp_throw): Call single_step.
8820 (start_step_over): Likewise.
8821
8822 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8823
8824 * Makefile.in (SFILES): Append arch/arm-linux.c,
8825 arch/arm-get-next-pcs.c.
8826 (arm-linux.o): New rule.
8827 (arm-get-next-pcs.o): New rule.
8828 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8829 arm-linux.o.
8830 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8831 to linux-aarch32-low.c.
8832 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8833 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8834 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8835 (thumb2_breakpoint_len): Likewise.
8836 (arm_is_thumb_mode): Make non-static.
8837 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8838 from linux-aarch32-low.c.
8839 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8840 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8841 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8842 (thumb2_breakpoint_len): Likewise.
8843 (arm_is_thumb_mode): New declaration.
8844 * linux-arm-low.c: Include arch/arm-linux.h
8845 aarch/arm-get-next-pcs.h, sys/syscall.h.
8846 (get_next_pcs_ops): New struct.
8847 (get_next_pcs_addr_bits_remove): New function.
8848 (get_next_pcs_is_thumb): New function.
8849 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8850 (arm_sigreturn_next_pc): Likewise.
8851 (get_next_pcs_syscall_next_pc): Likewise.
8852 (arm_gdbserver_get_next_pcs): Likewise.
8853 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8854 Initialize.
8855 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8856 * server.h: Include gdb_vecs.h.
8857
8858 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8859
8860 * Makefile.in (SFILES): Append common/common-regcache.c.
8861 (OBS): Append common-regcache.o.
8862 (common-regcache.o): New rule.
8863 * regcache.c (init_register_cache): Initialize cache to
8864 REG_UNAVAILABLE.
8865 (regcache_raw_read_unsigned): New function.
8866 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8867 register_status enum.
8868
8869 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8870
8871 * linux-aarch64-low.c (the_low_targets): Rename
8872 breakpoint_reinsert_addr to get_next_pcs.
8873 * linux-arm-low.c (the_low_targets): Likewise.
8874 * linux-bfin-low.c (the_low_targets): Likewise.
8875 * linux-cris-low.c (the_low_targets): Likewise.
8876 * linux-crisv32-low.c (the_low_targets): Likewise.
8877 * linux-low.c (can_software_single_step): Likewise.
8878 (install_software_single_step_breakpoints): New function.
8879 (start_step_over): Use install_software_single_step_breakpoints.
8880 * linux-low.h: New CORE_ADDR vector.
8881 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8882 get_next_pcs.
8883 * linux-mips-low.c (the_low_targets): Likewise.
8884 * linux-nios2-low.c (the_low_targets): Likewise.
8885 * linux-sparc-low.c (the_low_targets): Likewise.
8886
8887 2015-12-17 Pedro Alves <palves@redhat.com>
8888
8889 * linux-low.c (linux_kill_one_lwp): Remove references to
8890 LinuxThreads.
8891 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8892 to 'kill'.
8893 (linux_init_signals): Delete.
8894 (initialize_low): Adjust.
8895 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8896
8897 2015-12-16 Pedro Alves <palves@redhat.com>
8898
8899 * configure.ac (compiler warning flags): When testing a
8900 -Wno-foo option, check whether -Wfoo works instead.
8901 * configure: Regenerate.
8902
8903 2015-12-11 Don Breazeal <donb@codesourcery.com>
8904
8905 * server.c (process_serial_event): Don't exit from gdbserver
8906 in remote mode if there are still active inferiors.
8907
8908 2015-12-11 Yao Qi <yao.qi@linaro.org>
8909
8910 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8911 arm_breakpoint_at if the process is 32-bit.
8912
8913 2015-12-11 Yao Qi <yao.qi@linaro.org>
8914
8915 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8916 arm breakpoint.
8917
8918 2015-12-07 Yao Qi <yao.qi@linaro.org>
8919
8920 * configure.srv: Append arm.o to srv_tgtobj for
8921 aarch64*-*-linux* target.
8922 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8923 from linux-arm-low.c.
8924 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8925 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8926 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8927 (thumb2_breakpoint_len): Likewise.
8928 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8929 (arm_breakpoint_kinds): Likewise.
8930 (arm_breakpoint_kind_from_pc): Likewise.
8931 (arm_sw_breakpoint_from_kind): Likewise.
8932 (arm_breakpoint_kind_from_current_state): Likewise.
8933 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8934 (arm_sw_breakpoint_from_kind): Declare.
8935 (arm_breakpoint_kind_from_current_state): Declare.
8936 (arm_breakpoint_at): Declare.
8937 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8938 arm_sw_breakpoint_from_kind if process is 32-bit.
8939 (aarch64_breakpoint_kind_from_pc): New function.
8940 (aarch64_breakpoint_kind_from_current_state): New function.
8941 (the_low_target): Initialize fields breakpoint_kind_from_pc
8942 and breakpoint_kind_from_current_state.
8943 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8944 linux-aarch32-low.c.
8945 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8946 (arm_breakpoint, arm_breakpoint_len): Likewise.
8947 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8948 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8949 (arm_is_thumb_mode): Likewise.
8950 (arm_breakpoint_at): Likewise.
8951 (arm_breakpoint_kind_from_pc): Likewise.
8952 (arm_sw_breakpoint_from_kind): Likewise.
8953 (arm_breakpoint_kind_from_current_state): Likewise.
8954
8955 Revert:
8956 2015-08-04 Yao Qi <yao.qi@linaro.org>
8957
8958 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8959 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8960 * server.c (extended_protocol): Remove "static".
8961 * server.h (extended_protocol): Declare it.
8962
8963 2015-12-04 Josh Stone <jistone@redhat.com>
8964
8965 * target.h (struct target_ops) <arch_setup>: Rename to ...
8966 (struct target_ops) <post_create_inferior>: ... this.
8967 (target_arch_setup): Rename to ...
8968 (target_post_create_inferior): ... this, calling post_create_inferior.
8969 * server.c (start_inferior): Update target_arch_setup calls to
8970 target_post_create_inferior.
8971 * linux-low.c (linux_low_ptrace_options): Forward declare.
8972 (linux_arch_setup): Update its comment for general use.
8973 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8974 (struct linux_target_ops): Use linux_post_create_inferior.
8975 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8976 to post_create_inferior.
8977 * nto-low.c (struct nto_target_ops): Likewise.
8978 * spu-low.c (struct spu_target_ops): Likewise.
8979 * win32-low.c (struct win32_target_ops): Likewise.
8980
8981 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8982
8983 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8984
8985 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8986
8987 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8988 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8989 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8990 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8991 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8992 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8993 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8994 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8995 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8996 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8997 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8998 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8999
9000 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9001
9002 * linux-low.c (linux_look_up_symbols): Don't call
9003 linux_supports_traceclone.
9004 * linux-low.h (thread_db_init): Remove use_events argument.
9005 * thread-db.c (thread_db_use_event): Remove global variable.
9006 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9007 (struct thread_db) <td_create_bp>: Remove field.
9008 (thread_db_create_event): Remove function.
9009 (thread_db_enable_reporting): Likewise.
9010 (find_one_thread): Don't check for thread_db_use_events.
9011 (attach_thread): Likewise.
9012 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9013 (try_thread_db_load_1): Don't check for thread_db_use_events.
9014 (thread_db_init): Remove use_events argument and thread events
9015 handling.
9016 (remove_thread_event_breakpoints): Remove function.
9017 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9018
9019 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9020
9021 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9022 New function.
9023 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9024 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9025 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9026 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9027 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9028 Initialize.
9029 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9030 New function.
9031 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9032 * linux-low.c (can_hardware_single_step): Use
9033 supports_hardware_single_step.
9034 (can_software_single_step): New function.
9035 (start_step_over): Call can_software_single_step.
9036 (linux_supports_hardware_single_step): New function.
9037 (struct target_ops) <supports_software_single_step>: Initialize.
9038 * linux-low.h (struct linux_target_ops)
9039 <supports_hardware_single_step>: Initialize.
9040 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9041 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9042 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9043 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9044 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9045 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9046 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9047 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9048 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9049 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9050 Initialize.
9051 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9052 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9053 Initialize.
9054 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9055 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9056 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9057 New function.
9058 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9059 * target.h (struct target_ops): <supports_software_single_step>:
9060 New field.
9061 (target_supports_software_single_step): New macro.
9062
9063 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9064
9065 * linux-low.c (linux_wait_1): Fix pc advance condition.
9066 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9067 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9068
9069 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9070
9071 * linux-arm-low.c (arm_is_thumb_mode): New function.
9072 (arm_breakpoint_at): Use arm_is_thumb_mode.
9073 (arm_breakpoint_kind_from_current_state): New function.
9074 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9075 Initialize.
9076 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9077 (linux_breakpoint_kind_from_current_state): New function.
9078 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9079 * linux-low.h (struct linux_target_ops)
9080 <breakpoint_kind_from_current_state>: New field.
9081 * target.h (struct target_ops): Likewise.
9082 (target_breakpoint_kind_from_current_state): New macro.
9083
9084 2015-11-30 Pedro Alves <palves@redhat.com>
9085
9086 * linux-low.c (linux_resume): Wake up the event loop before
9087 returning.
9088
9089 2015-11-30 Pedro Alves <palves@redhat.com>
9090
9091 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9092 check.
9093 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9094 to -1.
9095 * target.c (struct thread_search): New structure.
9096 (thread_search_callback): New function.
9097 (prev_general_thread): New global.
9098 (prepare_to_access_memory, done_accessing_memory): New functions.
9099 * target.h (prepare_to_access_memory, done_accessing_memory):
9100 Replace macros with function declarations.
9101
9102 2015-11-30 Pedro Alves <palves@redhat.com>
9103
9104 PR 14618
9105 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9106 report TARGET_WAITKIND_NO_RESUMED.
9107 * remote-utils.c (prepare_resume_reply): Handle
9108 TARGET_WAITKIND_NO_RESUMED.
9109 * server.c (report_no_resumed): New global.
9110 (handle_query) <qSupported>: Handle "no-resumed+". Report
9111 "no-resumed+" support.
9112 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9113 return error if the client doesn't support no-resumed events.
9114 (push_stop_notification): New function.
9115 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9116 events if the client supports them.
9117
9118 2015-11-30 Pedro Alves <palves@redhat.com>
9119
9120 * linux-low.c (thread_still_has_status_pending_p): Don't check
9121 vCont;t here.
9122 (lwp_resumed): New function.
9123 (status_pending_p_callback): Return early if the LWP is not
9124 supposed to be resumed.
9125
9126 2015-11-30 Pedro Alves <palves@redhat.com>
9127
9128 * linux-low.c (handle_extended_wait): Assert that the LWP's
9129 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9130 thread create events, leave the new child's status pending.
9131 (linux_low_filter_event): If GDB wants to hear about thread exit
9132 events, leave the LWP marked dead and don't delete it.
9133 (linux_wait_for_event_filtered): Don't check for thread exit.
9134 (filter_exit_event): New function.
9135 (linux_wait_1): Use it, when returning an exit event.
9136 (linux_resume_one_lwp_throw): Assert that the LWP's
9137 waitstatus is TARGET_WAITKIND_IGNORE.
9138 * remote-utils.c (prepare_resume_reply): Handle
9139 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9140 * server.c (report_thread_events): New global.
9141 (handle_general_set): Handle QThreadEvents.
9142 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9143 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9144 TARGET_WAITKIND_THREAD_EXITED.
9145 * server.h (report_thread_events): Declare.
9146
9147 2015-11-30 Pedro Alves <palves@redhat.com>
9148
9149 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9150 the thread's last_resume_kind was resume_stop.
9151
9152 2015-11-30 Pedro Alves <palves@redhat.com>
9153
9154 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9155 before returning.
9156
9157 2015-11-30 Pedro Alves <palves@redhat.com>
9158
9159 * server.c (handle_v_requests): Handle vCtrlC.
9160
9161 2015-11-30 Pedro Alves <palves@redhat.com>
9162
9163 * gdbthread.h (find_any_thread_of_pid): Declare.
9164 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9165 functions.
9166 * server.c (handle_query): If current_thread is NULL, look for
9167 another thread of the selected process.
9168
9169 2015-11-26 Daniel Colascione <dancol@dancol.org>
9170 Simon Marchi <simon.marchi@ericsson.com>
9171
9172 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9173 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9174 name in reply.
9175 * target.h (struct target_ops) <thread_name>: New field.
9176 (target_thread_name): New macro.
9177
9178 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9179
9180 * regcache.h (regcache_invalidate_pid): Add declaration.
9181 * regcache.c (regcache_invalidate_pid): New function, extracted
9182 from regcache_invalidate.
9183 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9184 Add trivial documentation comment.
9185 * lynx-low.c: Use regcache_invalidate_pid instead of
9186 regcache_invalidate.
9187
9188 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9189
9190 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9191 and Elf64_auxv_t if the target is Android.
9192
9193 2015-11-22 Doug Evans <xdje42@gmail.com>
9194
9195 * target.h: #include <sys/types.h>.
9196
9197 2015-11-19 Pedro Alves <palves@redhat.com>
9198
9199 * linux-low.c (linux_process_qsupported): Change prototype.
9200 Adjust.
9201 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9202 Change prototype.
9203 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9204 and adjust to loop over all features.
9205 * server.c (handle_query) <qSupported>: Adjust to call
9206 target_process_qsupported once, passing it a vector of unprocessed
9207 features.
9208 * target.h (struct target_ops) <process_qsupported>: Change
9209 prototype.
9210 (target_process_qsupported): Adjust.
9211
9212 2015-11-19 Pedro Alves <palves@redhat.com>
9213
9214 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9215 mode.
9216 * configure: Regenerate.
9217
9218 2015-11-19 Pedro Alves <palves@redhat.com>
9219
9220 * configure: Regenerate.
9221
9222 2015-11-19 Yao Qi <yao.qi@linaro.org>
9223
9224 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9225 type to uint32_t.
9226
9227 2015-11-19 Yao Qi <yao.qi@linaro.org>
9228
9229 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9230 (struct aarch64_operand): Move enum out.
9231
9232 2015-11-19 Yao Qi <yao.qi@linaro.org>
9233
9234 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9235 struct user_fpsimd_state *.
9236 (aarch64_store_fpregset): Likewise.
9237
9238 2015-11-19 Yao Qi <yao.qi@linaro.org>
9239
9240 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9241 struct user_pt_regs *.
9242 (aarch64_store_gregset): Likewise.
9243
9244 2015-11-18 Pedro Alves <palves@redhat.com>
9245
9246 * Makefile.in (all_object_files): Add $IPA_OBJS.
9247
9248 2015-11-17 Pedro Alves <palves@redhat.com>
9249
9250 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9251 GDB_SIGNAL_0 and gdb_signal_to_string.
9252
9253 2015-11-17 Pedro Alves <palves@redhat.com>
9254
9255 * win32-low.c (handle_output_debug_string): Remove parameter.
9256 (win32_kill): Remove our_status local and adjust call to
9257 handle_output_debug_string.
9258 (get_child_debug_event): Adjust call to
9259 handle_output_debug_string.
9260
9261 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9262
9263 * linux-mips-low.c (mips_fill_gregset): Add cast.
9264 (mips_store_gregset): Likewise.
9265 (mips_fill_fpregset): Likewise.
9266 (mips_store_fpregset): Likewise.
9267
9268 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9269
9270 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9271 priv.
9272
9273 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9274
9275 * linux-mips-low.c (mips_linux_new_thread): Change type of
9276 watch_type to enum target_hw_bp_type.
9277
9278 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9279
9280 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9281 Change return type to arm_hwbp_type.
9282
9283 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9284
9285 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9286 (arm_store_gregset): Likewise.
9287 * linux-arm-low.c (arm_get_hwcap): Likewise.
9288 (arm_read_description): Likewise.
9289
9290 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9291
9292 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9293
9294 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9295
9296 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9297 (ppc_fill_vsxregset): Likewise.
9298 (ppc_store_vsxregset): Likewise.
9299 (ppc_fill_vrregset): Likewise.
9300 (ppc_store_vrregset): Likewise.
9301 (ppc_fill_evrregset): Likewise.
9302 (ppc_store_evrregset): Likewise.
9303
9304 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9305
9306 * linux-ppc-low.c (ppc_usrregs_info): Remove
9307 forward-declaration.
9308 (ppc_arch_setup): Move lower in file.
9309
9310 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9311
9312 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9313 (ps_pdwrite): Likewise.
9314
9315 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9316
9317 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9318 to after assert checks.
9319
9320 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9321
9322 * proc-service.c (ps_pdread): Add/adjust casts.
9323 (ps_pdwrite): Add/adjust casts.
9324
9325 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9326
9327 * server.c (handle_search_memory_1): Cast return value of
9328 memmem.
9329
9330 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9331
9332 * server.c (write_qxfer_response): Change type of data to
9333 gdb_byte *.
9334
9335 2015-10-29 Pedro Alves <palves@redhat.com>
9336
9337 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9338
9339 2015-10-29 Pedro Alves <palves@redhat.com>
9340
9341 * tracepoint.c (clear_installed_tracepoints): Add casts.
9342
9343 2015-10-29 Pedro Alves <palves@redhat.com>
9344
9345 * server.c (handle_v_cont, process_serial_event): Add enum
9346 gdb_signal casts to signal parsing code.
9347
9348 2015-10-29 Pedro Alves <palves@redhat.com>
9349
9350 * linux-low.h (NULL_REGSET): Define.
9351 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9352 * linux-arm-low.c (arm_regsets): Likewise.
9353 * linux-crisv32-low.c (cris_regsets): Likewise.
9354 * linux-m68k-low.c (m68k_regsets): Likewise.
9355 * linux-mips-low.c (mips_regsets): Likewise.
9356 * linux-nios2-low.c (nios2_regsets): Likewise.
9357 * linux-ppc-low.c (ppc_regsets): Likewise.
9358 * linux-s390-low.c (s390_regsets): Likewise.
9359 * linux-sh-low.c (sh_regsets): Likewise.
9360 * linux-sparc-low.c (sparc_regsets): Likewise.
9361 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9362 * linux-tile-low.c (tile_regsets): Likewise.
9363 * linux-x86-low.c (x86_regsets): Likewise.
9364 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9365
9366 2015-10-29 Pedro Alves <palves@redhat.com>
9367
9368 * linux-low.h (NULL_REGSET): Define.
9369 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9370 * linux-arm-low.c (arm_regsets): Likewise.
9371 * linux-crisv32-low.c (cris_regsets): Likewise.
9372 * linux-m68k-low.c (m68k_regsets): Likewise.
9373 * linux-mips-low.c (mips_regsets): Likewise.
9374 * linux-nios2-low.c (nios2_regsets): Likewise.
9375 * linux-ppc-low.c (ppc_regsets): Likewise.
9376 * linux-s390-low.c (s390_regsets): Likewise.
9377 * linux-sh-low.c (sh_regsets): Likewise.
9378 * linux-sparc-low.c (sparc_regsets): Likewise.
9379 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9380 * linux-tile-low.c (tile_regsets): Likewise.
9381 * linux-x86-low.c (x86_regsets): Likewise.
9382 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9383
9384 2015-10-26 Doug Evans <dje@google.com>
9385
9386 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9387
9388 2015-10-26 Doug Evans <dje@google.com>
9389
9390 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9391
9392 2015-10-26 Doug Evans <dje@google.com>
9393
9394 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9395 for debug_printf.
9396 (attach_thread, find_new_threads_callback): Ditto.
9397
9398 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9399
9400 * mem-break.h (set_breakpoint_data): Remove.
9401
9402 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9403
9404 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9405 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9406 (initialize_low): Remove set_breakpoint_data call.
9407 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9408 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9409 (initialize_low): Remove set_breakpoint_data call.
9410 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9411 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9412 (initialize_low): Remove set_breakpoint_data call.
9413
9414 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9415
9416 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9417 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9418 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9419 * target.h (target_breakpoint_kind_from_pc): New macro.
9420
9421 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9422
9423 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9424 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9425 the default breakpoint kind.
9426
9427 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9428
9429 * linux-arm-low.c (arm_supports_z_point_type): Add software
9430 breakpoint support.
9431
9432 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9433
9434 * linux-arm-low.c: Refactor breakpoint definitions.
9435 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9436 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9437
9438 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9439
9440 * Makefile.in: Add arm.c/o.
9441 * configure.srv: Likewise.
9442 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9443 (arm_breakpoint_kind_from_pc): New function.
9444 (arm_sw_breakpoint_from_kind): Return proper kind.
9445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9446
9447 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9448
9449 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9450 removal.
9451 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9452 (struct raw_breakpoint) <size>: Remove.
9453 (struct raw_breakpoint) <kind>: Add.
9454 (bp_size): New function.
9455 (bp_opcode): Likewise.
9456 (find_raw_breakpoint_at): Adjust for kind.
9457 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9458 (remove_memory_breakpoint): Adjust for kind call bp_size.
9459 (set_raw_breakpoint_at): Adjust for kind.
9460 (set_breakpoint): Likewise.
9461 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9462 (delete_raw_breakpoint): Adjust for kind.
9463 (delete_breakpoint): Likewise.
9464 (find_gdb_breakpoint): Likewise.
9465 (set_gdb_breakpoint_1): Likewise.
9466 (set_gdb_breakpoint): Likewise.
9467 (delete_gdb_breakpoint_1): Likewise.
9468 (delete_gdb_breakpoint): Likewise.
9469 (uninsert_raw_breakpoint): Likewise.
9470 (reinsert_raw_breakpoint): Likewise.
9471 (set_breakpoint_data): Remove.
9472 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9473 (check_mem_read): Adjust for kind call bp_size.
9474 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9475 (clone_one_breakpoint): Adjust for kind.
9476 * mem-break.h (set_gdb_breakpoint): Likewise.
9477 (delete_gdb_breakpoint): Likewise.
9478 * server.c (process_serial_event): Likewise.
9479
9480 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9481
9482 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9483 (struct linux_target_ops) <breakpoint>: Remove.
9484 (struct linux_target_ops) <breakpoint_len>: Remove.
9485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9487 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9488 (arm_sw_breakpoint_from_kind): New function.
9489 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9505 and sw_breakpoint_from_kind to increment the pc.
9506 (linux_breakpoint_kind_from_pc): New function.
9507 (linux_sw_breakpoint_from_kind): New function.
9508 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9509 (initialize_low): Call breakpoint_kind_from_pc and
9510 sw_breakpoint_from_kind to replace breakpoint_data/len.
9511 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9512 New field.
9513 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9514 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9535 (struct linux_target_ops) <breakpoint>: Remove.
9536 (struct linux_target_ops) <breakpoint_len>: Remove.
9537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9539 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9540 (struct linux_target_ops) <breakpoint>: Remove.
9541 (struct linux_target_ops) <breakpoint_len>: Remove.
9542 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9543 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9544 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9545 (struct linux_target_ops) <breakpoint>: Remove.
9546 (struct linux_target_ops) <breakpoint_len>: Remove.
9547 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9548 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9549 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9550 (struct linux_target_ops) <breakpoint>: Remove.
9551 (struct linux_target_ops) <breakpoint_len>: Remove.
9552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9554 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9555 (struct linux_target_ops) <breakpoint>: Remove.
9556 (struct linux_target_ops) <breakpoint_len>: Remove.
9557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9558 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9559 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9560 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9561 (struct linux_target_ops) <breakpoint>: Remove.
9562 (struct linux_target_ops) <breakpoint_len>: Remove.
9563 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9564 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9565 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9566 (struct linux_target_ops) <breakpoint>: Remove.
9567 (struct linux_target_ops) <breakpoint_len>: Remove.
9568 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9569 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9570
9571 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9572
9573 * linux-cris-low.c (cris_get_pc): Remove void arg.
9574
9575 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9576
9577 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9578 variable name.
9579
9580 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9581
9582 * inferiors.c (thread_pid_matches_callback): New function.
9583 (find_thread_process): New function.
9584 (remove_thread): Reset current_thread.
9585 (remove_process): Assert threads have been removed first.
9586
9587 2015-10-15 Yao Qi <yao.qi@linaro.org>
9588
9589 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9590 if it is 3.
9591 (aarch64_remove_point): Likewise.
9592 * regcache.c (regcache_register_size): New function.
9593
9594 2015-10-12 Yao Qi <yao.qi@linaro.org>
9595
9596 * linux-aarch64-low.c: Update all callers as emit_load_store
9597 is renamed to aarch64_emit_load_store.
9598
9599 2015-10-12 Yao Qi <yao.qi@linaro.org>
9600
9601 * linux-aarch64-low.c: Update all callers of function renaming
9602 from emit_insn to aarch64_emit_insn.
9603
9604 2015-10-12 Yao Qi <yao.qi@linaro.org>
9605
9606 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9607 arch/aarch64-insn.h.
9608 (struct aarch64_memory_operand): Likewise.
9609 (ENCODE): Likewise.
9610 (emit_insn): Move to arch/aarch64-insn.c.
9611 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9612 (emit_load_store): Move to arch/aarch64-insn.c.
9613 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9614 (can_encode_int32): Remove.
9615
9616 2015-10-12 Yao Qi <yao.qi@linaro.org>
9617
9618 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9619 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9620 (aarch64_relocate_instruction): Likewise.
9621 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9622 (struct aarch64_insn_visitor): Likewise.
9623
9624 2015-10-12 Yao Qi <yao.qi@linaro.org>
9625
9626 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9627 (struct aarch64_insn_visitor): New.
9628 (struct aarch64_insn_relocation_data): New.
9629 (aarch64_ftrace_insn_reloc_b): New function.
9630 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9631 (aarch64_ftrace_insn_reloc_cb): Likewise.
9632 (aarch64_ftrace_insn_reloc_tb): Likewise.
9633 (aarch64_ftrace_insn_reloc_adr): Likewise.
9634 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9635 (aarch64_ftrace_insn_reloc_others): Likewise.
9636 (visitor): New.
9637 (aarch64_relocate_instruction): Use visitor.
9638
9639 2015-10-12 Yao Qi <yao.qi@linaro.org>
9640
9641 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9642 int. Add argument buf.
9643 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9644 aarch64_relocate_instruction.
9645
9646 2015-10-12 Yao Qi <yao.qi@linaro.org>
9647
9648 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9649 argument insn. Remove local variable insn. Don't call
9650 target_read_uint32.
9651 (aarch64_install_fast_tracepoint_jump_pad): Call
9652 target_read_uint32.
9653
9654 2015-09-30 Yao Qi <yao.qi@linaro.org>
9655
9656 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9657 (emit_load_store_pair): Likewise.
9658
9659 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9660
9661 * dll.c (match_dll): Add cast(s).
9662 (unloaded_dll): Likewise.
9663 * linux-low.c (second_thread_of_pid_p): Likewise.
9664 (delete_lwp_callback): Likewise.
9665 (count_events_callback): Likewise.
9666 (select_event_lwp_callback): Likewise.
9667 (linux_set_resume_request): Likewise.
9668 * server.c (accumulate_file_name_length): Likewise.
9669 (emit_dll_description): Likewise.
9670 (handle_qxfer_threads_worker): Likewise.
9671 (visit_actioned_threads): Likewise.
9672 * thread-db.c (any_thread_of): Likewise.
9673 * tracepoint.c (same_process_p): Likewise.
9674 (match_blocktype): Likewise.
9675 (build_traceframe_info_xml): Likewise.
9676
9677 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9678
9679 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9680 assignment.
9681 (gdb_unparse_agent_expr): Likewise.
9682 * hostio.c (require_data): Likewise.
9683 (handle_pread): Likewise.
9684 * linux-low.c (disable_regset): Likewise.
9685 (fetch_register): Likewise.
9686 (store_register): Likewise.
9687 (get_dynamic): Likewise.
9688 (linux_qxfer_libraries_svr4): Likewise.
9689 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9690 (set_fast_tracepoint_jump): Likewise.
9691 (uninsert_fast_tracepoint_jumps_at): Likewise.
9692 (reinsert_fast_tracepoint_jumps_at): Likewise.
9693 (validate_inserted_breakpoint): Likewise.
9694 (clone_agent_expr): Likewise.
9695 * regcache.c (init_register_cache): Likewise.
9696 * remote-utils.c (putpkt_binary_1): Likewise.
9697 (decode_M_packet): Likewise.
9698 (decode_X_packet): Likewise.
9699 (look_up_one_symbol): Likewise.
9700 (relocate_instruction): Likewise.
9701 (monitor_output): Likewise.
9702 * server.c (handle_search_memory): Likewise.
9703 (handle_qxfer_exec_file): Likewise.
9704 (handle_qxfer_libraries): Likewise.
9705 (handle_qxfer): Likewise.
9706 (handle_query): Likewise.
9707 (handle_v_cont): Likewise.
9708 (handle_v_run): Likewise.
9709 (captured_main): Likewise.
9710 * target.c (write_inferior_memory): Likewise.
9711 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9712 * tracepoint.c (init_trace_buffer): Likewise.
9713 (add_tracepoint_action): Likewise.
9714 (add_traceframe): Likewise.
9715 (add_traceframe_block): Likewise.
9716 (cmd_qtdpsrc): Likewise.
9717 (cmd_qtdv): Likewise.
9718 (cmd_qtstatus): Likewise.
9719 (response_source): Likewise.
9720 (response_tsv): Likewise.
9721 (cmd_qtnotes): Likewise.
9722 (gdb_collect): Likewise.
9723 (initialize_tracepoint): Likewise.
9724
9725 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9726
9727 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9728 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9729 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9730 <NOP>: New.
9731 (enum aarch64_condition_codes): New enum.
9732 (w0): New static global.
9733 (fp): Likewise.
9734 (lr): Likewise.
9735 (struct aarch64_memory_operand) <type>: New
9736 MEMORY_OPERAND_POSTINDEX type.
9737 (postindex_memory_operand): New helper function.
9738 (emit_ret): New function.
9739 (emit_load_store_pair): New function, factored out of emit_stp
9740 with support for MEMORY_OPERAND_POSTINDEX.
9741 (emit_stp): Rewrite using emit_load_store_pair.
9742 (emit_ldp): New function.
9743 (emit_load_store): Likewise.
9744 (emit_ldr): Mention post-index instruction in comment.
9745 (emit_ldrh): New function.
9746 (emit_ldrb): New function.
9747 (emit_ldrsw): Mention post-index instruction in comment.
9748 (emit_str): Likewise.
9749 (emit_subs): New function.
9750 (emit_cmp): Likewise.
9751 (emit_and): Likewise.
9752 (emit_orr): Likewise.
9753 (emit_orn): Likewise.
9754 (emit_eor): Likewise.
9755 (emit_mvn): Likewise.
9756 (emit_lslv): Likewise.
9757 (emit_lsrv): Likewise.
9758 (emit_asrv): Likewise.
9759 (emit_mul): Likewise.
9760 (emit_sbfm): Likewise.
9761 (emit_sbfx): Likewise.
9762 (emit_ubfm): Likewise.
9763 (emit_ubfx): Likewise.
9764 (emit_csinc): Likewise.
9765 (emit_cset): Likewise.
9766 (emit_nop): Likewise.
9767 (emit_ops_insns): New helper function.
9768 (emit_pop): Likewise.
9769 (emit_push): Likewise.
9770 (aarch64_emit_prologue): New function.
9771 (aarch64_emit_epilogue): Likewise.
9772 (aarch64_emit_add): Likewise.
9773 (aarch64_emit_sub): Likewise.
9774 (aarch64_emit_mul): Likewise.
9775 (aarch64_emit_lsh): Likewise.
9776 (aarch64_emit_rsh_signed): Likewise.
9777 (aarch64_emit_rsh_unsigned): Likewise.
9778 (aarch64_emit_ext): Likewise.
9779 (aarch64_emit_log_not): Likewise.
9780 (aarch64_emit_bit_and): Likewise.
9781 (aarch64_emit_bit_or): Likewise.
9782 (aarch64_emit_bit_xor): Likewise.
9783 (aarch64_emit_bit_not): Likewise.
9784 (aarch64_emit_equal): Likewise.
9785 (aarch64_emit_less_signed): Likewise.
9786 (aarch64_emit_less_unsigned): Likewise.
9787 (aarch64_emit_ref): Likewise.
9788 (aarch64_emit_if_goto): Likewise.
9789 (aarch64_emit_goto): Likewise.
9790 (aarch64_write_goto_address): Likewise.
9791 (aarch64_emit_const): Likewise.
9792 (aarch64_emit_call): Likewise.
9793 (aarch64_emit_reg): Likewise.
9794 (aarch64_emit_pop): Likewise.
9795 (aarch64_emit_stack_flush): Likewise.
9796 (aarch64_emit_zero_ext): Likewise.
9797 (aarch64_emit_swap): Likewise.
9798 (aarch64_emit_stack_adjust): Likewise.
9799 (aarch64_emit_int_call_1): Likewise.
9800 (aarch64_emit_void_call_2): Likewise.
9801 (aarch64_emit_eq_goto): Likewise.
9802 (aarch64_emit_ne_goto): Likewise.
9803 (aarch64_emit_lt_goto): Likewise.
9804 (aarch64_emit_le_goto): Likewise.
9805 (aarch64_emit_gt_goto): Likewise.
9806 (aarch64_emit_ge_got): Likewise.
9807 (aarch64_emit_ops_impl): New static global variable.
9808 (aarch64_emit_ops): New target function, return
9809 &aarch64_emit_ops_impl.
9810 (struct linux_target_ops): Install it.
9811
9812 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9813
9814 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9815 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9816 aarch64-ipa.o.
9817 * linux-aarch64-ipa.c: New file.
9818 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9819 and endian.h.
9820 (aarch64_get_thread_area): New target method.
9821 (extract_signed_bitfield): New helper function.
9822 (aarch64_decode_ldr_literal): New function.
9823 (enum aarch64_opcodes): New enum.
9824 (struct aarch64_register): New struct.
9825 (struct aarch64_operand): New struct.
9826 (x0): New static global.
9827 (x1): Likewise.
9828 (x2): Likewise.
9829 (x3): Likewise.
9830 (x4): Likewise.
9831 (w2): Likewise.
9832 (ip0): Likewise.
9833 (sp): Likewise.
9834 (xzr): Likewise.
9835 (aarch64_register): New helper function.
9836 (register_operand): Likewise.
9837 (immediate_operand): Likewise.
9838 (struct aarch64_memory_operand): New struct.
9839 (offset_memory_operand): New helper function.
9840 (preindex_memory_operand): Likewise.
9841 (enum aarch64_system_control_registers): New enum.
9842 (ENCODE): New macro.
9843 (emit_insn): New helper function.
9844 (emit_b): New function.
9845 (emit_bcond): Likewise.
9846 (emit_cb): Likewise.
9847 (emit_tb): Likewise.
9848 (emit_blr): Likewise.
9849 (emit_stp): Likewise.
9850 (emit_ldp_q_offset): Likewise.
9851 (emit_stp_q_offset): Likewise.
9852 (emit_load_store): Likewise.
9853 (emit_ldr): Likewise.
9854 (emit_ldrsw): Likewise.
9855 (emit_str): Likewise.
9856 (emit_ldaxr): Likewise.
9857 (emit_stxr): Likewise.
9858 (emit_stlr): Likewise.
9859 (emit_data_processing_reg): Likewise.
9860 (emit_data_processing): Likewise.
9861 (emit_add): Likewise.
9862 (emit_sub): Likewise.
9863 (emit_mov): Likewise.
9864 (emit_movk): Likewise.
9865 (emit_mov_addr): Likewise.
9866 (emit_mrs): Likewise.
9867 (emit_msr): Likewise.
9868 (emit_sevl): Likewise.
9869 (emit_wfe): Likewise.
9870 (append_insns): Likewise.
9871 (can_encode_int32_in): New helper function.
9872 (aarch64_relocate_instruction): New function.
9873 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9874 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9875 (struct linux_target_ops): Install aarch64_get_thread_area,
9876 aarch64_install_fast_tracepoint_jump_pad and
9877 aarch64_get_min_fast_tracepoint_insn_len.
9878
9879 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9880
9881 * Makefile.in (aarch64-insn.o): New rule.
9882 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9883
9884 2015-09-21 Yao Qi <yao.qi@linaro.org>
9885
9886 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9887
9888 2015-09-21 Yao Qi <yao.qi@linaro.org>
9889
9890 * tracepoint.c (max_jump_pad_size): Remove.
9891
9892 2015-09-18 Yao Qi <yao.qi@linaro.org>
9893
9894 * linux-aarch64-low.c: Don't include sys/uio.h.
9895 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9896
9897 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9898
9899 * tracepoint.c (eval_result_type): Change prototype.
9900 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9901
9902 2015-09-15 Pedro Alves <palves@redhat.com>
9903
9904 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9905 Check whether to report exec events instead of checking whether
9906 multiprocess is enabled.
9907
9908 2015-09-15 Pedro Alves <palves@redhat.com>
9909
9910 PR remote/18965
9911 * remote-utils.c (prepare_resume_reply): Merge
9912 TARGET_WAITKIND_VFORK_DONE switch case with the
9913 TARGET_WAITKIND_FORKED case.
9914
9915 2015-09-15 Yao Qi <yao.qi@linaro.org>
9916
9917 * server.c (handle_query): Check string comparison using
9918 "else if" instead of "if".
9919
9920 2015-09-15 Yao Qi <yao.qi@linaro.org>
9921
9922 * server.c (vCont_supported): New global variable.
9923 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9924 matches. Append ";vContSupported+" to own_buf.
9925 (handle_v_requests): Append ";s;S" to own_buf if target supports
9926 hardware single step or vCont_supported is false.
9927 (capture_main): Set vCont_supported to zero.
9928
9929 2015-09-15 Yao Qi <yao.qi@linaro.org>
9930
9931 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9932 it to ...
9933 (linux_supports_hardware_single_step): ... New function.
9934 (linux_target_ops): Update.
9935 * lynx-low.c (lynx_target_ops): Set field
9936 supports_hardware_single_step to target_can_do_hardware_single_step.
9937 * nto-low.c (nto_target_ops): Likewise.
9938 * spu-low.c (spu_target_ops): Likewise.
9939 * win32-low.c (win32_target_ops): Likewise.
9940 * target.c (target_can_do_hardware_single_step): New function.
9941 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9942 Remove. <supports_hardware_single_step>: New field.
9943 (target_supports_conditional_breakpoints): Remove.
9944 (target_supports_hardware_single_step): New macro.
9945 (target_can_do_hardware_single_step): Declare.
9946 * server.c (handle_query): Use target_supports_hardware_single_step
9947 instead of target_supports_conditional_breakpoints.
9948
9949 2015-09-15 Yao Qi <yao.qi@linaro.org>
9950
9951 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9952 function.
9953 (struct linux_target_ops the_low_target): Install
9954 aarch64_linux_siginfo_fixup.
9955
9956 2015-09-11 Don Breazeal <donb@codesourcery.com>
9957 Luis Machado <lgustavo@codesourcery.com>
9958
9959 * linux-low.c (linux_mourn): Static declaration.
9960 (linux_arch_setup): Move in front of
9961 handle_extended_wait.
9962 (linux_arch_setup_thread): New function.
9963 (handle_extended_wait): Handle exec events. Call
9964 linux_arch_setup_thread. Make event_lwp argument a
9965 pointer-to-a-pointer.
9966 (check_zombie_leaders): Do not check stopped threads.
9967 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9968 (linux_low_filter_event): Add lwp and thread for exec'ing
9969 non-leader thread if leader thread has been deleted.
9970 Refactor code into linux_arch_setup_thread and call it.
9971 Pass child lwp pointer by reference to handle_extended_wait.
9972 (linux_wait_for_event_filtered): Update comment.
9973 (linux_wait_1): Prevent clobbering exec event status.
9974 (linux_supports_exec_events): New function.
9975 (linux_target_ops) <supports_exec_events>: Initialize new member.
9976 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9977 new member.
9978 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9979 * server.c (report_exec_events): New global variable.
9980 (handle_query): Handle qSupported query for exec-events feature.
9981 (captured_main): Initialize report_exec_events.
9982 * server.h (report_exec_events): Declare new global variable.
9983 * target.h (struct target_ops) <supports_exec_events>: New
9984 member.
9985 (target_supports_exec_events): New macro.
9986 * win32-low.c (win32_target_ops) <supports_exec_events>:
9987 Initialize new member.
9988
9989 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9990
9991 * linux-low.c (linux_low_enable_btrace): Remove.
9992 (linux_target_ops): Replace linux_low_enable_btrace with
9993 linux_enable_btrace.
9994
9995 2015-09-03 Yao Qi <yao.qi@linaro.org>
9996
9997 * linux-aarch64-low.c (aarch64_insert_point): Call
9998 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9999 returns true.
10000
10001 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10002
10003 * linux-low.c (check_stopped_by_breakpoint): Use
10004 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10005
10006 2015-08-27 Pedro Alves <palves@redhat.com>
10007
10008 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10009
10010 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10011
10012 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10013 the XNEW-family equivalent.
10014 (compile_bytecodes): Likewise.
10015 * dll.c (loaded_dll): Likewise.
10016 * event-loop.c (append_callback_event): Likewise.
10017 (create_file_handler): Likewise.
10018 (create_file_event): Likewise.
10019 * hostio.c (handle_open): Likewise.
10020 * inferiors.c (add_thread): Likewise.
10021 (add_process): Likewise.
10022 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10023 * linux-arm-low.c (arm_new_process): Likewise.
10024 (arm_new_thread): Likewise.
10025 * linux-low.c (add_to_pid_list): Likewise.
10026 (linux_add_process): Likewise.
10027 (handle_extended_wait): Likewise.
10028 (add_lwp): Likewise.
10029 (enqueue_one_deferred_signal): Likewise.
10030 (enqueue_pending_signal): Likewise.
10031 (linux_resume_one_lwp_throw): Likewise.
10032 (linux_resume_one_thread): Likewise.
10033 (linux_read_memory): Likewise.
10034 (linux_write_memory): Likewise.
10035 * linux-mips-low.c (mips_linux_new_process): Likewise.
10036 (mips_linux_new_thread): Likewise.
10037 (mips_add_watchpoint): Likewise.
10038 * linux-x86-low.c (initialize_low_arch): Likewise.
10039 * lynx-low.c (lynx_add_process): Likewise.
10040 * mem-break.c (set_raw_breakpoint_at): Likewise.
10041 (set_breakpoint): Likewise.
10042 (add_condition_to_breakpoint): Likewise.
10043 (add_commands_to_breakpoint): Likewise.
10044 (clone_agent_expr): Likewise.
10045 (clone_one_breakpoint): Likewise.
10046 * regcache.c (new_register_cache): Likewise.
10047 * remote-utils.c (look_up_one_symbol): Likewise.
10048 * server.c (queue_stop_reply): Likewise.
10049 (start_inferior): Likewise.
10050 (queue_stop_reply_callback): Likewise.
10051 (handle_target_event): Likewise.
10052 * spu-low.c (fetch_ppc_memory): Likewise.
10053 (store_ppc_memory): Likewise.
10054 * target.c (set_target_ops): Likewise.
10055 * thread-db.c (thread_db_load_search): Likewise.
10056 (try_thread_db_load_1): Likewise.
10057 * tracepoint.c (add_tracepoint): Likewise.
10058 (add_tracepoint_action): Likewise.
10059 (create_trace_state_variable): Likewise.
10060 (cmd_qtdpsrc): Likewise.
10061 (cmd_qtro): Likewise.
10062 (add_while_stepping_state): Likewise.
10063 * win32-low.c (child_add_thread): Likewise.
10064 (get_image_name): Likewise.
10065
10066 2015-08-25 Yao Qi <yao.qi@linaro.org>
10067
10068 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10069
10070 2015-08-25 Yao Qi <yao.qi@linaro.org>
10071
10072 * Makefile.in (aarch64-linux.o): New rule.
10073 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10074 srv_tgtobj.
10075 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10076 (aarch64_init_debug_reg_state): Make it extern.
10077 (aarch64_linux_prepare_to_resume): Remove.
10078
10079 2015-08-25 Yao Qi <yao.qi@linaro.org>
10080
10081 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10082 lwp_arch_private_info and ptid_of_lwp.
10083
10084 2015-08-25 Yao Qi <yao.qi@linaro.org>
10085
10086 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10087 Find proc_info by find_process_pid. All callers updated.
10088
10089 2015-08-25 Yao Qi <yao.qi@linaro.org>
10090
10091 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10092 Remove.
10093 (debug_reg_change_callback): Remove.
10094 (aarch64_notify_debug_reg_change): Remove.
10095
10096 2015-08-25 Yao Qi <yao.qi@linaro.org>
10097
10098 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10099 Call current_lwp_ptid.
10100
10101 2015-08-25 Yao Qi <yao.qi@linaro.org>
10102
10103 * linux-aarch64-low.c (debug_reg_change_callback): Use
10104 debug_printf.
10105
10106 2015-08-25 Yao Qi <yao.qi@linaro.org>
10107
10108 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10109
10110 2015-08-25 Yao Qi <yao.qi@linaro.org>
10111
10112 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10113
10114 2015-08-25 Yao Qi <yao.qi@linaro.org>
10115
10116 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10117 the code.
10118
10119 2015-08-25 Yao Qi <yao.qi@linaro.org>
10120
10121 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10122 Remove.
10123 (debug_reg_change_callback): Remove argument entry and add argument
10124 lwp. Remove local variable thread. Don't print thread id in the
10125 debugging output. Don't check whether pid of thread equals to pid.
10126 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10127 iterate_over_lwps instead find_inferior.
10128
10129 2015-08-24 Pedro Alves <palves@redhat.com>
10130
10131 * inferiors.c (get_first_process): New function.
10132 * inferiors.h (get_first_process): New declaration.
10133 * remote-utils.c (read_ptid): Default to the first process in the
10134 list, instead of to the current thread's process.
10135
10136 2015-08-24 Pedro Alves <palves@redhat.com>
10137
10138 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10139 * event-loop.c: Likewise.
10140 * remote-utils.c: Likewise.
10141 * tracepoint.c: Likewise.
10142
10143 2015-08-24 Pedro Alves <palves@redhat.com>
10144
10145 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10146 ptid_get_lwp.
10147
10148 2015-08-21 Pedro Alves <palves@redhat.com>
10149
10150 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10151 instead of literal 1.
10152
10153 2015-08-21 Pedro Alves <palves@redhat.com>
10154
10155 * tdesc.c (default_description): Explicitly zero-initialize.
10156
10157 2015-08-21 Pedro Alves <palves@redhat.com>
10158
10159 PR gdb/18749
10160 * inferiors.c (remove_thread): Discard any pending stop reply for
10161 this thread.
10162 * server.c (remove_all_on_match_pid): Rename to ...
10163 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10164 instead of a pid.
10165 (discard_queued_stop_replies): Change parameter to a ptid. Now
10166 extern.
10167 (handle_v_kill, kill_inferior_callback, captured_main)
10168 (process_serial_event): Adjust.
10169 * server.h (discard_queued_stop_replies): Declare.
10170
10171 2015-08-21 Pedro Alves <palves@redhat.com>
10172
10173 * linux-low.c (wait_for_sigstop): Always switch to no thread
10174 selected if the previously current thread dies.
10175 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10176 process instead of the current thread's.
10177 * remote-utils.c (input_interrupt): Don't check if there's no
10178 current thread.
10179 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10180 current thread to the general thread fails, error out.
10181 (handle_qxfer_auxv, handle_qxfer_libraries)
10182 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10183 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10184 (handle_query): Check if there's a thread selected instead of
10185 checking whether there's any thread in the thread list.
10186 (handle_qxfer_threads, handle_qxfer_btrace)
10187 (handle_qxfer_btrace_conf): Don't error out early if there's no
10188 thread in the thread list.
10189 (handle_v_cont, myresume): Don't set the current thread to the
10190 continue thread.
10191 (process_serial_event) <Hg handling>: Also set thread_id if the
10192 previous general thread is still alive.
10193 (process_serial_event) <g/G handling>: If setting the current
10194 thread to the general thread fails, error out.
10195 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10196 thread's lwp instead of the current thread's.
10197 * target.c (set_desired_thread): If the desired thread was not
10198 found, leave the current thread pointing to NULL. Return an int
10199 (boolean) indicating success.
10200 * target.h (set_desired_thread): Change return type to int.
10201
10202 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10203
10204 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10205 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10206 #includes.
10207 (ps_get_thread_area): New function.
10208
10209 2015-08-19 Gary Benson <gbenson@redhat.com>
10210
10211 * hostio.c (handle_pread): Do not attempt to read more data
10212 than hostio_reply_with_data can fit in a packet.
10213
10214 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10215
10216 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10217
10218 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10219
10220 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10221
10222 2015-08-06 Pedro Alves <palves@redhat.com>
10223
10224 * tracepoint.c (expr_eval_result): Now an int.
10225
10226 2015-08-06 Pedro Alves <palves@redhat.com>
10227
10228 * gdbthread.h (struct regcache): Forward declare.
10229 (struct thread_info) <regcache_data>: Now a struct regcache
10230 pointer.
10231 * inferiors.c (inferior_regcache_data)
10232 (set_inferior_regcache_data): Now work with struct regcache
10233 pointers.
10234 * inferiors.h (struct regcache): Forward declare.
10235 (inferior_regcache_data, set_inferior_regcache_data): Now work
10236 with struct regcache pointers.
10237 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10238 (free_register_cache_thread): Remove struct regcache pointer
10239 casts.
10240
10241 2015-08-06 Pedro Alves <palves@redhat.com>
10242
10243 * server.c (captured_main): On error, print the exception message
10244 to stderr, and if run_once is set, throw a quit.
10245
10246 2015-08-06 Pedro Alves <palves@redhat.com>
10247
10248 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10249 the current thread.
10250
10251 2015-08-06 Pedro Alves <palves@redhat.com>
10252
10253 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10254 reading beyond the passed in buffer length.
10255
10256 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10257
10258 * tracepoint.c (symbol_list) <required>: Remove.
10259
10260 2015-08-06 Pedro Alves <palves@redhat.com>
10261
10262 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10263 count if stopping and suspending threads.
10264 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10265 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10266 (linux_detach): Complete an ongoing step-over.
10267 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10268 throughout.
10269 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10270 (linux_wait_1): If passing a signal to the inferior after
10271 finishing a step-over, unsuspend and re-resume all lwps. If we
10272 see a single-step event but the thread should be continuing, don't
10273 pass the trap to gdb.
10274 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10275 internal_error instead of gdb_assert.
10276 (enqueue_pending_signal): New function.
10277 (check_ptrace_stopped_lwp_gone): Add debug output.
10278 (start_step_over): Use internal_error instead of gdb_assert.
10279 (complete_ongoing_step_over): New function.
10280 (linux_resume_one_thread): Don't resume a suspended thread.
10281 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10282 it stepping.
10283
10284 2015-08-06 Pedro Alves <palves@redhat.com>
10285
10286 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10287 (linux_thread_alive): Use lwp_is_marked_dead.
10288 (extended_event_reported): Delete.
10289 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10290 instead of extended_event_reported.
10291 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10292 as well.
10293 (lwp_is_marked_dead): New function.
10294 (lwp_running): Use lwp_is_marked_dead.
10295 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10296 comment.
10297
10298 2015-08-06 Pedro Alves <palves@redhat.com>
10299
10300 * linux-low.c (linux_wait_1): Move fork event output out of the
10301 !report_to_gdb check. Pass event_child->waitstatus to
10302 target_waitstatus_to_string instead of ourstatus.
10303
10304 2015-08-04 Yao Qi <yao.qi@linaro.org>
10305
10306 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10307 if current_thread is 32 bit.
10308
10309 2015-08-04 Yao Qi <yao.qi@linaro.org>
10310
10311 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10312 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10313 * server.c (extended_protocol): Remove "static".
10314 * server.h (extended_protocol): Declare it.
10315
10316 2015-08-04 Yao Qi <yao.qi@linaro.org>
10317
10318 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10319 both aarch64 and aarch32.
10320 (aarch64_set_pc): Likewise.
10321
10322 2015-08-04 Yao Qi <yao.qi@linaro.org>
10323
10324 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10325 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10326 arm-with-neon.xml to srv_xmlfiles.
10327 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10328 (is_64bit_tdesc): New function.
10329 (aarch64_linux_read_description): New function.
10330 (aarch64_arch_setup): Call aarch64_linux_read_description.
10331 (regs_info): Rename to regs_info_aarch64.
10332 (aarch64_regs_info): Return right regs_info.
10333 (initialize_low_arch): Call initialize_low_arch_aarch32.
10334
10335 2015-08-04 Yao Qi <yao.qi@linaro.org>
10336
10337 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10338 * linux-aarch32-low.c: New file.
10339 * linux-aarch32-low.h: New file.
10340 * linux-arm-low.c (arm_fill_gregset): Move it to
10341 linux-aarch32-low.c.
10342 (arm_store_gregset): Likewise.
10343 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10344 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10345 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10346 (regs_info): Rename to regs_info_arm.
10347 (arm_regs_info): Return regs_info_aarch32 if
10348 have_ptrace_getregset is 1 and target description is
10349 arm_with_neon or arm_with_vfpv3.
10350 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10351 Call initialize_low_arch_aarch32 instead.
10352
10353 2015-08-04 Yao Qi <yao.qi@linaro.org>
10354
10355 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10356 * linux-low.c: ... here.
10357 * linux-low.h (have_ptrace_getregset): Declare it.
10358
10359 2015-08-04 Pedro Alves <palves@redhat.com>
10360
10361 * thread-db.c (struct thread_db): Use new typedefs.
10362 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10363 CHK calls.
10364 (disable_thread_event_reporting): Cast result of dlsym to
10365 destination function pointer type.
10366 (thread_db_mourn): Use td_ta_delete_ftype.
10367
10368 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10369
10370 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10371 arch variant.
10372 (CDX_BREAKPOINT): Define for R2.
10373 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10374 (the_low_target): Add comments.
10375
10376 2015-07-30 Yao Qi <yao.qi@linaro.org>
10377
10378 * linux-arm-low.c (arm_hwcap): Remove it.
10379 (arm_read_description): New local variable arm_hwcap. Don't
10380 set arm_hwcap to zero.
10381
10382 2015-07-30 Yao Qi <yao.qi@linaro.org>
10383
10384 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10385 Use regcache->tdesc instead.
10386 (arm_store_wmmxregset): Likewise.
10387 (arm_fill_vfpregset): Likewise.
10388 (arm_store_vfpregset): Likewise.
10389
10390 2015-07-30 Yao Qi <yao.qi@linaro.org>
10391
10392 * linux-arm-low.c: Include arch/arm.h.
10393 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10394 (arm_store_gregset): Likewise.
10395
10396 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10397
10398 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10399 ptrace's 4th parameter.
10400
10401 2015-07-27 Yao Qi <yao.qi@linaro.org>
10402
10403 * configure.srv (case aarch64*-*-linux*): Don't set
10404 srv_linux_usrregs.
10405
10406 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10407
10408 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10409 sys/ptrace.h.
10410 * linux-arm-low.c: Likewise.
10411 * linux-cris-low.c: Likewise.
10412 * linux-crisv32-low.c: Likewise.
10413 * linux-low.c: Likewise.
10414 * linux-m68k-low.c: Likewise.
10415 * linux-mips-low.c: Likewise.
10416 * linux-nios2-low.c: Likewise.
10417 * linux-s390-low.c: Likewise.
10418 * linux-sparc-low.c: Likewise.
10419 * linux-tic6x-low.c: Likewise.
10420 * linux-tile-low.c: Likewise.
10421 * linux-x86-low.c: Likewise.
10422
10423 2015-07-24 Pedro Alves <palves@redhat.com>
10424
10425 * config.in: Regenerate.
10426 * configure: Regenerate.
10427
10428 2015-07-24 Pedro Alves <palves@redhat.com>
10429
10430 * acinclude.m4: Include ../ptrace.m4.
10431 * configure.ac: Call GDB_AC_PTRACE.
10432 * config.in, configure: Regenerate.
10433
10434 2015-07-24 Yao Qi <yao.qi@linaro.org>
10435
10436 * linux-low.c (linux_create_inferior): Remove setting to
10437 proc->priv->new_inferior.
10438 (linux_attach): Likewise.
10439 (linux_low_filter_event): Likewise.
10440 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10441
10442 2015-07-24 Yao Qi <yao.qi@linaro.org>
10443
10444 * linux-low.c (linux_arch_setup): New function.
10445 (linux_low_filter_event): If proc->tdesc is NULL and
10446 proc->attached is true, call the_low_target.arch_setup.
10447 Otherwise, keep status pending, and return.
10448 (linux_resume_one_lwp_throw): Don't call get_pc if
10449 thread->while_stepping isn't NULL. Don't call
10450 get_thread_regcache if proc->tdesc is NULL.
10451 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10452 (linux_target_ops): Install arch_setup.
10453 * server.c (start_inferior): Call the_target->arch_setup.
10454 * target.h (struct target_ops) <arch_setup>: New field.
10455 (target_arch_setup): New marco.
10456 * lynx-low.c (lynx_target_ops): Update.
10457 * nto-low.c (nto_target_ops): Update.
10458 * spu-low.c (spu_target_ops): Update.
10459 * win32-low.c (win32_target_ops): Update.
10460
10461 2015-07-24 Yao Qi <yao.qi@linaro.org>
10462
10463 * linux-low.c (linux_add_process): Don't set
10464 proc->priv->new_inferior.
10465 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10466 (linux_attach): Likewise.
10467
10468 2015-07-24 Yao Qi <yao.qi@linaro.org>
10469
10470 * server.c (start_inferior): Code refactor.
10471
10472 2015-07-24 Yao Qi <yao.qi@linaro.org>
10473
10474 * server.c (process_serial_event): Set general_thread.
10475
10476 2015-07-21 Yao Qi <yao.qi@linaro.org>
10477
10478 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10479 aarch64_linux_get_debug_reg_capacity.
10480
10481 2015-07-17 Yao Qi <yao.qi@linaro.org>
10482
10483 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10484 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10485 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10486 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10487 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10488 (AARCH64_HWP_ALIGNMENT): Likewise.
10489 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10490 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10491 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10492 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10493 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10494 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10495 (struct aarch64_debug_reg_state): Likewise.
10496 (struct arch_lwp_info): Likewise.
10497 (aarch64_align_watchpoint): Likewise.
10498 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10499 (aarch64_watchpoint_length): Likewise.
10500 (aarch64_point_encode_ctrl_reg): Likewise
10501 (aarch64_point_is_aligned): Likewise.
10502 (aarch64_align_watchpoint): Likewise.
10503 (aarch64_linux_set_debug_regs):
10504 (aarch64_dr_state_insert_one_point): Likewise.
10505 (aarch64_dr_state_remove_one_point): Likewise.
10506 (aarch64_handle_breakpoint): Likewise.
10507 (aarch64_handle_aligned_watchpoint): Likewise.
10508 (aarch64_handle_unaligned_watchpoint): Likewise.
10509 (aarch64_handle_watchpoint): Likewise.
10510
10511 2015-07-17 Yao Qi <yao.qi@linaro.org>
10512
10513 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10514 and don't aarch64_get_debug_reg_state. All callers update.
10515 (aarch64_handle_aligned_watchpoint): Likewise.
10516 (aarch64_handle_unaligned_watchpoint): Likewise.
10517 (aarch64_handle_watchpoint): Likewise.
10518 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10519 (aarch64_remove_point): Likewise.
10520
10521 2015-07-17 Yao Qi <yao.qi@linaro.org>
10522
10523 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10524 debug_printf.
10525 (aarch64_handle_unaligned_watchpoint): Likewise.
10526
10527 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10528
10529 Revert the previous 3 commits:
10530 Move gdb_regex* to common/
10531 Move linux_find_memory_regions_full & co.
10532 gdbserver build-id attribute generator
10533
10534 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10535 Jan Kratochvil <jan.kratochvil@redhat.com>
10536
10537 gdbserver build-id attribute generator.
10538 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10539 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10540 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10541 (find_phdr): New.
10542 (get_dynamic): Use find_pdhr to traverse program headers.
10543 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10544 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10545 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10546 (get_hex_build_id): New.
10547 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10548 to reply XML document.
10549
10550 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10551 Jan Kratochvil <jan.kratochvil@redhat.com>
10552
10553 * target.c: Include target/target-utils.h and fcntl.h.
10554 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10555 (target_fileio_read_stralloc): New functions.
10556
10557 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10558
10559 * Makefile.in (OBS): Add gdb_regex.o.
10560 (gdb_regex.o): New.
10561 * config.in: Rebuilt.
10562 * configure: Rebuilt.
10563
10564 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10565 Jan Kratochvil <jan.kratochvil@redhat.com>
10566
10567 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10568 * Makefile.in (OBS): Add target-utils.o.
10569 (linux-maps.o, target-utils.o): New.
10570 * configure.srv (srv_linux_obj): Add linux-maps.o.
10571
10572 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10573
10574 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10575 function, return 1.
10576 (the_low_target): Install it.
10577
10578 2015-07-14 Pedro Alves <palves@redhat.com>
10579
10580 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10581 Instead, ignore ECHILD, and throw an error for other errnos.
10582
10583 2015-07-10 Pedro Alves <palves@redhat.com>
10584
10585 * event-loop.c (struct callback_event) <data>: Change type to
10586 gdb_client_data instance instead of gdb_client_data pointer.
10587 (append_callback_event): Adjust.
10588
10589 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10590
10591 * linux-aarch64-low.c: Add comments for each linux_target_ops
10592 method. Remove comments already covered in target_ops and
10593 linux_target_ops definitions.
10594 (the_low_target): Add comments for each unimplemented method.
10595
10596 2015-07-09 Yao Qi <yao.qi@linaro.org>
10597
10598 * linux-aarch64-low.c (aarch64_regmap): Remove.
10599 (aarch64_usrregs_info): Remove.
10600 (regs_info): Set field usrregs to NULL.
10601
10602 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10603
10604 * linux-low.c: Include "rsp-low.h"
10605 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10606 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10607 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10608 (handle_btrace_enable_pt): New.
10609 (handle_btrace_general_set): Support "pt".
10610 (handle_btrace_conf_general_set): Support "pt:size".
10611
10612 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10613
10614 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10615 Z_PACKET_SW_BP.
10616
10617 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10618
10619 * linux-aarch64-low.c: Remove comment about endianness.
10620 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10621 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10622 memcmp.
10623
10624 2015-06-24 Gary Benson <gbenson@redhat.com>
10625
10626 * linux-i386-ipa.c (stdint.h): Do not include.
10627 * lynx-i386-low.c (stdint.h): Likewise.
10628 * lynx-ppc-low.c (stdint.h): Likewise.
10629 * mem-break.c (stdint.h): Likewise.
10630 * thread-db.c (stdint.h): Likewise.
10631 * tracepoint.c (stdint.h): Likewise.
10632 * win32-low.c (stdint.h): Likewise.
10633
10634 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10635
10636 * server.c (write_qxfer_response): Update call to
10637 remote_escape_output.
10638
10639 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10640 Jan Kratochvil <jan.kratochvil@redhat.com>
10641
10642 Merge multiple hex conversions.
10643 * gdbreplay.c (tohex): Rename to 'fromhex'.
10644 (logchar): Use fromhex.
10645
10646 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10647
10648 * server.c (handle_qxfer_libraries): Set `version' attribute for
10649 <library-list>.
10650
10651 2015-06-10 Gary Benson <gbenson@redhat.com>
10652
10653 * target.h (struct target_ops) <multifs_open>: New field.
10654 <multifs_unlink>: Likewise.
10655 <multifs_readlink>: Likewise.
10656 * linux-low.c (nat/linux-namespaces.h): New include.
10657 (linux_target_ops): Initialize the_target->multifs_open,
10658 the_target->multifs_unlink and the_target->multifs_readlink.
10659 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10660 * hostio.c (hostio_fs_pid): New static variable.
10661 (hostio_handle_new_gdb_connection): New function.
10662 (handle_setfs): Likewise.
10663 (handle_open): Use the_target->multifs_open as appropriate.
10664 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10665 (handle_readlink): Use the_target->multifs_readlink as
10666 appropriate.
10667 (handle_vFile): Handle vFile:setfs packets.
10668 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10669 after target_handle_new_gdb_connection.
10670
10671 2015-06-10 Gary Benson <gbenson@redhat.com>
10672
10673 * configure.ac (AC_CHECK_FUNCS): Add setns.
10674 * config.in: Regenerate.
10675 * configure: Likewise.
10676 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10677 (linux-namespaces.o): New rule.
10678 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10679
10680 2015-06-09 Gary Benson <gbenson@redhat.com>
10681
10682 * hostio.c (handle_open): Process mode argument with
10683 fileio_to_host_mode.
10684
10685 2015-06-01 Yao Qi <yao.qi@linaro.org>
10686
10687 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10688 * linux-x86-low.c: Likewise.
10689
10690 2015-05-28 Don Breazeal <donb@codesourcery.com>
10691
10692 * linux-low.c (handle_extended_wait): Initialize
10693 thread_info.last_resume_kind for new fork children.
10694
10695 2015-05-15 Pedro Alves <palves@redhat.com>
10696
10697 * target.h (target_handle_new_gdb_connection): Rewrite using if
10698 wrapped in do/while.
10699
10700 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10701
10702 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10703 * configure, config.in: Regenerate.
10704 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10705 Declare typedef.
10706
10707 2015-05-12 Don Breazeal <donb@codesourcery.com>
10708
10709 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10710 PTRACE_EVENT_VFORK_DONE.
10711 (linux_low_ptrace_options, extended_event_reported): Add vfork
10712 events.
10713 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10714 and "vforkdone" for RSP 'T' Stop Reply Packet.
10715 * server.h (report_vfork_events): Declare
10716 global variable.
10717
10718 2015-05-12 Don Breazeal <donb@codesourcery.com>
10719
10720 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10721 (the_low_target) <new_fork>: Initialize new member.
10722 * linux-arm-low.c (arm_new_fork): New function.
10723 (the_low_target) <new_fork>: Initialize new member.
10724 * linux-low.c (handle_extended_wait): Call new target function
10725 new_fork.
10726 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10727 * linux-mips-low.c (mips_add_watchpoint): New function
10728 extracted from mips_insert_point.
10729 (the_low_target) <new_fork>: Initialize new member.
10730 (mips_linux_new_fork): New function.
10731 (mips_insert_point): Call mips_add_watchpoint.
10732 * linux-x86-low.c (x86_linux_new_fork): New function.
10733 (the_low_target) <new_fork>: Initialize new member.
10734
10735 2015-05-12 Don Breazeal <donb@codesourcery.com>
10736
10737 * linux-low.c (handle_extended_wait): Implement return value,
10738 rename argument 'event_child' to 'event_lwp', handle
10739 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10740 (linux_low_ptrace_options): New function.
10741 (linux_low_filter_event): Call linux_low_ptrace_options,
10742 use different argument fo linux_enable_event_reporting,
10743 use return value from handle_extended_wait.
10744 (extended_event_reported): New function.
10745 (linux_wait_1): Call extended_event_reported and set
10746 status to report fork events.
10747 (linux_write_memory): Add pid to debug message.
10748 (reset_lwp_ptrace_options_callback): New function.
10749 (linux_handle_new_gdb_connection): New function.
10750 (linux_target_ops): Initialize new structure member.
10751 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10752 * lynx-low.c: Initialize new structure member.
10753 * remote-utils.c (prepare_resume_reply): Implement stop reason
10754 "fork" for "T" stop message.
10755 * server.c (handle_query): Call handle_new_gdb_connection.
10756 * server.h (report_fork_events): Declare global flag.
10757 * target.h (struct target_ops) <handle_new_gdb_connection>:
10758 New member.
10759 (target_handle_new_gdb_connection): New macro.
10760 * win32-low.c: Initialize new structure member.
10761
10762 2015-05-12 Don Breazeal <donb@codesourcery.com>
10763
10764 * mem-break.c (APPEND_TO_LIST): Define macro.
10765 (clone_agent_expr): New function.
10766 (clone_one_breakpoint): New function.
10767 (clone_all_breakpoints): New function.
10768 * mem-break.h: Declare new functions.
10769
10770 2015-05-12 Don Breazeal <donb@codesourcery.com>
10771
10772 * linux-low.c (linux_supports_fork_events): New function.
10773 (linux_supports_vfork_events): New function.
10774 (linux_target_ops): Initialize new structure members.
10775 (initialize_low): Call linux_check_ptrace_features.
10776 * lynx-low.c (lynx_target_ops): Initialize new structure
10777 members.
10778 * server.c (report_fork_events, report_vfork_events):
10779 New global flags.
10780 (handle_query): Add new features to qSupported packet and
10781 response.
10782 (captured_main): Initialize new global variables.
10783 * target.h (struct target_ops) <supports_fork_events>:
10784 New member.
10785 <supports_vfork_events>: New member.
10786 (target_supports_fork_events): New macro.
10787 (target_supports_vfork_events): New macro.
10788 * win32-low.c (win32_target_ops): Initialize new structure
10789 members.
10790
10791 2015-05-12 Gary Benson <gbenson@redhat.com>
10792
10793 * server.c (handle_qxfer_exec_file): Use current process
10794 if annex is empty.
10795
10796 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10797
10798 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10799 Remove HAVE_PTRACE_GETREGS conditionals.
10800 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10801 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10802
10803 2015-05-08 Yao Qi <yao.qi@linaro.org>
10804
10805 * linux-low.c (linux_supports_conditional_breakpoints): New
10806 function.
10807 (linux_target_ops): Install new target method.
10808 * lynx-low.c (lynx_target_ops): Install NULL hook for
10809 supports_conditional_breakpoints.
10810 * nto-low.c (nto_target_ops): Likewise.
10811 * spu-low.c (spu_target_ops): Likewise.
10812 * win32-low.c (win32_target_ops): Likewise.
10813 * server.c (handle_query): Check
10814 target_supports_conditional_breakpoints.
10815 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10816 New field.
10817 (target_supports_conditional_breakpoints): New macro.
10818
10819 2015-05-06 Pedro Alves <palves@redhat.com>
10820
10821 PR server/18081
10822 * server.c (start_inferior): If the process exits, mourn it.
10823
10824 2015-04-21 Gary Benson <gbenson@redhat.com>
10825
10826 * hostio.c (fileio_open_flags_to_host): Factored out to
10827 fileio_to_host_openflags in common/fileio.c. Single use
10828 updated.
10829
10830 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10831
10832 * linux-xtensa-low.c (xtensa_fill_gregset)
10833 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10834 XCHAL_HAVE_LOOP.
10835
10836 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10837
10838 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10839 (regs_info): Replace usrregs pointer with NULL.
10840
10841 2015-04-17 Gary Benson <gbenson@redhat.com>
10842
10843 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10844 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10845 * server.c (handle_qxfer_exec_file): New function.
10846 (qxfer_packets): Add exec-file entry.
10847 (handle_query): Report qXfer:exec-file:read as supported packet.
10848
10849 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10850
10851 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10852
10853 2015-04-09 Gary Benson <gbenson@redhat.com>
10854
10855 * hostio-errno.c (errno_to_fileio_error): Remove function.
10856 Update caller to use remote_fileio_to_fio_error.
10857
10858 2015-04-09 Yao Qi <yao.qi@linaro.org>
10859
10860 * linux-low.c (linux_insert_point): Call
10861 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10862 (linux_remove_point): Call remove_memory_breakpoint if type is
10863 raw_bkpt_type_sw.
10864 * linux-x86-low.c (x86_insert_point): Don't call
10865 insert_memory_breakpoint.
10866 (x86_remove_point): Don't call remove_memory_breakpoint.
10867
10868 2015-04-01 Pedro Alves <palves@redhat.com>
10869 Cleber Rosa <crosa@redhat.com>
10870
10871 * server.c (gdbserver_usage): Reorganize and extend the usage
10872 message.
10873
10874 2015-03-24 Pedro Alves <palves@redhat.com>
10875
10876 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10877 output. Also dump TRAP_TRACE.
10878 (linux_low_filter_event): In debug output, distinguish a
10879 resume_stop SIGSTOP from a delayed SIGSTOP.
10880
10881 2015-03-24 Gary Benson <gbenson@redhat.com>
10882
10883 * linux-x86-low.c (x86_linux_new_thread): Moved to
10884 nat/x86-linux.c.
10885 (x86_linux_prepare_to_resume): Likewise.
10886
10887 2015-03-24 Gary Benson <gbenson@redhat.com>
10888
10889 * Makefile.in (x86-linux-dregs.o): New rule.
10890 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10891 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10892 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10893 (x86_linux_dr_get): Likewise.
10894 (x86_linux_dr_set): Likewise.
10895 (update_debug_registers_callback): Likewise.
10896 (x86_linux_dr_set_addr): Likewise.
10897 (x86_linux_dr_get_addr): Likewise.
10898 (x86_linux_dr_set_control): Likewise.
10899 (x86_linux_dr_get_control): Likewise.
10900 (x86_linux_dr_get_status): Likewise.
10901 (x86_linux_update_debug_registers): Likewise.
10902
10903 2015-03-24 Gary Benson <gbenson@redhat.com>
10904
10905 * linux-x86-low.c (x86_linux_update_debug_registers):
10906 New function, factored out from...
10907 (x86_linux_prepare_to_resume): ...this.
10908
10909 2015-03-24 Gary Benson <gbenson@redhat.com>
10910
10911 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10912 (x86_linux_dr_set): Likewise.
10913 (update_debug_registers_callback): Likewise.
10914 (x86_linux_dr_set_addr): Likewise.
10915 (x86_linux_dr_get_addr): Likewise.
10916 (x86_linux_dr_set_control): Likewise.
10917 (x86_linux_dr_get_control): Likewise.
10918 (x86_linux_dr_get_status): Likewise.
10919 (x86_linux_prepare_to_resume): Likewise.
10920
10921 2015-03-24 Gary Benson <gbenson@redhat.com>
10922
10923 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10924 Use perror_with_name. Pass string through gettext.
10925 (x86_linux_dr_set): Likewise.
10926
10927 2015-03-24 Gary Benson <gbenson@redhat.com>
10928
10929 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10930 (x86_linux_dr_set_addr): ...this.
10931 (x86_dr_low_get_addr): Rename to...
10932 (x86_linux_dr_get_addr): ...this.
10933 (x86_dr_low_set_control): Rename to...
10934 (x86_linux_dr_set_control): ...this.
10935 (x86_dr_low_get_control): Rename to...
10936 (x86_linux_dr_get_control): ...this.
10937 (x86_dr_low_get_status): Rename to...
10938 (x86_linux_dr_get_status): ...this.
10939 (x86_dr_low): Update with new function names.
10940
10941 2015-03-24 Gary Benson <gbenson@redhat.com>
10942
10943 * Makefile.in (x86-linux.o): New rule.
10944 * configure.srv: Add x86-linux.o to relevant targets.
10945 * linux-low.c (lwp_set_arch_private_info): New function.
10946 (lwp_arch_private_info): Likewise.
10947 * linux-x86-low.c: Include nat/x86-linux.h.
10948 (arch_lwp_info): Removed structure.
10949 (update_debug_registers_callback):
10950 Use lwp_set_debug_registers_changed.
10951 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10952 and lwp_set_debug_registers_changed.
10953 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10954
10955 2015-03-24 Gary Benson <gbenson@redhat.com>
10956
10957 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10958 * linux-arm-low.c (arm_new_thread): Likewise.
10959 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10960 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10961 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10962 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10963
10964 2015-03-24 Gary Benson <gbenson@redhat.com>
10965
10966 * linux-low.c (ptid_of_lwp): New function.
10967 (lwp_is_stopped): Likewise.
10968 (lwp_stop_reason): Likewise.
10969 * linux-x86-low.c (update_debug_registers_callback):
10970 Use lwp_is_stopped.
10971 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10972 lwp_stop_reason.
10973
10974 2015-03-24 Gary Benson <gbenson@redhat.com>
10975
10976 * linux-low.h (linux_stop_lwp): Remove declaration.
10977
10978 2015-03-24 Gary Benson <gbenson@redhat.com>
10979
10980 * linux-low.h: Include nat/linux-nat.h.
10981 * linux-low.c (iterate_over_lwps_args): New structure.
10982 (iterate_over_lwps_filter): New function.
10983 (iterate_over_lwps): Likewise.
10984 * linux-x86-low.c (update_debug_registers_callback):
10985 Update signature to what iterate_over_lwps expects.
10986 Remove PID check that iterate_over_lwps now performs.
10987 (x86_dr_low_set_addr): Use iterate_over_lwps.
10988 (x86_dr_low_set_control): Likewise.
10989
10990 2015-03-24 Gary Benson <gbenson@redhat.com>
10991
10992 * linux-x86-low.c (x86_debug_reg_state): New function.
10993 (x86_linux_prepare_to_resume): Use the above.
10994
10995 2015-03-24 Gary Benson <gbenson@redhat.com>
10996
10997 * linux-low.c (current_lwp_ptid): New function.
10998 * linux-x86-low.c: Include nat/linux-nat.h.
10999 (x86_dr_low_get_addr): Use current_lwp_ptid.
11000 (x86_dr_low_get_control): Likewise.
11001 (x86_dr_low_get_status): Likewise.
11002
11003 2015-03-20 Pedro Alves <palves@redhat.com>
11004
11005 * tracepoint.c (cmd_qtstatus): Make "str" const.
11006
11007 2015-03-20 Pedro Alves <palves@redhat.com>
11008
11009 * server.c (handle_general_set): Make "req_str" const.
11010
11011 2015-03-19 Pedro Alves <palves@redhat.com>
11012
11013 * linux-low.c (linux_resume_one_lwp): Rename to ...
11014 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11015 instead call perror_with_name.
11016 (check_ptrace_stopped_lwp_gone): New function.
11017 (linux_resume_one_lwp): Reimplement as wrapper around
11018 linux_resume_one_lwp_throw that swallows errors if the LWP is
11019 gone.
11020
11021 2015-03-19 Pedro Alves <palves@redhat.com>
11022
11023 * linux-low.c (count_events_callback, select_event_lwp_callback):
11024 No longer check whether the thread has resume_stop as last resume
11025 kind.
11026
11027 2015-03-19 Pedro Alves <palves@redhat.com>
11028
11029 * linux-low.c (count_events_callback, select_event_lwp_callback):
11030 Use the lwp's status_pending_p field, not the thread's.
11031
11032 2015-03-19 Pedro Alves <palves@redhat.com>
11033
11034 * linux-low.c (select_event_lwp_callback): Update comments to
11035 no longer mention SIGTRAP.
11036
11037 2015-03-18 Gary Benson <gbenson@redhat.com>
11038
11039 * server.c (handle_query): Do not report vFile:fstat as supported.
11040
11041 2015-03-11 Gary Benson <gbenson@redhat.com>
11042
11043 * hostio.c (sys/types.h): New include.
11044 (sys/stat.h): Likewise.
11045 (common-remote-fileio.h): Likewise.
11046 (handle_fstat): New function.
11047 (handle_vFile): Handle vFile:fstat packets.
11048
11049 2015-03-11 Gary Benson <gbenson@redhat.com>
11050
11051 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11052 struct stat.st_blocks and struct stat.st_blksize.
11053 * configure: Regenerate.
11054 * config.in: Likewise.
11055 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11056 (OBS): Add common-remote-fileio.o.
11057 (common-remote-fileio.o): New rule.
11058
11059 2015-03-09 Pedro Alves <palves@redhat.com>
11060
11061 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11062 'struct sockaddr' pointer in 'accept' call.
11063
11064 2015-03-09 Pedro Alves <palves@redhat.com>
11065
11066 Revert:
11067 2015-03-07 Pedro Alves <palves@redhat.com>
11068 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11069 or <winsock2.h> here. Instead include "gdb_socket.h".
11070 (remote_open): Use union gdb_sockaddr_u.
11071 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11072 or <winsock2.h> here. Instead include "gdb_socket.h".
11073 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11074 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11075 or <sys/un.h>.
11076 (init_named_socket, gdb_agent_helper_thread): Use union
11077 gdb_sockaddr_u.
11078
11079 2015-03-07 Pedro Alves <palves@redhat.com>
11080
11081 * configure.ac (build_warnings): Move
11082 -Wdeclaration-after-statement to the C-specific set.
11083 * configure: Regenerate.
11084
11085 2015-03-07 Pedro Alves <palves@redhat.com>
11086
11087 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11088 or <winsock2.h> here. Instead include "gdb_socket.h".
11089 (remote_open): Use union gdb_sockaddr_u.
11090 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11091 or <winsock2.h> here. Instead include "gdb_socket.h".
11092 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11093 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11094 or <sys/un.h>.
11095 (init_named_socket, gdb_agent_helper_thread): Use union
11096 gdb_sockaddr_u.
11097
11098 2015-03-07 Pedro Alves <palves@redhat.com>
11099
11100 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11101 instead.
11102
11103 2015-03-06 Yao Qi <yao.qi@linaro.org>
11104
11105 * linux-aarch64-low.c (aarch64_insert_point): Use
11106 show_debug_regs as a boolean.
11107 (aarch64_remove_point): Likewise.
11108
11109 2015-03-05 Pedro Alves <palves@redhat.com>
11110
11111 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11112 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11113 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11114 * nto-low.c (nto_target_ops): Likewise.
11115 * spu-low.c (spu_target_ops): Likewise.
11116 * win32-low.c (win32_target_ops): Likewise.
11117
11118 2015-03-04 Pedro Alves <palves@redhat.com>
11119
11120 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11121 Decide whether a breakpoint triggered based on the SIGTRAP's
11122 siginfo.si_code.
11123 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11124 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11125 (linux_low_filter_event): Check for breakpoints before checking
11126 watchpoints.
11127 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11128 siginfo.si_code.
11129 (linux_stopped_by_sw_breakpoint)
11130 (linux_supports_stopped_by_sw_breakpoint)
11131 (linux_stopped_by_hw_breakpoint)
11132 (linux_supports_stopped_by_hw_breakpoint): New functions.
11133 (linux_target_ops): Install new target methods.
11134
11135 2015-03-04 Pedro Alves <palves@redhat.com>
11136
11137 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11138 * server.c (swbreak_feature, hwbreak_feature): New globals.
11139 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11140 (captured_main): Clear swbreak_feature and hwbreak_feature.
11141 * server.h (swbreak_feature, hwbreak_feature): Declare.
11142 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11143 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11144 supports_stopped_by_hw_breakpoint>: New fields.
11145 (target_supports_stopped_by_sw_breakpoint)
11146 (target_stopped_by_sw_breakpoint)
11147 (target_supports_stopped_by_hw_breakpoint)
11148 (target_stopped_by_hw_breakpoint): Declare.
11149
11150 2015-03-04 Pedro Alves <palves@redhat.com>
11151
11152 enum lwp_stop_reason -> enum target_stop_reason
11153 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11154 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11155 (linux_wait_1, stuck_in_jump_pad_callback)
11156 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11157 (linux_stopped_by_watchpoint):
11158 * linux-low.h (enum lwp_stop_reason): Delete.
11159 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11160 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11161
11162 2015-03-04 Yao Qi <yao.qi@linaro.org>
11163
11164 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11165
11166 2015-03-03 Gary Benson <gbenson@redhat.com>
11167
11168 * hostio.c (handle_vFile): Fix prefix lengths.
11169
11170 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11171
11172 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11173 ptr_bits.
11174
11175 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11176
11177 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11178 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11179 (clean): Add "rm -f" for above C files.
11180 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11181 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11182 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11183 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11184 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11185 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11186 (init_registers_s390x_vx_linux64)
11187 (init_registers_s390x_tevx_linux64)
11188 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11189 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11190 declarations.
11191 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11192 (s390_store_vxrs_high): New functions.
11193 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11194 NT_S390_VXRS_HIGH.
11195 (s390_arch_setup): Add logic for selecting one of the new target
11196 descriptions. Activate the new vector regsets if applicable.
11197 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11198 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11199 and init_registers_s390x_tevx_linux64.
11200
11201 2015-03-01 Pedro Alves <palves@redhat.com>
11202
11203 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11204 parameter.
11205
11206 2015-02-27 Pedro Alves <palves@redhat.com>
11207
11208 * linux-x86-low.c (u_debugreg_offset): New function.
11209 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11210
11211 2015-02-27 Pedro Alves <palves@redhat.com>
11212
11213 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11214 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11215 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11216 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11217 (ps_lsetfpregs, ps_getpid)
11218 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11219 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11220 (ps_lsetxregs, ps_plog): Declare.
11221
11222 2015-02-27 Pedro Alves <palves@redhat.com>
11223
11224 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11225 IP_AGENT_EXPORT_FUNC.
11226 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11227 IP_AGENT_EXPORT_FUNC.
11228 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11229 (IP_AGENT_EXPORT): Delete.
11230 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11231 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11232 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11233 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11234 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11235 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11236 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11237 (traceframe_read_count, traceframe_write_count)
11238 (traceframes_created, trace_state_variables, get_raw_reg)
11239 (get_trace_state_variable_value, set_trace_state_variable_value)
11240 (ust_loaded, helper_thread_id, cmd_buf): Use
11241 IPA_SYM_EXPORTED_NAME.
11242 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11243 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11244 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11245 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11246 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11247 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11248 EXTERN_C_PUSH/EXTERN_C_POP.
11249 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11250 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11251 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11252 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11253 (traceframe_write_count, traceframe_read_count)
11254 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11255 (about_to_request_buffer_space, get_trace_state_variable_value)
11256 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11257 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11258 EXTERN_C_PUSH/EXTERN_C_POP.
11259 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11260 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11261 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11262 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11263 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11264 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11265 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11266 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11267 Define.
11268 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11269 (IP_AGENT_EXPORT_VAR_DECL): Define.
11270 (tracing): Declare.
11271 (gdb_agent_get_raw_reg): Declare.
11272
11273 2015-02-27 Tom Tromey <tromey@redhat.com>
11274 Pedro Alves <palves@redhat.com>
11275
11276 Rename symbols whose names are reserved C++ keywords throughout.
11277
11278 2015-02-27 Pedro Alves <palves@redhat.com>
11279
11280 * Makefile.in (COMPILER): New, get it from autoconf.
11281 (CXX): Get from autoconf instead.
11282 (COMPILE.pre): Use COMPILER.
11283 (CC-LD): Rename to ...
11284 (CC_LD): ... this. Use COMPILER.
11285 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11286 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11287 * acinclude.m4: Include build-with-cxx.m4.
11288 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11289 Disable -Werror by default if building in C++ mode.
11290 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11291 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11292 the C++ compiler. Save/restore CXXFLAGS too.
11293 * configure: Regenerate.
11294
11295 2015-02-27 Pedro Alves <palves@redhat.com>
11296
11297 * acinclude.m4: Include libiberty.m4.
11298 * configure.ac: Call libiberty_INIT.
11299 * config.in, configure: Regenerate.
11300
11301 2015-02-26 Pedro Alves <palves@redhat.com>
11302
11303 * linux-low.c (linux_wait_1): When incrementing the PC past a
11304 program breakpoint always use the_low_target.breakpoint_len as
11305 increment, rather than the maximum between that and
11306 the_low_target.decr_pc_after_break.
11307
11308 2015-02-23 Pedro Alves <palves@redhat.com>
11309
11310 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11311 thread was doing a step-over; always adjust the PC if
11312 we stepped over a permanent breakpoint.
11313 (linux_wait_1): If we stepped over breakpoint that was on top of a
11314 permanent breakpoint, manually advance the PC past it.
11315
11316 2015-02-23 Pedro Alves <palves@redhat.com>
11317
11318 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11319 modes.
11320 (x86_fill_gregset, x86_store_gregset): Use it when handling
11321 $orig_eax.
11322
11323 2015-02-20 Pedro Alves <palves@redhat.com>
11324
11325 * thread-db.c: Include "nat/linux-procfs.h".
11326 (thread_db_init): Skip listing new threads if the kernel supports
11327 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11328
11329 2015-02-20 Pedro Alves <palves@redhat.com>
11330
11331 * linux-low.c (status_pending_p_callback): Use ptid_match.
11332
11333 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11334
11335 PR breakpoints/16812
11336 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11337 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11338 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11339
11340 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11341
11342 PR breakpoints/15956
11343 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11344
11345 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11346
11347 * linux-low.c (linux_low_btrace_conf): Print size.
11348 * server.c (handle_btrace_conf_general_set): New.
11349 (hanle_general_set): Call handle_btrace_conf_general_set.
11350 (handle_query): Report Qbtrace-conf:bts:size as supported.
11351
11352 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11353
11354 * linux-low.c (linux_low_enable_btrace): Update parameters.
11355 (linux_low_btrace_conf): New.
11356 (linux_target_ops)<to_btrace_conf>: Initialize.
11357 * server.c (current_btrace_conf): New.
11358 (handle_btrace_enable): Rename to ...
11359 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11360 to target_enable_btrace. Update comment. Update users.
11361 (handle_qxfer_btrace_conf): New.
11362 (qxfer_packets): Add btrace-conf entry.
11363 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11364 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11365 (target_ops)<read_btrace_conf>: New.
11366 (target_enable_btrace): Update parameters.
11367 (target_read_btrace_conf): New.
11368
11369 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11370
11371 * server.c (handle_btrace_general_set): Remove call to
11372 target_supports_btrace.
11373 (supported_btrace_packets): New.
11374 (handle_query): Call supported_btrace_packets.
11375 * target.h: include btrace-common.h.
11376 (btrace_target_info): Removed.
11377 (supports_btrace, target_supports_btrace): Update parameters.
11378
11379 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11380
11381 * Makefile.in (SFILES): Add common/btrace-common.c.
11382 (OBS): Add common/btrace-common.o.
11383 (btrace-common.o): Add build rules.
11384 * linux-low: Include btrace-common.h.
11385 (linux_low_read_btrace): Use struct btrace_data. Call
11386 btrace_data_init and btrace_data_fini.
11387
11388 2015-02-06 Pedro Alves <palves@redhat.com>
11389
11390 * thread-db.c (find_new_threads_callback): Add debug output.
11391
11392 2015-02-04 Pedro Alves <palves@redhat.com>
11393
11394 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11395 (resume_stopped_resumed_lwps): New function.
11396 (linux_wait_for_event_filtered): Use it.
11397
11398 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11399
11400 * Makefile.in (SFILES): Add linux-personality.c.
11401 (linux-personality.o): New rule.
11402 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11403 list of objects to be built.
11404 * linux-low.c: Include nat/linux-personality.h.
11405 (linux_create_inferior): Remove code to disable address space
11406 randomization (moved to ../nat/linux-personality.c). Create
11407 cleanup to disable address space randomization.
11408
11409 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11410
11411 * Makefile.in (posix-strerror.o): New rule.
11412 (mingw-strerror.o): Likewise.
11413 * configure: Regenerated.
11414 * configure.ac: Source file ../common/common.host. Initialize new
11415 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11416
11417 2015-01-14 Yao Qi <yao@codesourcery.com>
11418
11419 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11420 (ppc-linux.o): New rule.
11421 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11422 * configure.ac: AC_CHECK_FUNCS(getauxval).
11423 * config.in: Re-generated.
11424 * configure: Re-generated.
11425 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11426 ppc64_64bit_inferior_p
11427
11428 2015-01-14 Yao Qi <yao@codesourcery.com>
11429
11430 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11431 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11432 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11433 (PT_ORIG_R3, PT_TRAP): Likewise.
11434 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11435 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11436 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11437
11438 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11439
11440 * i387-fp.c (i387_cache_to_xsave): In look over
11441 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11442 zmmh_low_space field by use of zmmh_high_space.
11443
11444 2015-01-09 Pedro Alves <palves@redhat.com>
11445
11446 * linux-low.c (step_over_bkpt): Move higher up in the file.
11447 (handle_extended_wait): Don't store the stop_pc here.
11448 (get_stop_pc): Adjust comments and rename to ...
11449 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11450 stopped for a software breakpoint or hardware breakpoint.
11451 (thread_still_has_status_pending_p): New function.
11452 (status_pending_p_callback): Use
11453 thread_still_has_status_pending_p. If the event is no longer
11454 interesting, resume the LWP.
11455 (handle_tracepoints): Add assert.
11456 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11457 (wstatus_maybe_breakpoint): New function.
11458 (cancel_breakpoint): Delete function.
11459 (check_stopped_by_watchpoint): New function, factored out from
11460 linux_low_filter_event.
11461 (lp_status_maybe_breakpoint): Delete function.
11462 (linux_low_filter_event): Remove filter_ptid argument.
11463 Leave thread group exits pending here. Store the LWP's stop PC.
11464 Always leave events pending.
11465 (linux_wait_for_event_filtered): Pull all events out of the
11466 kernel, and leave them all pending.
11467 (count_events_callback, select_event_lwp_callback): Consider all
11468 events.
11469 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11470 (select_event_lwp): Only give preference to the stepping LWP in
11471 all-stop mode. Adjust comments.
11472 (ignore_event): New function.
11473 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11474 references to cancel_breakpoints. Adjust to renames. Also give
11475 equal priority to all LWPs that have had events in non-stop mode.
11476 If reporting a software breakpoint event, unadjust the LWP's PC.
11477 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11478 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11479 Adjust.
11480 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11481 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11482 (linux_stopped_by_watchpoint): Adjust.
11483 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11484 * linux-low.h (enum lwp_stop_reason): New.
11485 (struct lwp_info) <stop_pc>: Adjust comment.
11486 <stopped_by_watchpoint>: Delete field.
11487 <stop_reason>: New field.
11488 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11489 * mem-break.c (software_breakpoint_inserted_here)
11490 (hardware_breakpoint_inserted_here): New function.
11491 * mem-break.h (software_breakpoint_inserted_here)
11492 (hardware_breakpoint_inserted_here): Declare.
11493 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11494 (cancel_breakpoints): Delete.
11495 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11496 (upload_fast_traceframes): Remove references to
11497 cancel_breakpoints.
11498
11499 2015-01-09 Pedro Alves <palves@redhat.com>
11500
11501 * thread-db.c (find_new_threads_callback): Ignore thread if the
11502 kernel thread ID is -1.
11503
11504 2015-01-09 Pedro Alves <palves@redhat.com>
11505
11506 * linux-low.c (linux_attach_fail_reason_string): Move to
11507 nat/linux-ptrace.c, and rename.
11508 (linux_attach_lwp): Update comment.
11509 (attach_proc_task_lwp_callback): New function.
11510 (linux_attach): Adjust to rename and use
11511 linux_proc_attach_tgid_threads.
11512 (linux_attach_fail_reason_string): Delete declaration.
11513
11514 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11515
11516 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11517 * server.c (gdbserver_version): Likewise.
11518
11519 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11520
11521 * remote-utils.c: Include ctype.h.
11522 (input_interrupt): Explicitly handle the case when the char
11523 received is the NUL byte. Improve the printing of non-ASCII
11524 characters.
11525
11526 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11527
11528 * linux-low.c (linux_low_filter_event): Update call to
11529 linux_enable_event_reporting following the addition of
11530 a new parameter to that function.
11531
11532 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11533
11534 PR server/17457
11535 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11536 (AARCH64_FPCR_REGNO): Likewise.
11537 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11538 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11539 (aarch64_store_fpregset): Likewise.
11540
11541 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11542
11543 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11544 Remove FIXME comment about assumption about N.
11545
11546 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11547
11548 * configure.ac: If large-file support is disabled in GDBserver,
11549 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11550 * configure: Regenerate.
11551
11552 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11553
11554 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11555 warning upon ENODATA from ptrace.
11556 * linux-s390-low.c (s390_store_tdb): New.
11557 (s390_regsets): Add regset for NT_S390_TDB.
11558
11559 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11560
11561 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11562 without a fill_function.
11563 * linux-s390-low.c (s390_fill_last_break): Remove.
11564 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11565 (s390_arch_setup): Use regset's size instead of fill_function for
11566 loop end condition.
11567
11568 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11569
11570 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11571 the regset's store function when ptrace returned an error.
11572 * regcache.c (get_thread_regcache): Invalidate register cache
11573 before fetching inferior's registers.
11574
11575 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11576
11577 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11578 while-loop as for-loop.
11579 (regsets_store_inferior_registers): Likewise.
11580
11581 2014-11-28 Yao Qi <yao@codesourcery.com>
11582
11583 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11584 * config.in, configure: Re-generate.
11585 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11586 is defined.
11587
11588 2014-11-21 Yao Qi <yao@codesourcery.com>
11589
11590 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11591 (AC_CHECK_HEADERS): Remove malloc.h.
11592 * configure: Re-generated.
11593 * config.in: Re-generated.
11594 * server.h: Don't include alloca.h and malloc.h.
11595 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11596 Don't include malloc.h.
11597
11598 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11599
11600 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11601 corresponding ERRNO check in same block.
11602
11603 2014-11-12 Pedro Alves <palves@redhat.com>
11604
11605 * server.c (cont_thread): Update comment.
11606 (start_inferior, attach_inferior): No longer clear cont_thread.
11607 (handle_v_cont): No longer set cont_thread.
11608 (captured_main): Clear cont_thread each time a GDB connects.
11609
11610 2014-11-12 Pedro Alves <palves@redhat.com>
11611
11612 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11613 thread, and don't resume all threads if the Hc thread has exited.
11614
11615 2014-11-12 Pedro Alves <palves@redhat.com>
11616
11617 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11618 the process group instead of to a specific LWP.
11619
11620 2014-10-15 Pedro Alves <palves@redhat.com>
11621
11622 PR server/17487
11623 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11624 parameter.
11625 (arm_set_thread_context): Delete.
11626 (the_low_target): Adjust.
11627 * win32-i386-low.c (debug_registers_changed)
11628 (debug_registers_used): Delete.
11629 (update_debug_registers_callback): New function.
11630 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11631 needing to update their debug registers.
11632 (win32_get_current_dr): New function.
11633 (x86_dr_low_get_addr, x86_dr_low_get_control)
11634 (x86_dr_low_get_status): Fetch the debug register from the thread
11635 record's context.
11636 (i386_initial_stuff): Adjust.
11637 (i386_get_thread_context): Remove current_event parameter. Don't
11638 clear debug_registers_changed nor copy DR values to
11639 debug_reg_state.
11640 (i386_set_thread_context): Delete.
11641 (i386_prepare_to_resume): New function.
11642 (i386_thread_added): Mark the thread as needing to update irs
11643 debug registers.
11644 (the_low_target): Remove i386_set_thread_context and install
11645 i386_prepare_to_resume.
11646 * win32-low.c (win32_get_thread_context): Adjust.
11647 (win32_set_thread_context): Use SetThreadContext
11648 directly.
11649 (win32_prepare_to_resume): New function.
11650 (win32_require_context): New function, factored out from ...
11651 (thread_rec): ... this.
11652 (continue_one_thread): Call win32_prepare_to_resume on each thread
11653 we're about to continue.
11654 (win32_resume): Call win32_prepare_to_resume on the event thread.
11655 * win32-low.h (struct win32_thread_info)
11656 <debug_registers_changed>: New field.
11657 (struct win32_target_ops): Change prototype of set_thread_context,
11658 delete set_thread_context and add prepare_to_resume.
11659 (win32_require_context): New declaration.
11660
11661 2014-10-08 Gary Benson <gbenson@redhat.com>
11662
11663 * server.h: Do not include common-exceptions.h.
11664
11665 2014-10-08 Gary Benson <gbenson@redhat.com>
11666
11667 * server.h: Do not include cleanups.h.
11668
11669 2014-09-30 James Hogan <james.hogan@imgtec.com>
11670
11671 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11672 mips64-dsp-linux.c.
11673
11674 2014-09-23 Yao Qi <yao@codesourcery.com>
11675
11676 * linux-low.c (lp_status_maybe_breakpoint): New function.
11677 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11678 (count_events_callback): Likewise.
11679 (select_event_lwp_callback): Likewise.
11680 (cancel_breakpoints_callback): Likewise.
11681
11682 2014-09-19 Don Breazeal <donb@codesourcery.com>
11683
11684 * linux-low.c (handle_extended_wait): Call
11685 linux_ptrace_get_extended_event.
11686 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11687 linux_is_extended_waitstatus.
11688
11689 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11690
11691 * Makefile.in (CPPFLAGS): Define.
11692 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11693 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11694
11695 2014-09-16 Gary Benson <gbenson@redhat.com>
11696
11697 * inferiors.h (current_inferior): Renamed as...
11698 (current_thread): New variable. All uses updated.
11699 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11700 (maybe_move_out_of_jump_pad): Likewise.
11701 (cancel_breakpoint): Likewise.
11702 (linux_low_filter_event): Likewise.
11703 (wait_for_sigstop): Likewise.
11704 (linux_resume_one_lwp): Likewise.
11705 (need_step_over_p): Likewise.
11706 (start_step_over): Likewise.
11707 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11708 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11709 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11710 and save_inferior as saved_thread.
11711 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11712 saved_thread.
11713 (regcache_invalidate_thread): Likewise.
11714 * remote-utils.c (prepare_resume_reply): Likewise.
11715 * thread-db.c (thread_db_get_tls_address): Likewise.
11716 (disable_thread_event_reporting): Likewise.
11717 (remove_thread_event_breakpoints): Likewise.
11718 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11719 as saved_thread.
11720 * target.h (set_desired_inferior): Renamed as...
11721 (set_desired_thread): New declaration. All uses updated.
11722 * server.c (myresume): Updated comment to reference thread instead
11723 of inferior.
11724 (handle_serial_event): Likewise.
11725 (handle_target_event): Likewise.
11726
11727 2014-09-12 Tom Tromey <tromey@redhat.com>
11728 Gary Benson <gbenson@redhat.com>
11729
11730 * regcache.h: Include common-regcache.h.
11731 (regcache_read_pc): Don't declare.
11732 * regcache.c (get_thread_regcache_for_ptid): New function.
11733
11734 2014-09-11 Tom Tromey <tromey@redhat.com>
11735 Gary Benson <gbenson@redhat.com>
11736
11737 * symbol.c: New file.
11738 * Makefile.in (SFILES): Add symbol.c.
11739 (OBS): Add symbol.o.
11740
11741 2014-09-11 Gary Benson <gbenson@redhat.com>
11742
11743 * target.c (target_stop_ptid, target_continue_ptid): New
11744 functions.
11745
11746 2014-09-11 Tom Tromey <tromey@redhat.com>
11747 Gary Benson <gbenson@redhat.com>
11748
11749 * target.h: Include target/target.h.
11750 * target.c (target_read_memory, target_read_uint32)
11751 (target_write_memory): New functions.
11752
11753 2014-09-11 Gary Benson <gbenson@redhat.com>
11754
11755 * server.h (debug_hw_points): Don't declare.
11756 * server.c (debug_hw_points): Don't define. Replace all uses
11757 with show_debug_regs.
11758 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11759 all uses with show_debug_regs.
11760
11761 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11762
11763 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11764 endianness into account.
11765 (ppc_supply_ptrace_register): Likewise.
11766
11767 2014-09-03 James Hogan <james.hogan@imgtec.com>
11768
11769 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11770 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11771
11772 2014-09-03 Gary Benson <gbenson@redhat.com>
11773
11774 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11775 ALL_DEBUG_ADDRESS_REGISTERS.
11776
11777 2014-09-02 Gary Benson <gbenson@redhat.com>
11778
11779 * i386-low.h: Renamed as...
11780 * x86-low.h: New file. All type, function and variable name
11781 prefixes changed from "i386_" to "x86_". All references updated.
11782 * i386-low.c: Renamed as...
11783 * x86-low.c: New file. All type, function and variable name
11784 prefixes changed from "i386_" to "x86_". All references updated.
11785
11786 2014-09-02 Gary Benson <gbenson@redhat.com>
11787
11788 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11789 (x86_linux_new_thread): Likewise.
11790
11791 2014-08-29 Gary Benson <gbenson@redhat.com>
11792
11793 * server.h (setjmp.h): Do not include.
11794 (toplevel): Do not declare.
11795 (common-exceptions.h): Include.
11796 (cleanups.h): Likewise.
11797 * server.c (toplevel): Do not define.
11798 (exit_code): New static global.
11799 (detach_or_kill_for_exit_cleanup): New function.
11800 (main): New function. Original main renamed to...
11801 (captured_main): New function.
11802 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11803
11804 2014-08-29 Gary Benson <gbenson@redhat.com>
11805
11806 * Makefile.in (SFILES): Add common/common-exceptions.c.
11807 (OBS): Add common-exceptions.o.
11808 (common-exceptions.o): New rule.
11809 * utils.c (prepare_to_throw_exception): New function.
11810
11811 2014-08-29 Gary Benson <gbenson@redhat.com>
11812
11813 * config.in: Regenerate.
11814 * configure: Likewise.
11815
11816 2014-08-29 Gary Benson <gbenson@redhat.com>
11817
11818 * Makefile.in (SFILES): Add common/cleanups.c.
11819 (OBS): cleanups.o.
11820 (cleanups.o): New rule.
11821
11822 2014-08-29 Gary Benson <gbenson@redhat.com>
11823
11824 * utils.c (internal_vwarning): New function.
11825
11826 2014-08-28 Gary Benson <gbenson@redhat.com>
11827
11828 * utils.h (fatal): Remove declaration.
11829 * utils.c (fatal): Remove function.
11830
11831 2014-08-28 Gary Benson <gbenson@redhat.com>
11832
11833 * tracepoint.c (gdb_agent_init): Replace fatal with
11834 perror_with_name.
11835 (initialize_tracepoint): Likewise.
11836
11837 2014-08-28 Gary Benson <gbenson@redhat.com>
11838
11839 * remote-utils.c (remote_prepare): Replace fatal with error.
11840
11841 2014-08-28 Gary Benson <gbenson@redhat.com>
11842
11843 * linux-low.c (linux_async): Replace fatal with warning.
11844 Tidy up and return.
11845 (linux_start_non_stop): Return -1 if linux_async failed.
11846
11847 2014-08-28 Gary Benson <gbenson@redhat.com>
11848
11849 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11850 gdb_assert.
11851 (i386_dr_low_get_addr): Remove vague comment.
11852 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11853 gdb_assert.
11854
11855 2014-08-28 Gary Benson <gbenson@redhat.com>
11856
11857 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11858 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11859 internal_error.
11860 (linux_resume_one_lwp): Likewise.
11861 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11862 gdb_assert.
11863 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11864 with internal_error.
11865 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11866 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11867 (find_register_by_name): Replace fatal with internal_error.
11868 (find_regno): Likewise.
11869 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11870 * thread-db.c (thread_db_create_event): Likewise.
11871 (thread_db_load_search): Likewise.
11872 (try_thread_db_load_1): Likewise.
11873 * tracepoint.c (get_jump_space_head): Replace fatal with
11874 internal_error.
11875 (claim_trampoline_space): Likewise.
11876 (have_fast_tracepoint_trampoline_buffer): Likewise.
11877 (cmd_qtstart): Likewise.
11878 (stop_tracing): Likewise.
11879 (fast_tracepoint_collecting): Likewise.
11880 (target_malloc): Likewise.
11881 (download_tracepoint): Likewise.
11882 (download_trace_state_variables): Replace check with gdb_assert.
11883 (upload_fast_traceframes): Replace fatal with internal_error.
11884
11885 2014-08-19 Tom Tromey <tromey@redhat.com>
11886 Gary Benson <gbenson@redhat.com>
11887
11888 * Makefile.in (SFILES): Add common/common-debug.c.
11889 (OBS): Add common-debug.o.
11890 (common-debug.o): New rule.
11891 * debug.h (debug_printf): Don't declare.
11892 * debug.c (debug_printf): Renamed and rewritten as...
11893 (debug_vprintf): New function.
11894
11895 2014-08-19 Gary Benson <gbenson@redhat.com>
11896
11897 * utils.h: Do not include print-utils.h.
11898
11899 2014-08-19 Tom Tromey <tromey@redhat.com>
11900 Gary Benson <gbenson@redhat.com>
11901
11902 * server.h: Add static assertion.
11903 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11904
11905 2014-08-19 Tom Tromey <tromey@redhat.com>
11906 Gary Benson <gbenson@redhat.com>
11907
11908 * Makefile.in (SFILES): Add common/errors.c.
11909 (OBS): Add errors.o.
11910 (IPA_OBS): Add errors-ipa.o.
11911 (errors.o): New rule.
11912 (errors-ipa.o): Likewise.
11913 * utils.h (perror_with_name, error, warning): Don't declare.
11914 * utils.c (warning): Renamed and rewritten as...
11915 (vwarning): New function.
11916 (error): Renamed and rewritten as...
11917 (verror): New function.
11918 (internal_error): Renamed and rewritten as...
11919 (internal_verror): New function.
11920
11921 2014-08-07 Gary Benson <gbenson@redhat.com>
11922
11923 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11924 * configure: Regenerate.
11925 * config.in: Likewise.
11926 * server.h: Do not include errno.h.
11927 * event-loop.c: Likewise.
11928 * hostio-errno.c: Likewise.
11929 * linux-low.c: Likewise.
11930 * remote-utils.c: Likewise.
11931 * spu-low.c: Likewise.
11932 * utils.c: Likewise.
11933 * gdbreplay.c: Unconditionally include errno.h.
11934
11935 2014-08-07 Gary Benson <gbenson@redhat.com>
11936
11937 * server.h: Do not include string.h.
11938 * event-loop.c: Likewise.
11939 * linux-low.c: Likewise.
11940 * regcache.c: Likewise.
11941 * remote-utils.c: Likewise.
11942 * spu-low.c: Likewise.
11943 * utils.c: Likewise.
11944
11945 2014-08-07 Gary Benson <gbenson@redhat.com>
11946
11947 * server.h: Do not include gdb_assert.h.
11948
11949 2014-08-07 Gary Benson <gbenson@redhat.com>
11950
11951 * server.h: Do not include common-utils.h.
11952
11953 2014-08-07 Gary Benson <gbenson@redhat.com>
11954
11955 * server.h: Do not include ptid.h.
11956 * notif.h: Likewise.
11957
11958 2014-08-07 Gary Benson <gbenson@redhat.com>
11959
11960 * server.h: Do not include gdb_locale.h.
11961
11962 2014-08-07 Gary Benson <gbenson@redhat.com>
11963
11964 * server.h: Do not include gdb/signals.h.
11965 * win32-low.c: Likewise.
11966
11967 2014-08-07 Gary Benson <gbenson@redhat.com>
11968
11969 * server.h: Do not include pathmax.h.
11970
11971 2014-08-07 Gary Benson <gbenson@redhat.com>
11972
11973 * server.h: Do not include libiberty.h.
11974 * linux-bfin-low.c: Likewise.
11975
11976 2014-08-07 Gary Benson <gbenson@redhat.com>
11977
11978 * server.h: Do not include ansidecl.h.
11979
11980 2014-08-07 Gary Benson <gbenson@redhat.com>
11981
11982 * linux-x86-low.c: Do not include stddef.h.
11983 * lynx-ppc-low.c: Likewise.
11984 * tracepoint.c: Likewise.
11985
11986 2014-08-07 Gary Benson <gbenson@redhat.com>
11987
11988 * server.h: Do not include stdarg.h.
11989 * nto-low.c: Likewise.
11990
11991 2014-08-07 Gary Benson <gbenson@redhat.com>
11992
11993 * server.h: Do not include stdlib.h.
11994 * inferiors.c: Likewise.
11995 * linux-low.c: Likewise.
11996 * regcache.c: Likewise.
11997 * spu-low.c: Likewise.
11998 * tracepoint.c: Likewise.
11999 * utils.c: Likewise.
12000
12001 2014-08-07 Gary Benson <gbenson@redhat.com>
12002
12003 * server.h: Do not include stdio.h.
12004 * linux-low.c: Likewise.
12005 * remote-utils.c: Likewise.
12006 * spu-low.c: Likewise.
12007 * utils.c: Likewise.
12008 * wincecompat.c: Likewise.
12009
12010 2014-08-06 Gary Benson <gbenson@redhat.com>
12011
12012 * regcache.c (init_register_cache): Move conditionals inside if.
12013
12014 2014-08-06 Gary Benson <gbenson@redhat.com>
12015
12016 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12017
12018 2014-07-31 Gary Benson <gbenson@redhat.com>
12019
12020 * ax.h: Do not include server.h.
12021 * gdbthread.h: Likewise.
12022 * lynx-low.h: Likewise.
12023 * notif.h: Likewise.
12024
12025 2014-07-30 Gary Benson <gbenson@redhat.com>
12026
12027 * server.h: Include common-defs.h.
12028 Do not include config.h or build-gnulib-gdbserver/config.h.
12029
12030 2014-07-30 Gary Benson <gbenson@redhat.com>
12031
12032 * hostio-errno.c: Move server.h to top of includes list.
12033 * inferiors.c: Likewise.
12034 * linux-x86-low.c: Likewise.
12035 * notif.c: Include server.h.
12036
12037 2014-07-24 Tom Tromey <tromey@redhat.com>
12038 Gary Benson <gbenson@redhat.com>
12039
12040 * server.h (CORE_ADDR): Now unsigned.
12041
12042 2014-07-16 Pedro Alves <palves@redhat.com>
12043
12044 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12045
12046 2014-07-15 Pedro Alves <palves@redhat.com>
12047
12048 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12049 copy.
12050
12051 2014-07-11 Pedro Alves <palves@redhat.com>
12052
12053 * linux-low.c (kill_wait_lwp): New function, based on
12054 kill_one_lwp_callback, but use my_waitpid directly.
12055 (kill_one_lwp_callback, linux_kill): Use it.
12056
12057 2014-06-23 Pedro Alves <palves@redhat.com>
12058
12059 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12060 before setting DR0..DR3.
12061
12062 2014-06-20 Gary Benson <gbenson@redhat.com>
12063
12064 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12065 * configure: Regenerated.
12066 * config.in: Likewise.
12067
12068 2014-06-20 Gary Benson <gbenson@redhat.com>
12069
12070 * Makefile.in (SFILES): Update locations for files moved
12071 from common to nat.
12072 (object file files): Reordered.
12073
12074 2014-06-20 Gary Benson <gbenson@redhat.com>
12075
12076 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12077 (i386_dr_low_set_addr): Likewise.
12078 (i386_dr_low_get_addr): Likewise.
12079 (i386_dr_low_can_set_control): Likewise.
12080 (i386_dr_low_set_control): Likewise.
12081 (i386_dr_low_get_control): Likewise.
12082 (i386_dr_low_get_status): Likewise.
12083 (i386_get_debug_register_length): Likewise.
12084 * linux-x86-low.c (i386_dr_low_set_addr):
12085 Changed signature. Made static.
12086 (i386_dr_low_get_addr): Likewise.
12087 (i386_dr_low_set_control): Likewise.
12088 (i386_dr_low_get_control): Likewise.
12089 (i386_dr_low_get_status): Likewise.
12090 (i386_dr_low): New global variable.
12091 * win32-i386-low.c (i386_dr_low_set_addr):
12092 Changed signature. Made static.
12093 (i386_dr_low_get_addr): Likewise.
12094 (i386_dr_low_set_control): Likewise.
12095 (i386_dr_low_get_control): Likewise.
12096 (i386_dr_low_get_status): Likewise.
12097 (i386_dr_low): New global variable.
12098
12099 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12100
12101 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12102 * Makefile.in (AR, AR_FLAGS): Define.
12103 * configure: Regenerate.
12104
12105 2014-06-19 Gary Benson <gbenson@redhat.com>
12106
12107 * Makefile.in (i386-dregs.o): New rule.
12108 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12109 * i386-low.c (target.h): Remove include.
12110 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12111 (DR_CONTROL_SHIFT): Likewise.
12112 (DR_CONTROL_SIZE): Likewise.
12113 (DR_RW_EXECUTE): Likewise.
12114 (DR_RW_WRITE): Likewise.
12115 (DR_RW_READ): Likewise.
12116 (DR_RW_IORW): Likewise.
12117 (DR_LEN_1): Likewise.
12118 (DR_LEN_2): Likewise.
12119 (DR_LEN_4): Likewise.
12120 (DR_LEN_8): Likewise.
12121 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12122 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12123 (DR_ENABLE_SIZE): Likewise.
12124 (DR_LOCAL_SLOWDOWN): Likewise.
12125 (DR_GLOBAL_SLOWDOWN): Likewise.
12126 (DR_CONTROL_RESERVED): Likewise.
12127 (I386_DR_CONTROL_MASK): Likewise.
12128 (I386_DR_VACANT): Likewise.
12129 (I386_DR_LOCAL_ENABLE): Likewise.
12130 (I386_DR_GLOBAL_ENABLE): Likewise.
12131 (I386_DR_DISABLE): Likewise.
12132 (I386_DR_SET_RW_LEN): Likewise.
12133 (I386_DR_GET_RW_LEN): Likewise.
12134 (I386_DR_WATCH_HIT): Likewise.
12135 (i386_wp_op_t): Likewise.
12136 (i386_show_dr): Likewise.
12137 (i386_length_and_rw_bits): Likewise.
12138 (i386_insert_aligned_watchpoint): Likewise.
12139 (i386_remove_aligned_watchpoint): Likewise.
12140 (i386_handle_nonaligned_watchpoint): Likewise.
12141 i386_update_inferior_debug_regs(): Likewise.
12142 (i386_dr_insert_watchpoint): Likewise.
12143 (i386_dr_remove_watchpoint): Likewise.
12144 (i386_dr_region_ok_for_watchpoint): Likewise.
12145 (i386_dr_stopped_data_address): Likewise.
12146 (i386_dr_stopped_by_watchpoint): Likewise.
12147
12148 2014-06-19 Gary Benson <gbenson@redhat.com>
12149
12150 * i386-low.c (i386_dr_show): Renamed to
12151 i386_show_dr and made static. All uses updated.
12152 (i386_dr_length_and_rw_bits): Renamed to
12153 i386_length_and_rw_bits and made static.
12154 All uses updated.
12155 (i386_dr_insert_aligned_watchpoint): Renamed to
12156 i386_insert_aligned_watchpoint and made static.
12157 All uses updated.
12158 (i386_dr_remove_aligned_watchpoint): Renamed to
12159 i386_remove_aligned_watchpoint and made static.
12160 All uses updated.
12161 (i386_dr_update_inferior_debug_regs): Renamed to
12162 i386_update_inferior_debug_regs and made static.
12163 All uses updated.
12164
12165 2014-06-18 Gary Benson <gbenson@redhat.com>
12166
12167 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12168 (i386_dr_low_can_set_control): Likewise.
12169 (i386_get_debug_register_length): Likewise.
12170 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12171 (i386_dr_low_can_set_control): Likewise.
12172 (i386_get_debug_register_length): Likewise.
12173
12174 2014-06-17 Gary Benson <gbenson@redhat.com>
12175
12176 * i386-low.h (i386-dregs.h): New include.
12177 (DR_FIRSTADDR): Now in i386-dregs.h.
12178 (DR_LASTADDR): Likewise.
12179 (DR_NADDR): Likewise.
12180 (DR_STATUS): Likewise.
12181 (DR_CONTROL): Likewise.
12182 (i386_debug_reg_state): Likewise.
12183 (i386_dr_insert_watchpoint): Likewise.
12184 (i386_dr_remove_watchpoint): Likewise.
12185 (i386_dr_region_ok_for_watchpoint): Likewise.
12186 (i386_dr_stopped_data_address): Likewise.
12187 (i386_dr_stopped_by_watchpoint): Likewise.
12188 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12189
12190 2014-06-18 Gary Benson <gbenson@redhat.com>
12191
12192 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12193 i386_dr_insert_watchpoint.
12194 (i386_low_remove_watchpoint): Renamed to
12195 i386_dr_remove_watchpoint.
12196 (i386_low_region_ok_for_watchpoint): Renamed to
12197 i386_dr_region_ok_for_watchpoint.
12198 (i386_low_stopped_data_address): Renamed to
12199 i386_dr_stopped_data_address.
12200 (i386_low_stopped_by_watchpoint): Renamed to
12201 i386_dr_stopped_by_watchpoint.
12202 * i386-low.c (i386_show_dr): Renamed to
12203 i386_dr_show and made nonstatic. All uses updated.
12204 (i386_length_and_rw_bits): Renamed to
12205 i386_dr_length_and_rw_bits and made nonstatic.
12206 All uses updated.
12207 (i386_insert_aligned_watchpoint): Renamed to
12208 i386_dr_insert_aligned_watchpoint and made nonstatic.
12209 All uses updated.
12210 (i386_remove_aligned_watchpoint): Renamed to
12211 i386_dr_remove_aligned_watchpoint and made nonstatic.
12212 All uses updated.
12213 (i386_update_inferior_debug_regs): Renamed to
12214 i386_dr_update_inferior_debug_regs and made nonstatic.
12215 All uses updated.
12216 (i386_low_insert_watchpoint): Renamed to
12217 i386_dr_insert_watchpoint. All uses updated.
12218 (i386_low_remove_watchpoint): Renamed to
12219 i386_dr_remove_watchpoint. All uses updated.
12220 (i386_low_region_ok_for_watchpoint): Renamed to
12221 i386_dr_region_ok_for_watchpoint. All uses updated.
12222 (i386_low_stopped_data_address): Renamed to
12223 i386_dr_stopped_data_address. All uses updated.
12224 (i386_low_stopped_by_watchpoint): Renamed to
12225 i386_dr_stopped_by_watchpoint. All uses updated.
12226
12227 2014-06-18 Gary Benson <gbenson@redhat.com>
12228
12229 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12230 (i386_dr_low_can_set_control): Likewise.
12231 (i386_insert_aligned_watchpoint): New check.
12232
12233 2014-06-18 Gary Benson <gbenson@redhat.com>
12234
12235 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12236 Renamed to state.
12237
12238 2014-06-18 Gary Benson <gbenson@redhat.com>
12239
12240 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12241 instead of fatal and error.
12242 (i386_handle_nonaligned_watchpoint): Likewise.
12243
12244 2014-06-18 Gary Benson <gbenson@redhat.com>
12245
12246 * i386-low.c (i386_get_debug_register_length): New macro.
12247 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12248 (i386_show_dr): Use debug_printf instead of fprintf. Use
12249 phex to format values.
12250
12251 2014-06-18 Gary Benson <gbenson@redhat.com>
12252
12253 * i386-low.h: Comment changes.
12254 * i386-low.c: Likewise.
12255
12256 2014-06-18 Gary Benson <gbenson@redhat.com>
12257
12258 * i386-low.c: Whitespace changes.
12259
12260 2014-06-12 Tom Tromey <tromey@redhat.com>
12261
12262 * utils.c (freeargv): Remove.
12263
12264 2014-06-12 Tom Tromey <tromey@redhat.com>
12265
12266 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12267 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12268 (parse_debug_format_options): Likewise.
12269 (gdbserver_usage): Likewise.
12270 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12271 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12272 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12273 against libiberty.
12274 ($(LIBGNU)): Depend on libiberty.
12275 (all-lib): Recurse into all subdirs.
12276 (install-only): Invoke "install" target in subdirs.
12277 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12278 targets.
12279 * configure: Rebuild.
12280 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12281 for vasprintf, vsnprintf, or gettimeofday.
12282 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12283 srv_tgtobj.
12284
12285 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12286
12287 * development.sh: Delete.
12288 * Makefile.in (config.status): Adjust dependency on development.sh.
12289 * configure.ac: Adjust development.sh source call.
12290 * configure: Regenerate.
12291
12292 2014-06-02 Pedro Alves <palves@redhat.com>
12293
12294 * ax.c (gdb_free_agent_expr): New function.
12295 * ax.h (gdb_free_agent_expr): New declaration.
12296 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12297 list.
12298 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12299 static.
12300 (clear_breakpoint_conditions_and_commands): New function.
12301 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12302 (clear_breakpoint_conditions_and_commands): New declaration.
12303
12304 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12305
12306 * linux-aarch64-low.c (asm/ptrace.h): Include.
12307
12308 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12309
12310 Fix TLS access for -static -pthread.
12311 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12312 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12313 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12314
12315 2014-05-20 Pedro Alves <palves@redhat.com>
12316
12317 * linux-aarch64-low.c (aarch64_insert_point)
12318 (aarch64_remove_point): No longer check whether the type is
12319 supported here. Adjust to new interface.
12320 (the_low_target): Install aarch64_supports_z_point_type as
12321 supports_z_point_type method.
12322 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12323 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12324 instead of a Z packet char. Adjust.
12325 (arm_supports_z_point_type): New function.
12326 (arm_insert_point, arm_remove_point): Adjust to new interface.
12327 (the_low_target): Install arm_supports_z_point_type.
12328 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12329 (cris_insert_point, cris_remove_point): Adjust to new interface.
12330 Don't check whether the type is supported here.
12331 (the_low_target): Install cris_supports_z_point_type.
12332 * linux-low.c (linux_supports_z_point_type): New function.
12333 (linux_insert_point, linux_remove_point): Adjust to new interface.
12334 * linux-low.h (struct linux_target_ops) <insert_point,
12335 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12336 raw_breakpoint pointer parameter.
12337 <supports_z_point_type>: New method.
12338 * linux-mips-low.c (mips_supports_z_point_type): New function.
12339 (mips_insert_point, mips_remove_point): Adjust to new interface.
12340 Use mips_supports_z_point_type.
12341 (the_low_target): Install mips_supports_z_point_type.
12342 * linux-ppc-low.c (the_low_target): Install NULL as
12343 supports_z_point_type method.
12344 * linux-s390-low.c (the_low_target): Install NULL as
12345 supports_z_point_type method.
12346 * linux-sparc-low.c (the_low_target): Install NULL as
12347 supports_z_point_type method.
12348 * linux-x86-low.c (x86_supports_z_point_type): New function.
12349 (x86_insert_point): Adjust to new insert_point interface. Use
12350 insert_memory_breakpoint. Adjust to new
12351 i386_low_insert_watchpoint interface.
12352 (x86_remove_point): Adjust to remove_point interface. Use
12353 remove_memory_breakpoint. Adjust to new
12354 i386_low_remove_watchpoint interface.
12355 (the_low_target): Install x86_supports_z_point_type.
12356 * lynx-low.c (lynx_target_ops): Install NULL as
12357 supports_z_point_type callback.
12358 * nto-low.c (nto_supports_z_point_type): New.
12359 (nto_insert_point, nto_remove_point): Adjust to new interface.
12360 (nto_target_ops): Install nto_supports_z_point_type.
12361 * mem-break.c: Adjust intro comment.
12362 (struct raw_breakpoint) <raw_type, size>: New fields.
12363 <inserted>: Update comment.
12364 <shlib_disabled>: Delete field.
12365 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12366 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12367 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12368 (raw_bkpt_type_to_target_hw_bp_type): New function.
12369 (find_enabled_raw_code_breakpoint_at): New function.
12370 (find_raw_breakpoint_at): New type and size parameters. Use them.
12371 (insert_memory_breakpoint): New function, based off
12372 set_raw_breakpoint_at.
12373 (remove_memory_breakpoint): New function.
12374 (set_raw_breakpoint_at): Reimplement.
12375 (set_breakpoint): New, based on set_breakpoint_at.
12376 (set_breakpoint_at): Reimplement.
12377 (delete_raw_breakpoint): Go through the_target->remove_point
12378 instead of assuming memory breakpoints.
12379 (find_gdb_breakpoint_at): Delete.
12380 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12381 (find_gdb_breakpoint): New function.
12382 (set_gdb_breakpoint_at): Delete.
12383 (z_type_supported): New function.
12384 (set_gdb_breakpoint_1): New function, loosely based off
12385 set_gdb_breakpoint_at.
12386 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12387 (delete_gdb_breakpoint_at): Delete.
12388 (delete_gdb_breakpoint_1): New function, loosely based off
12389 delete_gdb_breakpoint_at.
12390 (delete_gdb_breakpoint): New function.
12391 (clear_gdb_breakpoint_conditions): Rename to ...
12392 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12393 breakpoint.
12394 (add_condition_to_breakpoint): Make static.
12395 (add_breakpoint_condition): Take a struct breakpoint pointer
12396 instead of an address. Adjust.
12397 (gdb_condition_true_at_breakpoint): Rename to ...
12398 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12399 z_type parameter.
12400 (gdb_condition_true_at_breakpoint): Reimplement.
12401 (add_breakpoint_commands): Take a struct breakpoint pointer
12402 instead of an address. Adjust.
12403 (gdb_no_commands_at_breakpoint): Rename to ...
12404 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12405 parameter. Return true if no breakpoint was found. Change debug
12406 output.
12407 (gdb_no_commands_at_breakpoint): Reimplement.
12408 (run_breakpoint_commands): Rename to ...
12409 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12410 and change return type to boolean.
12411 (run_breakpoint_commands): New function.
12412 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12413 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12414 breakpoint. Go through the_target->remove_point instead of
12415 assuming memory breakpoint.
12416 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12417 software and hardware breakpoints.
12418 (reinsert_raw_breakpoint): Go through the_target->insert_point
12419 instead of assuming memory breakpoint.
12420 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12421 software and hardware breakpoints.
12422 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12423 Check both software and hardware breakpoints.
12424 (validate_inserted_breakpoint): Assert the breakpoint is a
12425 software breakpoint. Set the inserted flag to -1 instead of
12426 setting shlib_disabled.
12427 (delete_disabled_breakpoints): Adjust.
12428 (validate_breakpoints): Only validate software breakpoints.
12429 Adjust to inserted flag change.
12430 (check_mem_read, check_mem_write): Skip breakpoint types other
12431 than software breakpoints. Adjust to inserted flag change.
12432 * mem-break.h (enum raw_bkpt_type): New enum.
12433 (raw_breakpoint, struct process_info): Forward declare.
12434 (Z_packet_to_target_hw_bp_type): Delete declaration.
12435 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12436 (set_gdb_breakpoint, delete_gdb_breakpoint)
12437 (clear_breakpoint_conditions): New declarations.
12438 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12439 (breakpoint_inserted_here): Update comment.
12440 (add_breakpoint_condition, add_breakpoint_commands): Replace
12441 address parameter with a breakpoint pointer parameter.
12442 (gdb_breakpoint_here): Update comment.
12443 (delete_gdb_breakpoint_at): Delete.
12444 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12445 * server.c (process_point_options): Take a struct breakpoint
12446 pointer instead of an address. Adjust.
12447 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12448 delete_gdb_breakpoint.
12449 * spu-low.c (spu_target_ops): Install NULL as
12450 supports_z_point_type method.
12451 * target.h: Include mem-break.h.
12452 (struct target_ops) <prepare_to_access_memory>: Update comment.
12453 <supports_z_point_type>: New field.
12454 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12455 instead of a char. Also take a raw breakpoint pointer.
12456 * win32-arm-low.c (the_low_target): Install NULL as
12457 supports_z_point_type.
12458 * win32-i386-low.c (i386_supports_z_point_type): New function.
12459 (i386_insert_point, i386_remove_point): Adjust to new interface.
12460 (the_low_target): Install i386_supports_z_point_type.
12461 * win32-low.c (win32_supports_z_point_type): New function.
12462 (win32_insert_point, win32_remove_point): Adjust to new interface.
12463 (win32_target_ops): Install win32_supports_z_point_type.
12464 * win32-low.h (struct win32_target_ops):
12465 <supports_z_point_type>: New method.
12466 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12467 instead of a char. Also take a raw breakpoint pointer.
12468
12469 2014-05-20 Pedro Alves <palves@redhat.com>
12470
12471 * mem-break.h: Include break-common.h.
12472 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12473 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12474 (Z_packet_to_target_hw_bp_type): New declaration.
12475 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12476 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12477 (Z_PACKET_ACCESS_WP): Delete macros.
12478 (Z_packet_to_hw_type): Delete function.
12479 * i386-low.h: Don't include break-common.h here.
12480 (Z_packet_to_hw_type): Delete declaration.
12481 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12482 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12483 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12484 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12485 * linux-aarch64-low.c: Don't include break-common.h here.
12486 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12487 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12488 (Z_packet_to_target_hw_bp_type): Delete function.
12489 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12490 function.
12491 (mips_insert_point, mips_remove_point): Use
12492 Z_packet_to_target_hw_bp_type.
12493
12494 2014-05-20 Pedro Alves <palves@redhat.com>
12495
12496 * linux-aarch64-low.c: Include break-common.h.
12497 (enum target_point_type): Delete.
12498 (Z_packet_to_point_type): Rename to ...
12499 (Z_packet_to_target_hw_bp_type): ... this, and return a
12500 target_hw_bp_type instead.
12501 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12502 instead of an enum target_point_type.
12503 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12504 breakpoint type.
12505 (aarch64_dr_state_insert_one_point)
12506 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12507 (aarch64_handle_aligned_watchpoint)
12508 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12509 Take an enum target_hw_bp_type instead of an enum
12510 target_point_type.
12511 (aarch64_supports_z_point_type): New function.
12512 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12513 use Z_packet_to_target_hw_bp_type.
12514
12515 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12516
12517 * configure.ac: Only use -Werror by default when DEVELOPMENT
12518 is true.
12519 * configure: Regenerate.
12520
12521 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12522
12523 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12524 * linux-x86-low.c (X86_64_USER_REGS): New.
12525 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12526
12527 2014-04-28 Yao Qi <yao@codesourcery.com>
12528
12529 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12530 name.
12531
12532 2014-04-25 Pedro Alves <palves@redhat.com>
12533
12534 PR server/16255
12535 * linux-low.c (linux_attach_fail_reason_string): New function.
12536 (linux_attach_lwp): Delete.
12537 (linux_attach_lwp_1): Rename to ...
12538 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12539 argument. Remove "initial" parameter. Return int instead of
12540 void. Don't error or warn here.
12541 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12542 failure to attach to the tgid. Call warning when failing to
12543 attach to an lwp.
12544 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12545 argument. Remove "initial" parameter. Return int instead of
12546 void. Don't error or warn here.
12547 (linux_attach_fail_reason_string): New declaration.
12548 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12549 interface change. Use linux_attach_fail_reason_string.
12550
12551 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12552 Walfred Tedeschi <walfred.tedeschi@intel.com>
12553
12554 * Makefile.in: Added rules to handle new files
12555 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12556 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12557 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12558 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12559 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12560 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12561 x32-avx512-linux.o.
12562 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12563 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12564 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12565 i386/x32-avx512.xml.
12566 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12567 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12568 i386/x32-avx512-linux.xml.
12569 * i387-fp.c (num_avx512_k_registers): New constant for number
12570 of K registers.
12571 (num_avx512_zmmh_low_registers): New constant for number of
12572 lower ZMM registers (0-15).
12573 (num_avx512_zmmh_high_registers): New constant for number of
12574 higher ZMM registers (16-31).
12575 (num_avx512_ymmh_registers): New contant for number of higher
12576 YMM registers (ymm16-31 added by avx521 on x86_64).
12577 (num_avx512_xmm_registers): New constant for number of higher
12578 XMM registers (xmm16-31 added by AVX512 on x86_64).
12579 (struct i387_xsave): Add space for AVX512 registers.
12580 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12581 Add code to handle AVX512 registers.
12582 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12583 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12584 prototypei from generated file.
12585 (tdesc_amd64_avx512_linux): Likewise.
12586 (init_registers_x32_avx512_linux): Likewise.
12587 (tdesc_x32_avx512_linux): Likewise.
12588 (init_registers_i386_avx512_linux): Likewise.
12589 (tdesc_i386_avx512_linux): Likewise.
12590 (x86_64_regmap): Add AVX512 registers.
12591 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12592 mask.
12593 (initialize_low_arch): Add code to initialize AVX512 registers.
12594
12595 2014-04-23 Pedro Alves <palves@redhat.com>
12596
12597 * mem-break.c (find_gdb_breakpoint_at): Make static.
12598 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12599
12600 2014-04-23 Pedro Alves <palves@redhat.com>
12601
12602 * i386-low.c: Don't include break-common.h here.
12603 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12604 prototype to take target_hw_bp_type as argument instead of a Z
12605 packet char.
12606 * i386-low.h: Include break-common.h here.
12607 (Z_packet_to_hw_type): Declare.
12608 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12609 prototypes.
12610 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12611 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12612 (x86_remove_point): Convert the packet number to a
12613 target_hw_bp_type before calling i386_low_remove_watchpoint.
12614 * win32-i386-low.c (i386_insert_point): Convert the packet number
12615 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12616 (i386_remove_point): Convert the packet number to a
12617 target_hw_bp_type before calling i386_low_remove_watchpoint.
12618
12619 2014-04-23 Pedro Alves <palves@redhat.com>
12620
12621 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12622
12623 2014-04-10 Pedro Alves <palves@redhat.com>
12624
12625 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12626 Check if the condition or command is NULL before checking if the
12627 breakpoint is known. On success, return true.
12628 * mem-break.h (add_breakpoint_condition): Document return.
12629 (add_breakpoint_commands): Add describing comment.
12630 * server.c (skip_to_semicolon): New function.
12631 (process_point_options): Use it.
12632
12633 2014-04-09 Pedro Alves <palves@redhat.com>
12634
12635 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12636 to lwpid_of.
12637
12638 2014-02-27 Pedro Alves <palves@redhat.com>
12639
12640 PR 12702
12641 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12642 macros.
12643 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12644 output.
12645 (last_thread_of_process_p): Take a PID argument instead of a
12646 thread pointer.
12647 (linux_wait_for_lwp): Delete.
12648 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12649 functions.
12650 (linux_low_filter_event): New function, party factored out from
12651 linux_wait_for_event.
12652 (linux_wait_for_event): Rename to ...
12653 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12654 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12655 sigsuspend. Check for zombie leaders.
12656 (linux_wait_for_event): Reimplement as wrapper around
12657 linux_wait_for_event_filtered.
12658 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12659 a normal or signal exit is seen, it's the whole process exiting.
12660 (wait_for_sigstop): No longer a for_each_inferior callback.
12661 Rewrite on top of linux_wait_for_event_filtered.
12662 (stop_all_lwps): Call wait_for_sigstop directly.
12663 * server.c (resume, handle_target_event): Handle
12664 TARGET_WAITKIND_NO_RESUMED.
12665
12666 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12667
12668 * win32-low.c (psapi_get_dll_name,
12669 * win32_CreateToolhelp32Snapshot): Delete.
12670 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12671 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12672 Delete.
12673 (handle_load_dll): Add function description.
12674 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12675
12676 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12677
12678 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12679 Add comment.
12680 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12681 base address when calling win32_add_one_solib.
12682 (handle_load_dll): Delete local variable load_addr.
12683 Remove 0x1000 offset applied to DLL base address when calling
12684 win32_add_one_solib.
12685 (handle_unload_dll): Add comment.
12686
12687 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12688
12689 * win32-low.c (win32_add_all_dlls): Renames
12690 win32_ensure_ntdll_loaded. Rewrite function documentation.
12691 Adjust implementation to always load all DLLs.
12692 Add 0x1000 offset to DLL base address when calling
12693 win32_add_one_solib.
12694 (child_initialization_done): New static global.
12695 (do_initial_child_stuff): Set child_initialization_done to
12696 zero during child initialization, and 1 after. Replace call
12697 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12698 Add comment.
12699 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12700 (handle_unload_dll): Add function documentation.
12701 (get_child_debug_event): Ignore load and unload DLL events
12702 during child initialization.
12703
12704 2014-02-20 Doug Evans <dje@google.com>
12705
12706 Remove global all_lwps.
12707 * inferiors.h (ptid_of): Move here from linux-low.h.
12708 (pid_of, lwpid_of): Ditto.
12709 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12710 parameter is a struct thread_info * now.
12711 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12712 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12713 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12714 directly.
12715 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12716 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12717 * linux-arm-low.c (update_registers_callback): Update, "entry"
12718 parameter is a struct thread_info * now.
12719 Fetch lwpid from current_inferior directly.
12720 (arm_insert_point): Pass &all_threads to find_inferior instead of
12721 &all_lwps.
12722 (arm_remove_point): Ditto.
12723 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12724 (arm_prepare_to_resume): Fetch pid from thread.
12725 (arm_read_description): Fetch lwpid from current_inferior directly.
12726 * linux-low.c (all_lwps): Delete.
12727 (delete_lwp): Delete call to remove_inferior.
12728 (handle_extended_wait): Fetch lwpid from thread.
12729 (add_lwp): Don't set lwp->entry.id. Remove call to
12730 add_inferior_to_list.
12731 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12732 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12733 (kill_one_lwp_callback): Ditto.
12734 (linux_kill): Don't dereference NULL pointer.
12735 Fetch ptid,lwpid from thread.
12736 (get_detach_signal): Fetch ptid from thread.
12737 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12738 Simplify call to regcache_invalidate_thread.
12739 (delete_lwp_callback): Update, "entry" parameter is a
12740 struct thread_info * now. Fetch pid from thread.
12741 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12742 (status_pending_p_callback): Update, "entry" parameter is a
12743 struct thread_info * now. Fetch ptid from thread.
12744 (find_lwp_pid): Update, "entry" parameter is a
12745 struct thread_info * now.
12746 (linux_wait_for_lwp): Fetch pid from thread.
12747 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12748 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12749 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12750 (dequeue_one_deferred_signal): Ditto.
12751 (cancel_breakpoint): Fetch ptid from current_inferior.
12752 (linux_wait_for_event): Pass &all_threads to find_inferior,
12753 not &all_lwps. Fetch ptid, lwpid from thread.
12754 (count_events_callback): Update, "entry" parameter is a
12755 struct thread_info * now.
12756 (select_singlestep_lwp_callback): Ditto.
12757 (select_event_lwp_callback): Ditto.
12758 (cancel_breakpoints_callback): Ditto.
12759 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12760 not &all_lwps.
12761 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12762 (unsuspend_one_lwp): Update, "entry" parameter is a
12763 struct thread_info * now.
12764 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12765 not &all_lwps.
12766 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12767 Fetch lwpid from thread, not lwp.
12768 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12769 Pass &all_threads to find_inferior, not &all_lwps.
12770 (send_sigstop): Fetch lwpid from thread, not lwp.
12771 (send_sigstop_callback): Update, "entry" parameter is a
12772 struct thread_info * now.
12773 (suspend_and_send_sigstop_callback): Ditto.
12774 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12775 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12776 struct thread_info * now.
12777 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12778 from thread, lwp.
12779 (lwp_running): Update, "entry" parameter is a
12780 struct thread_info * now.
12781 (stop_all_lwps): Fetch ptid from thread.
12782 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12783 (linux_resume_one_lwp): Fetch lwpid from thread.
12784 (linux_set_resume_request): Update, "entry" parameter is a
12785 struct thread_info * now. Fetch pid, lwpid from thread.
12786 (resume_status_pending_p): Update, "entry" parameter is a
12787 struct thread_info * now.
12788 (need_step_over_p): Ditto. Fetch lwpid from thread.
12789 (start_step_over): Fetch lwpid from thread.
12790 (linux_resume_one_thread): Update, "entry" parameter is a
12791 struct thread_info * now. Fetch lwpid from thread.
12792 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12793 (proceed_one_lwp): Update, "entry" parameter is a
12794 struct thread_info * now. Fetch lwpid from thread.
12795 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12796 struct thread_info * now.
12797 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12798 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12799 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12800 directly.
12801 (regsets_store_inferior_registers): Ditto.
12802 (fetch_register, store_register): Ditto.
12803 (linux_read_memory, linux_write_memory): Ditto.
12804 (linux_request_interrupt): Ditto.
12805 (linux_read_auxv): Ditto.
12806 (linux_xfer_siginfo): Ditto.
12807 (linux_qxfer_spu): Ditto.
12808 (linux_qxfer_libraries_svr4): Ditto.
12809 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12810 moved to inferiors.h.
12811 (get_lwp): Delete.
12812 (get_thread_lwp): Update.
12813 (struct lwp_info): Delete member "entry". Simplify comment for
12814 member "thread".
12815 (all_lwps): Delete.
12816 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12817 current_inferior directly.
12818 (update_watch_registers_callback): Update, "entry" parameter is a
12819 struct thread_info * now. Fetch pid from thread.
12820 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12821 (mips_insert_point): Fetch lwpid from current_inferior.
12822 Pass &all_threads to find_inferior, not &all_lwps.
12823 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12824 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12825 directly.
12826 (mips_stopped_data_address): Ditto.
12827 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12828 directly.
12829 * linux-tile-low.c (tile_arch_setup): Ditto.
12830 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12831 (update_debug_registers_callback): Update, "entry" parameter is a
12832 struct thread_info * now. Fetch pid from thread.
12833 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12834 Pass &all_threads to find_inferior, not &all_lwps.
12835 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12836 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12837 Pass &all_threads to find_inferior, not &all_lwps.
12838 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12839 (i386_dr_low_get_status): Ditto.
12840 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12841 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12842 (x86_linux_read_description): Ditto.
12843 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12844
12845 2014-02-20 Doug Evans <dje@google.com>
12846
12847 * inferiors.c (get_first_inferior): Fix buglet.
12848
12849 2014-02-19 Doug Evans <dje@google.com>
12850
12851 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12852 * inferiors.c (add_thread): Change result type to struct thread_info *.
12853 All callers updated.
12854 (add_lwp): Call add_thread here instead of in callers.
12855 All callers updated.
12856 * linux-low.h (get_lwp_thread): Rewrite.
12857 (struct lwp_info): New member "thread".
12858
12859 2014-02-19 Doug Evans <dje@google.com>
12860
12861 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12862 All callers updated.
12863
12864 2014-02-19 Doug Evans <dje@google.com>
12865
12866 * inferiors.c (add_thread): Fix whitespace.
12867
12868 2014-02-19 Doug Evans <dje@google.com>
12869
12870 * dll.c (clear_dlls): Replace accessing list implemention details
12871 with API function.
12872 * gdbthread.h (get_first_thread): Declare.
12873 * inferiors.c (for_each_inferior_with_data): New function.
12874 (get_first_thread): New function.
12875 (find_thread_ptid): Simplify.
12876 (get_first_inferior): New function.
12877 (clear_list): Delete.
12878 (one_inferior_p): New function.
12879 (clear_inferior_list): New function.
12880 (clear_inferiors): Update.
12881 * inferiors.h (for_each_inferior_with_data): Declare.
12882 (clear_inferior_list): Declare.
12883 (one_inferior_p): Declare.
12884 (get_first_inferior): Declare.
12885 * linux-low.c (linux_wait_for_event): Replace accessing list
12886 implemention details with API function.
12887 * server.c (target_running): Ditto.
12888 (accumulate_file_name_length): New function.
12889 (emit_dll_description): New function.
12890 (handle_qxfer_libraries): Replace accessing list implemention
12891 details with API function.
12892 (handle_qxfer_threads_worker): New function.
12893 (handle_qxfer_threads_proper): Replace accessing list implemention
12894 details with API function.
12895 (handle_query): Ditto.
12896 (visit_actioned_threads_callback_ftype): New typedef.
12897 (visit_actioned_threads_data): New struct.
12898 (visit_actioned_threads): Rewrite to be find_inferior callback.
12899 (resume): Call find_inferior.
12900 (handle_status): Replace accessing list implemention
12901 details with API function.
12902 (process_serial_event): Replace accessing list implemention details
12903 with API function.
12904 * target.c (set_desired_inferior): Replace accessing list implemention
12905 details with API function.
12906 * tracepoint.c (same_process_p): New function.
12907 (gdb_agent_about_to_close): Replace accessing list implemention
12908 details with API function.
12909 * win32-low.c (child_delete_thread): Replace accessing list
12910 implemention details with API function.
12911 (match_dll_by_basename): New function.
12912 (dll_is_loaded_by_basename): New function.
12913 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12914 details call to dll_is_loaded_by_basename.
12915
12916 2014-02-19 Doug Evans <dje@google.com>
12917
12918 * dll.h (struct dll_info): Add comment.
12919 * gdbthread.h (struct thread_info): Add comment.
12920 (current_ptid): Simplify.
12921 * inferiors.c (add_process): Update.
12922 (remove_process): Update.
12923 * inferiors.h (struct process_info): Rename member "head" to "entry".
12924 * linux-low.c (delete_lwp): Update.
12925 (add_lwp): Update.
12926 (last_thread_of_process_p): Update.
12927 (kill_one_lwp_callback, linux_kill): Update.
12928 (status_pending_p_callback): Update.
12929 (wait_for_sigstop): Update. Simplify read of ptid.
12930 (start_step_over): Update.
12931 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12932 (get_lwp_thread): Update.
12933 (struct lwp_info): Rename member "head" to "entry".
12934 * regcache.h (inferior_list_entry): Delete.
12935 * server.c (kill_inferior_callback): Update.
12936 (detach_or_kill_inferior_callback): Update.
12937 (print_started_pid): Update.
12938 (print_attached_pid): Update.
12939 (process_serial_event): Simplify read of ptid.
12940 * thread-db.c (thread_db_create_event): Update.
12941 (thread_db_get_tls_address): Update.
12942 * win32-low.c (current_inferior_ptid): Simplify.
12943
12944 2014-02-19 Tom Tromey <tromey@redhat.com>
12945
12946 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12947 argument.
12948 (target_supports_btrace): Update.
12949
12950 2014-02-14 Yao Qi <yao@codesourcery.com>
12951
12952 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12953 (rsp-low-ipa.o): New target.
12954
12955 2014-02-12 Tom Tromey <tromey@redhat.com>
12956
12957 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12958 convert_ascii_to_int.
12959 * regcache.c (registers_to_string): Likewise.
12960 * remote-utils.c (decode_M_packet): Likewise.
12961 * server.c (process_serial_event): Likewise.
12962
12963 2014-02-12 Tom Tromey <tromey@redhat.com>
12964
12965 * server.c (handle_query, handle_v_run): Use hex2bin, not
12966 unhexify.
12967 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12968
12969 2014-02-12 Tom Tromey <tromey@redhat.com>
12970
12971 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12972 convert_int_to_ascii.
12973 * regcache.c (registers_to_string, collect_register_as_string):
12974 Likewise.
12975 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12976 Likewise.
12977 * server.c (process_serial_event): Likewise.
12978 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12979 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12980
12981 2014-02-12 Tom Tromey <tromey@redhat.com>
12982
12983 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12984 bin2hex, not hexify.
12985 * tracepoint.c (cmd_qtstatus): Likewise.
12986
12987 2014-02-12 Tom Tromey <tromey@redhat.com>
12988
12989 * remote-utils.c (monitor_output): Pass explicit length to
12990 hexify.
12991
12992 2014-02-12 Tom Tromey <tromey@redhat.com>
12993
12994 * tracepoint.c: Include rsp-low.h.
12995 * server.c: Include rsp-low.h.
12996 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12997 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12998 declare.
12999 * remote-utils.c: Include rsp-low.h.
13000 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13001 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13002 (convert_int_to_ascii, convert_ascii_to_int): Move to
13003 common/rsp-low.c.
13004 * regcache.c: Include rsp-low.h.
13005 * ax.c: Include rsp-low.h.
13006 * Makefile.in (SFILES): Add common/rsp-low.c.
13007 (OBS): Add rsp-low.o.
13008 (rsp-low.o): New target.
13009
13010 2014-02-12 Tom Tromey <tromey@redhat.com>
13011
13012 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13013 Include print-utils.h.
13014 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13015 (plongest, thirty_two, phex_nz): Remove.
13016 * Makefile.in (SFILES): Add common/print-utils.c.
13017 (OBS): Add print-utils.o.
13018 (print-utils-ipa.o): New target.
13019 (print-utils.o): New target.
13020 (IPA_OBJS): Add print-utils-ipa.o.
13021
13022 2014-02-06 Tom Tromey <tromey@redhat.com>
13023
13024 * Makefile.in (SFILES): Fix indentation.
13025
13026 2014-02-05 Doug Evans <dje@google.com>
13027
13028 * linux-low.c (linux_wait_for_event): Improve comment.
13029 (linux_wait_1): Keep current_inferior in sync with event_child.
13030
13031 2014-01-22 Doug Evans <dje@google.com>
13032
13033 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13034
13035 2014-01-22 Doug Evans <dje@google.com>
13036
13037 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13038 * configure: Regenerate.
13039 * config.in: Regenerate.
13040 * Makefile.in (SFILES): Add debug.c.
13041 (OBS): Add debug.o.
13042 * debug.c: New file.
13043 * debug.h: New file.
13044 * linux-aarch64-low.c (*): Update all debugging printfs to use
13045 debug_printf instead of fprintf.
13046 * linux-arm-low.c (*): Ditto.
13047 * linux-cris-low.c (*): Ditto.
13048 * linux-crisv32-low.c (*): Ditto.
13049 * linux-m32r-low.c (*): Ditto.
13050 * linux-sparc-low.c (*): Ditto.
13051 * linux-x86.c (*): Ditto.
13052 * linux-low.c (*): Ditto.
13053 (linux_wait_1): Add calls to debug_enter, debug_exit.
13054 (linux_wait): Remove redundant debugging printf.
13055 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13056 (linux_resume, unstop_all_lwps): Ditto.
13057 * mem-break.c (*): Update all debugging printfs to use
13058 debug_printf instead of fprintf.
13059 * remote-utils.c (*): Ditto.
13060 * thread-db.c (*): Ditto.
13061 * server.c #include <ctype.h>, "gdb_vecs.h".
13062 (debug_threads): Moved to debug.c.
13063 (*): Update all debugging printfs to use debug_printf instead of
13064 fprintf.
13065 (start_inferior): Replace call to fflush with call to debug_flush.
13066 (monitor_show_help): Mention set debug-format.
13067 (parse_debug_format_options): New function.
13068 (handle_monitor_command): Handle "monitor set debug-format".
13069 (gdbserver_usage): Mention --debug-format.
13070 (main): Parse --debug-format.
13071 * server.h (debug_threads): Declaration moved to debug.h.
13072 #include "debug.h".
13073 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13074 trace_debug_1 that uses debug_printf.
13075 (tracepoint_look_up_symbols): Update all debugging printfs to use
13076 debug_printf instead of fprintf.
13077
13078 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13079
13080 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13081 sys/ptrace.h.
13082
13083 2014-01-17 Pedro Alves <palves@redhat.com>
13084
13085 PR build/16445
13086 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13087 defined after including gdb_proc_service.h.
13088
13089 2014-01-16 Doug Evans <dje@google.com>
13090
13091 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13092 (match_dll): Use it.
13093
13094 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13095
13096 * target.h (target_ops) <read_btrace>: Change parameters and
13097 return type to allow error reporting.
13098 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13099 trace reading errors on.
13100 * linux-low.c (linux_low_read_btrace): Pass trace reading
13101 errors on.
13102 (linux_low_disable_btrace): New.
13103
13104 2014-01-15 Doug Evans <dje@google.com>
13105
13106 * inferiors.c (thread_id_to_gdb_id): Delete.
13107 * inferiors.h (thread_id_to_gdb_id): Delete.
13108
13109 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13110
13111 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13112 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13113 versions.
13114
13115 2014-01-08 Pedro Alves <palves@redhat.com>
13116
13117 * server.c (handle_status): Don't discard previous queued stop
13118 replies or thread's pending status here.
13119 (main) <disconnection>: Do it here instead.
13120
13121 2014-01-08 Pedro Alves <palves@redhat.com>
13122
13123 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13124 * server.c (visit_actioned_threads, handle_pending_status): New
13125 function.
13126 (handle_v_cont): Factor out parts to ...
13127 (resume): ... this new function. If in all-stop, and a thread
13128 being resumed has a pending status, report it without actually
13129 resuming.
13130 (myresume): Adjust to use the new 'resume' function.
13131 (clear_pending_status_callback, set_pending_status_callback)
13132 (find_status_pending_thread_callback): New functions.
13133 (handle_status): Handle the case of multiple threads having
13134 interesting statuses to report. Report threads' real last signal
13135 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13136 with an interesting thread to report the status for, instead of
13137 always reporting the status of the first thread.
13138
13139 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13140
13141 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13142 * gdbreplay.c (gdbreplay_version): Likewise.
13143
13144 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13145
13146 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13147 iov.iov_len with the real length in use.
13148
13149 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13150
13151 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13152 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13153 for all targets that use win32-low.c.
13154 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13155 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13156
13157 2013-12-13 Pedro Alves <palves@redhat.com>
13158
13159 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13160 if equal to TARGET_WAITKIND_LOADED.
13161 * win32-low.c (cached_status): New static global.
13162 (win32_wait): Add declaration.
13163 (do_initial_child_stuff): Flush all initial pending debug events
13164 up to the initial breakpoint.
13165 (win32_wait): If CACHED_STATUS was set, return that instead
13166 of doing a real wait. Remove the code resuming the execution
13167 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13168 during the initial phase. Also remove the code changing
13169 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13170 TARGET_WAITKIND_STOPPED.
13171
13172 2013-12-11 Yao Qi <yao@codesourcery.com>
13173
13174 * notif.c (handle_notif_ack): Return 0 if no notification
13175 matches.
13176
13177 2013-11-20 Doug Evans <dje@google.com>
13178
13179 * linux-low.c (linux_set_resume_request): Fix comment.
13180
13181 2013-11-20 Doug Evans <dje@google.com>
13182
13183 * linux-low.c (resume_status_pending_p): Tweak comment.
13184
13185 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13186
13187 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13188 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13189 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13190 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13191 (srv_amd64_regobj): Add amd64-mpx.o.
13192 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13193 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13194 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13195 * i387-fp.c (num_pl_bnd_register) Added constant.
13196 (num_pl_bnd_cfg_registers) Added constant.
13197 (struct i387_xsave) Added reserved area and MPX fields.
13198 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13199 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13200 function.
13201 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13202 (init_registers_amd64_mpx_linux): Declare new function.
13203 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13204 (x86_64_regmap): Add MPX registers.
13205 (x86_linux_read_description): Add MPX case.
13206 (initialize_low_arch): Initialize MPX targets.
13207
13208 2013-11-18 Tom Tromey <tromey@redhat.com>
13209
13210 * configure: Rebuild.
13211 * configure.ac: Don't check for stdlib.h.
13212 * gdbreplay.c: Unconditionally include stdlib.h.
13213
13214 2013-11-18 Tom Tromey <tromey@redhat.com>
13215
13216 * config.in: Rebuild.
13217 * configure: Rebuild.
13218 * configure.ac: Don't use AC_HEADER_DIRENT.
13219
13220 2013-11-18 Tom Tromey <tromey@redhat.com>
13221
13222 * server.h: Don't check HAVE_STRING_H.
13223 * gdbreplay.c: Don't check HAVE_STRING_H.
13224 * configure: Rebuild.
13225
13226 2013-11-18 Tom Tromey <tromey@redhat.com>
13227
13228 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13229 LIBGNU.
13230
13231 2013-11-08 Tom Tromey <tromey@redhat.com>
13232
13233 * configure, config.in: Rebuild.
13234 * configure.ac: Remove unused configury.
13235
13236 2013-11-08 Tom Tromey <tromey@redhat.com>
13237
13238 * acinclude.m4: Include common.m4, codeset.m4.
13239 * configure, config.in: Rebuild.
13240 * configure.ac: Use GDB_AC_COMMON.
13241
13242 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13243
13244 * linux-s390-low.c (HWCAP_S390_TE): New define.
13245 (s390_arch_setup): Consider the TE field in the HWCAP for
13246 determining 'have_regset_tdb'.
13247
13248 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13249
13250 PR gdb/16014
13251 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13252 call to sizeof.
13253
13254 2013-10-02 Pedro Alves <palves@redhat.com>
13255
13256 * server.c (process_serial_event): Don't output "GDBserver
13257 exiting" if GDB is connected through stdio.
13258 * target.c (mywait): Likewise, be silent if GDB is connected
13259 through stdio.
13260
13261 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13262
13263 * lynx-low.c (lynx_add_threads_after_attach): New function.
13264 (lynx_attach): Remove call to add_thread. Add call to
13265 lynx_add_threads_after_attach instead.
13266
13267 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13268
13269 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13270 * config.in, configure: Regenerated.
13271
13272 2013-09-18 Yao Qi <yao@codesourcery.com>
13273
13274 PR server/15959
13275 * server.c (start_inferior): Clear 'resume_info'.
13276
13277 2013-09-16 Jiong Wang <jiwang@tilera.com>
13278
13279 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13280 for each register.
13281
13282 2013-09-16 Jiong Wang <jiwang@tilera.com>
13283
13284 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13285 linux-tile-low.o to srv_tgtobj.
13286
13287 2013-09-16 Will Newton <will.newton@linaro.org>
13288
13289 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13290 out regs.
13291
13292 2013-09-06 Pedro Alves <palves@redhat.com>
13293
13294 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13295 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13296 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13297 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13298 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13299 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13300
13301 2013-09-06 Pedro Alves <palves@redhat.com>
13302
13303 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13304 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13305
13306 2013-09-06 Pedro Alves <palves@redhat.com>
13307
13308 * linux-amd64-ipa.c: Include tracepoint.h.
13309 * linux-i386-ipa.c: Include tracepoint.h.
13310
13311 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13312
13313 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13314 (ps_get_thread_area): New function.
13315
13316 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13317
13318 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13319 (initialize_low_arch): Call init_registers_crisv32 rather than
13320 init_register_crisv32.
13321
13322 2013-09-05 Pedro Alves <palves@redhat.com>
13323
13324 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13325 to ...
13326 * hostio.h: ... this new file.
13327 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13328 win32-low.c: Include hostio.h.
13329
13330 2013-09-05 Pedro Alves <palves@redhat.com>
13331
13332 * server.h (gdb_client_data, handler_func, callback_handler_func)
13333 (delete_file_handler, add_file_handler, append_callback_event)
13334 (delete_callback_event, start_event_loop, initialize_event_loop):
13335 Move to event-loop.h and include it.
13336 * event-loop.h: New file.
13337
13338 2013-09-05 Pedro Alves <palves@redhat.com>
13339
13340 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13341 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13342 (loaded_dll, unloaded_dll): Move to ...
13343 * dll.h: ... this new file.
13344 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13345
13346 2013-09-05 Pedro Alves <palves@redhat.com>
13347
13348 * server.h (current_process, get_thread_process, all_processes)
13349 (add_inferior_to_list, for_each_inferior, current_inferior)
13350 (remove_inferior, add_process, remove_process, find_process_pid)
13351 (have_started_inferiors_p, have_attached_inferiors_p)
13352 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13353 (clear_inferiors, find_inferior, find_inferior_id)
13354 (inferior_target_data, set_inferior_target_data)
13355 (inferior_regcache_data, set_inferior_regcache_data): Move to
13356 inferiors.h, and include it.
13357 * inferiors.h: New file.
13358
13359 2013-09-05 Pedro Alves <palves@redhat.com>
13360
13361 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13362 Move ...
13363 * ax.h: ... here.
13364
13365 2013-09-05 Pedro Alves <palves@redhat.com>
13366
13367 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13368 tracepoint.h.
13369 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13370 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13371 (handle_tracepoint_general_set, handle_tracepoint_query)
13372 (tracepoint_finished_step, tracepoint_was_hit)
13373 (release_while_stepping_state_list, current_traceframe)
13374 (in_readonly_region, traceframe_read_mem)
13375 (fetch_traceframe_registers, traceframe_read_sdata)
13376 (traceframe_read_info, struct fast_tpoint_collect_status)
13377 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13378 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13379 (supply_fast_tracepoint_registers)
13380 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13381 (ipa_tdesc, claim_trampoline_space)
13382 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13383 (agent_mem_read, agent_get_trace_state_variable_value)
13384 (agent_set_trace_state_variable_value, agent_tsv_read)
13385 (agent_mem_read_string, get_raw_reg_func_addr)
13386 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13387 * tracepoint.h: ... this new file.
13388
13389 2013-09-05 Pedro Alves <palves@redhat.com>
13390
13391 * server.h (perror_with_name, error, fatal, warning, paddress)
13392 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13393 include it.
13394 * utils.h: New file.
13395
13396 2013-09-05 Pedro Alves <palves@redhat.com>
13397
13398 * server.h (remote_debug, noack_mode, transport_is_reliable)
13399 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13400 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13401 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13402 (write_enn, initialize_async_io, enable_async_io)
13403 (disable_async_io, check_remote_input_interrupt_request)
13404 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13405 (dead_thread_notify, prepare_resume_reply)
13406 (decode_address_to_semicolon, decode_address, decode_m_packet)
13407 (decode_M_packet, decode_X_packet, decode_xfer_write)
13408 (decode_search_memory_packet, unhexify, hexify)
13409 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13410 (look_up_one_symbol, relocate_instruction)
13411 (monitor_output): Move to remote-utils.h, and include it.
13412 * remote-utils.h: New file.
13413
13414 2013-09-05 Pedro Alves <palves@redhat.com>
13415
13416 * server.h (_): Delete.
13417
13418 2013-09-02 Pedro Alves <palves@redhat.com>
13419
13420 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13421 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13422 allocated.
13423 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13424
13425 2013-09-02 Pierre Muller <muller@sourceware.org>
13426
13427 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13428 or WriteProcessMemory complete successfully and handle
13429 ERROR_PARTIAL_COPY error.
13430
13431 2013-09-02 Pedro Alves <palves@redhat.com>
13432
13433 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13434 error instead of EIO.
13435
13436 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13437
13438 PR server/15604
13439 * linux-low.c: Include filestuff.h.
13440 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13441 * lynx-low.c: Include filestuff.h.
13442 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13443 * server.c: Include filestuff.h.
13444 (main): Call notice_open_fds.
13445 * spu-low.c: Include filestuff.h.
13446 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13447
13448 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13449
13450 * Makefile.in: Explain why ../target and ../nat are not
13451 listed as include file search paths.
13452 (linux-waitpid.o): New object file rule.
13453 * configure.srv (srv_native_linux_obj): New variable.
13454 Replace all occurrences of linux native object files with
13455 $srv_native_linux_obj.
13456 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13457 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13458 (linux_enable_event_reporting): Remove declaration.
13459 (my_waitpid): Moved to common/linux-waitpid.c.
13460 (linux_wait_for_event): Pass ptid when calling
13461 linux_enable_event_reporting.
13462 (linux_supports_tracefork_flag): Remove.
13463 (linux_enable_event_reporting): Likewise.
13464 (linux_tracefork_grandchild): Remove.
13465 (STACK_SIZE): Moved to common/linux-ptrace.c.
13466 (linux_tracefork_child): Remove.
13467 (linux_test_for_tracefork): Remove.
13468 (linux_look_up_symbols): Call linux_supports_traceclone.
13469 (initialize_low): Remove call to linux_test_for_tracefork.
13470 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13471 common/linux-ptrace.h.
13472 (PTRACE_TYPE_ARG4): Likewise.
13473 Include linux-ptrace.h.
13474
13475 2013-08-21 Pedro Alves <palves@redhat.com>
13476
13477 * config.in: Renegerate.
13478
13479 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13480
13481 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13482 (SFILES): Remove $(srcdir)/common/target-common.c and
13483 add $(srcdir)/target/waitstatus.c.
13484 (OBS): Remove target-common.o and add waitstatus.o.
13485 (server_h): Remove $(srcdir)/../common/target-common.h and
13486 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13487 and $(srcdir)/../target/waitstatus.h.
13488 (target-common.o): Remove.
13489 (waitstatus.o): New target object file.
13490 * target.h: Do not include target-common.h and
13491 include target/resume.h, target/wait.h and
13492 target/waitstatus.h.
13493
13494 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13495
13496 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13497 to PTRACE_TYPE_ARG3.
13498 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13499 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13500 PTRACE_TYPE_ARG4.
13501 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13502 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13503
13504 2013-07-27 Jie Zhang <jie@codesourcery.com>
13505 Daniel Jacobowitz <dan@codesourcery.com>
13506 Yao Qi <yao@codesourcery.com>
13507
13508 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13509 (mips-linux-watch.o): New rule.
13510 (mips_linux_watch_h): New variable.
13511 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13512 srv_tgtobj.
13513 * linux-mips-low.c: Include mips-linux-watch.h.
13514 (struct arch_process_info, struct arch_lwp_info): New.
13515 (update_watch_registers_callback): New function.
13516 (mips_linux_new_process, mips_linux_new_thread) New functions.
13517 (mips_linux_prepare_to_resume, mips_insert_point): New
13518 functions.
13519 (mips_remove_point, mips_stopped_by_watchpoint): New
13520 functions.
13521 (rsp_bp_type_to_target_hw_bp_type): New function.
13522 (mips_stopped_data_address): New function.
13523 (the_low_target): Add watchpoint support functions.
13524
13525 2013-07-27 Yao Qi <yao@codesourcery.com>
13526
13527 * i386-low.c: Include break-common.h.
13528 (enum target_hw_bp_type): Remove.
13529
13530 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13531
13532 * Makefile.in (SFILES): /common/target-common.c.
13533 (OBS): Add target-common.o.
13534 (server_h): Add $(srcdir)/../common/target-common.h.
13535 (target-common.o): New target.
13536 * server.c (queue_stop_reply_callback): Free
13537 status string after use.
13538 * target.c (target_waitstatus_to_string): Remove.
13539 * target.h: Include target-common.h.
13540 (resume_kind): Likewise.
13541 (target_waitkind): Likewise.
13542 (target_waitstatus): Likewise.
13543 (TARGET_WNOHANG): Likewise.
13544
13545 2013-07-04 Yao Qi <yao@codesourcery.com>
13546
13547 * Makefile.in (host_alias): Use @host_noncanonical@.
13548 (target_alias): Use @target_noncanonical@.
13549 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13550 ACX_NONCANONICAL_HOST.
13551 * configure: Regenerated.
13552
13553 Revert:
13554 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13555
13556 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13557 * configure: Rebuild.
13558 * Makefile.in (version_host, version_target): Get from configure.
13559 (version.c): Use $(version_host) and $(version_target).
13560
13561 2013-07-03 Pedro Alves <palves@redhat.com>
13562
13563 * Makefile.in (config.status): Depend on development.sh.
13564 * acinclude.m4: Include libmcheck.m4.
13565 * configure: Regenerate.
13566
13567 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13568
13569 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13570 attribute inside the parentheses.
13571 (winapi_DebugSetProcessKillOnExit): Ditto.
13572 (winapi_DebugBreakProcess): Ditto.
13573 (winapi_GenerateConsoleCtrlEvent): Ditto.
13574
13575 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13576
13577 * notif.h (notif_event): Add a dummy member to avoid compiler
13578 errors.
13579
13580 2013-07-01 Pedro Alves <palves@redhat.com>
13581
13582 * hostio.c (HOSTIO_PATH_MAX): Define.
13583 (require_filename, handle_open, handle_unlink, handle_readlink):
13584 Use it.
13585
13586 2013-07-01 Pedro Alves <palves@redhat.com>
13587
13588 * server.h: Include "pathmax.h".
13589 * linux-low.c: Don't include sys/param.h.
13590 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13591 MAXPATHLEN.
13592 * win32-low.c: Don't include sys/param.h.
13593 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13594
13595 2013-07-01 Pedro Alves <palves@redhat.com>
13596
13597 * event-loop.c: Don't check HAVE_UNISTD_H before including
13598 <unistd.h>.
13599 * gdbreplay.c: Likewise.
13600 * remote-utils.c: Likewise.
13601 * server.c: Likewise.
13602 * configure.ac: Don't check for unistd.h.
13603 * configure: Regenerate.
13604
13605 2013-06-28 Tom Tromey <tromey@redhat.com>
13606
13607 * Makefile.in (version.c): Use version.in, not
13608 common/version.in.
13609
13610 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13611
13612 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13613 * configure: Rebuild.
13614 * Makefile.in (version_host, version_target): Get from configure.
13615 (version.c): Use $(version_host) and $(version_target).
13616
13617 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13618
13619 Fix trace-status to output user name without trailing colon.
13620 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13621
13622 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13623
13624 Fix trace-status to output proper start-time and stop-time.
13625 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13626 output start time and stop time in hex as gdb expects.
13627
13628 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13629
13630 * tracepoint.c (build_traceframe_info_xml): Output trace state
13631 variables present in the trace buffer.
13632
13633 2013-06-24 Tom Tromey <tromey@redhat.com>
13634
13635 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13636 create-version.sh.
13637 (version.o): Remove.
13638 * gdbreplay.c: Include version.h.
13639 (version, host_name): Don't declare.
13640 * server.h: Include version.h.
13641 (version, host_name): Don't declare.
13642
13643 2013-06-12 Pedro Alves <palves@redhat.com>
13644
13645 * linux-x86-low.c (linux_is_elf64): Delete global.
13646 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13647 with local linux_pid_exe_is_elf_64_file use.
13648
13649 2013-06-11 Pedro Alves <palves@redhat.com>
13650
13651 * linux-low.c (regset_disabled, disable_regset): New functions.
13652 (regsets_fetch_inferior_registers)
13653 (regsets_store_inferior_registers): Use them.
13654 (initialize_regsets_info); Don't allocate the disabled_regsets
13655 array here.
13656 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13657 comment.
13658
13659 2013-06-11 Pedro Alves <palves@redhat.com>
13660
13661 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13662 xmalloc.
13663
13664 2013-06-11 Pedro Alves <palves@redhat.com>
13665
13666 * linux-x86-low.c (initialize_low_arch): Call
13667 init_registers_x32_avx_linux.
13668
13669 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13670
13671 Fix compatibility with Android Bionic.
13672 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13673 it is not empty.
13674
13675 2013-06-07 Pedro Alves <palves@redhat.com>
13676
13677 PR server/14823
13678 * Makefile.in (OBS): Add tdesc.o.
13679 (IPA_OBJS): Add tdesc-ipa.o.
13680 (tdesc-ipa.o): New rule.
13681 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13682 interface.
13683 * linux-low.c (new_inferior): Delete.
13684 (disabled_regsets, num_regsets): Delete.
13685 (linux_add_process): Adjust to set the new per-process
13686 new_inferior flag.
13687 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13688 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13689 was a stop. When calling arch_setup, switch the current inferior
13690 to the thread that got an event.
13691 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13692 (regsets_fetch_inferior_registers)
13693 (regsets_store_inferior_registers): New regsets_info parameter.
13694 Adjust to use it.
13695 (linux_register_in_regsets): New regs_info parameter. Adjust to
13696 use it.
13697 (register_addr, fetch_register, store_register): New usrregs_info
13698 parameter. Adjust to use it.
13699 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13700 parameter regs_info. Adjust to use it.
13701 (linux_fetch_registers): Get the current inferior's regs_info, and
13702 adjust to use it.
13703 (linux_store_registers): Ditto.
13704 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13705 (initialize_low): Don't initialize the target_regsets here. Call
13706 initialize_low_arch.
13707 * linux-low.h (target_regsets): Delete declaration.
13708 (struct regsets_info): New.
13709 (struct usrregs_info): New.
13710 (struct regs_info): New.
13711 (struct process_info_private) <new_inferior>: New field.
13712 (struct linux_target_ops): Delete the num_regs, regmap, and
13713 regset_bitmap fields. New field regs_info.
13714 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13715 * i387-fp.c (num_xmm_registers): Delete.
13716 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13717 calls to new interface.
13718 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13719 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13720 Infer the number of xmm registers from the regcache's target
13721 description.
13722 * i387-fp.h (num_xmm_registers): Delete.
13723 * inferiors.c (add_thread): Don't install the thread's regcache
13724 here.
13725 * proc-service.c (gregset_info): Fetch the current inferior's
13726 regs_info. Adjust to use it.
13727 * regcache.c: Include tdesc.h.
13728 (register_bytes, reg_defs, num_registers)
13729 (gdbserver_expedite_regs): Delete.
13730 (get_thread_regcache): If the thread doesn't have a regcache yet,
13731 create one, instead of aborting gdbserver.
13732 (regcache_invalidate_one): Rename to ...
13733 (regcache_invalidate_thread): ... this.
13734 (regcache_invalidate_one): New.
13735 (regcache_invalidate): Only invalidate registers of the current
13736 process.
13737 (init_register_cache): Add target_desc parameter, and use it.
13738 (new_register_cache): Ditto. Assert the target description has a
13739 non zero registers_size.
13740 (regcache_cpy): Add assertions. Adjust.
13741 (realloc_register_cache, set_register_cache): Delete.
13742 (registers_to_string, registers_from_string): Adjust.
13743 (find_register_by_name, find_regno, find_register_by_number)
13744 (register_cache_size): Add target_desc parameter, and use it.
13745 (free_register_cache_thread, free_register_cache_thread_one)
13746 (regcache_release, register_cache_size): New.
13747 (register_size): Add target_desc parameter, and use it.
13748 (register_data, supply_register, supply_register_zeroed)
13749 (supply_regblock, supply_register_by_name, collect_register)
13750 (collect_register_as_string, collect_register_by_name): Adjust.
13751 * regcache.h (struct target_desc): Forward declare.
13752 (struct regcache) <tdesc>: New field.
13753 (init_register_cache, new_register_cache): Add target_desc
13754 parameter.
13755 (regcache_invalidate_thread): Declare.
13756 (regcache_invalidate_one): Delete declaration.
13757 (regcache_release): Declare.
13758 (find_register_by_number, register_cache_size, register_size)
13759 (find_regno): Add target_desc parameter.
13760 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13761 declarations.
13762 * remote-utils.c: Include tdesc.h.
13763 (outreg, prepare_resume_reply): Adjust.
13764 * server.c: Include tdesc.h.
13765 (gdbserver_xmltarget): Delete declaration.
13766 (get_features_xml, process_serial_event): Adjust.
13767 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13768 declare.
13769 (struct process_info) <tdesc>: New field.
13770 (ipa_tdesc): Declare.
13771 * tdesc.c: New file.
13772 * tdesc.h: New file.
13773 * tracepoint.c: Include tdesc.h.
13774 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13775 (get_context_regcache): Adjust to pass ipa_tdesc down.
13776 (do_action_at_tracepoint): Adjust to get the register cache size
13777 from the context regcache's description.
13778 (traceframe_walk_blocks): Adjust to get the register cache size
13779 from the current trace frame's description.
13780 (traceframe_get_pc): Adjust to get current trace frame's
13781 description and pass it down.
13782 (gdb_collect): Adjust to get the register cache size from the
13783 IPA's description.
13784 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13785 (gdbserver_xmltarget): Delete.
13786 (initialize_low_tracepoint): Set the ipa's target description.
13787 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13788 (initialize_low_tracepoint): Set the ipa's target description.
13789 * linux-x86-low.c: Include tdesc.h.
13790 [__x86_64__] (is_64bit_tdesc): New.
13791 (ps_get_thread_area, x86_get_thread_area): Use it.
13792 (i386_cannot_store_register): Rename to ...
13793 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13794 (i386_cannot_fetch_register): Rename to ...
13795 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13796 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13797 to new interface.
13798 (target_regsets): Rename to ...
13799 (x86_regsets): ... this.
13800 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13801 interface.
13802 (x86_siginfo_fixup): Use is_64bit_tdesc.
13803 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13804 (tdesc_x32_avx_linux, tdesc_x32_linux)
13805 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13806 Declare.
13807 (x86_linux_update_xmltarget): Delete.
13808 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13809 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13810 (AMD64_LINUX_USER64_CS): New.
13811 (x86_linux_read_description): New, based on
13812 x86_linux_update_xmltarget.
13813 (same_process_callback): New.
13814 (x86_arch_setup_process_callback): New.
13815 (x86_linux_update_xmltarget): New.
13816 (x86_regsets_info): New.
13817 (amd64_linux_regs_info): New.
13818 (i386_linux_usrregs_info): New.
13819 (i386_linux_regs_info): New.
13820 (x86_linux_regs_info): New.
13821 (x86_arch_setup): Reimplement.
13822 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13823 (x86_emit_ops): Ditto.
13824 (the_low_target): Adjust. Install x86_linux_regs_info,
13825 x86_cannot_fetch_register, and x86_cannot_store_register.
13826 (initialize_low_arch): New.
13827 * linux-ia64-low.c (tdesc_ia64): Declare.
13828 (ia64_fetch_register): Adjust.
13829 (ia64_usrregs_info, regs_info): New globals.
13830 (ia64_regs_info): New function.
13831 (the_low_target): Adjust.
13832 (initialize_low_arch): New function.
13833 * linux-sparc-low.c (tdesc_sparc64): Declare.
13834 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13835 Adjust.
13836 (sparc_arch_setup): New function.
13837 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13838 (the_low_target): Adjust.
13839 (initialize_low_arch): New function.
13840 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13841 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13842 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13843 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13844 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13845 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13846 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13847 (tdesc_powerpc_isa205_vsx64l): Declare.
13848 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13849 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13850 (ppc_set_pc, ppc_get_hwcap): Adjust.
13851 (ppc_usrregs_info): Forward declare.
13852 (!__powerpc64__) ppc_regmap_adjusted: New global.
13853 (ppc_arch_setup): Adjust to the current process'es target
13854 description.
13855 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13856 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13857 (ppc_store_evrregset): Adjust.
13858 (target_regsets): Rename to ...
13859 (ppc_regsets): ... this, and make static.
13860 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13861 (ppc_regs_info): New function.
13862 (the_low_target): Adjust.
13863 (initialize_low_arch): New function.
13864 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13865 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13866 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13867 (tdesc_s390x_linux64v2): Declare.
13868 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13869 (s390_fill_gregset, s390_store_last_break): Adjust.
13870 (target_regsets): Rename to ...
13871 (s390_regsets): ... this, and make static.
13872 (s390_get_pc, s390_set_pc): Adjust.
13873 (s390_get_hwcap): New target_desc parameter, and use it.
13874 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13875 (s390_arch_setup): Adjust to set the current process'es target
13876 description. Don't adjust the regmap.
13877 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13878 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13879 (regs_info_3264): New globals.
13880 (s390_regs_info): New function.
13881 (the_low_target): Adjust.
13882 (initialize_low_arch): New function.
13883 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13884 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13885 [__mips64] (init_registers_mips_linux)
13886 (init_registers_mips_dsp_linux): Delete defines.
13887 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13888 (have_dsp): New global.
13889 (mips_read_description): New, based on mips_arch_setup.
13890 (mips_arch_setup): Reimplement.
13891 (get_usrregs_info): New function.
13892 (mips_cannot_fetch_register, mips_cannot_store_register)
13893 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13894 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13895 (target_regsets): Rename to ...
13896 (mips_regsets): ... this, and make static.
13897 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13898 (dsp_regs_info, regs_info): New globals.
13899 (mips_regs_info): New function.
13900 (the_low_target): Adjust.
13901 (initialize_low_arch): New function.
13902 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13903 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13904 Declare.
13905 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13906 (arm_read_description): New, with bits factored from
13907 arm_arch_setup.
13908 (arm_arch_setup): Reimplement.
13909 (target_regsets): Rename to ...
13910 (arm_regsets): ... this, and make static.
13911 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13912 (arm_regs_info): New function.
13913 (the_low_target): Adjust.
13914 (initialize_low_arch): New function.
13915 * linux-m68k-low.c (tdesc_m68k): Declare.
13916 (target_regsets): Rename to ...
13917 (m68k_regsets): ... this, and make static.
13918 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13919 (m68k_regs_info): New function.
13920 (m68k_arch_setup): New function.
13921 (the_low_target): Adjust.
13922 (initialize_low_arch): New function.
13923 * linux-sh-low.c (tdesc_sharch): Declare.
13924 (target_regsets): Rename to ...
13925 (sh_regsets): ... this, and make static.
13926 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13927 (sh_regs_info, sh_arch_setup): New functions.
13928 (the_low_target): Adjust.
13929 (initialize_low_arch): New function.
13930 * linux-bfin-low.c (tdesc_bfin): Declare.
13931 (bfin_arch_setup): New function.
13932 (bfin_usrregs_info, regs_info): New globals.
13933 (bfin_regs_info): New function.
13934 (the_low_target): Adjust.
13935 (initialize_low_arch): New function.
13936 * linux-cris-low.c (tdesc_cris): Declare.
13937 (cris_arch_setup): New function.
13938 (cris_usrregs_info, regs_info): New globals.
13939 (cris_regs_info): New function.
13940 (the_low_target): Adjust.
13941 (initialize_low_arch): New function.
13942 * linux-cris-low.c (tdesc_crisv32): Declare.
13943 (cris_arch_setup): New function.
13944 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13945 (cris_regs_info): New function.
13946 (the_low_target): Adjust.
13947 (initialize_low_arch): New function.
13948 * linux-m32r-low.c (tdesc_m32r): Declare.
13949 (m32r_arch_setup): New function.
13950 (m32r_usrregs_info, regs_info): New globals.
13951 (m32r_regs_info): Adjust.
13952 (initialize_low_arch): New function.
13953 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13954 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13955 (tic6x_usrregs_info): Forward declare.
13956 (tic6x_read_description): New function, based on ...
13957 (tic6x_arch_setup): ... this. Reimplement.
13958 (target_regsets): Rename to ...
13959 (tic6x_regsets): ... this, and make static.
13960 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13961 (tic6x_regs_info): New function.
13962 (the_low_target): Adjust.
13963 (initialize_low_arch): New function.
13964 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13965 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13966 (target_regsets): Rename to ...
13967 (xtensa_regsets): ... this, and make static.
13968 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13969 globals.
13970 (xtensa_arch_setup, xtensa_regs_info): New functions.
13971 (the_low_target): Adjust.
13972 (initialize_low_arch): New function.
13973 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13974 (nios2_arch_setup): Set the current process'es tdesc.
13975 (target_regsets): Rename to ...
13976 (nios2_regsets): ... this.
13977 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13978 (nios2_regs_info): New function.
13979 (the_low_target): Adjust.
13980 (initialize_low_arch): New function.
13981 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13982 (aarch64_arch_setup): Set the current process'es tdesc.
13983 (target_regsets): Rename to ...
13984 (aarch64_regsets): ... this.
13985 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13986 (aarch64_regs_info): New function.
13987 (the_low_target): Adjust.
13988 (initialize_low_arch): New function.
13989 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13990 globals.
13991 (target_regsets): Rename to ...
13992 (tile_regsets): ... this.
13993 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13994 (tile_regs_info): New function.
13995 (tile_arch_setup): Set the current process'es tdesc.
13996 (the_low_target): Adjust.
13997 (initialize_low_arch): New function.
13998 * spu-low.c (tdesc_spu): Declare.
13999 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14000 * win32-arm-low.c (tdesc_arm): Declare.
14001 (arm_arch_setup): New function.
14002 (the_low_target): Install arm_arch_setup instead of
14003 init_registers_arm.
14004 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14005 (init_windows_x86): Rename to ...
14006 (i386_arch_setup): ... this. Set `win32_tdesc'.
14007 (the_low_target): Adjust.
14008 * win32-low.c (win32_tdesc): New global.
14009 (child_add_thread): Don't create the thread cache here.
14010 (do_initial_child_stuff): Set the new process'es tdesc.
14011 * win32-low.h (struct target_desc): Forward declare.
14012 (win32_tdesc): Declare.
14013 * lynx-i386-low.c (tdesc_i386): Declare global.
14014 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14015 * lynx-low.c (lynx_tdesc): New global.
14016 (lynx_add_process): Set the new process'es tdesc.
14017 * lynx-low.h (struct target_desc): Forward declare.
14018 (lynx_tdesc): Declare global.
14019 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14020 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14021 * nto-low.c (nto_tdesc): New global.
14022 (do_attach): Set the new process'es tdesc.
14023 * nto-low.h (struct target_desc): Forward declare.
14024 (nto_tdesc): Declare.
14025 * nto-x86-low.c (tdesc_i386): Declare.
14026 (nto_x86_arch_setup): Set `nto_tdesc'.
14027
14028 2013-06-04 Gary Benson <gbenson@redhat.com>
14029
14030 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14031 to qSupported response when appropriate.
14032 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14033 with nonzero-length annex.
14034 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14035 arguments supplied in annex.
14036
14037 2013-05-31 Doug Evans <dje@google.com>
14038
14039 PR server/15594
14040 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14041 64 bits in 64-cross-32 environment.
14042
14043 2013-05-28 Pedro Alves <palves@redhat.com>
14044
14045 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14046 (aarch64-without-fpu.c): Delete rule.
14047 * configure.srv (aarch64*-*-linux*): Remove references to
14048 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14049 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14050 declaration.
14051
14052 2013-05-24 Pedro Alves <palves@redhat.com>
14053
14054 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14055 instead of strchr/decode_address. Error if the range isn't split
14056 with a ','. Don't assume there's be a ':' in the action.
14057
14058 2013-05-23 Yao Qi <yao@codesourcery.com>
14059 Pedro Alves <palves@redhat.com>
14060
14061 * linux-low.c (lwp_in_step_range): New function.
14062 (linux_wait_1): If the thread was range stepping and stopped
14063 outside the stepping range, report the stop to GDB. Otherwise,
14064 continue stepping. Add range stepping debug output.
14065 (linux_set_resume_request): Copy the step range from the resume
14066 request to the lwp.
14067 (linux_supports_range_stepping): New.
14068 (linux_target_ops) <supports_range_stepping>: Set to
14069 linux_supports_range_stepping.
14070 * linux-low.h (struct linux_target_ops)
14071 <supports_range_stepping>: New field.
14072 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14073 * linux-x86-low.c (x86_supports_range_stepping): New.
14074 (the_low_target) <supports_range_stepping>: Set to
14075 x86_supports_range_stepping.
14076 * server.c (handle_v_cont): Handle 'r' action.
14077 (handle_v_requests): Append ";r" if the target supports range
14078 stepping.
14079 * target.h (struct thread_resume) <step_range_start,
14080 step_range_end>: New fields.
14081 (struct target_ops) <supports_range_stepping>:
14082 New field.
14083 (target_supports_range_stepping): New macro.
14084
14085 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14086
14087 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14088 confusion in comment.
14089
14090 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14091
14092 * lynx-low.c (struct process_info_private): New type.
14093 (lynx_add_process): New function.
14094 (lynx_create_inferior, lynx_attach): Replace calls to
14095 add_process by calls to lynx_add_process.
14096 (lynx_resume): If PTID is null, then try using
14097 current_process()->private->last_wait_event_ptid.
14098 Add comments.
14099 (lynx_clear_inferiors): Delete. The contents of that function
14100 has been inlined in lynx_mourn;
14101 (lynx_wait_1): Save the ptid in the process's private data.
14102 (lynx_mourn): Free the process' private data. Replace call
14103 to lynx_clear_inferiors by call to clear_inferiors.
14104
14105 2013-05-17 Yao Qi <yao@codesourcery.com>
14106
14107 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14108 the right place.
14109
14110 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14111
14112 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14113 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14114 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14115 PT_TEXT_END_ADDR guards. Update comments.
14116 (linux_target_op) <read_offsets>: Conditionally define to
14117 linux_read_offsets if the target is UCLIBC and if it defines
14118 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14119
14120 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14121 Andrew Jenner <andrew@codesourcery.com>
14122
14123 * Makefile.in (SFILES): Add linux-nios2-low.c.
14124 (clean): Add action to delete nios2-linux.c.
14125 (nios2-linux.c): New rule.
14126 * configure.srv: Add nios2*-*-linux*.
14127 * linux-nios2-low.c: New.
14128
14129 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14130
14131 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14132
14133 2013-04-25 Hui Zhu <hui@codesourcery.com>
14134
14135 PR gdb/15186
14136 * ax.c (ax_printf): Add fflush.
14137
14138 2013-04-22 Tom Tromey <tromey@redhat.com>
14139
14140 * Makefile.in (SFILES): Add filestuff.c.
14141 (OBS): Add filestuff.o.
14142 (filestuff.o): New target.
14143 * config.in, configure: Rebuild.
14144 * configure.ac: Check for fdwalk, pipe2.
14145
14146 2013-04-17 Pedro Alves <palves@redhat.com>
14147
14148 * configure.ac (USE_THREAD_DB): Delete variable.
14149 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14150 Don't AC_SUBST USE_THREAD_DB.
14151 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14152 * config.in, configure: Regenerate.
14153
14154 2013-04-16 Pedro Alves <palves@redhat.com>
14155
14156 * linux-low.h (struct lwp_info) <thread_known>: Move under
14157 the USE_THREAD_DB #ifdef.
14158
14159 2013-04-16 Pedro Alves <palves@redhat.com>
14160
14161 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14162 (linux-low.o): Delete rule.
14163 * linux-low.h: Always include "gdb_thread_db.h" instead of
14164 conditionally including thread_db.h.
14165 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14166 HAVE_THREAD_DB_H.
14167
14168 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14169
14170 * Makefile.in (install-only): Fix make install regression.
14171
14172 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14173
14174 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14175 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14176 installation.
14177 * gdbserver.1: Remove.
14178
14179 2013-03-22 Pedro Alves <palves@redhat.com>
14180
14181 * linux-low.c (handle_extended_wait): Don't call
14182 linux_enable_event_reporting.
14183
14184 2013-03-15 Tony Theodore <tonyt@logyst.com>
14185
14186 PR build/9098:
14187 * Makefile.in (SHELL): Use @SHELL@.
14188
14189 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14190
14191 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14192 compiler warning.
14193
14194 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14195
14196 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14197 Remove extraneous NULL element.
14198
14199 2013-03-13 Yao Qi <yao@codesourcery.com>
14200
14201 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14202 'V' block in trace frame.
14203
14204 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14205
14206 * target.h (struct target_ops): Add btrace ops.
14207 (target_supports_btrace): New macro.
14208 (target_enable_btrace): New macro.
14209 (target_disable_btrace): New macro.
14210 (target_read_btrace): New macro.
14211 * gdbthread.h (struct thread_info): Add btrace field.
14212 * server.c: Include btrace-common.h.
14213 (handle_btrace_general_set): New function.
14214 (handle_btrace_enable): New function.
14215 (handle_btrace_disable): New function.
14216 (handle_general_set): Call handle_btrace_general_set.
14217 (handle_qxfer_btrace): New function.
14218 (struct qxfer qxfer_packets[]): Add btrace entry.
14219 * inferiors.c (remove_thread): Disable btrace.
14220 * linux-low: Include linux-btrace.h.
14221 (linux_low_enable_btrace): New function.
14222 (linux_low_read_btrace): New function.
14223 (linux_target_ops): Add btrace ops.
14224 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14225 Add srv_linux_btrace=yes.
14226 (x86_64-*-linux*): Add linux-btrace.o.
14227 Add srv_linux_btrace=yes.
14228 * configure.ac: Define HAVE_LINUX_BTRACE.
14229 * config.in: Regenerated.
14230 * configure: Regenerated.
14231
14232 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14233
14234 * server.c (handle_qxfer): Preserve error message if -3 is
14235 returned.
14236 (qxfer): Document the -3 return value.
14237
14238 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14239
14240 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14241 (linux_btrace_h): New variable.
14242 (linux-btrace.o): New rule.
14243
14244 2013-03-08 Stan Shebs <stan@codesourcery.com>
14245 Hafiz Abid Qadeer <abidh@codesourcery.com>
14246
14247 * tracepoint.c (trace_buffer_size): New global.
14248 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14249 (init_trace_buffer): Change to one-argument function. Allocate
14250 trace buffer memory.
14251 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14252 handle QTBuffer:size packet.
14253 (cmd_bigqtbuffer_size): New function.
14254 (initialize_tracepoint): Call init_trace_buffer with
14255 DEFAULT_TRACE_BUFFER_SIZE.
14256 * server.c (handle_query): Add QTBuffer:size in the
14257 supported packets.
14258
14259 2013-03-07 Yao Qi <yao@codesourcery.com>
14260
14261 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14262 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14263 of -1.
14264 (cmd_qtsp): Adjust condition. Do post increment.
14265 Set cur_action and cur_step_action back to 0.
14266
14267 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14268
14269 PR server/15236
14270 * linux-low.c (linux_write_memory): Return early success if LEN is
14271 zero.
14272
14273 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14274
14275 * configure.srv: Add x86_64-*-cygwin* as target.
14276
14277 2013-02-28 Tom Tromey <tromey@redhat.com>
14278
14279 * configure.ac: Invoke AC_SYS_LARGEFILE.
14280 * configure, config.in: Rebuild.
14281
14282 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14283
14284 * win32-low.c: Throughout, fix format strings and casts of
14285 printf-like functions to avoid type related warnings on all
14286 platforms.
14287 (get_child_debug_event): Print dwDebugEventCode as hex since
14288 that's how it's usually documented.
14289
14290 2013-02-28 Yao Qi <yao@codesourcery.com>
14291
14292 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14293 pulongest.
14294
14295 2013-02-27 Jiong Wang <jiwang@tilera.com>
14296
14297 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14298 (reg-tilegx32.c): New rule.
14299 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14300 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14301 different register info initializer according to elf class.
14302 (init_registers_tilgx32): New function. The tilegx32 register info
14303 initializer.
14304 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14305 (tile_store_gregset): Likewise.
14306
14307 2013-02-27 Yao Qi <yao@codesourcery.com>
14308
14309 * server.c (process_point_options): Print debug message when
14310 debug_threads is true.
14311
14312 2013-02-26 Yao Qi <yao@codesourcery.com>
14313
14314 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14315
14316 2013-02-19 Pedro Alves <palves@redhat.com>
14317 Kai Tietz <ktietz@redhat.com>
14318
14319 PR gdb/15161
14320
14321 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14322 instead of strtoul to extract address from packet.
14323 (process_serial_event) <'z'>: Likewise.
14324
14325 2013-02-18 Yao Qi <yao@codesourcery.com>
14326
14327 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14328
14329 2013-02-14 Pedro Alves <palves@redhat.com>
14330
14331 Plug memory leak.
14332
14333 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14334 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14335
14336 2013-02-14 Pedro Alves <palves@redhat.com>
14337
14338 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14339
14340 2013-02-14 Pedro Alves <palves@redhat.com>
14341
14342 * tracepoint.c (save_string): Delete.
14343 (add_tracepoint_action): Use savestring instead of save_string.
14344
14345 2013-02-12 Pedro Alves <palves@redhat.com>
14346
14347 * linux-xtensa-low.c: Ditto.
14348 * xtensa-xtregs.c: Ditto.
14349
14350 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14351
14352 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14353 thread_db.
14354
14355 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14356
14357 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14358 aarch64_num_wp_regs and aarch64_num_bp_regs to
14359 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14360
14361 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14362
14363 * linux-aarch64-low.c (ps_get_thread_area): Replace
14364 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14365
14366 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14367 Marcus Shawcroft <marcus.shawcroft@arm.com>
14368 Nigel Stephens <nigel.stephens@arm.com>
14369 Yufeng Zhang <yufeng.zhang@arm.com>
14370
14371 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14372 (aarch64.c, aarch64-without-fpu.c): New targets.
14373 * configure.srv (aarch64*-*-linux*): New.
14374 * linux-aarch64-low.c: New file.
14375
14376 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14377
14378 * linux-low.c (handle_extended_wait, linux_create_inferior)
14379 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14380 (dequeue_one_deferred_signal, linux_resume_one_thread)
14381 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14382 (linux_tracefork_grandchild, linux_test_for_tracefork)
14383 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14384 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14385 where the argument is 0.
14386
14387 2013-01-25 Yao Qi <yao@codesourcery.com>
14388
14389 * event-loop.c: Include "queue.h".
14390 (gdb_event_p): New typedef.
14391 (struct gdb_event) <next_event>: Remove.
14392 (event_queue): Change to QUEUE(gdb_event_p).
14393 (async_queue_event): Remove.
14394 (gdb_event_xfree): New.
14395 (initialize_event_loop): New.
14396 (process_event): Use API from QUEUE.
14397 (wait_for_event): Likewise.
14398 * server.c (main): Call initialize_event_loop.
14399 * server.h (initialize_event_loop): Declare.
14400
14401 2013-01-18 Yao Qi <yao@codesourcery.com>
14402
14403 * ax.h (struct eval_agent_expr_context): New.
14404 (gdb_eval_agent_expr): Update declaration.
14405 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14406 TFRAME. Add new argument CTX.
14407 * server.h (struct eval_agent_expr_context): Declare.
14408 (agent_mem_read, agent_tsv_read): Update declaration.
14409 (agent_mem_read_string): Likewise.
14410 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14411 (add_traceframe_block): Add new argument TPOINT.
14412 Increase TPOINT->traceframe_usage.
14413 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14414 eval_tracepoint_agent_expr.
14415 (condition_true_at_tracepoint): Likewise.
14416 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14417 (agent_mem_read_string, agent_tsv_read): Likewise.
14418
14419 2013-01-16 Yao Qi <yao@codesourcery.com>
14420
14421 * linux-low.c (linux_resume_one_lwp): Don't check
14422 'lwp->bp_reinsert != 0'.
14423
14424 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14425 Pedro Alves <palves@redhat.com>
14426
14427 * lynx-low.c (ptrace_request_to_str): Define a temporary
14428 macro and use it to simplify this function's implementation.
14429
14430 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14431
14432 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14433 sets errno.
14434
14435 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14436
14437 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14438
14439 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14440
14441 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14442
14443 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14444
14445 * lynx-low.c (lynx_resume): Use the resume_info parameter
14446 to determine the ptid for the lynx_ptrace call, unless
14447 it is equal to minus_one_ptid, in which case we use the
14448 ptid of the current_inferior.
14449 (lynx_wait_1): After having received a thread create/exit
14450 event, resume the inferior's execution using the signaling
14451 thread's ptid, rather than the old ptid.
14452
14453 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14454
14455 * lynx-low.c (lynx_resume): Delete variable ret.
14456
14457 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14458
14459 * gdbreplay.c (gdbreplay_version): Update copyright year.
14460 * server.c (gdbserver_version): Likewise.
14461
14462 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14463
14464 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14465 new thread.
14466
14467 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14468
14469 * lynx-low.c (ptrace_request_to_str): Add handling for
14470 PTRACE_GETTRACESIG.
14471
14472 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14473
14474 * lynx-low.c (lynx_attach): Delete variable new_process.
14475
14476 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14477
14478 * lynx-low.c (lynx_create_inferior): Delete variable
14479 new_process.
14480
14481 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14482
14483 * lynx-low.c (ptrace_request_to_str): Do not handle
14484 PTRACE_GETTHREADLIST if this macro does not exist.
14485
14486 2012-12-15 Yao Qi <yao@codesourcery.com>
14487
14488 * Makefile.in (OBS): Add notif.o.
14489 * notif.c, notif.h: New.
14490 * server.c: Include "notif.h".
14491 (struct vstop_notif) <next>: Remove.
14492 <base>: New field.
14493 (queue_stop_reply): Update.
14494 (push_event, send_next_stop_reply): Remove.
14495 (discard_queued_stop_replies): Update.
14496 (notif_stop): New variable.
14497 (handle_v_stopped): Remove.
14498 (handle_v_requests): Don't call handle_v_stopped. Call
14499 handle_ack_notif instead.
14500 (queue_stop_reply_callback): Call notif_event_enque instead
14501 of queue_stop_reply.
14502 (handle_status): Don't call send_next_stop_reply, call
14503 notif_write_event instead.
14504 (kill_inferior_callback): Likewise.
14505 (detach_or_kill_inferior_callback): Likewise.
14506 (main): Call initialize_notif.
14507 (process_serial_event): Call QUEUE_is_empty.
14508 (handle_target_event): Call notif_push instead of push event.
14509 * server.h (push_event): Remove declaration.
14510
14511 2012-12-10 Tom Tromey <tromey@redhat.com>
14512
14513 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14514 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14515 macros.
14516 (.c.o): Rewrite.
14517 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14518 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14519 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14520 (amd64-linux-ipa.o, ax.o): Rewrite.
14521 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14522 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14523 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14524 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14525 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14526 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14527 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14528 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14529 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14530 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14531 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14532 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14533 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14534 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14535 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14536 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14537 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14538 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14539 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14540 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14541 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14542 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14543 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14544 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14545 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14546 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14547 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14548 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14549 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14550 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14551 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14552 (reg-tilegx.o): Remove.
14553 (all_object_files): New macro.
14554 Include .deps files.
14555 * aclocal.m4, configure: Rebuild.
14556 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14557 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14558 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14559
14560 2012-12-05 Tom Tromey <tromey@redhat.com>
14561
14562 PR gdb/14917:
14563 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14564
14565 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14566
14567 * configure.ac: Check for linux/perf_event.h.
14568 * config.in: Regenerated.
14569 * configure: Regenerated.
14570
14571 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14572
14573 * hostio.c (handle_readlink): Decrease buffer size
14574 parameter passed to readlink by one byte.
14575
14576 2012-11-26 Yao Qi <yao@codesourcery.com>
14577
14578 * configure.ac (build_warnings): Append '-Wempty-body'.
14579 * configure: Regenerated.
14580 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14581 body.
14582
14583 2012-11-15 Pierre Muller <muller@sourceware.org>
14584
14585 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14586 * config.in: Regenerate.
14587 * configure: Regenerate.
14588 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14589 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14590 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14591 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14592 header.
14593 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14594 instead of <sys/wait.h> header.
14595 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14596
14597 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14598
14599 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14600 (various make rules): Remove -DGDBSERVER
14601
14602 2012-11-09 Yao Qi <yao@codesourcery.com>
14603
14604 * spu-low.c (current_ptid): Move it to ..
14605 * gdbthread.h: ... here. New.
14606 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14607 * server.c (myresume, process_serial_event): Likewise.
14608 * thread-db.c (thread_db_find_new_threads): Likewise.
14609 * tracepoint.c (run_inferior_command): Likewise.
14610
14611 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14612
14613 * server.c (handle_search_memory_1): Include access length in
14614 warning message.
14615
14616 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14617
14618 * linux-crisv32-low.c: Fix compile errors.
14619
14620 2012-09-04 Yao Qi <yao@codesourcery.com>
14621
14622 * tracepoint.c (cmd_qtsv): Adjust debug message.
14623 Don't check CUR_TPOINT.
14624
14625 2012-08-28 Yao Qi <yao@codesourcery.com>
14626
14627 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14628 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14629 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14630 Remove declarations of xmalloc, xreallloc, xstrdup and
14631 freeargv.
14632 * Makefile.in (libiberty_h): New.
14633 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14634 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14635
14636 2012-08-23 Yao Qi <yao@codesourcery.com>
14637
14638 * server.h: Remove declaration of 'xsnprintf'.
14639
14640 2012-08-22 Keith Seitz <keiths@redhat.com>
14641
14642 * server.h: Include build-gnulib-gbserver/config.h.
14643 * gdbreplay.c: Likewise.
14644
14645 2012-08-08 Doug Evans <dje@google.com>
14646
14647 * Makefile.in (SFILES): Add gdb_vecs.c.
14648 (OBS): Add gdb_vecs.o.
14649 (gdb_vecs_h, host_defs_h): New variables.
14650 (thread-db.o): Add $(gdb_vecs_h) dependency.
14651 (gdb_vecs.o): New rule.
14652 * thread-db.c: #include "gdb_vecs.h".
14653 (thread_db_load_search): Use a vector to iterate over path elements.
14654 Handle text appearing after "$pdir".
14655
14656 * configure.ac: Add check for strstr.
14657 * config.in: Regenerate.
14658 * configure: Regenerate.
14659
14660 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14661
14662 * hostio.c (handle_pread): If pread fails, fall back to attempting
14663 lseek/read.
14664 (handle_pwrite): Likewise for pwrite.
14665
14666 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14667
14668 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14669 between unsupported TYPE and unimplementable ADDR/LEN combination.
14670 (arm_insert_point): Act on new return value.
14671
14672 2012-07-31 Pedro Alves <palves@redhat.com>
14673
14674 * server.c (process_point_options): Only skip tokens if we find
14675 one that is unrecognized. Don't treat 'X' specially while
14676 skipping unrecognized tokens.
14677
14678 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14679
14680 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14681 to 4-byte-align HW breakpoint addresses for Thumb.
14682
14683 2012-07-27 Yao Qi <yao@codesourcery.com>
14684
14685 PR remote/14161.
14686
14687 * server.h: Declare gdb_agent_about_to_close.
14688 * target.c (kill_inferior): Include "agent.h".
14689 New. Send command 'kill'.
14690 * target.h (kill_inferior): Removed macro.
14691 * tracepoint.c (gdb_agent_about_to_close): New.
14692 (gdb_agent_helper_thread): Handle command 'close'.
14693 Wait endlessly until the inferior stops.
14694 Install gdb_agent_remove_socket to atexit hook.
14695 (agent_socket_name): New static variable.
14696 (gdb_agent_socket_init): Replace local variable 'name' with
14697 'agent_socket_name'.
14698 (gdb_agent_remove_socket): New.
14699
14700 2012-07-27 Yao Qi <yao@codesourcery.com>
14701
14702 * server.c (process_point_options): Stop at 'X' when parsing.
14703
14704 2012-07-19 Michael Eager <eager@eagercon.com>
14705
14706 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14707 to hw_execute.
14708 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14709 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14710 hardware breakpoint.
14711
14712 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14713
14714 * gdbserver/linux-low.c (initialize_low): Call
14715 linux_ptrace_init_warnings.
14716
14717 2012-07-02 Doug Evans <dje@google.com>
14718
14719 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14720 pointer to int.
14721
14722 2012-07-02 Stan Shebs <stan@codesourcery.com>
14723
14724 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14725 (ax.o): Add it to build rule.
14726 (ax-ipa.o): Ditto.
14727 (OBS): Add format.o.
14728 (IPA_OBS): Add format.o.
14729 * server.c (handle_query): Claim support for breakpoint commands.
14730 (process_point_options): Add command case.
14731 (process_serial_event): Leave running if there are printfs in
14732 effect.
14733 * mem-break.h (any_persistent_commands): Declare.
14734 (add_breakpoint_commands): Declare.
14735 (gdb_no_commands_at_breakpoint): Declare.
14736 (run_breakpoint_commands): Declare.
14737 * mem-break.c (struct point_command_list): New struct.
14738 (struct breakpoint): New field command_list.
14739 (any_persistent_commands): New function.
14740 (add_commands_to_breakpoint): New function.
14741 (add_breakpoint_commands): New function.
14742 (gdb_no_commands_at_breakpoint): New function.
14743 (run_breakpoint_commands): New function.
14744 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14745 locally.
14746 * ax.c: Include format.h.
14747 (ax_printf): New function.
14748 (gdb_eval_agent_expr): Add printf opcode.
14749
14750 2012-06-13 Yao Qi <yao@codesourcery.com>
14751
14752 * server.c (start_inferior): Remove duplicated writes to fields
14753 'last_resume_kind' and 'last_status' of 'current_inferior'.
14754
14755 2012-06-12 Yao Qi <yao@codesourcery.com>
14756 Pedro Alves <palves@redhat.com>
14757
14758 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14759 comment.
14760 * server.c (handle_v_cont): Extend comment.
14761
14762 2012-06-11 Yao Qi <yao@codesourcery.com>
14763
14764 * linux-low.c (linux_attach): Add 'static'.
14765
14766 2012-06-06 Yao Qi <yao@codesourcery.com>
14767
14768 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14769
14770 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14771
14772 Fix gcc -flto compilation warning.
14773 * server.c (main): Make variable multi_mode and attach volatile.
14774
14775 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14776
14777 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14778 if the platform doesn't know about it.
14779
14780 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14781
14782 * Makefile.in (SFILES): Add linux-tile-low.c.
14783 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14784 * configure.srv: Handle tilegx-*-linux*.
14785 * linux-tile-low.c: New file.
14786
14787 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14788
14789 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14790
14791 2012-05-24 Pedro Alves <palves@redhat.com>
14792
14793 PR gdb/7205
14794
14795 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14796
14797 2012-05-24 Pedro Alves <palves@redhat.com>
14798
14799 PR gdb/7205
14800
14801 Replace target_signal with gdb_signal throughout.
14802
14803 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14804
14805 * linux-low.c (linux_store_registers): Avoid the copying sequence
14806 when no data has been retrieved by ptrace.
14807
14808 2012-05-22 Will Deacon <will.deacon@arm.com>
14809
14810 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14811 Include asm/ptrace.h.
14812 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14813 already defined.
14814
14815 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14816
14817 * linux-low.c (linux_store_registers): Don't re-retrieve data
14818 with ptrace that has already been obtained from /proc. Always
14819 copy any data retrieved with ptrace to the buffer supplied.
14820
14821 2012-05-11 Yao Qi <yao@codesourcery.com>
14822 Pedro Alves <palves@redhat.com>
14823
14824 * linux-low.c (enum stopping_threads_kind): New.
14825 (stopping_threads): Change type to `enum stopping_threads_kind'.
14826 (handle_extended_wait): If stopping and suspending threads, leave
14827 the new_lwp suspended too.
14828 (linux_wait_for_event): Adjust.
14829 (stop_all_lwps): Set `stopping_threads' to
14830 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14831 whether we're suspending threads or just stopping them. Assert no
14832 recursion happens.
14833
14834 2012-04-29 Yao Qi <yao@codesourcery.com>
14835
14836 * server.h: Move some code to ...
14837 * gdbthread.h: ... here. New.
14838 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14839 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14840 (nto-low.o, win32-low.o): Likewise.
14841 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14842 * regcache.c, remote-utils.c, server.c: Likewise.
14843 * target.c, tracepoint.c, win32-low.c: Likewise.
14844
14845 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14846
14847 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14848 (PTRACE_ARG4_TYPE): Likewise.
14849 (PTRACE_XFER_TYPE): Likewise.
14850 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14851 ptrace to PTRACE_ARG3_TYPE.
14852 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14853 (PTRACE_ARG4_TYPE): Likewise.
14854 (PTRACE_XFER_TYPE): Likewise.
14855 (linux_detach_one_lwp): Cast fourth argument of
14856 ptrace to long then PTRACE_ARG4_TYPE.
14857 (regsets_fetch_inferior_registers): Cast third argument of
14858 ptrace to long then PTRACE_ARG3_TYPE.
14859 (regsets_store_inferior_registers): Likewise.
14860
14861 2012-04-20 Pedro Alves <palves@redhat.com>
14862
14863 * configure: Regenerate.
14864
14865 2012-04-19 Pedro Alves <palves@redhat.com>
14866
14867 * Makefile.in (GNULIB_BUILDDIR): New.
14868 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14869 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14870 (all, install-only, uninstall, clean-info, all-lib, clean): No
14871 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14872 (maintainer-clean realclean distclean): Use subdir_do.
14873 (subdir_do): New.
14874 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14875 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14876 * acinclude.m4: Include acx_configure_dir.m4.
14877 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14878 calls. Call AC_PROG_RANLIB. Configure gnulib using
14879 ACX_CONFIGURE_DIR.
14880 (GNULIB): New.
14881 (GNULIB_STDINT_H): Adjust.
14882 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14883 * gdbreplay.c: Include build-gnulib/config.h.
14884 * server.h: Likewise.
14885 * aclocal.m4: Regenerate.
14886 * config.in: Regenerate.
14887 * configure: Regenerate.
14888
14889 2012-04-19 Pedro Alves <palves@redhat.com>
14890
14891 * Makefile.in (LIBGNU, INCGNU): Adjust.
14892 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14893 (all, install-only, uninstall, clean-info, all-lib, clean)
14894 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14895 * configure.ac: Adjust AC_OUTPUT output.
14896 * aclocal.m4: Regenerate.
14897 * configure: Regenerate.
14898
14899 2012-04-19 Pedro Alves <palves@redhat.com>
14900
14901 * Makefile.in (generated_files): New.
14902 (server_h): Remove the explicit dependency on config.h, and depend
14903 on $generated_files.
14904
14905 2012-04-19 Pedro Alves <palves@redhat.com>
14906
14907 * Makefile.in (INCGNU): Add -Ignulib.
14908
14909 2012-04-19 Pedro Alves <palves@redhat.com>
14910
14911 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14912 (INCGNU): ... this, and spell out -I here.
14913 (GNULIB_LIB): Rename to ...
14914 (LIBGNU): ... this.
14915 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14916
14917 2012-04-19 Pedro Alves <palves@redhat.com>
14918
14919 * config.in: Regenerate.
14920
14921 2012-04-19 Pedro Alves <palves@redhat.com>
14922
14923 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14924 * server.h (memmem): Remove declaration.
14925 * config.in: Regenerate.
14926 * configure: Regenerate.
14927
14928 2012-04-19 Yao Qi <yao@codesourcery.com>
14929
14930 * Makefile.in (SFILES): Add common/vec.c.
14931 (OBS): Add vec.o.
14932 (vec.o): New rule.
14933
14934 2012-04-19 Yao Qi <yao@codesourcery.com>
14935
14936 * remote-utils.c (prepare_resume_reply): Replace with macro
14937 target_core_of_thread.
14938 * server.c (handle_qxfer_threads_proper): Likewise.
14939 * target.h (traget_core_of_thread): New macro.
14940
14941 2012-04-18 Pedro Alves <palves@redhat.com>
14942
14943 * aclocal.m4: Regenerate.
14944 * configure: Regenerate.
14945
14946 2012-04-16 Yao Qi <yao@codesourcery.com>
14947
14948 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14949 duplicated on address.
14950
14951 2012-04-16 Yao Qi <yao@codesourcery.com>
14952
14953 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14954 (struct tracepoint_action_ops) <send>: New field.
14955 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14956 (agent_expr_send, x_tracepoint_action_send): New.
14957 (l_tracepoint_action_send): New.
14958 (cmd_qtdp): Download and install tracepoint
14959 according to `use_agent'.
14960 (run_inferior_command): Add one more parameter `len'.
14961 Update callers.
14962 (tracepoint_send_agent): New.
14963 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14964
14965 2012-04-16 Yao Qi <yao@codesourcery.com>
14966
14967 * tracepoint.c (download_tracepoints): Moved to ...
14968 (cmd_qtstart): ... here.
14969
14970 2012-04-14 Yao Qi <yao@codesourcery.com>
14971
14972 * tracepoint.c: Include inttypes.h.
14973 (struct collect_memory_action): Use sized types.
14974 (struct tracepoint): Likewise.
14975 (cmd_qtdp, stop_tracing): Update print specifiers.
14976 (cmd_qtp, response_tracepoint): Likewise.
14977 (collect_data_at_tracepoint): Likewise.
14978 (collect_data_at_step): Likewise.
14979
14980 2012-04-14 Yao Qi <yao@codesourcery.com>
14981
14982 Import gnulib module inttypes.
14983 * aclocal.m4, config.in, configure: Regenerated.
14984
14985 2012-04-14 Yao Qi <yao@codesourcery.com>
14986
14987 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14988 Makefile and config.status at last.
14989
14990 2012-04-13 Yao Qi <yao@codesourcery.com>
14991
14992 * tracepoint.c: Include stdint.h unconditionally.
14993
14994 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14995
14996 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14997 on BFD_HAVE_SYS_PROCFS_TYPE.
14998 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14999 * configure: Regenerate.
15000 * config.in: Likewise.
15001
15002 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15003
15004 * Makefile.in (clean): Also remove x32.c x32-linux.c
15005 x32-avx.c x32-avx-linux.c.
15006 (x32.o): New target.
15007 (x32.c): Likewise.
15008 (x32-linux.o): Likewise.
15009 (x32-linux.c): Likewise.
15010 (x32-avx.o): Likewise.
15011 (x32-avx.c): Likewise.
15012 (x32-avx-linux.o): Likewise.
15013 (x32-avx-linux.c): Likewise.
15014
15015 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15016 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15017 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15018 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15019 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15020 i386/x32-avx-linux.xml.
15021
15022 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15023 (init_registers_x32_avx_linux): Likwise.
15024 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15025 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15026
15027 2012-04-13 Pedro Alves <palves@redhat.com>
15028
15029 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15030 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15031 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15032 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15033 the sub-make.
15034
15035 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15036
15037 * linux-x86-low.c (compat_x32_clock_t): New.
15038 (compat_x32_siginfo_t): Likewise.
15039 (compat_x32_siginfo_from_siginfo): Likewise.
15040 (siginfo_from_compat_x32_siginfo): Likewise.
15041 (linux_is_elf64): Likewise.
15042 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15043 and siginfo_from_compat_x32_siginfo for x32.
15044 (x86_arch_setup): Set linux_is_elf64.
15045
15046 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15047
15048 PR gdb/13969
15049 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15050 e_machine field.
15051 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15052 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15053 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15054 compatible with process.
15055
15056 2012-04-12 Yao Qi <yao@codesourcery.com>
15057
15058 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15059 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15060 (install-only, install-info, clean): Handle sub dir gnulib.
15061 (all-lib, am--refresh): New targets.
15062 (memmem.o): Remove target.
15063 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15064 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15065 (AC_REPLACE_FUNCS): Remove memmem.
15066 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15067 (AC_OUTPUT): Generate Makefile in gnulib/.
15068 * aclocal.m4, config.in, configure: Regenerated.
15069
15070 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15071
15072 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15073
15074 2012-04-05 Pedro Alves <palves@redhat.com>
15075
15076 -Werror=strict-aliasing
15077
15078 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15079 pointer.
15080
15081 2012-04-04 Pedro Alves <palves@redhat.com>
15082
15083 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15084 (sparc_store_gregset_from_stack, sparc_store_gregset)
15085 (sparc_breakpoint_at): Fix formatting.
15086
15087 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15088
15089 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15090 are available.
15091 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15092 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15093 * config.in: Regenerate.
15094 * configure: Likewise.
15095
15096 2012-03-29 Pedro Alves <palves@redhat.com>
15097
15098 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15099 Correct ptrace arguments.
15100
15101 2012-03-28 Pedro Alves <palves@redhat.com>
15102
15103 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15104 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15105 (IA64_FR1_REGNUM): New defines.
15106 (ia64_fetch_register): New.
15107 (the_low_target): Install it.
15108 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15109 field.
15110 * linux-low.c (linux_fetch_registers): Try the
15111 the_low_target.fetch_register hook first.
15112
15113 * linux-arm-low.c (the_low_target): Adjust.
15114 * linux-bfin-low.c (the_low_target): Adjust.
15115 * linux-cris-low.c (the_low_target): Adjust.
15116 * linux-crisv32-low.c (the_low_target): Adjust.
15117 * linux-m32r-low.c (the_low_target): Adjust.
15118 * linux-m68k-low.c (the_low_target): Adjust.
15119 * linux-mips-low.c (the_low_target): Adjust.
15120 * linux-ppc-low.c (the_low_target): Adjust.
15121 * linux-s390-low.c (the_low_target): Adjust.
15122 * linux-sh-low.c (the_low_target): Adjust.
15123 * linux-sparc-low.c (the_low_target): Adjust.
15124 * linux-tic6x-low.c (the_low_target): Adjust.
15125 * linux-x86-low.c (the_low_target): Adjust.
15126 * linux-xtensa-low.c (the_low_target): Adjust.
15127
15128 2012-03-26 Pedro Alves <palves@redhat.com>
15129
15130 * server.c (handle_qxfer_libraries): Don't bail early if
15131 the_target->qxfer_libraries_svr4 is not NULL.
15132
15133 2012-03-26 Pedro Alves <palves@redhat.com>
15134
15135 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15136
15137 2012-03-23 Pedro Alves <palves@redhat.com>
15138
15139 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15140 "library-list-svr4" element's start tag when the the DSO list is
15141 empty.
15142
15143 2012-03-23 Pedro Alves <palves@redhat.com>
15144
15145 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15146 a variable whose type size is the same as the inferior's pointer
15147 size.
15148
15149 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15150
15151 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15152 struct siginfo.
15153 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15154 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15155 * linux-low.h: Include <signal.h>.
15156 (struct siginfo): Remove forward declaration.
15157 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15158 struct siginfo.
15159
15160 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15161
15162 * .gitignore: Ignore more files.
15163
15164 2012-03-19 Pedro Alves <palves@redhat.com>
15165 Jan Kratochvil <jan.kratochvil@redhat.com>
15166
15167 * server.c (cont_thread, general_thread): Add describing comments.
15168 (start_inferior): Clear `cont_thread'.
15169 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15170 of a process.
15171
15172 2012-03-15 Yao Qi <yao@codesourcery.com>
15173
15174 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15175 handling to ...
15176 (cmd_qtdp): ... here.
15177
15178 2012-03-15 Yao Qi <yao@codesourcery.com>
15179
15180 * tracepoint.c (struct tracepoint_action_ops): New.
15181 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15182 (m_tracepoint_action_download): New.
15183 (r_tracepoint_action_download): New.
15184 (x_tracepoint_action_download): New.
15185 (l_tracepoint_action_download): New.
15186 (add_tracepoint_action): Install `action->ops' according type.
15187 (download_tracepoint_1): Move code `download' function pointer
15188 of various tracepoint_action_ops.
15189
15190 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15191
15192 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15193 linux_ptrace_attach_warnings.
15194
15195 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15196
15197 * Makefile.in (linux-ptrace.o): New.
15198 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15199 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15200 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15201 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15202 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15203 of these targets.
15204 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15205
15206 2012-03-08 Yao Qi <yao@codesourcery.com>
15207 Pedro Alves <palves@redhat.com>
15208
15209 Fix PR server/13392.
15210 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15211 offset of JMP insn.
15212 * tracepoint.c (remove_tracepoint): New.
15213 (cmd_qtdp): Call remove_tracepoint when failed to install.
15214
15215 2012-03-07 Pedro Alves <palves@redhat.com>
15216
15217 * linux-low.c (get_detach_signal): New.
15218 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15219 Pass on pending signals to PTRACE_DETACH. Check the result of the
15220 ptrace call.
15221 * server.c (program_signals, program_signals_p): New.
15222 (handle_general_set): Handle QProgramSignals.
15223 * server.h (program_signals, program_signals_p): Declare.
15224
15225 2012-03-05 Pedro Alves <palves@redhat.com>
15226 Jan Kratochvil <jan.kratochvil@redhat.com>
15227
15228 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15229 New comment why.
15230
15231 2012-03-03 Yao Qi <yao@codesourcery.com>
15232
15233 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15234 agent_look_up_symbols.
15235
15236 2012-03-03 Yao Qi <yao@codesourcery.com>
15237
15238 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15239 (linux-x86-low.o): Likewise.
15240 * server.h: Remove in_process_agent_loaded.
15241 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15242 common/agent.c.
15243 Update callers.
15244
15245 2012-03-03 Yao Qi <yao@codesourcery.com>
15246
15247 * tracepoint.c (gdb_agent_capability): New global.
15248 (in_process_agent_loaded_ust): Renamed to
15249 `in_process_agent_supports_ust'.
15250 Update callers.
15251 (in_process_agent_supports_ust): Call agent_capability_check.
15252 (clear_installed_tracepoints): Assert that agent supports
15253 agent.
15254
15255 2012-03-03 Yao Qi <yao@codesourcery.com>
15256
15257 * linux-low.c (linux_supports_agent): New.
15258 (linux_target_ops): Initialize field `supports_agent' with
15259 linux_supports_agent.
15260 * target.h (struct target_ops) <supports_agent>: New.
15261 (target_supports_agent): New macro.
15262 * server.c (handle_general_set): Handle packet 'QAgent'.
15263 (handle_query): Send `QAgent+'.
15264 * Makefile.in (server.o): Depends on agent.h.
15265
15266 2012-03-03 Yao Qi <yao@codesourcery.com>
15267
15268 * Makefile.in (OBS): Add agent.o.
15269 Add new rule for agent.o.
15270 Track dependence of tracepoint.c on agent.h.
15271 * tracepoint.c (run_inferior_command_1):
15272 (run_inferior_command): Call agent_run_command.
15273 (gdb_ust_connect_sync_socket): Deleted. Move it to
15274 common/agent.c.
15275 (resume_thread, stop_thread): Likewise.
15276 (gdb_ust_socket_init): Renamed to ...
15277 (gdb_agent_socket_init): ... New.
15278 (gdb_ust_thread): Renamed to ...
15279 (gdb_agent_helper_thread): ... New.
15280 (gdb_ust_init): Move some code to ...
15281 (gdb_agent_init): ... here. New.
15282 [HAVE_UST]: Call gdb_ust_init.
15283 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15284 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15285 * config.in, configure: Regenerated.
15286
15287 2012-03-02 Pedro Alves <palves@redhat.com>
15288
15289 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15290 * linux-low.c (struct simple_pid_list): New.
15291 (stopped_pids): New a struct simple_pid_list pointer.
15292 (add_to_pid_list, pull_pid_from_list): New.
15293 (handle_extended_wait): Don't assume the first signal new children
15294 report is SIGSTOP. Adjust call to pull_pid_from_list.
15295 (linux_wait_for_lwp): Adjust.
15296
15297 2012-03-02 Yao Qi <yao@codesourcery.com>
15298
15299 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15300 debug log.
15301
15302 2012-03-02 Yao Qi <yao@codesourcery.com>
15303
15304 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15305 `stop_pc' and `tpoint'. Update caller.
15306
15307 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15308
15309 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15310 * linux-low.c (use_linux_regsets): New macro.
15311 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15312 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15313 (linux_register_in_regsets): New function.
15314 (usr_fetch_inferior_registers): Skip registers covered by
15315 regsets.
15316 (usr_store_inferior_registers): Likewise.
15317 (usr_fetch_inferior_registers): New macro.
15318 (usr_store_inferior_registers): Likewise.
15319 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15320 (linux_store_registers): Likewise.
15321 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15322 prototype.
15323 (init_registers_mips64_dsp_linux): Likewise.
15324 (init_registers_mips_linux): New macro.
15325 (init_registers_mips_dsp_linux): Likewise.
15326 (mips_dsp_num_regs): Likewise.
15327 (DSP_BASE, DSP_CONTROL): New fallback macros.
15328 (mips_base_regs): New macro.
15329 (mips_regmap): Use it. Fix the size.
15330 (mips_dsp_regmap): New variable.
15331 (mips_dsp_regset_bitmap): Likewise.
15332 (mips_arch_setup): New function.
15333 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15334 than mips_regmap.
15335 (mips_cannot_store_register): Likewise.
15336 (the_low_target): Update .arch_setup, .num_regs and .regmap
15337 initializers. Add .regset_bitmap initializer.
15338 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15339 initializer.
15340 * linux-bfin-low.c (the_low_target): Likewise.
15341 * linux-cris-low.c (the_low_target): Likewise.
15342 * linux-crisv32-low.c (the_low_target): Likewise.
15343 * linux-ia64-low.c (the_low_target): Likewise.
15344 * linux-m32r-low.c (the_low_target): Likewise.
15345 * linux-m68k-low.c (the_low_target): Likewise.
15346 * linux-ppc-low.c (the_low_target): Likewise.
15347 * linux-s390-low.c (the_low_target): Likewise.
15348 * linux-sh-low.c (the_low_target): Likewise.
15349 * linux-sparc-low.c (the_low_target): Likewise.
15350 * linux-tic6x-low.c (the_low_target): Likewise.
15351 * linux-x86-low.c (the_low_target): Likewise.
15352 * linux-xtensa-low.c (the_low_target): Likewise.
15353 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15354 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15355 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15356 srv_xmlfiles.
15357 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15358 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15359
15360 2012-02-29 Yao Qi <yao@codesourcery.com>
15361 Pedro Alves <palves@redhat.com>
15362
15363 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15364 `step_over_finished' is true.
15365
15366 2012-02-27 Pedro Alves <palves@redhat.com>
15367
15368 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15369 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15370
15371 2012-02-27 Pedro Alves <palves@redhat.com>
15372
15373 PR server/9684
15374 * linux-low.c (pid_is_stopped): New.
15375 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15376
15377 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15378
15379 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15380 of conditions.
15381
15382 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15383
15384 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15385
15386 2012-02-24 Luis Machado <lgustavo@codesourcery>
15387
15388 * server.c (handle_query): Advertise support for target-side
15389 breakpoint condition evaluation.
15390 (process_point_options): New function.
15391 (process_serial_event): When inserting a breakpoint, check for
15392 a target-side condition that should be evaluated.
15393
15394 * mem-break.c: Include regcache.h and ax.h.
15395 (point_cond_list_t): New data structure.
15396 (breakpoint) <cond_list>: New field.
15397 (find_gdb_breakpoint_at): Make non-static.
15398 (delete_gdb_breakpoint_at): Clear any target-side
15399 conditions.
15400 (clear_gdb_breakpoint_conditions): New function.
15401 (add_condition_to_breakpoint): Likewise.
15402 (add_breakpoint_condition): Likewise.
15403 (gdb_condition_true_at_breakpoint): Likewise.
15404 (gdb_breakpoint_here): Return result directly instead
15405 of going through a local variable.
15406
15407 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15408 (clear_gdb_breakpoint_conditions): Likewise.
15409 (add_breakpoint_condition): Likewise.
15410 (gdb_condition_true_at_breakpoint): Likewise.
15411
15412 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15413 (need_step_over_p): Take target-side breakpoint condition into
15414 consideration.
15415
15416 2012-02-24 Luis Machado <lgustavo@codesourcery>
15417
15418 * server.h: Include tracepoint.h.
15419 (agent_mem_read, agent_get_trace_state_variable_value,
15420 agent_set_trace_state_variable_value,
15421 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15422 get_set_tsv_func_addr): New prototypes.
15423
15424 * ax.h: New include file.
15425 * ax.c: New source file.
15426
15427 * tracepoint.c: Include ax.h.
15428 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15429 agent_expr, eval_result_type): Move to ax.h.
15430 (parse_agent_expr): Rename to ...
15431 (gdb_parse_agent_expr): ... this, make it non-static and move
15432 to ax.h.
15433 (unparse_agent_expr) Rename to ...
15434 (gdb_unparse_agent_expr): ... this, make it non-static and move
15435 to ax.h.
15436 (eval_agent_expr): Rename to ...
15437 (eval_tracepoint_agent_expr): ... this.
15438 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15439 forward declarations.
15440 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15441 (agent_get_trace_state_variable_value): New function.
15442 (agent_set_trace_state_variable_value): New function.
15443 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15444 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15445 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15446 (condition_true_at_tracepoint): Likewise.
15447 (parse_agent_expr): Rename to ...
15448 (gdb_parse_agent_expr): ... this and move to ax.c.
15449 (unparse_agent_expr): Rename to ...
15450 (gdb_unparse_agent_expr): ... this and move to ax.c.
15451 (gdb_agent_op_name): Move to ax.c.
15452 (eval_agent_expr): Rename to ...
15453 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15454 and move to ax.c.
15455 (eval_tracepoint_agent_expr): New function.
15456 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15457 non-static.
15458 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15459 ax.c.
15460 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15461 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15462 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15463 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15464 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15465 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15466 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15467 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15468 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15469 (compile_bytecodes): Remove forward declaration.
15470 (is_goto_target): Move to ax.c.
15471 (compile_bytecodes): Move to ax.c and call
15472 agent_get_trace_state_variable_value (...) and
15473 agent_set_trace_state_variable_value (...).
15474
15475 * Makefile.in: Update ax.c and IPA dependencies.
15476
15477 2012-02-24 Pedro Alves <palves@redhat.com>
15478
15479 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15480 (cmd_bigqtbuffer_circular): ... this. Only handle
15481 'QTBuffer:circular:'.
15482 (handle_tracepoint_general_set): Adjust.
15483
15484 2012-02-16 Yao Qi <yao@codesourcery.com>
15485
15486 * inferiors.c: Move code to ...
15487 * dll.c: .... here. New.
15488 * server.h: Declare clear_dlls.
15489 * Makefile.in (SFILES): Add dll.c.
15490 (OBS): Add dll.o
15491 (dll.o): New rule.
15492
15493 2012-02-11 Yao Qi <yao@codesourcery.com>
15494
15495 * server.c: (handle_monitor_command): Add a new parameter
15496 `own_buf'.
15497 (handle_query): Update caller.
15498
15499 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15500
15501 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15502 * configure, config.in: Regenerate.
15503 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15504 is not defined.
15505
15506 2012-02-02 Pedro Alves <palves@redhat.com>
15507
15508 Try SIGKILL first, then PTRACE_KILL.
15509 * linux-low.c (linux_kill_one_lwp): New.
15510 (linux_kill_one_lwp): Rename to ...
15511 (kill_one_lwp_callback): ... this. Use the new
15512 linux_kill_one_lwp.
15513
15514 2012-02-02 Pedro Alves <palves@redhat.com>
15515
15516 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15517 inferior.
15518
15519 2012-01-27 Pedro Alves <palves@redhat.com>
15520
15521 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15522 (elf_64_file_p): Make static.
15523 (linux_pid_exe_is_elf_64_file): New.
15524 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15525 Delete declarations.
15526 (linux_pid_exe_is_elf_64_file): Declare.
15527 * linux-x86-low.c (x86_arch_setup): Use
15528 linux_pid_exe_is_elf_64_file.
15529
15530 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15531
15532 * linux-low.c (linux_wait_for_event_1): Rename to ...
15533 (linux_wait_for_event): ... here and merge it with former
15534 linux_wait_for_event - new variable wait_ptid, use it.
15535 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15536
15537 2012-01-23 Pedro Alves <palves@redhat.com>
15538
15539 * server.c (main): Avoid yet another case of infinite loop while
15540 detaching/killing after a longjmp.
15541
15542 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15543
15544 Code cleanup.
15545 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15546
15547 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15548
15549 * hostio.c (handle_readlink): New function.
15550 (handle_vFile): Call it to handle "vFile:readlink" packets.
15551
15552 2012-01-20 Pedro Alves <palves@redhat.com>
15553 Ulrich Weigand <ulrich.weigand@linaro.org>
15554
15555 * server.c (handle_v_requests): Only support vAttach and vRun to
15556 start multiple processes when in extended protocol mode.
15557
15558 2012-01-17 Pedro Alves <palves@redhat.com>
15559
15560 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15561 memalign plus mprotect to allocate the scratch buffer.
15562
15563 2012-01-13 Pedro Alves <palves@redhat.com>
15564
15565 * server.c (attach_inferior): Clear `cont_thread'.
15566
15567 2012-01-13 Pedro Alves <palves@redhat.com>
15568
15569 * server.c (main): Avoid infinite loop while detaching/killing
15570 after a longjmp.
15571
15572 2012-01-09 Doug Evans <dje@google.com>
15573
15574 * server.c (start_inferior): Set last_ptid in --wrapper case.
15575
15576 2012-01-06 Yao Qi <yao@codesourcery.com>
15577
15578 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15579 defined.
15580 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15581
15582 2012-01-04 Yao Qi <yao@codesourcery.com>
15583
15584 * tracepoint.c (cmd_qtdp): Print debug message
15585 for static tracepoint.
15586
15587 2012-01-04 Yao Qi <yao@codesourcery.com>
15588
15589 * tracepoint.c (trace_vdebug): Differentiate debug message
15590 between gdbserver and IPA.
15591
15592 2012-01-03 Yao Qi <yao@codesourcery.com>
15593
15594 * tracepoint.c (tracepoint_was_hit): Don't collect for
15595 static tracepoint.
15596
15597 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15598
15599 * terminal.h: Reformat copyright header.
15600
15601 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15602
15603 * server.c (gdbserver_version): Update copyright year.
15604 * gdbreplay.c (gdbreplay_version): Likewise.
15605
15606 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15607
15608 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15609
15610 Revert:
15611 2011-12-18 Hui Zhu <teawater@gmail.com>
15612 * linux-low.c (linux_create_inferior): Save return value to ret.
15613
15614 2011-12-18 Hui Zhu <teawater@gmail.com>
15615
15616 * linux-low.c (linux_create_inferior): Save return value to ret.
15617
15618 2011-12-16 Doug Evans <dje@google.com>
15619
15620 * linux-low.c (linux_create_inferior): If stdio connection,
15621 redirect stdin from /dev/null, stdout to stderr.
15622 * remote-utils.c (remote_is_stdio): New static global.
15623 (remote_connection_is_stdio): New function.
15624 (remote_prepare): Handle stdio connection.
15625 (remote_open): Ditto.
15626 (remote_close): Don't close stdin for stdio connections.
15627 (read_prim,write_prim): New functions. Replace all calls to
15628 read/write to these.
15629 * server.c (main): Watch for "-" argument. Move call to
15630 remote_prepare before start_inferior.
15631 * server.h (STDIO_CONNECTION_NAME): New macro.
15632 (remote_connection_is_stdio): Declare.
15633
15634 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15635 in debugging output.
15636
15637 2011-12-15 Yao Qi <yao@codesourcery.com>
15638
15639 * tracepoint.c: Include sys/syscall.h.
15640 (gdb_ust_thread): Remove preprocessor conditional.
15641
15642 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15643
15644 * linux-low.c (linux_detach_one_lwp): Call
15645 the_low_target.prepare_to_resume before detaching.
15646
15647 2011-12-14 Yao Qi <yao@codesourcery.com>
15648
15649 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15650 of write.
15651
15652 2011-12-14 Yao Qi <yao@codesourcery.com>
15653
15654 * i386-low.c (i386_low_stopped_data_address): Initialize local
15655 variable `control'.
15656
15657 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15658
15659 PR remote/13492
15660
15661 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15662 DR_CONTROL unless necessary. Extend comments.
15663 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15664 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15665
15666 2011-12-13 Yao Qi <yao@codesourcery.com>
15667
15668 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15669 macros.
15670 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15671
15672 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15673
15674 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15675 Print new debug message for such case.
15676
15677 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15678
15679 Fix overlapping memcpy.
15680 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15681 the read_inferior_memory transfer.
15682 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15683 write_inferior_memory transfer.
15684 (set_fast_tracepoint_jump): New variable buf. Use it for the
15685 read_inferior_memory and write_inferior_memory transfers.
15686 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15687 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15688 Use it for the write_inferior_memory transfer.
15689 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15690 buffers.
15691
15692 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15693
15694 * linux-low.c (fetch_register, store_register): Make code
15695 consistent, fix formatting.
15696
15697 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15698
15699 * linux-low.c (usr_store_inferior_registers): Factor out code
15700 to handle individual registers into...
15701 (store_register): ... this new function.
15702
15703 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15704
15705 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15706 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15707 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15708 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15709 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15710 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15711 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15712 (srv_xmlfiles): Add new XML files.
15713
15714 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15715 and <sys/uio.h>.
15716 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15717 (init_registers_s390_linux32v1): Add prototype.
15718 (init_registers_s390_linux32v2): Likewise.
15719 (init_registers_s390_linux64v1): Likewise.
15720 (init_registers_s390_linux64v2): Likewise.
15721 (init_registers_s390x_linux64v1): Likewise.
15722 (init_registers_s390x_linux64v2): Likewise.
15723 (s390_num_regs): Increment to 52.
15724 (s390_regmap): Add orig_r2 register.
15725 (s390_num_regs_3264): Increment to 68.
15726 (s390_regmap_3264): Add orig_r2 register.
15727 (s390_collect_ptrace_register): Handle orig_r2 register.
15728 (s390_supply_ptrace_register): Likewise.
15729 (s390_fill_last_break): New function.
15730 (s390_store_last_break): Likewise.
15731 (s390_fill_system_call): New function.
15732 (s390_store_system_call): Likewise.
15733 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15734 register sets.
15735 (s390_check_regset): New function.
15736 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15737 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15738 Update target_regsets for available register sets.
15739
15740 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15741 Jan Kratochvil <jan.kratochvil@redhat.com>
15742
15743 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15744 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15745 New.
15746 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15747 * linux-low.h (struct process_info_private): New member r_debug.
15748 * server.c (handle_qxfer_libraries): Call
15749 the_target->qxfer_libraries_svr4.
15750 (handle_qxfer_libraries_svr4): New function.
15751 (qxfer_packets): New entry "libraries-svr4".
15752 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15753 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15754 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15755 PACKET_qXfer_libraries_svr4.
15756
15757 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15758
15759 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15760 PSW address/mask between 8-byte and 16-byte formats.
15761 (s390_supply_ptrace_register): Likewise.
15762 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15763 basic addressing mode bit.
15764
15765 2011-11-24 Stan Shebs <stan@codesourcery.com>
15766
15767 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15768
15769 2011-11-17 Stan Shebs <stan@codesourcery.com>
15770
15771 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15772 (tracing_start_time): New global.
15773 (tracing_stop_time): New global.
15774 (tracing_user_name): New global.
15775 (tracing_notes): New global.
15776 (tracing_stop_note): New global.
15777 (cmd_qtstart): Set traceframe_usage, start_time.
15778 (stop_tracing): Set stop_time.
15779 (cmd_qtstatus): Report additional status.
15780 (cmd_qtp): New function.
15781 (handle_tracepoint_query): Call it.
15782 (cmd_qtnotes): New function.
15783 (handle_tracepoint_general_set): Call it.
15784 (get_timestamp): Rename from tsv_get_timestamp.
15785
15786 2011-11-14 Stan Shebs <stan@codesourcery.com>
15787 Kwok Cheung Yeung <kcy@codesourcery.com>
15788
15789 * linux-x86-low.c (small_jump_insn): New.
15790 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15791 trampoline and error message, build a trampoline and issue a small
15792 jump instruction to it.
15793 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15794 trampoline and error message.
15795 (x86_get_min_fast_tracepoint_insn_len): New.
15796 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15797 * linux-low.h (struct linux_target_ops): Add arguments to
15798 install_fast_tracepoint_jump_pad operation, add new operation.
15799 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15800 arguments.
15801 (linux_get_min_fast_tracepoint_insn_len): New function.
15802 (linux_target_op): Add new operation.
15803 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15804 (gdb_trampoline_buffer_end): Ditto.
15805 (gdb_trampoline_buffer_error): Ditto.
15806 (struct ipa_sym_addresses): Add fields for new IPA variables.
15807 (symbol_list): Add entries for new IPA variables.
15808 (struct tracepoint): Add fields to hold the address range of the
15809 trampoline used by the tracepoint.
15810 (trampoline_buffer_head): New static variable.
15811 (trampoline_buffer_tail): Ditto.
15812 (claim_trampoline_space): New function.
15813 (have_fast_tracepoint_trampoline_buffer): New function.
15814 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15815 structure.
15816 (install_fast_tracepoint): Ditto, also add error buffer argument.
15817 (cmd_qtminftpilen): New function.
15818 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15819 (fast_tracepoint_from_trampoline_address): New function.
15820 (fast_tracepoint_collecting): Handle trampoline as part of jump
15821 pad space.
15822 (set_trampoline_buffer_space): New function.
15823 (initialize_tracepoint): Initialize new IPA variables.
15824 * target.h (struct target_ops): Add arguments to
15825 install_fast_tracepoint_jump_pad operation, add new
15826 get_min_fast_tracepoint_insn_len operation.
15827 (target_get_min_fast_tracepoint_insn_len): New.
15828 (install_fast_tracepoint_jump_pad): Add arguments.
15829 * server.h (IPA_BUFSIZ): Define.
15830 * linux-i386-ipa.c: Include extra header files.
15831 (initialize_fast_tracepoint_trampoline_buffer): New function.
15832 (initialize_low_tracepoint): Call it.
15833 * server.h (set_trampoline_buffer_space): Declare.
15834 (claim_trampoline_space): Ditto.
15835 (have_fast_tracepoint_trampoline_buffer): Ditto.
15836
15837 2011-11-14 Yao Qi <yao@codesourcery.com>
15838
15839 * server.c (handle_query): Handle InstallInTrace for qSupported.
15840 * tracepoint.c (add_tracepoint): Sort list.
15841 (install_tracepoint, download_tracepoint): New.
15842 (cmd_qtdp): Call them to install and download tracepoints.
15843 (sort_tracepoints): Removed.
15844 (cmd_qtstart): Update.
15845
15846 2011-11-14 Yao Qi <yao@codesourcery.com>
15847
15848 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15849 * mem-break.h: Declare.
15850 * tracepoint.c (cmd_qtstart): Move some code to ...
15851 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15852 New.
15853 (download_tracepoints): Move some code to ...
15854 (download_tracepoint_1): ... here. New.
15855
15856 2011-11-08 Yao Qi <yao@codesourcery.com>
15857
15858 * remote-utils.c (relocate_instruction): A comment fix.
15859
15860 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15861
15862 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15863 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15864 dr_status_mirror and dr_control_mirror from debug_reg_state.
15865 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15866 (i386_initial_stuff): Remove use of deleted globals.
15867 (i386_get_thread_context, i386_set_thread_context,
15868 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15869 from debug_reg_state.
15870
15871 2011-11-05 Yao Qi <yao@codesourcery.com>
15872
15873 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15874 address as TPOINT's.
15875
15876 2011-11-02 Stan Shebs <stan@codesourcery.com>
15877
15878 * tracepoint.c (agent_mem_read_string): New function.
15879 (eval_agent_expr): Call it for tracenz.
15880 * server.c (handle_query): Report support for tracenz.
15881
15882 2011-11-02 Yao Qi <yao@codesourcery.com>
15883
15884 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15885
15886 2011-11-02 Yao Qi <yao@codesourcery.com>
15887
15888 * target.h: Fix a typo in comment.
15889
15890 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15891
15892 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15893 clobber the breakpoints' shadows with fast tracepoint jumps.
15894 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15895 * target.c (write_inferior_memory): Also pass MYADDR down to
15896 check_mem_write.
15897
15898 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15899
15900 * configure.ac: Check support for personality routine.
15901 * configure: Regenerate.
15902 * config.in: Likewise.
15903 * linux-low.c: Include <sys/personality.h>.
15904 Define ADDR_NO_RANDOMIZE if necessary.
15905 (linux_create_inferior): Disable address space randomization when
15906 forking inferior, if requested.
15907 (linux_supports_disable_randomization): New function.
15908 (linux_target_ops): Install it.
15909 * server.h (disable_randomization): Declare.
15910 * server.c (disable_randomization): New global variable.
15911 (handle_general_set): Handle QDisableRandomization.
15912 (handle_query): Likewise for qSupported.
15913 (main): Support --disable-randomization and --no-disable-randomization
15914 command line arguments.
15915 * target.h (struct target_ops): Add supports_disable_randomization.
15916 (target_supports_disable_randomization): New macro.
15917
15918 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15919
15920 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15921 ifdef check.
15922 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15923 [!PT_GETDSBT] (target_loadmap): New definition.
15924 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15925 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15926 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15927 and PT_GETDSBT to LINUX_LOADMAP.
15928 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15929 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15930
15931 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15932
15933 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15934 (arm_linux_hwbp_cap): New static variable.
15935 (arm_linux_get_hwbp_cap): Replace by ...
15936 (arm_linux_init_hwbp_cap): ... this new function.
15937 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15938 (arm_linux_get_hw_watchpoint_count): Likewise.
15939 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15940 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15941 (arm_prepare_to_resume): Use perror_with_name instead of error.
15942
15943 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15944
15945 * linux-arm-low.c: Include <signal.h>.
15946 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15947 (struct arm_linux_hwbp_cap): New data type.
15948 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15949 (struct arm_linux_hw_breakpoint): New data type.
15950 (MAX_BPTS, MAX_WPTS): Define.
15951 (struct arch_process_info, struct arch_lwp_info): New data types.
15952 (arm_linux_get_hwbp_cap): New function.
15953 (arm_linux_get_hw_breakpoint_count): Likewise.
15954 (arm_linux_get_hw_watchpoint_count): Likewise.
15955 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15956 (arm_hwbp_control_initialize): Likewise.
15957 (arm_hwbp_control_is_enabled): Likewise.
15958 (arm_hwbp_control_is_initialized): Likewise.
15959 (arm_hwbp_control_disable): Likewise.
15960 (arm_linux_hw_breakpoint_equal): Likewise.
15961 (arm_linux_hw_point_initialize): Likewise.
15962 (struct update_registers_data): New data structure.
15963 (update_registers_callback: New function.
15964 (arm_insert_point): Likewise.
15965 (arm_remove_point): Likewise.
15966 (arm_stopped_by_watchpoint): Likewise.
15967 (arm_stopped_data_address): Likewise.
15968 (arm_new_process): Likewise.
15969 (arm_new_thread): Likewise.
15970 (arm_prepare_to_resume): Likewise.
15971 (the_low_target): Register arm_insert_point, arm_remove_point,
15972 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15973 arm_new_thread, and arm_prepare_to_resume.
15974
15975 2011-09-15 Stan Shebs <stan@codesourcery.com>
15976
15977 * server.h (struct emit_ops): Add compare-goto fields.
15978 * tracepoint.c (gdb_agent_op_sizes): New table.
15979 (emit_eq_goto): New function.
15980 (emit_ne_goto): New function.
15981 (emit_lt_goto): New function.
15982 (emit_le_goto): New function.
15983 (emit_gt_goto): New function.
15984 (emit_ge_goto): New function.
15985 (is_goto_target): New function.
15986 (compile_bytecodes): Recognize special cases of compare-goto
15987 combinations and call specialized emitters for them.
15988 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15989 (amd64_emit_ne_goto): New function.
15990 (amd64_emit_lt_goto): New function.
15991 (amd64_emit_le_goto): New function.
15992 (amd64_emit_gt_goto): New function.
15993 (amd64_emit_ge_goto): New function.
15994 (amd64_emit_ops): Add the new functions.
15995 (i386_emit_eq_goto): New function.
15996 (i386_emit_ne_goto): New function.
15997 (i386_emit_lt_goto): New function.
15998 (i386_emit_le_goto): New function.
15999 (i386_emit_gt_goto): New function.
16000 (i386_emit_ge_goto): New function.
16001 (i386_emit_ops): Add the new functions.
16002
16003 2011-09-08 Stan Shebs <stan@codesourcery.com>
16004
16005 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16006 (i386_emit_epilogue): Restore %ebx.
16007
16008 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16009
16010 * server.c (step_thread): Remove definition.
16011 (process_serial_event): Don't handle Hs.
16012 * server.h (step_thread): Remove declaration.
16013 * target.c (set_desired_inferior): Remove use of step_thread.
16014
16015 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16016
16017 * linux-low.c: Include linux-procfs.h.
16018 (linux_attach_lwp_1): Update comments.
16019 (linux_attach): Scan for existing threads when attaching to a
16020 process that is the tgid.
16021 * Makefile.in: Update dependencies.
16022
16023 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16024
16025 * configure.srv: Add linux-procfs.o dependencies.
16026
16027 2011-08-14 Yao Qi <yao@codesourcery.com>
16028
16029 * target.h (struct target_ops): Fix indent.
16030 * win32-low.c (win32_target_ops): Fix comment.
16031
16032 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16033 Yao Qi <yao@codesourcery.com>
16034
16035 * Makefile.in (clean): Remove tic6x-*.c files.
16036 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16037 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16038 (tic6x-c64xp-linux.c): Likewise.
16039 * configure.srv: Add support for tic6x-*-uclinux.
16040 * linux-tic6x-low.c: New.
16041 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16042
16043 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16044 Yao Qi <yao@codesourcery.com>
16045
16046 * target.h (struct target_ops): Add read_loadmap.
16047 * linux-low.c (struct target_loadseg): New type.
16048 (struct target_loadmap): New type.
16049 (linux_read_loadmap): New function.
16050 (linux_target_ops): Add linux_read_loadmap.
16051 * server.c (handle_query): Support qXfer:fdpic:read packet.
16052 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16053 to NULL.
16054
16055 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16056
16057 * win32-low.c: Include <stdint.h>.
16058
16059 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16060
16061 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16062 to the inferior here.
16063 (i386_remove_aligned_watchpoint): Ditto.
16064 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16065 fit part of the watchpoint in the debug registers.
16066 (i386_update_inferior_debug_regs): New.
16067 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16068 registers, and only update the inferior on success.
16069 (i386_low_remove_watchpoint): Ditto.
16070
16071 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16072
16073 * linux-low.c (compare_ints, unique, list_threads, show_process,
16074 linux_core_of_thread): Delete.
16075 (linux_target_ops): Change linux_core_of_thread to
16076 linux_common_core_of_thread.
16077 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16078 * utils.c (malloc_failure): Change type of argument.
16079 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16080 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16081 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16082 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16083 (IPA_OBJS): Add common-utils-ipa.o.
16084 (ptid_h, linux_osdata_h): New macros.
16085 (server_h): Add common/common-utils.h, common/xml-utils.h,
16086 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16087 common/ptid.h.
16088 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16089 ptid.o, buffer.o): New rules.
16090 (linux-low.o): Add common/linux-osdata.h as a dependency.
16091 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16092 * configure.ac: Add AC_HEADER_DIRENT check.
16093 * config.in: Regenerate.
16094 * configure: Regenerate.
16095 * remote-utils.c (xml_escape_text): Delete.
16096 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16097 buffer_xml_printf): Move to common/buffer.c.
16098 * server.c (main): Remove call to initialize_inferiors.
16099 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16100 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16101 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16102 internal_error, gdb_assert, gdb_assert_fail): Delete.
16103 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16104 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16105 common/buffer.h.
16106 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16107 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16108 initialize_inferiors): Delete.
16109
16110 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16111
16112 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16113 symbol error.
16114
16115 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16116
16117 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16118 assertion.
16119 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16120
16121 2011-05-26 Yao Qi <yao@codesourcery.com>
16122
16123 * Makefile.in (thread-db.o): Track dependence to
16124 common/gdb_thread_db.h.
16125 * thread-db.c: include gdb_thread_db.h from right place.
16126
16127 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16128
16129 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16130 __FILE__ and __LINE__ to internal_error.
16131
16132 2011-05-13 Doug Evans <dje@google.com>
16133
16134 * thread-db.c (try_thread_db_load_from_sdir): New function.
16135 (try_thread_db_load_from_dir): New function.
16136 (thread_db_load_search): Handle $sdir, ignore $pdir.
16137 Remove trying of system directories if search of
16138 libthread-db-search-path fails, that is now done via $sdir.
16139
16140 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16141
16142 * server.c (handle_query): Add EnableDisableTracepoints to the list
16143 of supported features.
16144 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16145 tracepoints.
16146 (cmd_qtenable_disable): New.
16147 (cmd_qtstart): Install tracepoints even if disabled.
16148 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16149 receiving a QTEnable or QTDisable packet.
16150 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16151 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16152 tracepoints.
16153 (gdb_probe): Skip data collection if static tracepoint is disabled.
16154
16155 2011-05-10 Doug Evans <dje@google.com>
16156
16157 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16158
16159 2011-05-04 Doug Evans <dje@google.com>
16160
16161 * linux-low.c (linux_join): Skip process lookup.
16162 * spu-low.c (spu_join): Ditto.
16163 * server.c (join_inferiors_callback): Delete.
16164 (process_serial_event): For 'D' packet (detach) call join_inferior
16165 directly.
16166
16167 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16168
16169 * README: Don't mention xscale*-*-linux*.
16170 * configure.srv (xscale*-*-linux*): Don't handle target.
16171
16172 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16173
16174 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16175 casting pointers.
16176 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16177 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16178 (i386_emit_void_call_2): Likewise.
16179
16180 2011-04-26 Yao Qi <yao@codesourcery.com>
16181
16182 * linux-low.c: Move common macros to linux-ptrace.h.
16183 Include linux-ptrace.h.
16184 * Makefile.in (linux_ptrace_h): New.
16185 (linux-low.o): Depends on linux-ptrace.h.
16186
16187 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16188
16189 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16190 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16191 (remote_prepare): New function with most of the TCP code from ...
16192 (remote_open): ... here. Detect PORT here unconditionally. Move also
16193 setting transport_is_reliable.
16194 * server.c (run_once): New variable.
16195 (gdbserver_usage): Document it.
16196 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16197 the first run if RUN_ONCE.
16198 * server.h (run_once, remote_prepare): New declarations.
16199
16200 2011-04-19 Tom Tromey <tromey@redhat.com>
16201
16202 * win32-low.c (handle_load_dll): Remove duplicate "the".
16203
16204 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16205
16206 Remove support for old Cygwin 1.5 versions.
16207 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16208 function to avoid warning.
16209 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16210 warning.
16211
16212 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16213
16214 * gdbserver/server.h (Macro _): Define it if not available.
16215
16216 2011-03-14 Michael Snyder <msnyder@vmware.com>
16217
16218 * hostio.c (handle_close): Remove unnecessary null test.
16219
16220 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16221
16222 * Makefile.in (maintainer-clean realclean distclean): Remove
16223 "make ... subdir_do" command.
16224
16225 2011-03-10 Michael Snyder <msnyder@vmware.com>
16226
16227 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16228
16229 * server.c (handle_v_run): Free alloced buffer on early return.
16230
16231 2011-03-09 Yao Qi <yao@codesourcery.com>
16232
16233 Revert:
16234 2011-03-04 Yao Qi <yao@codesourcery.com>
16235
16236 * Makefile.in: Remove GNU make feature --directory.
16237
16238 2011-03-05 Yao Qi <yao@codesourcery.com>
16239
16240 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16241 (subdir_do): New make target. Copied from gdb/Makefile.
16242 (maintainer-clean, realclean, distclean, clean): Call corresponding
16243 make targets in common/Makefile.
16244
16245 2011-02-11 Yao Qi <yao@codesourcery.com>
16246
16247 * configure.ac: Call AC_PROG_RANLIB.
16248 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16249 * configure: Regenerate.
16250
16251 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16252
16253 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16254
16255 2011-03-06 Yao Qi <yao@codesourcery.com>
16256
16257 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16258
16259 2011-03-05 Yao Qi <yao@codesourcery.com>
16260
16261 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16262 (subdir_do): New make target. Copied from gdb/Makefile.
16263 (maintainer-clean, realclean, distclean, clean): Call corresponding
16264 make targets in common/Makefile.
16265
16266 2011-03-04 Yao Qi <yao@codesourcery.com>
16267
16268 * Makefile.in: Remove GNU make feature --directory.
16269
16270 2011-03-04 Michael Snyder <msnyder@vmware.com>
16271
16272 * server.c (queue_stop_reply): Call xmalloc not malloc.
16273
16274 2011-03-02 Michael Snyder <msnyder@vmware.com>
16275
16276 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16277
16278 2011-02-28 Michael Snyder <msnyder@vmware.com>
16279
16280 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16281 (cmd_qtframe): Ditto.
16282 (cmd_qtbuffer): Ditto.
16283 (cmd_bigqtbuffer): Ditto.
16284
16285 * utils.c (decimal2str): Initialize 'width' to nine, then
16286 don't mess with it.
16287
16288 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16289
16290 * hostio.c (require_data): Free *data, not data.
16291
16292 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16293
16294 * hostio.c (require_data): Use free, not xfree.
16295
16296 2011-02-27 Michael Snyder <msnyder@vmware.com>
16297
16298 * server.c (handle_query): Discard unused value.
16299
16300 * hostio.c (require_data): Free malloc memory before returning
16301 error.
16302
16303 2011-02-26 Michael Snyder <msnyder@vmware.com>
16304
16305 * linux-low.c (list_threads): Call closedir for dirent.
16306
16307 2011-02-27 Michael Snyder <msnyder@vmware.com>
16308
16309 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16310 a case statement falls through.
16311
16312 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16313
16314 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16315 in comparison.
16316
16317 2011-02-26 Michael Snyder <msnyder@vmware.com>
16318
16319 * utils.c (decimal2str): Eliminate dead code and dead param.
16320 (pulongest): Drop dead param from call to decimal2str.
16321 (plongest): Ditto.
16322
16323 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16324
16325 Revert the following patch (not approved yet):
16326 2011-02-21 Hui Zhu <teawater@gmail.com>
16327 * tracepoint.c (tp_printf): New function.
16328 (eval_agent_expr): Handle gdb_agent_op_printf.
16329
16330 2011-02-21 Hui Zhu <teawater@gmail.com>
16331
16332 * tracepoint.c (tp_printf): New function.
16333 (eval_agent_expr): Handle gdb_agent_op_printf.
16334
16335 2011-02-18 Tom Tromey <tromey@redhat.com>
16336
16337 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16338 (tracepoint.o): Likewise.
16339 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16340 (gdb_agent_op_names): Likewise.
16341
16342 2011-02-18 Tom Tromey <tromey@redhat.com>
16343
16344 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16345 gdb_agent_op_rot>: New constants.
16346 (gdb_agent_op_names): Add pick and roll.
16347 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16348 cases.
16349
16350 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16351
16352 * aclocal.m4: Regenerated with aclocal-1.11.1.
16353
16354 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16355
16356 * server.c (handle_qxfer_traceframe_info): New.
16357 (qxfer_packets): Register "traceframe-info".
16358 (handle_query): Report support for qXfer:traceframe-info:read+.
16359 * tracepoint.c (match_blocktype): New.
16360 (traceframe_find_block_type): Rename to ...
16361 (traceframe_walk_blocks): ... this. Add callback filter argument,
16362 and use it.
16363 (traceframe_find_block_type): New, reimplemented on top of
16364 traceframe_walk_blocks.
16365 (build_traceframe_info_xml): New.
16366 (traceframe_read_info): New.
16367 * server.h (traceframe_read_info): Declare.
16368
16369 2011-02-11 Yao Qi <yao@codesourcery.com>
16370
16371 * configure.ac: Call AC_PROG_RANLIB.
16372 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16373 * configure: Regenerate.
16374
16375 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16376
16377 * server.c (gdb_read_memory): Change return semantics to allow
16378 partial transfers.
16379 (handle_search_memory_1): Adjust.
16380 (process_serial_event) <'m' packet>: Handle partial transfers.
16381 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16382
16383 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16384
16385 * regcache.c (init_register_cache): Initialize
16386 regcache->register_status.
16387 (free_register_cache): Release regcache->register_status.
16388 (regcache_cpy): Copy register_status.
16389 (registers_to_string): Print 'x's for unavailable registers.
16390 (supply_register): Mark the register's status valid or
16391 unavailable, depending on whether a buffer was passed in or not.
16392 (supply_register_zeroed): New.
16393 (supply_regblock): Mark the registers' status valid or
16394 unavailable, depending on whether a buffer was passed in or not.
16395 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16396 (struct regcache): New `register_status' field.
16397 (supply_register_zeroed): Declare.
16398 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16399 supply_register_zeroed, rather than passing a NULL buffer to
16400 supply_register.
16401 * tracepoint.c (fetch_traceframe_registers): Update comment.
16402
16403 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16404
16405 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16406 buffer explicit.
16407
16408 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16409
16410 * server.h (decode_xfer_write): Change prototype.
16411 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16412 and don't extract the annex here.
16413 * server.c (decode_xfer_read): Remove `annex' parameter,
16414 and don't extract the annex here.
16415 (decode_xfer): New.
16416 (struct qxfer): New.
16417 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16418 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16419 (handle_qxfer_statictrace): New functions, abstracted out from
16420 handle_query, and made to use the struct qxfer interface.
16421 (handle_threads_qxfer_proper): Rename to ...
16422 (handle_qxfer_threads_proper): ... this.
16423 (handle_threads_qxfer): Rename to ...
16424 (handle_qxfer_threads): ... this. Adjust.
16425 (qxfer_packets): New array.
16426 (handle_qxfer): New function.
16427 (handle_query): Use handle_qxfer.
16428
16429 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16430
16431 * gdbreplay.c: Shorten lines of >= 80 columns.
16432 * linux-low.c: Ditto.
16433 * linux-ppc-low.c: Ditto.
16434 * linux-s390-low.c: Ditto.
16435 * linux-sparc-low.c: Ditto.
16436 * linux-x86-low.c: Ditto.
16437 * linux-xtensa-low.c: Ditto.
16438 * mem-break.c: Ditto.
16439 * nto-low.c: Ditto.
16440 * regcache.h: Ditto.
16441 * remote-utils.c: Ditto.
16442 * server.c: Ditto.
16443 * server.h: Ditto.
16444 * thread-db.c: Ditto.
16445 * tracepoint.c: Ditto.
16446 * utils.c: Ditto.
16447 * win32-low.h: Ditto.
16448
16449 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16450
16451 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16452 update.
16453
16454 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16455
16456 * server.c (gdbserver_version): Update copyright year in version
16457 output.
16458 * gdbreplay.c (gdbreplay_version): Ditto.
16459
16460 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16461
16462 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16463 * linux-bfin-low.c: New file.
16464 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16465 PT_DATA_ADDR for BFIN targets.
16466 * Makefile.in (SFILES): Add linux-bfin-low.c.
16467 (clean): Remove reg-bfin.c.
16468 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16469 * README: Mention supported Blackfin targets.
16470
16471 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16472
16473 * .gitignore: New file.
16474
16475 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16476
16477 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16478
16479 2010-10-22 Jie Zhang <jie@codesourcery.com>
16480
16481 * Makefile.in: Add FLAGS_TO_PASS variable.
16482 (install): Remove dependency of install-only and recursively
16483 invoke make for install-only.
16484
16485 2010-10-04 Doug Evans <dje@google.com>
16486
16487 * Makefile.in (uninstall): Use $(DESTDIR).
16488
16489 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16490
16491 PR gdb/11842
16492
16493 * linux-x86-low.c (compat_siginfo_from_siginfo)
16494 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16495 si_code is < 0. Check for si_code == SI_TIMER before checking for
16496 si_code < 0.
16497
16498 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16499
16500 * lynx-i386-low.c: New file.
16501 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16502
16503 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16504
16505 * lynx-low.c (ptrace_request_to_str): Remove handling for
16506 request values that have been removed in LynxOS 5.x.
16507
16508 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16509
16510 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16511 <ptrace.h>
16512
16513 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16514
16515 * configure.ac: Add --enable-inprocess-agent option.
16516 * configure: Rebuilt.
16517
16518 2010-09-06 Yao Qi <yao@codesourcery.com>
16519
16520 * linux-low.c (linux_kill): Remove unused variable.
16521 (linux_stabilize_threads): Likewise.
16522 * server.c (start_inferior): Likewise.
16523 (queue_stop_reply_callback): Likewise.
16524 * tracepoint.c (do_action_at_tracepoint): Likewise.
16525
16526 2010-09-06 Yao Qi <yao@codesourcery.com>
16527
16528 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16529 on return.
16530
16531 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16532
16533 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16534
16535 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16536
16537 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16538 "$(IPA_DEPFILES)".
16539
16540 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16541
16542 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16543 gdbserver/lynx-ppc-low.c: New files.
16544 * Makefile.in (lynx_low_h): New variable.
16545 (lynx-low.o, lynx-ppc-low.o): New rules.
16546 * configure.ac: On LynxOS, link with -lnetinet.
16547 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16548 * configure: regenerate.
16549
16550 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16551
16552 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16553 * configure.ac: Add check for vasprintf and vsnprintf.
16554 * configure, config.in: Regenerate.
16555 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16556
16557 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16558
16559 * gdbreplay.c: Move include of alloca.h up, next to include of
16560 malloc.h.
16561 * server.h: Add include of malloc.h.
16562 * mem-break.c: Remove include of malloc.h.
16563 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16564
16565 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16566
16567 * Makefile.in (memmem.o): Build with -Wno-error.
16568
16569 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16570
16571 * utils.c (xsnprintf): Make non-static.
16572 * server.h: Add xsnprintf declaration.
16573 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16574 replace calls to snprintf by calls to xsnprintf throughout.
16575
16576 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16577
16578 * configure.ac: Add configure check for alloca.
16579 * configure, config.in: Regenerate.
16580 * server.h: Include alloca.h if it exists.
16581 * gdbreplay.c: Include alloca.h if it exists.
16582
16583 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16584
16585 * linux-low.c (__SIGRTMIN): Define if not already defined.
16586 (linux_create_inferior): Check for __ANDROID__ rather than
16587 __SIGRTMIN.
16588 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16589 are already deferred.
16590 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16591 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16592 stopped and already has a pending signal to report.
16593 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16594 a pending signal to report or is moving out of a jump pad.
16595 (linux_init_signals): Check for __ANDROID__ rather than
16596 __SIGRTMIN.
16597
16598 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16599
16600 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16601 debug_threads check. Avoid a linear search when not doing debug
16602 output.
16603
16604 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16605
16606 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16607 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16608 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16609 (process_event): Change local fd's type to gdb_fildes_t.
16610 (create_file_handler): Adjust prototype.
16611 (delete_file_handler): Adjust prototype.
16612 (handle_file_event): Adjust prototype. Use pfildes.
16613 (create_file_event): Adjsut prototype.
16614 * remote-utils.c (remote_desc, listen_desc): Change type to
16615 gdb_fildes_t.
16616 * server.h: New gdb_fildes_t typedef.
16617 [USE_WIN32API]: Include winsock2.h.
16618 (delete_file_handler, add_file_handler): Adjust prototypes.
16619 (pfildes): Declare.
16620 * utils.c (pfildes): New.
16621
16622 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16623
16624 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16625 * configure: Regenerate.
16626
16627 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16628
16629 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16630 (linux_done_accessing_memory): ... this.
16631 (linux_target_ops): Adjust.
16632 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16633 * nto-low.c (nto_target_ops): Adjust comment.
16634 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16635 * spu-low.c (spu_target_ops): Adjust comment.
16636 * target.h (target_ops): Rename unprepare_to_access_memory field
16637 to done_accessing_memory.
16638 (unprepare_to_access_memory): Rename to ...
16639 (done_accessing_memory): ... this.
16640
16641 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16642
16643 * linux-low.c (linux_prepare_to_access_memory): New.
16644 (linux_unprepare_to_access_memory): New.
16645 (linux_target_ops): Install them.
16646 * server.c (read_memory): Rename to ...
16647 (gdb_read_memory): ... this. Use
16648 prepare_to_access_memory/prepare_to_access_memory.
16649 (write_memory): Rename to ...
16650 (gdb_write_memory): ... this. Use
16651 prepare_to_access_memory/prepare_to_access_memory.
16652 (handle_search_memory_1): Adjust.
16653 (process_serial_event): Adjust.
16654 * target.h (struct target_ops): New fields
16655 prepare_to_access_memory and unprepare_to_access_memory.
16656 (prepare_to_access_memory, unprepare_to_access_memory): New.
16657 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16658 prepare_to_access_memory/prepare_to_access_memory.
16659 * nto-low.c (nto_target_ops): Adjust.
16660 * spu-low.c (spu_target_ops): Adjust.
16661 * win32-low.c (win32_target_ops): Adjust.
16662
16663 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16664
16665 * Makefile.in (WARN_CFLAGS): Get it from configure.
16666 (WERROR_CFLAGS): New.
16667 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16668 * configure.ac: Introduce --enable-werror, which adds -Werror to
16669 the compiler command line. Enabled by default. Disable with
16670 --disable-werror. Add -Wdeclaration-after-statement
16671 Wpointer-arith and -Wformat-nonliteral to warning flags.
16672 * configure: Regenerate.
16673
16674 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16675
16676 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16677
16678 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16679
16680 * gdbreplay.c (remote_error): New.
16681 (gdbchar): New.
16682 (expect): Use gdbchar. Check for error reading from GDB.
16683 Clarify sync error output.
16684 (play): Check for errors writing to GDB.
16685 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16686 * remote-utils.c (getpkt): Check for errors writing to the remote
16687 descriptor.
16688
16689 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16690
16691 * linux-low.c (linux_wait_1): Move non-debugging code out of
16692 `debug_threads' control.
16693
16694 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16695
16696 * linux-low.c (linux_wait_1): Don't set last_status here.
16697 * server.c (push_event, queue_stop_reply_callback): Assert we're
16698 not pushing a TARGET_WAITKIND_IGNORE event.
16699 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16700 (myresume, handle_target_event): Set the thread's last_resume_kind
16701 and last_status from the target returned status.
16702
16703 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16704
16705 PR threads/10729
16706
16707 * linux-x86-low.c (update_debug_registers_callback): New.
16708 (i386_dr_low_set_addr): Use it.
16709 (i386_dr_low_get_addr): New.
16710 (i386_dr_low_set_control): Use update_debug_registers_callback.
16711 (i386_dr_low_get_control): New.
16712 (i386_dr_low_get_status): Adjust.
16713 * linux-low.c (linux_stop_lwp): New.
16714 * linux-low.h (linux_stop_lwp): Declare.
16715
16716 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16717 argument instead of a i386_debug_reg_state.
16718 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16719 a i386_debug_reg_state.
16720 (i386_insert_aligned_watchpoint): Adjust.
16721 (i386_remove_aligned_watchpoint): Adjust.
16722 (i386_low_stopped_data_address): Read the debug registers from the
16723 inferior instead of from the mirrors.
16724 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16725 (i386_dr_low_get_addr): Declare.
16726 (i386_dr_low_get_control): Declare.
16727 (i386_dr_low_get_status): Change prototype.
16728
16729 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16730 (i386_dr_low_get_addr): New.
16731 (i386_dr_low_get_control): New.
16732 (i386_dr_low_get_status): Adjust prototype. Return
16733 dr_status_mirror.
16734 (i386_initial_stuff): Clear dr_status_mirror and
16735 dr_control_mirror.
16736 (i386_get_thread_context): Adjust.
16737 (i386_set_thread_context): Adjust.
16738 (i386_thread_added): Adjust.
16739
16740 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16741
16742 * linux-low.h (linux_thread_area): Delete declaration.
16743
16744 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16745
16746 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16747 after its termination.
16748
16749 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16750
16751 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16752 (gdb_wants_all_stopped): Delete.
16753 (linux_wait_1): Don't call them.
16754 * server.c (handle_v_cont): Tag all threads as want-stopped.
16755 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16756 stopped as "client-wants-stopped".
16757
16758 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16759
16760 * Makefile.in (signals_h): New.
16761 (server_h): Depend on it.
16762 (server.o): Don't depend on $(signals_def).
16763 (signals.o): Depend on $(signals_def).
16764
16765 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16766
16767 * Makefile.in (signals_def): New.
16768 (server_h): Append include/gdb/signals.h and signals_def.
16769 (server.o): Append signals_def.
16770
16771 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16772
16773 * server.c (handle_target_event): Use target_signal_to_host for
16774 resume_info.sig initialization.
16775 * target.h (struct thread_resume) <sig>: New comment.
16776
16777 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16778
16779 * server.c (handle_query): strcpy() the returned string from paddress()
16780 instead of sprintf().
16781 * utils.c (paddress): Return phex_nz().
16782
16783 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16784
16785 * server.c (handle_v_cont): Call mourn_inferior if process
16786 just exited.
16787 (myresume): Likewise.
16788
16789 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16790
16791 Static tracepoints, and integration with UST.
16792
16793 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16794 * mem-break.c (uninsert_all_breakpoints)
16795 (reinsert_all_breakpoints): New.
16796 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16797 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16798 (gdb_agent_ust_loaded, helper_thread_id)
16799 (gdb_agent_helper_thread_id): New macros.
16800 (struct ipa_sym_addresses): Add addr_ust_loaded,
16801 addr_helper_thread_id, addr_cmd_buf.
16802 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16803 (in_process_agent_loaded_ust): New.
16804 (write_e_ust_not_loaded): New.
16805 (maybe_write_ipa_ust_not_loaded): New.
16806 (struct collect_static_trace_data_action): New.
16807 (enum tracepoint_type) <static_tracepoint>: New.
16808 (struct tracepoint) <handle>: Mention static tracepoints.
16809 (struct static_tracepoint_ctx): New.
16810 (CMD_BUF_SIZE): New.
16811 (add_tracepoint_action): Handle static tracepoint actions.
16812 (unprobe_marker_at): New.
16813 (clear_installed_tracepoints): Handle static tracepoints.
16814 (cmd_qtdp): Handle static tracepoints.
16815 (probe_marker_at): New.
16816 (cmd_qtstart): Handle static tracepoints.
16817 (response_tracepoint): Handle static tracepoints.
16818 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16819 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16820 (get_context_regcache): Handle static tracepoints.
16821 (do_action_at_tracepoint): Handle static tracepoint actions.
16822 (traceframe_find_block_type): Handle static trace data blocks.
16823 (traceframe_read_sdata): New.
16824 (download_tracepoints): Download static tracepoint actions.
16825 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16826 (GDB_PROBE_NAME): New.
16827 (ust_ops): New.
16828 (GET_UST_SYM): New.
16829 (USTF): New.
16830 (dlsym_ust): New.
16831 (ust_marker_to_static_tracepoint): New.
16832 (gdb_probe): New.
16833 (collect_ust_data_at_tracepoint): New.
16834 (gdb_ust_probe): New.
16835 (UNIX_PATH_MAX, SOCK_DIR): New.
16836 (gdb_ust_connect_sync_socket): New.
16837 (resume_thread, stop_thread): New.
16838 (run_inferior_command): New.
16839 (init_named_socket): New.
16840 (gdb_ust_socket_init): New.
16841 (cstr_to_hexstr): New.
16842 (next_st): New.
16843 (first_marker, next_marker): New.
16844 (response_ust_marker): New.
16845 (cmd_qtfstm, cmd_qtsstm): New.
16846 (unprobe_marker_at, probe_marker_at): New.
16847 (cmd_qtstmat, gdb_ust_thread): New.
16848 (gdb_ust_init): New.
16849 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16850 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16851 (ST_REGENTRY): New.
16852 (x86_64_st_collect_regmap): New.
16853 (X86_64_NUM_ST_COLLECT_GREGS): New.
16854 (AMD64_RIP_REGNUM): New.
16855 (supply_static_tracepoint_registers): New.
16856 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16857 (ST_REGENTRY): New.
16858 (i386_st_collect_regmap): New.
16859 (i386_NUM_ST_COLLECT_GREGS): New.
16860 (supply_static_tracepoint_registers): New.
16861 * server.c (handle_query): Handle qXfer:statictrace:read.
16862 <qSupported>: Report support for StaticTracepoints, and
16863 qXfer:statictrace:read features.
16864 * server.h (traceframe_read_sdata)
16865 (supply_static_tracepoint_registers): Declare.
16866 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16867 (unpack_varlen_hex): Include in IPA build.
16868 * Makefile.in (ustlibs, ustinc): New.
16869 (IPA_OBJS): Add remote-utils-ipa.o.
16870 ($(IPA_LIB)): Link -ldl and -lpthread.
16871 (UST_CFLAGS): New.
16872 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16873 * config.in, configure: Regenerate.
16874
16875 2010-06-20 Ian Lance Taylor <iant@google.com>
16876 Pedro Alves <pedro@codesourcery.com>
16877
16878 * linux-x86-low.c (always_true): Delete.
16879 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16880 trying to fool the compiler with always_true.
16881
16882 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16883
16884 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16885 conditions in gdbserver.
16886
16887 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16888
16889 * spu-low.c (spu_read_memory): Wrap around local store limit.
16890 (spu_write_memory): Likewise.
16891
16892 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16893
16894 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16895 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16896 LONGEST uses.
16897 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16898 uses.
16899 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16900 uses with LONGEST uses.
16901
16902 2010-06-14 Stan Shebs <stan@codesourcery.com>
16903 Pedro Alves <pedro@codesourcery.com>
16904
16905 Bytecode compiler.
16906
16907 * linux-x86-low.c: Include limits.h.
16908 (add_insns): New.
16909 (always_true): New.
16910 (EMIT_ASM): New.
16911 (EMIT_ASM32): New.
16912 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16913 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16914 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16915 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16916 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16917 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16918 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16919 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16920 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16921 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16922 (amd64_emit_void_call_2): New.
16923 (amd64_emit_ops): New.
16924 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16925 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16926 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16927 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16928 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16929 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16930 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16931 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16932 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16933 (i386_emit_stack_adjust, i386_emit_int_call_1)
16934 (i386_emit_void_call_2): New.
16935 (i386_emit_ops): New.
16936 (x86_emit_ops): New.
16937 (the_low_target): Install x86_emit_ops.
16938 * server.h (struct emit_ops): New.
16939 (get_raw_reg_func_addr): Declare.
16940 (current_insn_ptr, emit_error): Declare.
16941 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16942 (set_trace_state_variable_value): New defines.
16943 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16944 addr_get_trace_state_variable_value and
16945 addr_set_trace_state_variable_value.
16946 (symbol_list): New fields for get_raw_reg,
16947 get_trace_state_variable_value and set_trace_state_variable_value.
16948 (condfn): New typedef.
16949 (struct tracepoint): New field `compiled_cond'.
16950 (do_action_at_tracepoint): Clear compiled_cond.
16951 (get_trace_state_variable_value, set_trace_state_variable_value):
16952 Export in the IPA.
16953 (condition_true_at_tracepoint): If there's a compiled condition,
16954 run that.
16955 (current_insn_ptr, emit_error): New globals.
16956 (struct bytecode_address): New.
16957 (get_raw_reg_func_addr): New.
16958 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16959 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16960 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16961 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16962 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16963 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16964 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16965 (compile_tracepoint_condition, compile_bytecodes): New.
16966 * target.h (emit_ops): Forward declare.
16967 (struct target_ops): New field emit_ops.
16968 (target_emit_ops): New.
16969 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16970 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16971 * linux-low.c (linux_emit_ops): New.
16972 (linux_target_ops): Install it.
16973 * linux-low.h (struct linux_target_ops): New field emit_ops.
16974
16975 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16976
16977 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16978 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16979
16980 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16981 Stan Shebs <stan@codesourcery.com>
16982
16983 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16984 (all): Depend on $(extra_libraries).
16985 (install-only): Install the IPA.
16986 (IPA_OBJS, IPA_LIB): New.
16987 (clean): Remove the IPA lib.
16988 (IPAGENT_CFLAGS): New.
16989 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16990 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16991 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16992 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16993 * configure.ac: Check for atomic builtins support in the compiler.
16994 (IPA_DEPFILES, extra_libraries): Define.
16995 * configure.srv (ipa_obj): Add description.
16996 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16997 (i[34567]86-*-linux*): Set ipa_obj.
16998 (x86_64-*-linux*): Set ipa_obj.
16999 * linux-low.c (stabilizing_threads): New.
17000 (supports_fast_tracepoints): New.
17001 (linux_detach): Stabilize threads before detaching.
17002 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17003 the lwp is either not stabilizing, or is moving out of a jump pad.
17004 (linux_fast_tracepoint_collecting): New.
17005 (maybe_move_out_of_jump_pad): New.
17006 (enqueue_one_deferred_signal): New.
17007 (dequeue_one_deferred_signal): New.
17008 (linux_wait_for_event_1): If moving out of a jump pad, defer
17009 pending signals to later.
17010 (linux_stabilize_threads): New.
17011 (linux_wait_1): Check if threads need moving out of jump pads, and
17012 do it if so.
17013 (stuck_in_jump_pad_callback): New.
17014 (move_out_of_jump_pad_callback): New.
17015 (lwp_running): New.
17016 (linux_resume_one_lwp): Handle moving out of jump pads.
17017 (linux_set_resume_request): Dequeue deferred signals.
17018 (need_step_over_p): Also step over fast tracepoint jumps.
17019 (start_step_over): Also uninsert fast tracepoint jumps.
17020 (finish_step_over): Also reinsert fast tracepoint jumps.
17021 (linux_install_fast_tracepoint_jump): New.
17022 (linux_target_ops): Install linux_stabilize_threads and
17023 linux_install_fast_tracepoint_jump_pad.
17024 * linux-low.h (linux_target_ops) <get_thread_area,
17025 install_fast_tracepoint_jump_pad>: New fields.
17026 (struct lwp_info) <collecting_fast_tracepoint,
17027 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17028 (linux_get_thread_area): Declare.
17029 * linux-x86-low.c (jump_insn): New.
17030 (x86_get_thread_area): New.
17031 (append_insns): New.
17032 (push_opcode): New.
17033 (amd64_install_fast_tracepoint_jump_pad): New.
17034 (i386_install_fast_tracepoint_jump_pad): New.
17035 (x86_install_fast_tracepoint_jump_pad): New.
17036 (the_low_target): Install x86_get_thread_area and
17037 x86_install_fast_tracepoint_jump_pad.
17038 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17039 (struct fast_tracepoint_jump): New.
17040 (fast_tracepoint_jump_insn): New.
17041 (fast_tracepoint_jump_shadow): New.
17042 (find_fast_tracepoint_jump_at): New.
17043 (fast_tracepoint_jump_here): New.
17044 (delete_fast_tracepoint_jump): New.
17045 (set_fast_tracepoint_jump): New.
17046 (uninsert_fast_tracepoint_jumps_at): New.
17047 (reinsert_fast_tracepoint_jumps_at): New.
17048 (set_breakpoint_at): Use write_inferior_memory.
17049 (uninsert_raw_breakpoint): Use write_inferior_memory.
17050 (check_mem_read): Mask out fast tracepoint jumps.
17051 (check_mem_write): Mask out fast tracepoint jumps.
17052 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17053 (set_fast_tracepoint_jump): Declare.
17054 (delete_fast_tracepoint_jump)
17055 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17056 (reinsert_fast_tracepoint_jumps_at): Declare.
17057 * regcache.c: Don't compile many functions when building the
17058 in-process agent library.
17059 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17060 the register buffer in the heap.
17061 (free_register_cache): If the register buffer isn't owned by the
17062 regcache, don't free it.
17063 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17064 pre-existing register caches.
17065 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17066 type.
17067 (convert_ascii_to_int): : Constify `from' parameter type.
17068 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17069 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17070 the needed buffer in-place.
17071 (relocate_instruction): New.
17072 * server.c (handle_query) <qSymbols>: If the target supports
17073 tracepoints, give it a chance of looking up symbols. Report
17074 support for fast tracepoints.
17075 (handle_status): Stabilize threads.
17076 (process_serial_event): Adjust.
17077 * server.h (struct fast_tracepoint_jump): Forward declare.
17078 (struct process_info) <fast_tracepoint_jumps>: New field.
17079 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17080 (decode_X_packet, decode_M_packet): Adjust.
17081 (relocate_instruction): Declare.
17082 (in_process_agent_loaded): Declare.
17083 (tracepoint_look_up_symbols): Declare.
17084 (struct fast_tpoint_collect_status): Declare.
17085 (fast_tracepoint_collecting): Declare.
17086 (force_unlock_trace_buffer): Declare.
17087 (handle_tracepoint_bkpts): Declare.
17088 (initialize_low_tracepoint)
17089 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17090 * target.h (struct target_ops) <stabilize_threads,
17091 install_fast_tracepoint_jump_pad>: New fields.
17092 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17093 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17094 [HAVE_STDINT_H]: Include stdint.h.
17095 (trace_debug_1): Rename to ...
17096 (trace_vdebug): ... this.
17097 (trace_debug): Rename to ...
17098 (trace_debug_1): ... this. Add `level' parameter.
17099 (trace_debug): New.
17100 (ATTR_USED, ATTR_NOINLINE): New.
17101 (IP_AGENT_EXPORT): New.
17102 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17103 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17104 (about_to_request_buffer_space, trace_buffer_is_full)
17105 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17106 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17107 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17108 (traceframe_write_count, traceframes_created)
17109 (trace_state_variables)
17110 New renaming defines.
17111 (struct ipa_sym_addresses): New.
17112 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17113 (symbol_list): New.
17114 (ipa_sym_addrs): New.
17115 (all_tracepoint_symbols_looked_up): New.
17116 (in_process_agent_loaded): New.
17117 (write_e_ipa_not_loaded): New.
17118 (maybe_write_ipa_not_loaded): New.
17119 (tracepoint_look_up_symbols): New.
17120 (debug_threads) [IN_PROCESS_AGENT]: New.
17121 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17122 (UNKNOWN_SIDE_EFFECTS): New.
17123 (stop_tracing): New.
17124 (flush_trace_buffer): New.
17125 (stop_tracing_bkpt): New.
17126 (flush_trace_buffer_bkpt): New.
17127 (read_inferior_integer): New.
17128 (read_inferior_uinteger): New.
17129 (read_inferior_data_pointer): New.
17130 (write_inferior_data_pointer): New.
17131 (write_inferior_integer): New.
17132 (write_inferior_uinteger): New.
17133 (struct collect_static_trace_data_action): Delete.
17134 (enum tracepoint_type): New.
17135 (struct tracepoint) <type>: New field `type'.
17136 <actions_str, step_actions, step_actions_str>: Only include in
17137 GDBserver.
17138 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17139 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17140 (tracepoints): Use IP_AGENT_EXPORT.
17141 (last_tracepoint): Don't include in the IPA.
17142 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17143 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17144 (alloced_trace_state_variables): New.
17145 (trace_state_variables): Use IP_AGENT_EXPORT.
17146 (traceframe_t): Delete unused variable.
17147 (circular_trace_buffer): Don't include in the IPA.
17148 (trace_buffer_start): Delete.
17149 (struct trace_buffer_control): New.
17150 (trace_buffer_free): Delete.
17151 (struct ipa_trace_buffer_control): New.
17152 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17153 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17154 New.
17155 (trace_buffer_ctrl): New.
17156 (TRACE_BUFFER_CTRL_CURR): New.
17157 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17158 Reimplement as macros.
17159 (trace_buffer_wrap): Delete.
17160 (traceframe_write_count, traceframe_read_count)
17161 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17162 (struct tracepoint_hit_ctx) <type>: New field.
17163 (struct fast_tracepoint_ctx): New.
17164 (memory_barrier): New.
17165 (cmpxchg): New.
17166 (record_tracepoint_error): Update atomically in the IPA.
17167 (clear_inferior_trace_buffer): New.
17168 (about_to_request_buffer_space): New.
17169 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17170 updating the same buffer.
17171 (add_tracepoint): Default the tracepoint's type to trap
17172 tracepoint, and orig_size to -1.
17173 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17174 internal variables.
17175 (create_trace_state_variable): New parameter `gdb'. Handle it.
17176 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17177 (cmd_qtdp): Handle fast tracepoints.
17178 (cmd_qtdv): Adjust.
17179 (max_jump_pad_size): New.
17180 (gdb_jump_pad_head): New.
17181 (get_jump_space_head): New.
17182 (claim_jump_space): New.
17183 (sort_tracepoints): New.
17184 (MAX_JUMP_SIZE): New.
17185 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17186 IPA.
17187 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17188 support. Upload fast traceframes, and delete internal IPA
17189 breakpoints.
17190 (stop_tracing_handler): New.
17191 (flush_trace_buffer_handler): New.
17192 (cmd_qtstop): Upload fast tracepoints.
17193 (response_tracepoint): Handle fast tracepoints.
17194 (tracepoint_finished_step): Upload fast traceframes. Set the
17195 tracepoint hit context's tracepoint type.
17196 (handle_tracepoint_bkpts): New.
17197 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17198 type. Add comment about fast tracepoints.
17199 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17200 non-existing action_str field.
17201 (get_context_regcache): Handle fast tracepoints.
17202 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17203 to the regcache.
17204 (fast_tracepoint_from_jump_pad_address): New.
17205 (fast_tracepoint_from_ipa_tpoint_address): New.
17206 (collecting_t): New.
17207 (force_unlock_trace_buffer): New.
17208 (fast_tracepoint_collecting): New.
17209 (collecting): New.
17210 (gdb_collect): New.
17211 (write_inferior_data_ptr): New.
17212 (target_tp_heap): New.
17213 (target_malloc): New.
17214 (download_agent_expr): New.
17215 (UALIGN): New.
17216 (download_tracepoints): New.
17217 (download_trace_state_variables): New.
17218 (upload_fast_traceframes): New.
17219 (IPA_FIRST_TRACEFRAME): New.
17220 (IPA_NEXT_TRACEFRAME_1): New.
17221 (IPA_NEXT_TRACEFRAME): New.
17222 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17223 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17224 (gdb_jump_pad_buffer_end): New.
17225 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17226 (initialize_tracepoint): Adjust.
17227 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17228 buffer. Initialize the low module.
17229 * utils.c (PREFIX, TOOLNAME): New.
17230 (malloc_failure): Use PREFIX.
17231 (error): In the IPA, an error causes an exit.
17232 (fatal, warning): Use PREFIX.
17233 (internal_error): Use TOOLNAME.
17234 (NUMCELLS): Increase to 10.
17235 * configure, config.in: Regenerate.
17236
17237 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17238
17239 * server.c (handle_query) <qSupported>: Do two passes over the
17240 qSupported string to avoid nesting strtok.
17241
17242 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17243
17244 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17245 (CDEPS): New.
17246 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17247 -Wl,--dynamic-list.
17248 * configure: Regenerate.
17249 * proc-service.list: New.
17250
17251 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17252
17253 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17254 New comment.
17255
17256 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17257
17258 * gdbreplay.c (remote_open): Check error return from socket() call by
17259 its equality to -1 not by it being negative.
17260 * remote-utils.c (remote_open): Likewise.
17261
17262 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17263
17264 * config.h: Regenerate.
17265
17266 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17267
17268 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17269 doesn't provide PTRACE_GET_THREAD_AREA.
17270
17271 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17272
17273 * linux-m68k-low.c: Include <asm/ptrace.h>
17274 (ps_get_thread_area): Implement.
17275
17276 2010-05-03 Doug Evans <dje@google.com>
17277
17278 * event-loop.c (struct callback_event): New struct.
17279 (callback_list): New global.
17280 (append_callback_event, delete_callback_event): New functions.
17281 (process_callback): New function.
17282 (start_event_loop): Call it.
17283 * remote-utils.c (NOT_SCHEDULED): Define.
17284 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17285 moved out of readchar.
17286 (readchar): Rewrite. Call reschedule before returning.
17287 (reset_readchar): New function.
17288 (remote_close): Call it.
17289 (process_remaining, reschedule): New functions.
17290 * server.h (callback_handler_func): New typedef.
17291 (append_callback_event, delete_callback_event): Declare.
17292
17293 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17294
17295 * proc-service.c (ps_pglobal_lookup): Use
17296 thread_db_look_up_one_symbol.
17297 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17298 parameter. Use it instead of all_symbols_looked_up.
17299 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17300 field.
17301 (all_symbols_looked_up): Don't declare.
17302 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17303 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17304 field.
17305 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17306 Set all_symbols_looked_up here.
17307 (thread_db_look_up_one_symbol): New.
17308 (thread_db_get_tls_address): Adjust.
17309 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17310 thread_db object on the heap, and tentatively set it in the
17311 process structure.
17312 (thread_db_init): Don't set all_symbols_looked_up here.
17313 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17314
17315 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17316
17317 * linux-low.c (linux_kill, linux_detach): Adjust.
17318 (status_pending_p_callback): Remove redundant statement. Check
17319 for !TARGET_WAITIKIND_IGNORE, instead of
17320 TARGET_WAITKIND_STOPPED.
17321 (handle_tracepoints): Make sure LWP is locked. Adjust.
17322 (linux_wait_for_event_1): Adjust.
17323 (linux_cancel_breakpoints): New.
17324 (unsuspend_one_lwp): New.
17325 (unsuspend_all_lwps): New.
17326 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17327 (send_sigstop_callback): Change return type to int, add new
17328 `except' parameter and handle it.
17329 (suspend_and_send_sigstop_callback): New.
17330 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17331 pass them down. If SUSPEND, also increment the lwp's suspend
17332 count.
17333 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17334 (need_step_over_p): Don't consider suspended LWPs.
17335 (start_step_over): Adjust.
17336 (proceed_one_lwp): Change return type to int, add new `except'
17337 parameter and handle it.
17338 (unsuspend_and_proceed_one_lwp): New.
17339 (proceed_all_lwps): Use find_inferior instead of
17340 for_each_inferior.
17341 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17342 also decrement the suspend count of LWPs. Pass `except' down,
17343 instead of hacking its suspend count.
17344 (linux_pause_all): Add `freeze' parameter. Adjust.
17345 (linux_unpause_all): New.
17346 (linux_target_ops): Install linux_unpause_all.
17347 * server.c (handle_status): Adjust.
17348 * target.h (struct target_ops): New fields `unpause_all' and
17349 `cancel_breakpoints'. Add new parameter to `pause_all'.
17350 (pause_all): Add new `freeze' parameter.
17351 (unpause_all): New.
17352 (cancel_breakpoints): New.
17353 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17354 cancel breakpoints.
17355 (cmd_qtstart): Pause threads.
17356 (stop_tracing): Pause threads, and cancel breakpoints.
17357 * win32-low.c (win32_target_ops): Adjust.
17358
17359 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17360
17361 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17362 the inferior right away from here...
17363 (linux_wait_1): ... to here, and adjust to check the thread's
17364 last_resume_kind instead of the lwp's step or stop_expected flags.
17365
17366 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17367
17368 * README: Use consistent `GDB' and `GDBserver' spellings.
17369
17370 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17371
17372 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17373 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17374 (linux_detach_one_lwp): Assume the lwp is stopped.
17375 (any_thread_of): Delete.
17376 (linux_detach): Stop all lwps here. Don't blindly delete all
17377 breakpoints.
17378 (delete_lwp_callback): New.
17379 (linux_mourn): Delete all lwps of the process that is gone.
17380 (linux_wait_1): Don't delete the last lwp of the process here.
17381 * mem-break.h (mark_breakpoints_out): Declare.
17382 * mem-break.c (mark_breakpoints_out): New.
17383 (free_all_breakpoints): Use it.
17384 * server.c (handle_target_event): If the process is gone, mark
17385 breakpoints out.
17386 * thread-db.c (struct thread_db) <create_bp>: New field.
17387 (thread_db_enable_reporting): Fix prototype. Store a thread event
17388 breakpoint reference in the thread_db struct.
17389 (thread_db_load_search): Clear the thread_db object.
17390 (try_thread_db_load_1): Ditto.
17391 (switch_to_process): New.
17392 (disable_thread_event_reporting): Use it.
17393 (remove_thread_event_breakpoints): New.
17394 (thread_db_detach, thread_db_mourn): Use it.
17395
17396 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17397
17398 * linux-low.c (linux_enable_event_reporting): New.
17399 (linux_wait_for_event_1, handle_extended_wait): Use it.
17400
17401 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17402
17403 * linux-low.c (linux_kill_one_lwp, linux_kill)
17404 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17405 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17406 SIGSTOP even if the LWP is stopped.
17407 (send_sigstop_callback): New.
17408 (stop_all_lwps): Use send_sigstop_callback instead.
17409 (linux_resume_one_thread): Adjust.
17410 (proceed_one_lwp): Still proceed an LWP that the client has
17411 requested to stop, if we haven't reported it as stopped yet. Make
17412 sure that LWPs the client want stopped, have a pending SIGSTOP.
17413
17414 2010-04-26 Doug Evans <dje@google.com>
17415
17416 * server.c (handle_general_set): Make static.
17417
17418 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17419 Print received char after testing for error/eof instead of before.
17420 (input_interrupt): Tweak comment.
17421
17422 2010-04-23 Doug Evans <dje@google.com>
17423
17424 * server.c (start_inferior): Print inferior argv if --debug.
17425
17426 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17427
17428 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17429 * nto-x86-low.c: Include server.h
17430
17431 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17432
17433 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17434 be consistent with other sources of this directory.
17435 (init_registers_amd64): Correct name of source file of this function
17436 in the comment.
17437
17438 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17439
17440 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17441 64-bit executables.
17442
17443 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17444
17445 * win32-i386-low.c: Add 64-bit support.
17446 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17447 (init_registers_amd64): Declare.
17448 (mappings): Add 64-bit version of array.
17449 (init_windows_x86): New function.
17450 (the_low_target): Change init_arch field to init_windows_x86.
17451
17452 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17453
17454 * win32-low.c: Adapt to support also 64-bit architecture.
17455 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17456 (get_image_name): Use SIZE_T type for local variable `done'.
17457 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17458 (toolhelp_get_dll_name): Idem.
17459 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17460 Use uintptr_t typecast to avoid warning.
17461 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17462 (handle_exception): Use phex_nz to avoid warning.
17463 (win32_wait): Remove unused local variable `process'.
17464
17465 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17466
17467 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17468 `amd64-avx.o'.
17469
17470 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17471
17472 * configure.ac: Use `ws2_32' library for srv_mingw.
17473 * configure: Regenerate.
17474 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17475 * remote-utils.c: Likewise.
17476
17477 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17478
17479 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17480 if __x86_64__ is defined.
17481
17482 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17483
17484 * configure: Regenerate.
17485
17486 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17487
17488 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17489 * target.h (target_ops): New get_tib_address field.
17490 * win32-low.h (win32_thread_info): Add thread_local_base field.
17491 * win32-low.c (child_add_thread): Add tlb argument.
17492 Set thread_local_base field to TLB.
17493 (get_child_debug_event): Adapt to child_add_thread change.
17494 (win32_get_tib_address): New function.
17495 (win32_target_ops): Set get_tib_address field to
17496 win32_get_tib_address.
17497 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17498
17499 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17500
17501 * linux-low.c (linux_mourn): Also remove the process.
17502 * server.c (handle_target_event): Don't remove the process here.
17503 * nto-low.c (nto_mourn): New.
17504 (nto_target_ops): Install it.
17505 * spu-low.c (spu_mourn): New.
17506 (spu_target_ops): Install it.
17507 * win32-low.c (win32_mourn): New.
17508 (win32_target_ops): Install it.
17509
17510 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17511
17512 * server.h (buffer_xml_printf): Remove redundant `;'.
17513
17514 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17515
17516 * regcache.c (set_register_cache): Invalidate regcaches before
17517 changing the register cache layout.
17518 (regcache_invalidate_one): Allow a NULL regcache.
17519 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17520 regcaches before changing the register cache layout or the target
17521 regsets.
17522
17523 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17524
17525 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17526 variable warning on Linux/x86-64.
17527
17528 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17529
17530 GDBserver disconnected tracing support.
17531
17532 * linux-low.c (linux_remove_process): Delete.
17533 (add_lwp): Don't set last_resume_kind here.
17534 (linux_kill): Use `mourn'.
17535 (linux_detach): Use `thread_db_detach', and `mourn'.
17536 (linux_mourn): New.
17537 (linux_attach_lwp_1): Adjust comment.
17538 (linux_attach): last_resume_kind moved the thread_info; adjust.
17539 (status_pending_p_callback): Adjust.
17540 (linux_wait_for_event_1): Adjust.
17541 (count_events_callback, select_singlestep_lwp_callback)
17542 (select_event_lwp_callback, cancel_breakpoints_callback)
17543 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17544 (proceed_one_lwp): Adjust.
17545 (linux_async): Add debug output.
17546 (linux_thread_stopped): New.
17547 (linux_pause_all): New.
17548 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17549 linux_pause_all.
17550 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17551 (thread_db_free): Delete declaration.
17552 (thread_db_detach, thread_db_mourn): Declare.
17553 * thread-db.c (thread_db_init): Use thread_db_mourn.
17554 (thread_db_free): Delete, split in two.
17555 (disable_thread_event_reporting): New.
17556 (thread_db_detach): New.
17557 (thread_db_mourn): New.
17558
17559 * server.h (struct thread_info) <last_resume_kind>: New field.
17560 <attached>: Add comment.
17561 <gdb_detached>: New field.
17562 (handler_func): Change return type to int.
17563 (handle_serial_event, handle_target_event): Ditto.
17564 (gdb_connected): Declare.
17565 (tracing): Delete.
17566 (disconnected_tracing): Declare.
17567 (stop_tracing): Declare.
17568
17569 * server.c (handle_query) <qSupported>: Report support for
17570 disconnected tracing.
17571 (queue_stop_reply_callback): Account for running threads.
17572 (gdb_wants_thread_stopped): New.
17573 (gdb_wants_all_threads_stopped): New.
17574 (gdb_reattached_process): New.
17575 (handle_status): Clear the `gdb_detached' flag of all processes.
17576 In all-stop, stop all threads.
17577 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17578 (process_serial_event): If the remote connection breaks, or if an
17579 exit was forced with "monitor exit", force an event loop exit.
17580 Handle disconnected tracing on detach.
17581 (handle_serial_event): Adjust.
17582 (handle_target_event): If GDB isn't connected, forward events back
17583 to the inferior, unless the last process exited, in which case,
17584 exit gdbserver. Adjust interface.
17585
17586 * remote-utils.c (remote_open): Don't block in accept. Instead
17587 register an event loop source on the listen socket file
17588 descriptor. Refactor bits into ...
17589 (listen_desc): ... this new global.
17590 (gdb_connected): ... this new function.
17591 (enable_async_notification): ... this new function.
17592 (handle_accept_event): ... this new function.
17593 (remote_close): Clear remote_desc.
17594
17595 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17596
17597 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17598 New fields.
17599 (mourn_inferior): Define.
17600 (target_process_qsupported): Avoid the dangling else problem.
17601 (thread_stopped): Define.
17602 (pause_all): Define.
17603 (target_waitstatus_to_string): Declare.
17604 * target.c (target_waitstatus_to_string): New.
17605
17606 * tracepoint.c (tracing): Make extern.
17607 (disconnected_tracing): New.
17608 (stop_tracing): Make extern. Handle tracing stops due to GDB
17609 disconnecting.
17610 (cmd_qtdisconnected): New.
17611 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17612 (handle_tracepoint_general_set): Handle QTDisconnected.
17613
17614 * event-loop.c (event_handler_func): Change return type to int.
17615 (process_event): Bail out if the event handler wants the event
17616 loop to stop.
17617 (handle_file_event): Ditto.
17618 (start_event_loop): Bail out if the event handler wants the event
17619 loop to stop.
17620
17621 * nto-low.c (nto_target_ops): Adjust.
17622 * spu-low.c (spu_wait): Don't remove the process here.
17623 (spu_target_ops): Adjust.
17624 * win32-low.c (win32_wait): Don't remove the process here.
17625 (win32_target_ops): Adjust.
17626
17627 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17628
17629 * regcache.c (realloc_register_cache): Invalidate inferior's
17630 regcache before recreating it.
17631
17632 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17633
17634 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17635
17636 2010-04-09 Stan Shebs <stan@codesourcery.com>
17637 Pedro Alves <pedro@codesourcery.com>
17638
17639 * server.h (LONGEST): New.
17640 (struct thread_info) <while_stepping>: New field.
17641 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17642 Declare.
17643 (initialize_tracepoint, handle_tracepoint_general_set)
17644 (handle_tracepoint_query, tracepoint_finished_step)
17645 (tracepoint_was_hit, release_while_stepping_state_list):
17646 (current_traceframe): Declare.
17647 * server.c (handle_general_set): Handle tracepoint packets.
17648 (read_memory): New.
17649 (write_memory): New.
17650 (handle_search_memory_1): Use read_memory.
17651 (handle_query): Report support for conditional tracepoints, trace
17652 state variables, and tracepoint sources. Handle tracepoint
17653 queries.
17654 (main): Initialize the tracepoints module.
17655 (process_serial_event): Handle traceframe reads/writes.
17656
17657 * linux-low.c (handle_tracepoints): New.
17658 (linux_wait_1): Call it.
17659 (linux_resume_one_lwp): Handle while-stepping.
17660 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17661 (linux_target_ops): Install them.
17662 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17663 New field.
17664 * linux-x86-low.c (x86_supports_tracepoints): New.
17665 (the_low_target). Install it.
17666
17667 * mem-break.h (delete_breakpoint): Declare.
17668 * mem-break.c (delete_breakpoint): Make external.
17669
17670 * target.h (struct target_ops): Add `supports_tracepoints',
17671 `read_pc', and `write_pc' fields.
17672 (target_supports_tracepoints): Define.
17673 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17674 (phex_nz): New.
17675
17676 * regcache.h (struct regcache) <registers_owned>: New field.
17677 (init_register_cache, regcache_cpy): Declare.
17678 (regcache_read_pc, regcache_write_pc): Declare.
17679 (register_cache_size): Declare.
17680 (supply_regblock): Declare.
17681 * regcache.c (init_register_cache): New.
17682 (new_register_cache): Use it.
17683 (regcache_cpy): New.
17684 (register_cache_size): New.
17685 (supply_regblock): New.
17686 (regcache_read_pc, regcache_write_pc): New.
17687
17688 * tracepoint.c: New.
17689
17690 * Makefile.in (OBS): Add tracepoint.o.
17691 (tracepoint.o): New rule.
17692
17693 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17694
17695 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17696 (i386-mmx.o): New.
17697 (i386-mmx.c): Likewise.
17698 (i386-mmx-linux.o): Likewise.
17699 (i386-mmx-linux.c): Likewise.
17700
17701 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17702 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17703 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17704 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17705
17706 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17707 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17708 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17709
17710 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17711
17712 * Makefile.in (clean): Updated.
17713 (i386-avx.o): New.
17714 (i386-avx.c): Likewise.
17715 (i386-avx-linux.o): Likewise.
17716 (i386-avx-linux.c): Likewise.
17717 (amd64-avx.o): Likewise.
17718 (amd64-avx.c): Likewise.
17719 (amd64-avx-linux.o): Likewise.
17720 (amd64-avx-linux.c): Likewise.
17721
17722 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17723 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17724 (srv_amd64_regobj): Add amd64-avx.o.
17725 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17726 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17727 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17728 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17729 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17730 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17731 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17732
17733 * i387-fp.c: Include "i386-xstate.h".
17734 (i387_xsave): New.
17735 (i387_cache_to_xsave): Likewise.
17736 (i387_xsave_to_cache): Likewise.
17737 (x86_xcr0): Likewise.
17738
17739 * i387-fp.h (i387_cache_to_xsave): Likewise.
17740 (i387_xsave_to_cache): Likewise.
17741 (x86_xcr0): Likewise.
17742
17743 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17744 * linux-crisv32-low.c (target_regsets): Likewise.
17745 * linux-m68k-low.c (target_regsets): Likewise.
17746 * linux-mips-low.c (target_regsets): Likewise.
17747 * linux-ppc-low.c (target_regsets): Likewise.
17748 * linux-s390-low.c (target_regsets): Likewise.
17749 * linux-sh-low.c (target_regsets): Likewise.
17750 * linux-sparc-low.c (target_regsets): Likewise.
17751 * linux-xtensa-low.c (target_regsets): Likewise.
17752
17753 * linux-low.c: Include <sys/uio.h>.
17754 (regsets_fetch_inferior_registers): Support nt_type.
17755 (regsets_store_inferior_registers): Likewise.
17756 (linux_process_qsupported): New.
17757 (linux_target_ops): Add linux_process_qsupported.
17758
17759 * linux-low.h (regset_info): Add nt_type.
17760 (linux_target_ops): Add process_qsupported.
17761
17762 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17763 and <sys/uio.h>.
17764 (init_registers_i386_avx_linux): New.
17765 (init_registers_amd64_avx_linux): Likewise.
17766 (xmltarget_i386_linux_no_xml): Likewise.
17767 (xmltarget_amd64_linux_no_xml): Likewise.
17768 (PTRACE_GETREGSET): Likewise.
17769 (PTRACE_SETREGSET): Likewise.
17770 (x86_fill_xstateregset): Likewise.
17771 (x86_store_xstateregset): Likewise.
17772 (use_xml): Likewise.
17773 (x86_linux_update_xmltarget): Likewise.
17774 (x86_linux_process_qsupported): Likewise.
17775 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17776 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17777 init_registers_i386_linux here. Call
17778 x86_linux_update_xmltarget.
17779 (the_low_target): Add x86_linux_process_qsupported.
17780
17781 * server.c (handle_query): Call target_process_qsupported.
17782
17783 * target.h (target_ops): Add process_qsupported.
17784 (target_process_qsupported): New.
17785
17786 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17787
17788 * inferiors.c (add_thread): Set last_status kind to
17789 TARGET_WAITKIND_IGNORE.
17790 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17791 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17792 (linux_wait_1): Move `thread' local definition to block that uses
17793 it. Don't NULL initialize `event_child'.
17794 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17795 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17796 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17797
17798 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17799
17800 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17801 an extended waitstatus, or by a watchpoint.
17802 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17803 thread was stepping or has been stopped by a watchpoint.
17804
17805 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17806
17807 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17808 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17809 of another, then delete the previous, and validate all
17810 breakpoints.
17811 (validate_inserted_breakpoint): New.
17812 (delete_disabled_breakpoints): New.
17813 (validate_breakpoints): New.
17814 (check_mem_read): Validate breakpoints before trusting their
17815 shadow. Delete disabled breakpoints.
17816 (check_mem_write): Validate breakpoints before trusting they
17817 should be inserted. Delete disabled breakpoints.
17818 * mem-break.h (validate_breakpoints):
17819 * server.c (handle_query): Validate breakpoints when we see a
17820 qSymbol query.
17821
17822 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17823
17824 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17825 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17826 if we could tell there's a GDB breakpoint at stop_pc.
17827 (need_step_over_p): Don't do a step over if we find a GDB
17828 breakpoint at the resume PC.
17829
17830 * mem-break.c (struct raw_breakpoint): New.
17831 (enum bkpt_type): New type `gdb_breakpoint'.
17832 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17833 fields. New field `raw'.
17834 (find_raw_breakpoint_at): New.
17835 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17836 breakpoint instead.
17837 (set_breakpoint_at): Adjust.
17838 (delete_raw_breakpoint): New.
17839 (release_breakpoint): New.
17840 (delete_breakpoint): Rename to...
17841 (delete_breakpoint_1): ... this. Add proc parameter. Use
17842 release_breakpoint. Return ENOENT.
17843 (delete_breakpoint): Reimplement.
17844 (find_breakpoint_at): Delete.
17845 (find_gdb_breakpoint_at): New.
17846 (delete_breakpoint_at): Delete.
17847 (set_gdb_breakpoint_at): New.
17848 (delete_gdb_breakpoint_at): New.
17849 (gdb_breakpoint_here): New.
17850 (set_reinsert_breakpoint): Use release_breakpoint.
17851 (uninsert_breakpoint): Rename to ...
17852 (uninsert_raw_breakpoint): ... this.
17853 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17854 (reinsert_raw_breakpoint): Change parameter type to
17855 raw_breakpoint.
17856 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17857 instead.
17858 (check_breakpoints): Adjust. Use release_breakpoint.
17859 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17860 (breakpoint_inserted_here): Ditto.
17861 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17862 Don't trust the breakpoint's shadow if it is not inserted.
17863 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17864 (delete_all_breakpoints): Adjust.
17865 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17866 use delete_breakpoint_1.
17867
17868 * mem-break.h (breakpoints_supported): Delete declaration.
17869 (set_gdb_breakpoint_at): Declare.
17870 (gdb_breakpoint_here): Declare.
17871 (delete_breakpoint_at): Delete.
17872 (delete_gdb_breakpoint_at): Declare.
17873
17874 * server.h (struct raw_breakpoint): Forward declare.
17875 (struct process_info): New field `raw_breakpoints'.
17876
17877 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17878 breakpoints.
17879
17880 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17881
17882 * linux-low.c (status_pending_p_callback): Fix comment.
17883 (linux_wait_for_event_1): Move most of the internal breakpoint
17884 handling from here...
17885 (linux_wait_1): ... to here.
17886 (count_events_callback): New.
17887 (select_singlestep_lwp_callback): New.
17888 (select_event_lwp_callback): New.
17889 (cancel_breakpoints_callback): New.
17890 (select_event_lwp): New.
17891 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17892 priority to all LWPs that have had events that should be reported
17893 to the client. Cancel breakpoints when about to reporting the
17894 event to the client, not while stopping lwps. No longer cancel
17895 finished single-steps here.
17896 (cancel_finished_single_step): Delete.
17897 (cancel_finished_single_steps): Delete.
17898
17899 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17900
17901 * mem-break.c (enum bkpt_type): New.
17902 (struct breakpoint): New field `type'.
17903 (set_breakpoint_at): Change return type to struct breakpoint
17904 pointer. Set type to `other_breakpoint' by default.
17905 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17906 in the breakpoint list.
17907 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17908 (reinsert_breakpoint): Rename to ...
17909 (reinsert_raw_breakpoint): ... this.
17910 (reinsert_breakpoints_at): Adjust.
17911 * mem-break.h (struct breakpoint): Declare.
17912 (set_breakpoint_at): Change return type to struct breakpoint
17913 pointer.
17914
17915 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17916
17917 * server.c (handle_query): Assign, not compare.
17918
17919 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17920
17921 Teach linux gdbserver to step-over-breakpoints.
17922
17923 * linux-low.c (can_hardware_single_step): New.
17924 (supports_breakpoints): New.
17925 (handle_extended_wait): If stopping threads, read the stop pc of
17926 the new cloned LWP.
17927 (get_pc): New.
17928 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17929 low target doesn't support retrieving the PC.
17930 (add_lwp): Set last_resume_kind to resume_continue.
17931 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17932 (linux_attach): Don't clear stop_expected. Set the lwp's
17933 last_resume_kind to resume_stop.
17934 (linux_detach_one_lwp): Don't check for removed breakpoints.
17935 (check_removed_breakpoint): Delete.
17936 (status_pending_p): Rename to ...
17937 (status_pending_p_callback): ... this. Don't check for removed
17938 breakpoints. Don't consider threads that are stopped from GDB's
17939 perspective.
17940 (linux_wait_for_lwp): Always read the stop_pc here.
17941 (cancel_breakpoint): New.
17942 (step_over_bkpt): New global.
17943 (linux_wait_for_event_1): Implement stepping over breakpoints.
17944 (gdb_wants_lwp_stopped): New.
17945 (gdb_wants_all_stopped): New.
17946 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17947 single-step traps here. Store the thread's last reported target
17948 wait status.
17949 (send_sigstop): Don't clear stop_expected. Always set it,
17950 instead.
17951 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17952 (cancel_finished_single_step): New.
17953 (cancel_finished_single_steps): New.
17954 (wait_for_sigstop): Don't cancel finished single-step traps here.
17955 (linux_resume_one_lwp): Don't check for removed breakpoints.
17956 Don't set `step' on non-hardware step archs.
17957 (linux_set_resume_request): Ignore resume_stop requests if already
17958 stopping or stopped. Set the lwp's last_resume_kind.
17959 (resume_status_pending_p): Don't check for removed breakpoints.
17960 (need_step_over_p): New.
17961 (start_step_over): New.
17962 (finish_step_over): New.
17963 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17964 requests. Clear the thread's last reported target waitstatus.
17965 Don't use the `suspended' flag. Don't consider pending breakpoints.
17966 (linux_resume): Start a step-over if necessary.
17967 (proceed_one_lwp): New.
17968 (proceed_all_lwps): New.
17969 (unstop_all_lwps): New.
17970 * linux-low.h (struct lwp_info): Rewrite comment for the
17971 `suspended' flag. Add the `stop_pc' field. Delete the
17972 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17973 Add `'last_resume_kind' and `need_step_over' fields.
17974 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17975 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17976 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17977 (set_raw_breakpoint_at): New.
17978 (set_breakpoint_at): Rewrite to use it.
17979 (reinsert_breakpoint_handler): Delete.
17980 (set_reinsert_breakpoint): New.
17981 (reinsert_breakpoint_by_bp): Delete.
17982 (delete_reinsert_breakpoints): New.
17983 (uninsert_breakpoint): Rewrite.
17984 (uninsert_breakpoints_at): New.
17985 (reinsert_breakpoint): Rewrite.
17986 (reinsert_breakpoints_at): New.
17987 (check_breakpoints): Rewrite.
17988 (breakpoint_here): New.
17989 (breakpoint_inserted_here): New.
17990 (check_mem_read): Adjust.
17991 * mem-break.h (breakpoints_supported, breakpoint_here)
17992 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17993 (reinsert_breakpoint_by_bp): Delete declaration.
17994 (delete_reinsert_breakpoints): Declare.
17995 (reinsert_breakpoint): Delete declaration.
17996 (reinsert_breakpoints_at): Declare.
17997 (uninsert_breakpoint): Delete declaration.
17998 (uninsert_breakpoints_at): Declare.
17999 (check_breakpoints): Adjust prototype.
18000 * server.h: Adjust include order.
18001 (struct thread_info): Declare here. Add a `last_status' field.
18002
18003 2010-03-23 Michael Snyder <msnyder@vmware.com>
18004
18005 * server.c (crc32): New function.
18006 (handle_query): Add handling for 'qCRC:' request.
18007
18008 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18009
18010 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18011 lwp had been stopped by a watchpoint.
18012
18013 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18014
18015 * server.h (internal_error): Declare.
18016 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18017 * utils.c (internal_error): New function.
18018
18019 2010-03-15 Andreas Schwab <schwab@redhat.com>
18020
18021 * configure.srv: Fix typo setting srv_regobj.
18022
18023 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18024
18025 * linux-low.c (fetch_register): Avoid passing a non string literal
18026 format to `error'.
18027 (usr_store_inferior_registers): Ditto.
18028
18029 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18030
18031 * linux-low.c (linux_write_memory): Bail out early if peeking
18032 memory failed.
18033
18034 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18035
18036 * linux-low.h (struct lwp_info): New fields
18037 `stopped_by_watchpoint' and `stopped_data_address'.
18038 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18039 here, and cache them in the lwp object.
18040 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18041 directly.
18042 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18043 field.
18044 (linux_stopped_by_watchpoint): Rewrite.
18045 (linux_stopped_data_address): Rewrite.
18046
18047 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18048
18049 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18050 switching the current inferior, not before.
18051
18052 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18053
18054 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18055 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18056 i386-linux.c and amd64-linux.c.
18057 (reg-i386.o): Removed.
18058 (reg-i386.c): Likewise.
18059 (reg-i386-linux.o): Likewise.
18060 (reg-i386-linux.c): Likewise.
18061 (reg-x86-64.o): Likewise.
18062 (reg-x86-64.c): Likewise.
18063 (reg-x86-64-linux.o): Likewise.
18064 (reg-x86-64-linux.c): Likewise.
18065 (i386.o): New.
18066 (i386.c): Likewise.
18067 (i386-linux.o): Likewise.
18068 (i386-linux.c): Likewise.
18069 (amd64.o): Likewise.
18070 (amd64.c): Likewise.
18071 (amd64-linux.o): Likewise.
18072 (amd64-linux.c): Likewise.
18073
18074 * configure.srv (srv_i386_regobj): New.
18075 (srv_i386_linux_regobj): Likewise.
18076 (srv_amd64_regobj): Likewise.
18077 (srv_amd64_linux_regobj): Likewise.
18078 (srv_i386_32bit_xmlfiles): Likewise.
18079 (srv_i386_64bit_xmlfiles): Likewise.
18080 (srv_i386_xmlfiles): Likewise.
18081 (srv_amd64_xmlfiles): Likewise.
18082 (srv_i386_linux_xmlfiles): Likewise.
18083 (srv_amd64_linux_xmlfiles): Likewise.
18084 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18085 srv_xmlfiles to $srv_i386_xmlfiles.
18086 (i[34567]86-*-mingw32ce*): Likewise.
18087 (i[34567]86-*-mingw*): Likewise.
18088 (i[34567]86-*-nto*): Likewise.
18089 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18090 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18091 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18092 (x86_64-*-linux*): Likewise.
18093
18094 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18095 (init_registers_amd64_linux): New.
18096 (x86_arch_setup): Replace init_registers_x86_64_linux with
18097 init_registers_amd64_linux.
18098
18099 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18100
18101 * configure.ac: Check for libdl. If it is not available link against
18102 static libthread_db.
18103 * configure: Regenerate.
18104
18105 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18106
18107 PR9605
18108
18109 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18110 handing a read watchpoint.
18111 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18112
18113 2010-02-12 Doug Evans <dje@google.com>
18114
18115 * linux-low.c (linux_supports_tracefork_flag): Document.
18116 (linux_look_up_symbols): Add comment.
18117
18118 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18119
18120 * regcache.c (supply_register): Clear regcache if buf is NULL.
18121
18122 2010-02-02 Nicolas Roche <roche@sourceware.org>
18123 Joel Brobecker <brobecker@adacore.com>
18124
18125 * inferiors.c (find_inferior): Add function documentation.
18126 (unloaded_dll): Handle the case where the unloaded dll has not
18127 been previously registered in the dll list.
18128
18129 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18130
18131 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18132 (thumb2_breakpoint): New.
18133 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18134
18135 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18136
18137 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18138 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18139 breakpoints.
18140
18141 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18142
18143 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18144
18145 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18146
18147 * linux-s390-low.c (s390_collect_ptrace_register)
18148 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18149
18150 2010-01-21 Doug Evans <dje@google.com>
18151
18152 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18153 (PTRACE_ARG4_TYPE): New macro.
18154 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18155 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18156 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18157 (usr_store_inferior_registers): Ditto.
18158 (linux_read_memory, linux_write_memory): Ditto.
18159 (linux_test_for_tracefork): Ditto.
18160
18161 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18162 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18163
18164 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18165
18166 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18167 target.
18168
18169 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18170
18171 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18172 prototype to take a regcache. Adjust.
18173
18174 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18175
18176 * regcache.h (struct thread_info): Forward declare.
18177 (struct regcache): New.
18178 (new_register_cache): Adjust prototype.
18179 (get_thread_regcache): Declare.
18180 (free_register_cache): Adjust prototype.
18181 (registers_to_string, registers_from_string): Ditto.
18182 (supply_register, supply_register_by_name, collect_register)
18183 (collect_register_as_string, collect_register_by_name): Ditto.
18184 * regcache.c (struct inferior_regcache_data): Delete.
18185 (get_regcache): Rename to ...
18186 (get_thread_regcache): ... this. Adjust. Switch inferior before
18187 fetching registers.
18188 (regcache_invalidate_one): Adjust.
18189 (regcache_invalidate): Fix prototype.
18190 (new_register_cache): Return the new register cache.
18191 (free_register_cache): Change prototype.
18192 (realloc_register_cache): Adjust.
18193 (registers_to_string): Change prototype to take a regcache. Adjust.
18194 (registers_from_string): Ditto.
18195 (register_data): Ditto.
18196 (supply_register): Ditto.
18197 (supply_register_by_name): Ditto.
18198 (collect_register): Ditto.
18199 (collect_register_as_string): Ditto.
18200 (collect_register_by_name): Ditto.
18201 * server.c (process_serial_event): Adjust.
18202 * linux-low.h (regset_fill_func, regset_store_func): Change
18203 prototype.
18204 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18205 Change prototype.
18206 * linux-low.c (get_stop_pc): Adjust.
18207 (check_removed_breakpoint): Adjust.
18208 (linux_wait_for_event): Adjust.
18209 (linux_resume_one_lwp): Adjust.
18210 (fetch_register): Add regcache parameter. Adjust.
18211 (usr_store_inferior_registers): Ditto.
18212 (regsets_fetch_inferior_registers): Ditto.
18213 (regsets_store_inferior_registers): Ditto.
18214 (linux_fetch_registers, linux_store_registers): Ditto.
18215 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18216 regcache. Adjust.
18217 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18218 Ditto.
18219 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18220 prototype to take a regcache.
18221 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18222 * remote-utils.c (convert_ascii_to_int, outreg)
18223 (prepare_resume_reply): Change prototype to take a regcache.
18224 Adjust.
18225 * target.h (struct target_ops) <fetch_registers, store_registers>:
18226 Change prototype to take a regcache.
18227 (fetch_inferior_registers, store_inferior_registers): Change
18228 prototype to take a regcache. Adjust.
18229 * proc-service.c (ps_lgetregs): Adjust.
18230 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18231 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18232 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18233 take a regcache. Adjust.
18234 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18235 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18236 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18237 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18238 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18239 (cris_cannot_fetch_register):
18240 (cris_breakpoint_at): Change prototype to take a regcache.
18241 Adjust.
18242 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18243 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18244 to take a regcache. Adjust.
18245 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18246 Adjust.
18247 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18248 take a regcache. Adjust.
18249 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18250 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18251 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18252 * linux-mips-low.c (mips_get_pc):
18253 (mips_set_pc): Change prototype to take a regcache. Adjust.
18254 (mips_reinsert_addr): Adjust.
18255 (mips_collect_register): Change prototype to take a regcache.
18256 Adjust.
18257 (mips_supply_register):
18258 (mips_collect_register_32bit, mips_supply_register_32bit)
18259 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18260 (mips_store_fpregset): Ditto.
18261 * linux-ppc-low.c (ppc_supply_ptrace_register)
18262 (ppc_supply_ptrace_register): Ditto.
18263 (parse_spufs_run): Adjust.
18264 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18265 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18266 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18267 take a regcache. Adjust.
18268 * linux-s390-low.c (s390_collect_ptrace_register)
18269 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18270 (s390_set_pc): Change prototype to take a regcache. Adjust.
18271 (s390_arch_setup): Adjust.
18272 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18273 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18274 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18275 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18276 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18277 regcache. Adjust.
18278 (sparc_breakpoint_at): Adjust.
18279 * linux-xtensa-low.c (xtensa_fill_gregset):
18280 (xtensa_store_gregset):
18281 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18282 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18283 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18284 prototype to take a regcache. Adjust.
18285 * win32-arm-low.c (arm_fetch_inferior_register)
18286 (arm_store_inferior_register): Change prototype to take a
18287 regcache. Adjust.
18288 * win32-i386-low.c (i386_fetch_inferior_register)
18289 (i386_store_inferior_register): Change prototype to take a
18290 regcache. Adjust.
18291 * win32-low.c (child_fetch_inferior_registers)
18292 (child_store_inferior_registers): Change prototype to take a
18293 regcache. Adjust.
18294 (win32_wait): Adjust.
18295 (win32_fetch_inferior_registers): Change prototype to take a
18296 regcache. Adjust.
18297 (win32_store_inferior_registers): Adjust.
18298 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18299 store_inferior_register>: Change prototype to take a regcache.
18300
18301 2010-01-20 Doug Evans <dje@google.com>
18302
18303 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18304 #ifdef.
18305 (linux_wait_for_event1, linux_init_signals): Ditto.
18306 (W_STOPCODE): Provide definition if missing.
18307
18308 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18309
18310 * linux-low.c (linux_core_of_thread): New.
18311 (compare_ints, show_process, list_threads): New.
18312 (linux_qxfer_osdata): Report threads and cores.
18313 (linux_target_op): Register linux_core_of_thread.
18314 * remote-utils.c (prepare_resume_reply): Report the core.
18315 (buffer_xml_printf): Support %d specifier.
18316 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18317 New.
18318 (handle_query): Handle qXfer:threads. Announce availability
18319 thereof.
18320 * target.h (struct target_ops): New field core_of_thread.
18321
18322 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18323
18324 * Makefile.in (clean): Remove new generated files.
18325 (reg-s390.o, reg-s390.c): Remove rules.
18326 (reg-s390x.o, reg-s390x.c): Likewise.
18327 (s390-linux32.o, s390-linux32.c): Add rules.
18328 (s390-linux64.o, s390-linux64.c): Likewise.
18329 (s390x-linux64.o, s390x-linux64.c): Likewise.
18330 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18331 * linux-s390-low.c: Include <elf.h>.
18332 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18333 (init_registers_s390): Remove prototype.
18334 (init_registers_s390x): Likewise.
18335 (init_registers_s390_linux32): Add prototype.
18336 (init_registers_s390_linux64): Likewise.
18337 (init_registers_s390x_linux64): Likewise.
18338 (s390_num_regs_3264): New define.
18339 (s390_regmap_3264): New global variable.
18340 (s390_cannot_fetch_register): Remove obsolete check.
18341 (s390_cannot_store_register): Likewise.
18342 (s390_collect_ptrace_register): Handle upper/lower register halves.
18343 (s390_supply_ptrace_register): Likewise.
18344 (s390_fill_gregset): Update to register number changes.
18345 (s390_get_hwcap): New routine.
18346 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18347 Install appropriate regmap and register set.
18348
18349 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18350
18351 * server.c (gdbserver_version): Update copyright year to 2010.
18352 * gdbreplay.c (gdbreplay_version): Likewise.
18353
18354 2009-12-28 Doug Evans <dje@google.com>
18355
18356 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18357 elf/external.h. Include <elf.h> instead but only if necessary.
18358
18359 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18360
18361 * linux-low.c (linux_remove_process): Remove `detaching'
18362 parameter. Don't release/detach from thread_db here.
18363 (linux_kill): Release/detach from thread_db here, ...
18364 (linux_detach): ... and here, before actually detaching.
18365 (linux_wait_1): ... and here, when a process exits.
18366 * thread-db.c (any_thread_of): New.
18367 (thread_db_free): Switch the current inferior to a thread of the
18368 passed in process.
18369
18370 2009-12-21 Doug Evans <dje@google.com>
18371
18372 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18373
18374 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18375 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18376 warning ifndef __NR_tkill. Move setting of errno there too.
18377 Delete unnecessary resetting of errno after syscall.
18378 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18379
18380 * configure.ac: Check for dladdr.
18381 * config.in: Regenerate.
18382 * configure: Regenerate.
18383 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18384 (try_thread_db_load): Update.
18385
18386 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18387
18388 2009-12-18 Doug Evans <dje@google.com>
18389
18390 * event-loop.c: Include unistd.h if it exists.
18391
18392 * linux-low.c (my_waitpid): Move definition away from being in
18393 between linux_tracefork_child/linux_test_for_tracefork.
18394
18395 * gdb_proc_service.h (psaddr_t): Fix type.
18396 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18397 signature to match glibc.
18398
18399 2009-12-16 Doug Evans <dje@google.com>
18400
18401 * linux-low.c (linux_read_memory): Fix argument to read.
18402
18403 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18404
18405 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18406 events, don't leave current_inferior pointing at null.
18407
18408 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18409
18410 * win32-low.c (LOG): Delete.
18411 (OUTMSG): Output to stderr.
18412 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18413 on compile time LOG macro.
18414 (win32_wait): Fix debug output.
18415
18416 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18417
18418 * win32-low.c (win32_add_one_solib): If the dll name is
18419 "ntdll.dll", prepend the system directory to the dll path.
18420
18421 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18422
18423 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18424
18425 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18426 Vladimir Prus <vladimir@codesourcery.com>
18427
18428 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18429 * configure.ac: Check for __mcoldfire__ and set
18430 gdb_cv_m68k_is_coldfire.
18431 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18432 reg-cf.o and reg-m68k.o.
18433 * configure: Regenerated.
18434
18435 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18436
18437 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18438 Pass it to thread_db_free.
18439 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18440 proper `detaching' argument to linux_remove_process.
18441 * linux-low.h (thread_db_free): Add `detaching' parameter.
18442 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18443 to thread_db_free.
18444 (thread_db_free): Add `detaching' parameter. Only
18445 call td_ta_clear_event if detaching from process.
18446
18447 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18448
18449 * thread-db.c (thread_db_free): Fix typo.
18450
18451 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18452
18453 PR gdb/10838
18454 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18455
18456 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18457
18458 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18459 with an i686 compiler.
18460 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18461 needed.
18462 * configure: Rebuilt.
18463
18464 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18465
18466 PR gdb/10783
18467
18468 * server.c (handle_search_memory_1): Correct read_addr initialization
18469 in loop for searching subsequent chunks.
18470
18471 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18472
18473 * configure.ac: New --with-libthread-db option.
18474 * thread-db.c: Allow direct dependence on libthread_db.
18475 (thread_db_free): Adjust.
18476 * config.in: Regenerate.
18477 * configure: Likewise.
18478
18479 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18480
18481 PR gdb/10757
18482 * thread-db.c (attach_thread): New function.
18483 (maybe_attach_thread): Return success/failure.
18484 (find_new_threads_callback): Adjust.
18485 (thread_db_find_new_threads): Loop until no new threads.
18486
18487 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18488
18489 * proc-service.c (ps_lgetregs): Formatting.
18490
18491 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18492
18493 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18494 * configure.ac: Adjust.
18495 * linux-low.h (struct process_info_private): Move members to struct
18496 thread_db.
18497 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18498 * linux-low.c (linux_remove_process): Adjust.
18499 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18500 * server.c (handle_query): Move code ...
18501 (handle_monitor_command): ... here. New function.
18502 * target.h (struct target_ops): New member.
18503 * thread-db.c (struct thread_db): New.
18504 (libthread_db_search_path): New variable.
18505 (thread_db_create_event, thread_db_enable_reporting)
18506 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18507 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18508 (try_thread_db_load_1, dladdr_to_soname): New functions.
18509 (try_thread_db_load, thread_db_load_search): New functions.
18510 (thread_db_init): Search for libthread_db.
18511 (thread_db_free): New function.
18512 (thread_db_handle_monitor_command): Likewise.
18513 * config.in: Regenerate.
18514 * configure: Regenerate.
18515
18516 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18517
18518 * spu-low.c (spu_kill): Wait for inferior to terminate.
18519 Call clear_inferiors.
18520 (spu_detach): Call clear_inferiors.
18521
18522 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18523
18524 * aclocal.m4: Regenerate.
18525 * config.in: Likewise.
18526 * configure: Likewise.
18527
18528 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18529
18530 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18531 (parse_spufs_run): New function.
18532 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18533 (ppc_breakpoint_at): Handle SPU breakpoints.
18534
18535 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18536
18537 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18538 (SPUFS_MAGIC): Define.
18539 (spu_enumerate_spu_ids): New function.
18540 (linux_qxfer_spu): New function.
18541 (linux_target_ops): Install linux_qxfer_spu.
18542
18543 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18544
18545 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18546 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18547 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18548 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18549 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18550 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18551 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18552 (init_registers_powerpc_cell32l): Add prototype.
18553 (init_registers_powerpc_cell64l): Likewise.
18554 (ppc_arch_setup): Detect Cell/B.E. architecture.
18555
18556 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18557
18558 * Makefile.in (datarootdir): New variable.
18559
18560 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18561
18562 * linux-low.c (linux_write_memory): Update debugging output.
18563 * Makefile.in (clean): Add new descriptions.
18564 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18565 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18566 * configure.srv: Add new files for arm*-*-linux*.
18567 * linux-arm-low.c: Add new declarations.
18568 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18569 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18570 (HWCAP_VFPv3D16): New.
18571 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18572 instead of __IWMMXT__.
18573 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18574 (arm_arch_setup): New.
18575 (target_regsets): Remove #ifdef. Add VFP regset.
18576 (the_low_target): Use arm_arch_setup.
18577
18578 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18579
18580 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18581 the main thread again.
18582
18583 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18584
18585 Adding Neutrino gdbserver.
18586 * configure: Regenerated.
18587 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18588 * configure.srv (i[34567]86-*-nto*): New target.
18589 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18590 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18591 (nto_comctrl) [__QNX__]: New function.
18592 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18593
18594 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18595
18596 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18597 srv_tgtobj.
18598
18599 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18600 Pedro Alves <pedro@codesourcery.com>
18601
18602 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18603 don't support CONTEXT_EXTENDED_REGISTERS.
18604 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18605 (the_low_target): Install them.
18606 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18607 failing with ERROR_PIPE_NOT_CONNECTED.
18608
18609 2009-06-30 Doug Evans <dje@google.com>
18610 Pierre Muller <muller@ics.u-strasbg.fr>
18611
18612 Add h/w watchpoint support to x86-linux, win32-i386.
18613 * Makefile.in (SFILES): Add i386-low.c
18614 (i386_low_h): Define.
18615 (i386-low.o): Add dependencies.
18616 (linux-x86-low.o): Add i386-low.h dependency.
18617 (win32-i386-low.o): Ditto.
18618 * i386-low.c: New file.
18619 * i386-low.h: New file.
18620 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18621 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18622 * linux-low.c (linux_add_process): Initialize arch_private.
18623 (linux_remove_process): Free arch_private.
18624 (add_lwp): Initialize arch_private.
18625 (delete_lwp): Free arch_private.
18626 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18627 provided.
18628 * linux-low.h (process_info_private): New member arch_private.
18629 (lwp_info): New member arch_private.
18630 (linux_target_ops): New members new_process, new_thread,
18631 prepare_to_resume.
18632 (ptid_of): New macro.
18633 * linux-x86-low.c: Include stddef.h, i386-low.h.
18634 (arch_process_info): New struct.
18635 (arch_lwp_info): New struct.
18636 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18637 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18638 (i386_dr_low_get_status): New function.
18639 (x86_insert_point, x86_remove_point): New functions.
18640 (x86_stopped_by_watchpoint): New function.
18641 (x86_stopped_data_address): New function.
18642 (x86_linux_new_process, x86_linux_new_thread): New functions.
18643 (x86_linux_prepare_to_resume): New function.
18644 (the_low_target): Add entries for insert_point, remove_point,
18645 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18646 prepare_to_resume.
18647 * server.c (debug_hw_points): New global.
18648 (monitor_show_help): Document set debug-hw-points.
18649 (handle_query): Process "set debug-hw-points".
18650 * server.h (debug_hw_points): Declare.
18651 (paddress): Declare.
18652 * utils.c (NUMCELLS, CELLSIZE): New macros.
18653 (get_sell, xsnprintf, paddress): New functions.
18654 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18655 remove_point, stopped_by_watchpoint, stopped_data_address.
18656 * win32-i386-low.c: Include i386-low.h.
18657 (debug_reg_state): Replaces dr.
18658 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18659 (i386_dr_low_get_status): New function.
18660 (i386_insert_point, i386_remove_point): New functions.
18661 (i386_stopped_by_watchpoint): New function.
18662 (i386_stopped_data_address): New function.
18663 (i386_initial_stuff): Update.
18664 (get_thread_context,set_thread_context,i386_thread_added): Update.
18665 (the_low_target): Add entries for insert_point,
18666 remove_point, stopped_by_watchpoint, stopped_data_address.
18667 * win32-low.c (win32_insert_watchpoint): New function.
18668 (win32_remove_watchpoint): New function.
18669 (win32_stopped_by_watchpoint): New function.
18670 (win32_stopped_data_address): New function.
18671 (win32_target_ops): Add entries for insert_watchpoint,
18672 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18673 * win32-low.h (win32_target_ops): New members insert_point,
18674 remove_point, stopped_by_watchpoint, stopped_data_address.
18675
18676 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18677
18678 * server.c (process_serial_event): Re-return unsupported, not
18679 error, if the type isn't recognized. Re-allow supporting only
18680 insert or remove packets. Also call require_running for
18681 breakpoints. Add missing break statement to default case. Tidy.
18682 * target.h (struct target_ops): Rename insert_watchpoint to
18683 insert_point, and remove_watchpoint to remove_point.
18684
18685 * linux-low.h (struct linux_target_ops): Likewise.
18686 * linux-low.c (linux_insert_watchpoint): Rename to ...
18687 (linux_insert_point): ... this. Adjust.
18688 (linux_remove_watchpoint): Rename to ...
18689 (linux_remove_point): ... this. Adjust.
18690 (linux_target_ops): Adjust.
18691 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18692 (cris_insert_point): ... this.
18693 (cris_remove_watchpoint): Rename to ...
18694 (cris_remove_point): ... this.
18695 (the_low_target): Adjust.
18696
18697 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18698
18699 * server.c (handle_v_kill): Pass signal_pid to
18700 kill_inferior if multi_process is zero.
18701
18702 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18703
18704 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18705 * target.h (target_ops): Comment for *_watchpoint to make it clear
18706 the functions can get types '0' and '1'.
18707
18708 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18709
18710 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18711 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18712 * regcache.c (get_regcache): Likewise.
18713 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18714 * win32-low.c (child_fetch_inferior_registers): Remove check for
18715 regno 0.
18716
18717 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18718 Pedro Alves <pedro@codesourcery.com>
18719
18720 * target.h (struct target_ops) <supports_multi_process>: New
18721 callback.
18722 (target_supports_multi_process): New.
18723 * server.c (handle_query): Even if GDB reports support, only
18724 enable multi-process if the target also supports it. Report
18725 multi-process support only if the target backend supports it.
18726 * linux-low.c (linux_supports_multi_process): New function.
18727 (linux_target_ops): Install it as target_supports_multi_process
18728 callback.
18729
18730 2009-05-24 Doug Evans <dje@google.com>
18731
18732 Global renaming of find_thread_pid to find_thread_ptid.
18733 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18734 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18735 All callers updated.
18736
18737 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18738 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18739 directly.
18740
18741 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18742 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18743 (linux_resume_one_lwp): Ditto.
18744
18745 2009-05-23 Doug Evans <dje@google.com>
18746
18747 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18748 from struct inferior_list_entry * to struct lwp_info *.
18749 All callers updated.
18750
18751 2009-05-13 Doug Evans <dje@google.com>
18752
18753 * linux-x86-low.c: Don't include assert.h.
18754 (x86_siginfo_fixup): Use fatal, not assert.
18755 (x86_arch_setup): Fix comment.
18756
18757 2009-05-12 Doug Evans <dje@google.com>
18758
18759 Biarch support for i386/amd64 gdbserver.
18760 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18761 Add linux-x86-low.c.
18762 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18763 (linux-x86-low.o): Add.
18764 * linux-x86-64-low.c: Delete.
18765 * linux-i386-low.c: Delete.
18766 * linux-x86-low.c: New file.
18767 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18768 linux-x86-low.o.
18769 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18770 linux-x86-low.o.
18771 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18772 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18773 (linux_child_pid_to_exec_file): New function.
18774 (elf_64_header_p, elf_64_file_p): New functions.
18775 (siginfo_fixup): New function.
18776 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18777 give target a chance to convert layout.
18778 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18779 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18780
18781 2009-05-07 Doug Evans <dje@google.com>
18782
18783 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18784 (regsets_store_inferior_registers): Ditto.
18785
18786 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18787
18788 PR server/10048
18789
18790 * linux-low.c (must_set_ptrace_flags): Delete.
18791 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18792 of the global.
18793 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18794 `lwp->must_set_ptrace_flags' instead.
18795 (linux_wait_for_event_1): Set ptrace options here.
18796 (linux_wait_1): ... not here.
18797
18798 2009-04-30 Doug Evans <dje@google.com>
18799
18800 * inferiors.c (started_inferior_callback): New function.
18801 (attached_inferior_callback): New function.
18802 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18803 * server.c (print_started_pid, print_attached_pid): New functions.
18804 (detach_or_kill_for_exit): New function.
18805 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18806 * server.h (have_started_inferiors_p): Declare.
18807 (have_attached_inferiors_p): Declare.
18808
18809 * inferiors.c (remove_process): Fix memory leak, free process.
18810 * linux-low.c (linux_remove_process): New function.
18811 (linux_kill): Call it instead of remove_process.
18812 (linux_detach, linux_wait_1): Ditto.
18813
18814 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18815
18816 * configure.srv: Add x86 Windows CE target.
18817
18818 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18819
18820 * inferiors.c (get_thread_process): Make global.
18821 * server.h (get_thread_process): Add prototype.
18822 * thread-db.c (find_one_thread): Use get_thread_process
18823 instead of current_process.
18824 (thread_db_get_tls_address): Do not crash if called when
18825 thread layer is not yet initialized.
18826
18827 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18828
18829 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18830 * spu-low.c (current_tid): Rename to ...
18831 (current_ptid): ... this.
18832 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18833 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18834 ptid_get_lwp (current_ptid) instead of current_tid.
18835 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18836 instead of current_tid. Use find_process_pid to verify pid
18837 argument is valid. Pass proper argument to remove_process.
18838 (spu_thread_alive): Compare current_ptid instead of current_tid.
18839 (spu_resume): Likewise.
18840
18841 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18842
18843 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18844 variable.
18845
18846 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18847
18848 Implement the multiprocess extensions, and add linux multiprocess
18849 support.
18850
18851 * server.h (ULONGEST): Declare.
18852 (struct ptid, ptid_t): New.
18853 (minus_one_ptid, null_ptid): Declare.
18854 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18855 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18856 (struct inferior_list_entry): Change `id' type from unsigned from
18857 to ptid_t.
18858 (struct sym_cache, struct breakpoint, struct
18859 process_info_private): Forward declare.
18860 (struct process_info): Declare.
18861 (current_process): Declare.
18862 (all_processes): Declare.
18863 (initialize_inferiors): Declare.
18864 (add_thread): Adjust to use ptid_t.
18865 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18866 (add_process, remove_process, find_thread_pid): Declare.
18867 (find_inferior_id): Adjust to use ptid_t.
18868 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18869 (multi_process): Declare.
18870 (push_event): Adjust to use ptid_t.
18871 (read_ptid, write_ptid): Declare.
18872 (prepare_resume_reply): Adjust to use ptid_t.
18873 (clear_symbol_cache): Declare.
18874 * inferiors.c (all_processes): New.
18875 (null_ptid, minus_one_ptid): New.
18876 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18877 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18878 (add_thread): Change unsigned long to ptid. Remove gdb_id
18879 parameter. Adjust.
18880 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18881 (gdb_id_to_thread): Rename to ...
18882 (find_thread_pid): ... this. Change unsigned long to ptid.
18883 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18884 (loaded_dll, pull_pid_from_list): Adjust.
18885 (add_process, remove_process, find_process_pid)
18886 (get_thread_process, current_process, initialize_inferiors): New.
18887 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18888 (struct target_waitstatus) <related_pid>: Ditto.
18889 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18890 return type to int.
18891 (struct target_ops) <join>: Add `pid' argument.
18892 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18893 (struct target_ops) <wait>: Add `ptid' field. Change return type
18894 to ptid.
18895 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18896 (mywait): Add `ptid' argument. Change return type to ptid_t.
18897 (target_pid_to_str): Declare.
18898 * target.c (set_desired_inferior): Adjust to use ptids.
18899 (mywait): Add new `ptid' argument. Adjust.
18900 (target_pid_to_str): New.
18901 * mem-break.h (free_all_breakpoints): Declare.
18902 * mem-break.c (breakpoints): Delelete.
18903 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18904 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18905 to use per-process breakpoint list.
18906 (free_all_breakpoints): New.
18907 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18908 (symbol_cache, all_symbols_looked_up): Delete.
18909 (hexchars): New.
18910 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18911 read_ptid): New.
18912 (prepare_resume_reply): Change ptid argument's type from unsigned
18913 long to ptid_t. Adjust. Implement W;process and X;process.
18914 (free_sym_cache, clear_symbol_cache): New.
18915 (look_up_one_symbol): Adjust to per-process symbol cache. *
18916 * server.c (cont_thread, general_thread, step_thread): Change type
18917 to ptid_t.
18918 (attached): Delete.
18919 (multi_process): New.
18920 (last_ptid): Change type to ptid_t.
18921 (struct vstop_notif) <ptid>: Change type to ptid_t.
18922 (queue_stop_reply, push_event): Change `ptid' argument's type to
18923 ptid_t.
18924 (discard_queued_stop_replies): Add `pid' argument.
18925 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18926 changes. Don't reference the `attached' global.
18927 (attach_inferior): Adjust to mywait interface changes.
18928 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18929 features. Handle and report "multiprocess+". Handle
18930 "qAttached:PID".
18931 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18932 changes.
18933 (handle_v_kill): New.
18934 (handle_v_stopped): Adjust to use target_pid_to_str.
18935 (handle_v_requests): Allow multiple attaches and runs when
18936 multiprocess extensions are in effect. Handle "vKill".
18937 (myresume): Adjust to use ptids.
18938 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18939 (handle_status): Adjust to discard_queued_stop_replies interface
18940 change.
18941 (first_thread_of, kill_inferior_callback)
18942 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18943 (main): Call initialize_inferiors. Adjust to use ptids, killing
18944 and detaching from all inferiors. Handle multiprocess packet
18945 variants.
18946 * linux-low.h: Include gdb_proc_service.h.
18947 (struct process_info_private): New.
18948 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18949 <lwpid_of>: Use ptid_get_lwp.
18950 (get_lwp_thread): Adjust.
18951 (struct lwp_info): Add `dead' member.
18952 (find_lwp_pid): Declare.
18953 * linux-low.c (thread_db_active): Delete.
18954 (new_inferior): Adjust comment.
18955 (inferior_pid): Delete.
18956 (linux_add_process): New.
18957 (handle_extended_wait): Adjust.
18958 (add_lwp): Change unsigned long to ptid.
18959 (linux_create_inferior): Add process to processes table. Adjust
18960 to use ptids. Don't set new_inferior here.
18961 (linux_attach_lwp): Rename to ...
18962 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18963 it. Adjust to use ptids.
18964 (linux_attach_lwp): New.
18965 (linux_attach): Add process to processes table. Don't set
18966 new_inferior here.
18967 (struct counter): New.
18968 (second_thread_of_pid_p, last_thread_of_process_p): New.
18969 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18970 multiple processes.
18971 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18972 processes. Remove process from process table.
18973 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18974 to multiple processes.
18975 (any_thread_of): New.
18976 (linux_detach): Add `pid' argument, and handle it. Remove process
18977 from processes table.
18978 (linux_join): Add `pid' argument. Handle it.
18979 (linux_thread_alive): Change unsighed long argument to ptid_t.
18980 Consider dead lwps as not being alive.
18981 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18982 threads we're not interested in.
18983 (same_lwp, find_lwp_pid): New.
18984 (linux_wait_for_lwp): Change `pid' argument's type from int to
18985 ptid_t. Adjust.
18986 (linux_wait_for_event): Rename to ...
18987 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18988 from int to ptid_t. Adjust.
18989 (linux_wait_for_event): New.
18990 (linux_wait_1): Add `ptid' argument. Change return type to
18991 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18992 that exit from the process table.
18993 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18994 Adjust.
18995 (mark_lwp_dead): New.
18996 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18997 stopping all threads, mark its main lwp as dead.
18998 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18999 ptids.
19000 (fetch_register, usr_store_inferior_registers)
19001 (regsets_fetch_inferior_registers)
19002 (regsets_store_inferior_registers, linux_read_memory)
19003 (linux_write_memory): Inline `inferior_pid'.
19004 (linux_look_up_symbols): Adjust to use per-process
19005 `thread_db_active'.
19006 (linux_request_interrupt): Adjust to use ptids.
19007 (linux_read_auxv): Inline `inferior_pid'.
19008 (initialize_low): Don't reference thread_db_active.
19009 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19010 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19011 (ps_getpid): Return the pid of the current inferior.
19012 * thread-db.c (proc_handle, thread_agent): Delete.
19013 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19014 per-process data.
19015 (find_one_thread): Change argument type to ptid_t. Adjust to
19016 per-process data.
19017 (maybe_attach_thread): Adjust to per-process data and ptids.
19018 (thread_db_find_new_threads): Ditto.
19019 (thread_db_init): Ditto.
19020 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19021 processes table. Adjust to use ptids.
19022 (spu_kill, spu_detach): Adjust interface. Remove process from
19023 processes table.
19024 (spu_join, spu_thread_alive): Adjust interface.
19025 (spu_wait): Adjust interface. Remove process from processes
19026 table. Adjust to use ptids.
19027 * win32-low.c (current_inferior_tid): Delete.
19028 (current_inferior_ptid): New.
19029 (debug_event_ptid): New.
19030 (thread_rec): Take a ptid. Adjust.
19031 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19032 (child_delete_thread): Ditto.
19033 (do_initial_child_stuff): Add `attached' argument. Add process to
19034 processes table.
19035 (child_fetch_inferior_registers, child_store_inferior_registers):
19036 Adjust.
19037 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19038 (win32_attach): Pass 1 to do_initial_child_stuff.
19039 (win32_kill): Adjust interface. Remove process from processes
19040 table.
19041 (win32_detach): Ditto.
19042 (win32_join): Adjust interface.
19043 (win32_thread_alive): Take a ptid.
19044 (win32_resume): Adjust to use ptids.
19045 (get_child_debug_event): Ditto.
19046 (win32_wait): Adjust interface. Remove exiting process from
19047 processes table.
19048
19049 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19050
19051 Non-stop mode support.
19052
19053 * server.h (non_stop): Declare.
19054 (gdb_client_data, handler_func): Declare.
19055 (delete_file_handler, add_file_handler, start_event_loop):
19056 Declare.
19057 (handle_serial_event, handle_target_event, push_event)
19058 (putpkt_notif): Declare.
19059 * target.h (enum resume_kind): New.
19060 (struct thread_resume): Replace `step' field by `kind' field.
19061 (TARGET_WNOHANG): Define.
19062 (struct target_ops) <wait>: Add `options' argument.
19063 <supports_non_stop, async, start_non_stop>: New fields.
19064 (target_supports_non_stop, target_async): New.
19065 (start_non_stop): Declare.
19066 (mywait): Add `options' argument.
19067 * target.c (mywait): Add `options' argument. Print child exit
19068 notifications here.
19069 (start_non_stop): New.
19070 * server.c (non_stop, own_buf, mem_buf): New globals.
19071 (struct vstop_notif): New.
19072 (notif_queue): New global.
19073 (queue_stop_reply, push_event, discard_queued_stop_replies)
19074 (send_next_stop_reply): New.
19075 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19076 interface changes.
19077 (attach_inferior): In non-stop mode, don't wait for the target
19078 here.
19079 (handle_general_set): Handle QNonStop.
19080 (handle_query): When handling qC, return the current general
19081 thread, instead of the first thread of the list.
19082 (handle_query): If the backend supports non-stop mode, include
19083 QNonStop+ in the qSupported query response.
19084 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19085 and non-stop mode.
19086 (handle_v_attach, handle_v_run): Handle non-stop mode.
19087 (handle_v_stopped): New.
19088 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19089 (myresume): Adjust to use resume_kind. Handle non-stop.
19090 (queue_stop_reply_callback): New.
19091 (handle_status): Handle non-stop mode.
19092 (main): Clear non_stop flag on reconnection. Use the event-loop.
19093 Refactor serial protocol handling from here ...
19094 (process_serial_event): ... to this new function. When GDB
19095 selects any thread, select one here. In non-stop mode, wait until
19096 GDB acks all pending events before exiting.
19097 (handle_serial_event, handle_target_event): New.
19098 * remote-utils.c (remote_open): Install remote_desc in the event
19099 loop.
19100 (remote_close): Remove remote_desc from the event loop.
19101 (putpkt_binary): Rename to...
19102 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19103 (putpkt_binary): New as wrapper around putpkt_binary_1.
19104 (putpkt_notif): New.
19105 (prepare_resume_reply): In non-stop mode, don't change the
19106 general_thread.
19107 * event-loop.c: New.
19108 * Makefile.in (OBJ): Add event-loop.o.
19109 (event-loop.o): New rule.
19110
19111 * linux-low.h (pid_of): Moved here.
19112 (lwpid_of): New.
19113 (get_lwp_thread): Use lwpid_of.
19114 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19115 * linux-low.c (pid_of): Delete.
19116 (inferior_pid): Use lwpid_of.
19117 (linux_event_pipe): New.
19118 (target_is_async_p): New.
19119 (delete_lwp): New.
19120 (handle_extended_wait): Use lwpid_of.
19121 (add_lwp): Don't set lwpid field.
19122 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19123 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19124 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19125 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19126 first. Adjust to linux_wait_for_event interface changes. Use
19127 lwpid_of.
19128 (linux_detach): Don't delete the main lwp here.
19129 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19130 (status_pending_p): Don't consider explicitly suspended lwps.
19131 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19132 pointer. Add OPTIONS argument. Change return type to int. Use
19133 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19134 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19135 pointer. Add status pointer argument. Return a pid instead of a
19136 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19137 changes. In non-stop mode, don't switch to a random thread.
19138 (linux_wait): Rename to...
19139 (linux_wait_1): ... this. Add target_options argument, and handle
19140 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19141 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19142 clean exit and signal exit code. Don't stop all threads in
19143 non-stop mode. In all-stop mode, only stop all threads when
19144 reporting a stop to GDB. Handle explicit thread stop requests.
19145 (async_file_flush, async_file_mark): New.
19146 (linux_wait): New.
19147 (send_sigstop): Use lwpid_of.
19148 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19149 interface changes. In non-stop mode, don't switch to a random
19150 thread.
19151 (linux_resume_one_lwp): Use lwpid_of.
19152 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19153 (linux_resume_one_thread): ... this. Handle resume_stop. In
19154 non-stop mode, don't look for pending flag in all threads.
19155 (resume_status_pending_p): Don't consider explicitly suspended
19156 threads.
19157 (my_waitpid): Reimplement. Emulate __WALL.
19158 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19159 Use lwpid_of.
19160 (sigchld_handler, linux_supports_non_stop, linux_async)
19161 (linux_start_non_stop): New.
19162 (linux_target_ops): Register linux_supports_non_stop, linux_async
19163 and linux_start_non_stop.
19164 (initialize_low): Install SIGCHLD handler.
19165 * thread-db.c (thread_db_create_event, find_one_thread)
19166 (thread_db_get_tls_address): Use lwpid_of.
19167 * win32-low.c (win32_detach): Adjust to use resume_kind.
19168 (win32_wait): Add `options' argument.
19169 * spu-low.c (spu_resume): Adjust to use resume_kind.
19170 (spu_wait): Add `options' argument.
19171
19172 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19173
19174 Decouple target code from remote protocol.
19175
19176 * target.h (enum target_waitkind): New.
19177 (struct target_waitstatus): New.
19178 (struct target_ops) <wait>: Return an unsigned long. Take a
19179 target_waitstatus pointer instead of a char pointer.
19180 (mywait): Likewise.
19181 * target.c (mywait): Change prototype to return an unsigned long.
19182 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19183 * server.h (thread_from_wait, old_thread_from_wait): Delete
19184 declarations.
19185 (prepare_resume_reply): Change prototype to take a
19186 target_waitstatus.
19187 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19188 (last_status, last_ptid): New.
19189 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19190 pid instead of a signal.
19191 (attach_inferior): Remove "status" and "signal" parameters.
19192 Adjust.
19193 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19194 not as an address.
19195 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19196 (handle_v_requests, myresume): Remove "status" and "signal"
19197 parameters. Adjust.
19198 (handle_status): New.
19199 (main): Delete local `status'. Adjust.
19200 * remote-utils.c: Include target.h.
19201 (prepare_resume_reply): Change prototype to take a
19202 target_waitstatus. Adjust.
19203
19204 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19205 interface.
19206 * spu-low.c (spu_wait): Adjust.
19207 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19208 Delete.
19209 (win32_wait): Adjust.
19210
19211 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19212
19213 * target.h (struct thread_resume): Delete leave_stopped member.
19214 (struct target_ops): Add a `n' argument to the `resume' callback.
19215 * server.c (start_inferior): Adjust.
19216 (handle_v_cont, myresume): Adjust.
19217 * linux-low.c (check_removed_breakpoint): Adjust to resume
19218 interface change, and to removed leave_stopped field.
19219 (resume_ptr): Delete.
19220 (struct thread_resume_array): New.
19221 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19222 resume interface change.
19223 (linux_continue_one_thread, linux_queue_one_thread)
19224 (resume_status_pending_p): Check if the resume field is NULL
19225 instead of checking the leave_stopped member.
19226 (linux_resume): Adjust to the target resume interface change.
19227 * spu-low.c (spu_resume): Adjust to the target resume interface
19228 change.
19229 * win32-low.c (win32_detach, win32_resume): Ditto.
19230
19231 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19232
19233 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19234 flag.
19235 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19236 pending.
19237 (linux_continue_one_thread): Only preserve the stepping flag if
19238 there's a pending breakpoint.
19239
19240 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19241
19242 * server.c (main): After the inferior having exited, call
19243 remote_close before exiting gdbserver.
19244
19245 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19246
19247 Fix size of FPSCR in Power 7 processors.
19248 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19249 (PPC_FEATURE_HAS_DFP): New #define.
19250 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19251 size of the FPSCR.
19252
19253 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19254
19255 * server.c (handle_query) Whitespace and formatting.
19256
19257 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19258
19259 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19260 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19261 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19262 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19263 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19264 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19265 Makefile.in, configure.ac: Fix whitespace throughout.
19266 * configure: Regenerate.
19267
19268 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19269
19270 * inferiors.c (find_inferior): Make it safe for the callback
19271 function to delete the currently iterated inferior.
19272
19273 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19274
19275 * Makefile.in (linuw_low_h): Move higher.
19276 (thread-db.o): Depend on $(linux_low_h).
19277
19278 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19279
19280 Rename "process" to "lwp" throughout.
19281
19282 * linux-low.c (all_processes): Rename to...
19283 (all_lwps): ... this.
19284 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19285 (add_process): Rename to ...
19286 (add_lwp): ... this. Adjust.
19287 (linux_create_inferior): Adjust.
19288 (linux_attach_lwp): Adjust.
19289 (linux_attach): Adjust.
19290 (linux_kill_one_process): Rename to ...
19291 (linux_kill_one_lwp): ... this. Adjust.
19292 (linux_kill): Adjust.
19293 (linux_detach_one_process): Rename to ...
19294 (linux_detach_one_lwp): ... this. Adjust.
19295 (linux_detach): Adjust.
19296 (check_removed_breakpoint): Adjust.
19297 (status_pending_p): Adjust.
19298 (linux_wait_for_process): Rename to ...
19299 (linux_wait_for_lwp): ... this. Adjust.
19300 (linux_wait_for_event): Adjust.
19301 (send_sigstop): Adjust.
19302 (wait_for_sigstop): Adjust.
19303 (stop_all_processes): Rename to ...
19304 (stop_all_lwps): ... this.
19305 (linux_resume_one_process): Rename to ...
19306 (linux_resume_one_lwp): ... this. Adjust.
19307 (linux_set_resume_request, linux_continue_one_thread)
19308 (linux_queue_one_thread, resume_status_pending_p)
19309 (usr_store_inferior_registers, regsets_store_inferior_registers)
19310 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19311 Adjust.
19312 * linux-low.h (get_process): Rename to ...
19313 (get_lwp): ... this. Adjust.
19314 (get_thread_process): Rename to ...
19315 (get_thread_lwp): ... this. Adjust.
19316 (get_process_thread): Rename to ...
19317 (get_lwp_thread): ... this. Adjust.
19318 (struct process_info): Rename to ...
19319 (struct lwp_info): ... this.
19320 (all_processes): Rename to ...
19321 (all_lwps): ... this.
19322 * proc-service.c (ps_lgetregs): Adjust.
19323 * thread-db.c (thread_db_create_event, find_one_thread)
19324 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19325
19326 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19327
19328 * server.c (handle_query): Handle "qAttached".
19329
19330 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19331
19332 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19333 GPLv3, update license URL.
19334
19335 2009-03-01 Doug Evans <dje@google.com>
19336
19337 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19338 (server_h): Add gdb_signals.h.
19339 (signals.o): Update.
19340 * server.h (target_signal_from_host,target_signal_to_host_p)
19341 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19342
19343 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19344
19345 * remote-utils.c (getpkt): Also generate remote-debug
19346 information if noack_mode is set.
19347
19348 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19349
19350 * server.c (handle_query): Report qXfer:siginfo:read and
19351 qXfer:siginfo:write as supported and handle them.
19352 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19353 * linux-low.c (linux_xfer_siginfo): New.
19354 (linux_target_ops): Set it.
19355
19356 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19357
19358 * server.c (gdbserver_usage): Mention --remote-debug.
19359 (main): Accept '--remote-debug' switch.
19360
19361 2009-01-18 Doug Evans <dje@google.com>
19362
19363 * regcache.c (new_register_cache): No need to check result of xcalloc.
19364 * server.c (handle_search_memory): Back out calls to xmalloc,
19365 result is checked and error is returned to user upon failure.
19366 (handle_query): Ditto. Add more checks for result of malloc.
19367 (handle_v_cont): Check result of malloc, report error back to
19368 user upon failure.
19369 (handle_v_run): Ditto. Call freeargv.
19370 * server.h (freeargv): Declare.
19371 * utils.c (freeargv): New fn.
19372
19373 2009-01-15 Doug Evans <dje@google.com>
19374
19375 * gdbreplay.c (perror_with_name): Make arg const char *.
19376 * server.h (target_signal_to_name): Make return type const char *.
19377 * thread-db.c (thread_db_err_str): Make return type const char *.
19378 * utils.c (perror_with_name): Make arg const char *.
19379
19380 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19381
19382 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19383 when handling a EXIT_PROCESS_DEBUG_EVENT.
19384
19385 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19386
19387 * gdbreplay.c (gdbreplay_version): Update copyright year.
19388 * server.c (gdbserver_version): Likewise.
19389
19390 2009-01-05 Doug Evans <dje@google.com>
19391
19392 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19393 (handle_extended_wait): Improve comment.
19394
19395 2008-12-13 Doug Evans <dje@google.com>
19396
19397 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19398 * server.h (ATTR_MALLOC): New macro.
19399 (xmalloc,xcalloc,xstrdup): Declare.
19400 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19401 * inferiors.c: Ditto.
19402 * linux-low.c: Ditto.
19403 * mem-break.c: Ditto.
19404 * regcache.c: Ditto.
19405 * remote-utils.c: Ditto.
19406 * server.c: Ditto.
19407 * target.c: Ditto.
19408 * win32-low.c: Ditto.
19409
19410 2008-12-12 Doug Evans <dje@google.com>
19411
19412 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19413 in debugging printf.
19414
19415 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19416
19417 2008-12-09 Doug Evans <dje@google.com>
19418
19419 * linux-low.h (struct process_info): Delete member tid, unused.
19420 * thread-db.c (find_one_thread): Update.
19421 (maybe_attach_thread): Update.
19422
19423 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19424
19425 * target.h (struct target_ops): Add qxfer_osdata member.
19426 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19427 and dirent.h.
19428 (linux_qxfer_osdata): New functions.
19429 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19430 callback.
19431 * server.c (handle_query): Handle "qXfer:osdata:read:".
19432 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19433 (buffer_xml_printf): New functions.
19434 * server.h (struct buffer): New.
19435 (buffer_grow_str, buffer_grow_str0): New macros.
19436 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19437 (buffer_xml_printf): Declare.
19438
19439 2008-11-24 Doug Evans <dje@google.com>
19440
19441 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19442
19443 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19444
19445 * server.c (handle_v_run): Always use the supplied argument list.
19446
19447 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19448
19449 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19450 (xtensa_regmap_table): Add entry for scompare1.
19451
19452 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19453
19454 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19455 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19456 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19457 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19458 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19459 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19460 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19461 XML target descriptions.
19462 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19463 when inferior is running on an ISA 2.05 or later processor. Add
19464 special case to return offset for full 64-bit slot of FPSCR when
19465 in 32-bits.
19466
19467 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19468
19469 * Makefile.in (SFILES, clean): Added sparc64 files.
19470 (reg-sparc64.o, reg-sparc64.c): New.
19471 * configure.srv (sparc*-*-linux*): New configuration.
19472 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19473 syscall arguments for SPARC.
19474 (regsets_store_inferior_registers): Likewise.
19475 * linux-sparc-low.c: New file.
19476
19477 2008-10-21 Doug Evans <dje@google.com>
19478
19479 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19480 (READLINE_DIR,READLINE_DEP): Delete.
19481 (INTERNAL_CFLAGS): Update.
19482 (LINTFLAGS): Update.
19483
19484 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19485
19486 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19487 whole argv from the last run, not just argv[0].
19488
19489 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19490
19491 * regcache.c (new_register_cache): Return NULL if the register
19492 cache size isn't known yet.
19493 (free_register_cache): Avoid dereferencing a NULL regcache.
19494
19495 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19496
19497 * configure.srv: Merge MIPS and MIPS64.
19498
19499 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19500
19501 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19502
19503 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19504
19505 * Makefile.in: Add required vsx dependencies.
19506
19507 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19508 Declare init_registers_powerpc_vsx32l.
19509 Declare init_registers_powerpc_vsx64l.
19510 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19511 (ppc_arch_setup): Check for VSX in hwcap.
19512 (ppc_fill_vsxregset): New function.
19513 (ppc_store_vsxregset): New function.
19514 Add new VSX entry in regset_info target_regsets.
19515
19516 * configure.srv: Add new VSX dependencies.
19517
19518 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19519
19520 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19521 (remote_open): Set or clear transport_is_reliable.
19522 (putpkt_binary): Don't expect acks in noack mode.
19523 (getpkt): Don't send ack/nac in noack mode.
19524 * server.c (handle_general_set): Handle QStartNoAckMode.
19525 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19526 qSupported.
19527 (main): Reset noack_mode on every connection.
19528 * server.h (noack_mode): Declare.
19529
19530 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19531
19532 * Makefile.in (GDBREPLAY_OBS): New variable.
19533 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19534
19535 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19536 Daniel Jacobowitz <dan@codesourcery.com>
19537
19538 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19539 (usr_store_inferior_registers): Likewise.
19540 (regsets_store_inferior_registers): Likewise.
19541
19542 2008-07-31 Rolf Jansen <rj@surtec.com>
19543 Pedro Alves <pedro@codesourcery.com>
19544
19545 * configure.ac: Check for memmem declaration.
19546 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19547 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19548 (disable_packet_qfThreadInfo): Unconditionally compile.
19549 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19550 * configure, config.in: Regenerate.
19551
19552 2008-07-28 Doug Kwan <dougkwan@google.com>
19553
19554 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19555 (linux_write_memory): Remove declaration of errno.
19556
19557 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19558
19559 * linux-low.c (handle_extended_wait): Do not use "status"
19560 variable uninitialized.
19561
19562 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19563
19564 * server.c (handle_v_attach): Inhibit reporting dll changes.
19565
19566 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19567
19568 * remote-utils.c (prepare_resume_reply): If requested, don't
19569 output "thread:TID" in the T stop reply.
19570
19571 * server.c (disable_packet_vCont, disable_packet_Tthread)
19572 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19573 (handle_query): If requested, disable support for qC, qfThreadInfo
19574 and qsThreadInfo.
19575 (handle_v_requests): If requested, disable support for vCont.
19576 (gdbserver_show_disableable): New.
19577 (main): Handle --disable-packet and --disable-packet=LIST.
19578
19579 * server.h (disable_packet_vCont, disable_packet_Tthread)
19580 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19581
19582 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19583
19584 * server.c (gdbserver_usage): Mention --version.
19585
19586 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19587
19588 * Makefile.in (gdbreplay.o): New rule.
19589
19590 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19591
19592 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19593 message, not gdbserver.
19594
19595 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19596 Nathan Sidwell <nathan@codesourcery.com>
19597 Joseph Myers <joseph@codesourcery.com>
19598
19599 * acinclude.m4: Include ../../config/acx.m4.
19600 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19601 * configure, config.in: Regenerate.
19602 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19603 * server.c (gdbserver_version): Print PKGVERSION.
19604 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19605 (main): Adjust gdbserver_usage calls.
19606 * gdbreplay.c (version, host_name): Add declarations.
19607 (gdbreplay_version, gdbreplay_usage): New.
19608 (main): Accept --version and --help options.
19609
19610 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19611
19612 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19613 (arm_breakpoint_at): Handle Thumb.
19614 (the_low_target): Add comment.
19615
19616 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19617
19618 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19619
19620 2008-05-09 Doug Evans <dje@google.com>
19621
19622 * server.h (decode_search_memory_packet): Declare.
19623 * remote-utils.c (decode_search_memory_packet): New fn.
19624 * server.c (handle_search_memory_1): New fn.
19625 (handle_search_memory): New fn.
19626 (handle_query): Process qSearch:memory packets.
19627
19628 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19629
19630 * regcache.c (registers_length): Remove.
19631 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19632 full register packet.
19633 * regcache.h (registers_length): Remove prototype.
19634 * server.h (PBUFSIZ): Define to 16384.
19635
19636 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19637
19638 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19639 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19640 powerpc-64l.o, and powerpc-altivec64l.o.
19641 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19642 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19643 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19644 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19645 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19646 to srv_xmlfiles.
19647
19648 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19649 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19650 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19651 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19652 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19653 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19654 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19655 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19656 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19657 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19658 (clean): Update.
19659
19660 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19661 (init_registers_powerpc_32l): ... this new prototype.
19662 (init_registers_powerpc_32): Remove, replace by ...
19663 (init_registers_powerpc_altivec32l): ... this new prototype.
19664 (init_registers_powerpc_e500): Remove, replace by ...
19665 (init_registers_powerpc_e500l): ... this new prototype.
19666 (init_registers_ppc64): Remove, replace by ...
19667 (init_registers_powerpc_64l): ... this new prototype.
19668 (init_registers_powerpc_64): Remove, replace by ...
19669 (init_registers_powerpc_altivec64l): ... this new prototype.
19670 (ppc_num_regs): Set to 73.
19671 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19672 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19673 (ppc_cannot_store_register): Handle orig_r3 and trap.
19674 (ppc_arch_setup): Update init_registers_... calls.
19675 (ppc_fill_gregset): Handle orig_r3 and trap.
19676
19677 * inferiors.c (clear_inferiors): Reset current_inferior.
19678
19679 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19680
19681 * acinclude.m4: Add override.m4.
19682 * configure: Regenerate.
19683
19684 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19685
19686 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19687 initial call to init_register_ppc64.
19688
19689 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19690
19691 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19692 single powerpc*-*-linux* case.
19693 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19694
19695 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19696
19697 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19698 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19699 from reg_xmlfiles.
19700 * linux-ppc-low.c: Include <elf.h>.
19701 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19702 (ppc_hwcap): New global variable.
19703 (ppc_regmap): Remove __SPE__ #ifdef sections.
19704 (ppc_regmap_e500): New global variable.
19705 (ppc_cannot_store_register): Update __SPE__ special case.
19706 (ppc_get_hwcap): New function.
19707 (ppc_arch_setup): Use it to determine whether inferior supports
19708 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19709 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19710 Do not access registers if target does not support AltiVec.
19711 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19712 Do not access registers if target does not support SPE.
19713 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19714
19715 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19716
19717 * linux-low.c (disabled_regsets, num_regsets): New.
19718 (use_regsets_p): Delete.
19719 (linux_wait_for_process): Clear disabled_regsets.
19720 (regsets_fetch_inferior_registers): Check and set it.
19721 (regsets_store_inferior_registers): Likewise.
19722 (linux_fetch_registers, linux_store_registers): Do not use
19723 use_regsets_p.
19724 (initialize_low): Allocate disabled_regsets.
19725
19726 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19727
19728 * Makefile.in (LIBOBJS): New.
19729 (OBS): Use LIBOBJS.
19730 (memmem.o): New rule.
19731 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19732 * configure: Regenerated.
19733
19734 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19735
19736 * server.c (handle_query): Never return "unsupported" for
19737 qXfer:features:read queries.
19738
19739 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19740
19741 * server.c (get_features_xml): Fix inverted condition.
19742 (handle_query): Always support qXfer:feature:read.
19743
19744 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19745
19746 * server.c (wrapper_argv): New.
19747 (start_inferior): Handle wrapper_argv. If set, expect an extra
19748 trap.
19749 (gdbserver_usage): Document --wrapper.
19750 (main): Parse --wrapper.
19751
19752 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19753
19754 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19755 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19756 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19757 (ppc_set_pc): Likewise.
19758 (ppc_arch_setup): New function.
19759 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19760 of collect_register.
19761 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19762
19763 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19764
19765 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19766 instead of linux-ppc64-low.o.
19767 * linux-ppc64-low.c: Remove file.
19768 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19769 (linux-ppc64-low.o): Remove rule.
19770
19771 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19772 (init_registers_powerpc_64): Likewise.
19773 (ppc_regmap): Conditionally define depending on __powerpc64__.
19774 (ppc_cannot_store_register): Do not special-case "fpscr" when
19775 compiled on __powerpc64__.
19776 (ppc_collect_ptrace_register): New function.
19777 (ppc_supply_ptrace_register): New function.
19778 (ppc_breakpoint): Change type to "unsigned int".
19779 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19780 (the_low_target): Conditionally provide initializers for the
19781 arch_setup member depending on __powerpc64__. Install
19782 collect_ptrace_register and supply_ptrace_register members.
19783
19784 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19785
19786 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19787 * server.c (gdbserver_xmltarget): Define.
19788 (get_features_xml): Use it to replace "target.xml" and arch_string.
19789
19790 * configure.srv: Remove srv_xmltarget. Add XML files that were
19791 mentioned there to srv_xmlfiles instead. Remove conditional tests
19792 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19793 srv_xmlfiles and srv_regobj to include all possible choices.
19794 * configure.ac (srv_xmltarget): Remove.
19795 (srv_xmlfiles): Do not add "target.xml".
19796 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19797 checks for supplementary target information.
19798 * configure: Regenerate.
19799 * Makefile.in (XML_TARGET): Remove.
19800 (target.xml): Remove rule.
19801 (clean): Do not clean up target.xml.
19802 (.PRECIOUS): Do not mention target.xml.
19803
19804 * target.h (struct target_ops): Remove arch_string member.
19805 * linux-low.c (linux_arch_string): Remove.
19806 (linux_target_ops): Remove arch_string initializer.
19807 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19808 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19809 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19810 * spu-low.c (spu_arch_string): Remove.
19811 (spu_target_ops): Remove arch_string initializer.
19812 * win32-low.c (win32_arch_string): Remove.
19813 (win32_target_ops): Remove arch_string initializer.
19814 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19815 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19816 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19817
19818 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19819
19820 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19821 by collect_ptrace_register and supply_ptrace_register hooks.
19822 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19823 instead of checking for the_low_target.left_pad_xfer.
19824 (usr_store_inferior_registers): Use collect_ptrace_register callback
19825 instead of checking for the_low_target.left_pad_xfer.
19826
19827 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19828 (s390_supply_ptrace_register): Likewise.
19829 (s390_fill_gregset): Call s390_collect_ptrace_register.
19830 (the_low_target): Update.
19831
19832 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19833 (ppc_supply_ptrace_register): Likewise.
19834 (the_low_target): Update.
19835
19836 * linux-i386-low.c (the_low_target): Update.
19837 * linux-x86-64-low.c (the_low_target): Update.
19838
19839 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19840
19841 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19842 reg-s390.o and reg-s390x.o.
19843
19844 * linux-low.c (new_inferior): New global variable.
19845 (linux_create_inferior, linux_attach): Set it.
19846 (linux_wait_for_process): Call the_low_target.arch_setup after the
19847 target has stopped for the first time.
19848 (initialize_low): Do not call the_low_target.arch_setup.
19849
19850 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19851 (s390_set_pc): Likewise.
19852 (s390_arch_setup): New function.
19853 (the_low_target): Use s390_arch_setup as arch_setup routine.
19854
19855 * regcache.c (realloc_register_cache): New function.
19856 (set_register_cache): Call it for each existing regcache.
19857
19858 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19859
19860 * server.h (init_registers): Remove prototype.
19861
19862 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19863 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19864 instead of init_registers ().
19865 * linux-arm-low.c (init_registers_arm): Add prototype.
19866 (init_registers_arm_with_iwmmxt): Likewise.
19867 (the_low_target): Add initializer for arch_setup field.
19868 * linux-cris-low.c (init_registers_cris): Add prototype.
19869 (the_low_target): Add initializer for arch_setup field.
19870 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19871 (the_low_target): Add initializer for arch_setup field.
19872 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19873 (the_low_target): Add initializer for arch_setup field.
19874 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19875 (the_low_target): Add initializer for arch_setup field.
19876 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19877 (the_low_target): Add initializer for arch_setup field.
19878 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19879 (the_low_target): Add initializer for arch_setup field.
19880 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19881 (init_registers_mips64_linux): Likewise.
19882 (the_low_target): Add initializer for arch_setup field.
19883 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19884 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19885 (the_low_target): Add initializer for arch_setup field.
19886 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19887 (init_registers_powerpc_64): Likewise.
19888 (the_low_target): Add initializer for arch_setup field.
19889 * linux-s390-low.c (init_registers_s390): Add prototype.
19890 (init_registers_s390x): Likewise.
19891 (the_low_target): Add initializer for arch_setup field.
19892 * linux-sh-low.c (init_registers_sh): Add prototype.
19893 (the_low_target): Add initializer for arch_setup field.
19894 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19895 (the_low_target): Add initializer for arch_setup field.
19896 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19897 (the_low_target): Add initializer for arch_setup field.
19898
19899 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19900 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19901 instead of init_registers ().
19902 * win32-arm-low.c (init_registers_arm): Add prototype.
19903 (the_low_target): Add initializer for arch_setup field.
19904 * win32-i386-low.c (init_registers_i386): Add prototype.
19905 (the_low_target): Add initializer for arch_setup field.
19906
19907 * spu-low.c (init_registers_spu): Add prototype.
19908 (initialize_low): Call initialie_registers_spu () instead of
19909 initialize_registers ().
19910
19911 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19912
19913 * server.c (handle_v_requests): When handling the vRun and vAttach
19914 packets, if already debugging a process, don't kill it. Return an
19915 error instead.
19916
19917 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19918
19919 * server.c (handle_query): Correct length check.
19920
19921 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19922
19923 * win32-low.c (do_initial_child_stuff): Add process handle
19924 parameter. Set current_process_handle and current_process_id from the
19925 parameters. Clear globals.
19926 (win32_create_inferior): Don't set current_process_handle and
19927 current_process_id here. Instead pass them on the call to
19928 do_initial_child_stuff.
19929 (win32_attach): Likewise.
19930 (win32_clear_inferiors): New.
19931 (win32_kill): Don't close the current process handle or the
19932 current thread handle here. Instead call win32_clear_inferiors.
19933 (win32_detach): Don't open a new handle to the process. Call
19934 win32_clear_inferiors.
19935 (win32_join): Don't rely on current_process_handle; open a new
19936 handle using the process id.
19937 (win32_wait): Call win32_clear_inferiors when the inferior process
19938 has exited.
19939
19940 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19941
19942 * server.c (monitor_show_help): Add "exit".
19943
19944 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19945
19946 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19947 (clean): Add reg-xtensa.c.
19948 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19949 * configure.srv (xtensa*-*-linux*) New target.
19950 * linux-xtensa-low.c: New.
19951 * xtensa-xtregs.c: New.
19952
19953 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19954
19955 * hostio.c: Don't include errno.h.
19956 (errno_to_fileio_errno): Move to hostio-errno.
19957 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19958 error number outputting to the target->hostio_last_error callback.
19959 (hostio_packet_error): Use FILEIO_EINVAL directly.
19960 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19961 calls to hostio_error.
19962 * hostio-errno.c: New.
19963 * server.h (hostio_last_error_from_errno): Declare.
19964 * target.h (target_ops): Add hostio_last_error member.
19965 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19966 as hostio_last_error handler.
19967 * spu-low.c (spu_target_ops): Likewise.
19968 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19969 (wince_hostio_last_error): New functions.
19970 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19971 as hostio_last_error handler.
19972 (win32_target_ops) [!_WIN32_WCE]: Register
19973 hostio_last_error_from_errno as hostio_last_error handler.
19974 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19975 (hostio-errno.o): New rule.
19976 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19977 * configure.srv (srv_hostio_err_objs): New variable. Default to
19978 hostio-errno.o.
19979 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19980 * configure: Regenerate.
19981
19982 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19983
19984 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19985 (linux_kill, linux_detach): Clean up the process list.
19986 * remote-utils.c (remote_open): Improve port number parsing.
19987 (putpkt_binary, input_interrupt): Only send interrupts if the target
19988 is running.
19989 * server.c (extended_protocol): Make static.
19990 (attached): Define earlier.
19991 (exit_requested, response_needed, program_argv): New variables.
19992 (target_running): New.
19993 (start_inferior): Clear attached here.
19994 (attach_inferior): Set attached here.
19995 (require_running): Define.
19996 (handle_query): Use require_running and target_running. Implement
19997 "monitor exit".
19998 (handle_v_attach, handle_v_run): New.
19999 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20000 (gdbserver_usage): Update.
20001 (main): Redo argument parsing. Handle --debug and --multi. Handle
20002 --attach along with other options or after the port. Save
20003 program_argv. Support no initial program. Resynchronize
20004 communication with GDB after an error. Handle "monitor exit".
20005 Use require_running and target_running. Always allow the extended
20006 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20007 restart in extended mode.
20008 * README: Refer to the GDB manual. Update --attach usage.
20009
20010 2007-12-20 Andreas Schwab <schwab@suse.de>
20011
20012 * linux-low.c (STACK_SIZE): Define.
20013 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20014 (linux_test_for_tracefork): Likewise.
20015
20016 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20017
20018 * linux-low.c (linux_wait_for_event): Update messages. Do not
20019 reinsert auto-delete breakpoints.
20020 * mem-break.c (struct breakpoint): Change return type of handler to
20021 int.
20022 (set_breakpoint_at): Update handler type.
20023 (reinsert_breakpoint_handler): Return 1 instead of calling
20024 delete_breakpoint.
20025 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20026 setting a new one.
20027 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20028 * mem-break.h (set_breakpoint_at): Update handler type.
20029 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20030 * win32-low.c (auto_delete_breakpoint): New.
20031 (get_child_debug_event): Use it.
20032
20033 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20034
20035 * configure.ac: Check for pread and pwrite.
20036 * hostio.c (handle_pread): Fall back to lseek and read.
20037 (handle_pwrite): Fall back to lseek and write.
20038 * config.in, configure: Regenerated.
20039
20040 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20041
20042 * server.c (myresume): Add own_buf argument.
20043 (main): Update calls.
20044
20045 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20046
20047 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20048 * remote-utils.c (remote_open): Do not call disable_async_io.
20049 (block_async_io): Delete.
20050 (unblock_async_io): Make static.
20051 (initialize_async_io): New.
20052 * server.c (handle_v_cont): Handle async I/O here.
20053 (myresume): Likewise. Move other common resume tasks here...
20054 (main): ... from here. Call initialize_async_io. Disable async
20055 I/O before the main loop.
20056 * server.h (initialize_async_io): Declare.
20057 (block_async_io, unblock_async_io): Delete prototypes.
20058 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20059
20060 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20061
20062 * remote-utils.c (readchar): Allow binary data in received messages.
20063
20064 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20065
20066 * win32-low.c (attaching): New global.
20067 (win32_create_inferior): Clear the `attaching' global.
20068 (win32_attach): Set the `attaching' global.
20069 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20070 attaching. Only set a breakpoint at the entry point if not
20071 attaching.
20072
20073 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20074
20075 * server.c (main): Don't report dll events on the initial
20076 connection on attaches.
20077
20078 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20079
20080 * server.c (main): Relax numerical bases supported for the pid of
20081 the --attach command line argument.
20082
20083 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20084
20085 * win32-low.c (win32_attach): Call OpenProcess before
20086 DebugActiveProcess, not after. Add last error output to error
20087 call.
20088
20089 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20090
20091 * win32-low.c (win32_get_thread_context)
20092 (win32_set_thread_context): New functions.
20093 (thread_rec): Use win32_get_thread_context.
20094 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20095 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20096 field.
20097
20098 2007-12-03 Leo Zayas
20099 Pedro Alves <pedro_alves@portugalmail.pt>
20100
20101 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20102 global variables.
20103 (child_add_thread): Minor cleanup.
20104 (child_continue): Resume artificially suspended threads before
20105 calling ContinueDebugEvent.
20106 (suspend_one_thread): New.
20107 (fake_breakpoint_event): New.
20108 (get_child_debug_event): Change return type to int. Check here if
20109 gdb sent an interrupt request. If a soft interrupt was requested,
20110 fake a breakpoint event. Return 0 if there is no event to handle,
20111 and 1 otherwise.
20112 (win32_wait): Don't check here if gdb sent an interrupt request.
20113 Ensure there is a valid event to handle.
20114 (win32_request_interrupt): Add soft interruption method as last
20115 resort.
20116
20117 2007-12-03 Leo Zayas
20118 Pedro Alves <pedro_alves@portugalmail.pt>
20119
20120 * win32-low.h (win32_thread_info): Add descriptions to the
20121 structure members. Replace `suspend_count' counter by a
20122 `suspended' flag.
20123 * win32-low.c (thread_rec): Update condition of when to get the
20124 context from the inferior. Rely on ContextFlags being set if it
20125 has already been retrieved. Only suspend the inferior thread if
20126 we haven't already. Warn if that fails.
20127 (continue_one_thread): s/suspend_count/suspended/. Only call
20128 ResumeThread once. Warn if that fails.
20129
20130 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20131
20132 * win32-low.c (win32_wait): Don't read from the inferior when it
20133 has already exited.
20134
20135 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20136
20137 * Makefile.in (win32_low_h): New variable.
20138 (win32-low.o): Add dependency on $(win32_low_h).
20139 (win32-arm-low.o, win32-i386-low.o): New rules.
20140
20141 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20142
20143 * hostio.c: Correct copyright year.
20144
20145 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20146
20147 * Makefile.in (OBS): Add hostio.o.
20148 (hostio.o): New rule.
20149 * server.h (handle_vFile): Declare.
20150 * hostio.c: New file.
20151 * server.c (handle_v_requests): Take packet_len and new_packet_len
20152 for binary packets. Call handle_vFile.
20153 (main): Update call to handle_v_requests.
20154
20155 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20156
20157 * linux-low.c: Include <sched.h>.
20158
20159 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20160
20161 * linux-low.c (linux_tracefork_grandchild): New.
20162 (linux_tracefork_child): Use clone.
20163 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20164
20165 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20166
20167 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20168
20169 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20170
20171 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20172
20173 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20174
20175 * inferiors.c (change_inferior_id): Delete.
20176 (add_pid_to_list, pull_pid_from_list): New.
20177 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20178 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20179 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20180 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20181 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20182 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20183 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20184 (using_threads): Always set to 1.
20185 (handle_extended_wait): New.
20186 (add_process): Do not set TID.
20187 (linux_create_inferior): Set must_set_ptrace_flags.
20188 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20189 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20190 (linux_thread_alive): Rename TID argument to LWPID.
20191 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20192 (linux_wait_for_event): Do not use TID or check using_threads. Update
20193 call to dead_thread_notify. Call handle_extended_wait.
20194 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20195 (send_sigstop): Delete sigstop_sent.
20196 (wait_for_sigstop): Avoid TID.
20197 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20198 (linux_test_for_tracefork): New.
20199 (linux_lookup_signals): Use thread_db_active and
20200 linux_supports_tracefork_flag.
20201 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20202 * linux-low.h (get_process_thread): Avoid TID.
20203 (struct process_ifo): Move thread_known and tid to the end. Remove
20204 sigstop_sent.
20205 (linux_attach_lwp, thread_db_init): Update prototypes.
20206 * server.h (change_inferior_id): Delete prototype.
20207 (add_pid_to_list, pull_pid_from_list): New prototypes.
20208 * thread-db.c (thread_db_use_events): New.
20209 (find_first_thread): Rename to...
20210 (find_one_thread): ...this. Update callers and messages. Do not
20211 call fatal. Check thread_db_use_events. Do not call
20212 change_inferior_id or new_thread_notify.
20213 (maybe_attach_thread): Update. Do not call new_thread_notify.
20214 (thread_db_init): Set thread_db_use_events. Check use_events.
20215 * utils.c (fatal, warning): Correct message prefix.
20216
20217 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20218
20219 * Makefile.in (clean): Remove new files.
20220 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20221 (powerpc-64.o, powerpc-64.c): New rules.
20222 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20223 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20224 with SPE.
20225 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20226 SPE targets.
20227 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20228 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20229 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20230 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20231 (target_regsets): Add AltiVec and SPE register sets.
20232 * configure.ac: Check for AltiVec and SPE.
20233 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20234 (ppc_fill_vrregset, ppc_store_vrregset): New.
20235 (target_regsets): Add AltiVec register set.
20236 * configure: Regenerated.
20237
20238 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20239
20240 * linux-low.c (O_LARGEFILE): Define.
20241 (linux_read_memory): Use /proc/PID/mem.
20242 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20243 * configure, config.in: Regenerated.
20244
20245 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20246
20247 * linux-low.c (linux_wait_for_event): Do not pass signals while
20248 single-stepping.
20249
20250 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20251
20252 * win32-low.c (create_process): New.
20253 (win32_create_inferior): Use create_process instead of
20254 CreateProcess. If create_process failed retry appending an ".exe"
20255 suffix. Store the GetLastError result immediatelly after
20256 create_process calls and use it on the call to error.
20257
20258 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20259
20260 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20261
20262 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20263
20264 * configure.ac: Switch license to GPLv3.
20265
20266 2007-08-01 Michael Snyder <msnyder@access-company.com>
20267
20268 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20269
20270 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20271
20272 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20273 typedef.
20274 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20275 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20276 CloseToolhelp32Snapshot.
20277 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20278 CloseToolhelp32Snapshot.
20279
20280 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20281
20282 * server.c (main): Check for inferior exit before main loop.
20283
20284 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20285
20286 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20287 instead of on tmp_desc.
20288
20289 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20290 Daniel Jacobowitz <dan@codesourcery.com>
20291
20292 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20293 (add_thread): Minor cleanups.
20294 (clear_inferiors): Move lower in the file. Clear the DLL
20295 list.
20296 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20297 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20298 (xml_escape_text): New.
20299 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20300 for qSupported.
20301 (handle_v_cont): Report errors.
20302 (gdbserver_version): Update.
20303 (main): Correct size of own_buf. Do not report initial DLL events.
20304 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20305 (unloaded_dll, xml_escape_text): New.
20306 * win32-low.c (enum target_waitkind): Update comments.
20307 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20308 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20309 (win32_EnumProcessModules, win32_GetModuleInformation)
20310 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20311 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20312 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20313 (win32_Module32First, win32_Module32Next, load_toolhelp)
20314 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20315 (get_child_debug_event): Handle DLL events.
20316 (win32_wait): Likewise.
20317
20318 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20319
20320 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20321 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20322
20323 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20324
20325 * win32-low.c (handle_output_debug_string): Ignore event if not
20326 waiting.
20327
20328 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20329
20330 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20331
20332 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20333
20334 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20335
20336 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20337
20338 * inferiors.c (change_inferior_id): Add comment.
20339 * linux-low.c (check_removed_breakpoint): Add an early
20340 prototype. Improve debug output.
20341 (linux_attach): Doc update.
20342 (linux_detach_one_process, linux_detach): Clean up before releasing
20343 each process.
20344 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20345 * linux-low.h (struct process_info): Doc improvement.
20346 * mem-break.c (delete_all_breakpoints): New.
20347 * mem-break.h (delete_all_breakpoints): New prototype.
20348 * thread-db.c (find_first_thread): New.
20349 (thread_db_create_event): Call it instead of
20350 thread_db_find_new_threads. Clean up unused variables.
20351 (maybe_attach_thread): Remove first thread handling.
20352 (thread_db_find_new_threads): Use find_first_thread.
20353 (thread_db_get_tls_address): Likewise.
20354
20355 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20356
20357 * thread-db.c (thread_db_find_new_threads): Add prototype.
20358 (thread_db_create_event): Check for the main thread before adding
20359 a new thread.
20360 (maybe_attach_thread): Only enable event reporting if TID == 0.
20361 (thread_db_get_tls_address): Check for new threads.
20362
20363 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20364
20365 * linux-low.c (linux_create_inferior): Try execv before execvp.
20366 * spu-low.c (spu_create_inferior): Likewise.
20367
20368 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20369
20370 * linux-low.c (linux_create_inferior): Change execv to execvp.
20371 * spu-low.c (spu_create_inferior): Likewies.
20372
20373 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20374
20375 * Makefile.in (clean): Clean new files instead of deleted ones.
20376 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20377 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20378 rules.
20379 * configure.srv: Specify XML files and new regformats for MIPS and
20380 MIPS64 GNU/Linux.
20381 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20382 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20383 an entry for the restart register.
20384 (mips_cannot_fetch_register, mips_cannot_store_register)
20385 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20386 register names to match the XML descriptions.
20387 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20388 restart register instead of $0.
20389
20390 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20391 Markus Deuling <deuling@de.ibm.com>
20392
20393 * remote-utils.c (decode_xfer_write): New function.
20394 * server.h (decode_xfer_write): Add prototype.
20395 * server.c (handle_query): Add PACKET_LEN argument. Support
20396 qXfer:spu:read and qXfer:spu:write packets.
20397 (main): Pass packet_len to handle_query.
20398 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20399 * target.h (target_ops): Add qxfer_spu.
20400
20401 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20402
20403 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20404 accessing non-seekable spufs files.
20405
20406 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20407
20408 * server.c (handle_query): Add reply for qC packet.
20409
20410 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20411 Leo Zayas <lerele@champenstudios@com>
20412
20413 * server.h (check_remote_input_interrupt_request): New function.
20414 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20415 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20416 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20417 (check_remote_input_interrupt_request): New function.
20418 * server.h (check_remote_input_interrupt_request): Declare.
20419 * win32-low.c (winapi_DebugBreakProcess,
20420 winapi_GenerateConsoleCtrlEvent): New typedefs.
20421 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20422 to 250 ms.
20423 (win32_wait): Check for remote interrupt request
20424 with check_remote_input_interrupt_request.
20425 (win32_request_interrupt): New function.
20426 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20427
20428 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20429
20430 * win32-low.c (debug_registers_changed,
20431 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20432 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20433 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20434 (thread_rec): Get context using the low target.
20435 (child_add_thread): Call thread_added on the low target,
20436 which does the same thing.
20437 (regptr): Delete.
20438 (do_initial_child_stuff): Remove debug registers references.
20439 Set context using the low target. Resume threads after
20440 setting the contexts.
20441 (child_continue): Remove dead variable. Remove debug
20442 registers references.
20443 (child_fetch_inferior_registers): Go through the low target.
20444 (do_child_store_inferior_registers): Remove.
20445 (child_store_inferior_registers): Go through the low target.
20446 (win32_resume): Remove debug registers references.
20447 Set context using the low target.
20448 (handle_exception): Change return type to void. Don't record
20449 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20450 first chance exception.
20451 (get_child_debug_event): Change return type to void. Remove
20452 goto loop. Always return after waiting for debug event.
20453 (win32_wait): Convert to switch statement. Handle spurious
20454 events.
20455
20456 * win32-i386-low.c (debug_registers_changed,
20457 debug_registers_used): New.
20458 (initial_stuff): Rename to ...
20459 (i386_initial_stuff): ... this. Clear debug registers
20460 state variables.
20461 (store_debug_registers): Delete.
20462 (i386_get_thread_context): New.
20463 (load_debug_registers): Delete.
20464 (i386_set_thread_context): New.
20465 (i386_thread_added): New.
20466 (single_step): Rename to ...
20467 (i386_single_step): ... this.
20468 (do_fetch_inferior_registers): Rename to ...
20469 (i386_fetch_inferior_register): ... this.
20470 (i386_store_inferior_register): New.
20471 (the_low_target): Adapt to new interface.
20472
20473 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20474 (arm_get_thread_context): New.
20475 (arm_set_thread_context): New.
20476 (regptr): New.
20477 (do_fetch_inferior_registers): Rename to ...
20478 (arm_fetch_inferior_register): ... this.
20479 (arm_store_inferior_register): New.
20480 (arm_wince_breakpoint): Reimplement as unsigned long.
20481 (arm_wince_breakpoint_len): Define.
20482 (the_low_target): Adapt to new interface.
20483
20484 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20485 load_debug_registers. Add get_thread_context, set_thread_context,
20486 thread_added and store_inferior_register. Rename
20487 fetch_inferior_registers to fetch_inferior_register.
20488 (regptr): Remove declaration.
20489
20490 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20491
20492 * linux-low.c (linux_detach): Change return type to int. Return 0.
20493 * spu-low.c (spu_detach): Likewise.
20494
20495 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20496
20497 * target.h (target_ops): Change return type of detach to int.
20498 Add join.
20499 (join_inferior): New.
20500 * server.c (main): Don't skip detach support on mingw32.
20501 If the inferior doesn't support detaching return error.
20502 Call join_inferior instead of using waitpid.
20503 * linux-low.c (linux_join): New.
20504 (linux_target_op): Add linux_join.
20505 * spu-low.c (spu_join): New.
20506 (spu_target_ops): Add spu_join.
20507 * win32-low.c (win32_detach): Adapt to new interface.
20508 Reopen current_process_handle before detaching. Issue a child
20509 resume before detaching.
20510 (win32_join): New.
20511 (win32_target_op): Add win32_join.
20512
20513 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20514
20515 * win32-low.c (win32-attach): Fix return value.
20516 * target.h (target_ops): Describe ATTACH return values.
20517
20518 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20519
20520 * win32-low.c (GETPROCADDRESS): Define.
20521 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20522 (winapi_DebugSetProcessKillOnExit): Likewise.
20523 (win32_create_inferior): Force usage of ansi CreateProcessA.
20524 (win32_attach): Use GETPROCADDRESS.
20525 (win32_detach): Likewise.
20526
20527 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20528
20529 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20530
20531 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20532
20533 * win32-low.c: Commit leftover changes from 2007-03-29.
20534
20535 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20536
20537 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20538 fields short instead of int. Add explicit padding.
20539 (i387_cache_to_fsave): Remove unnecessary casts.
20540 (i387_fsave_to_cache): Doc fix.
20541 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20542
20543 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20544
20545 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20546 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20547
20548 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20549
20550 * configure.srv (arm*-*-mingw32ce*): Move near the other
20551 arm targets.
20552
20553 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20554
20555 * configure.ac: Add errno checking.
20556 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20557 sys/file.h and malloc.h.
20558 (AC_CHECK_DECLS): Add perror.
20559 (srv_mingwce): Handle.
20560 * configure.srv (i[34567]86-*-cygwin*): Add
20561 win32-i386-low.o to srv_tgtobj.
20562 (i[34567]86-*-mingw*): Likewise.
20563 (arm*-*-mingw32ce*): Add case.
20564 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20565 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20566 [__MINGW32CE__] (strerror): New function.
20567 [__MINGW32CE__] (errno): Define to GetLastError.
20568 [__MINGW32CE__] (COUNTOF): New macro.
20569 (remote_open): Remove extra close call.
20570 * mem-break.c (delete_breakpoint_at): New function.
20571 * mem-break.h (delete_breakpoint_at): Declare.
20572 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20573 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20574 [USE_WIN32API] (read, write): Add char* casts.
20575 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20576 * server.h: Include wincecompat.h on Windows CE.
20577 [HAVE_ERRNO_H]: Check.
20578 (perror): Declare if not declared.
20579 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20580 (perror_with_name): Remove errno declaration.
20581 * wincecompat.h: New.
20582 * wincecompat.c: New.
20583 * win32-low.h: New.
20584 * win32-arm-low.c: New.
20585 * win32-i386-low.c: New.
20586 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20587 (OUTMSG2): Make it safe.
20588 (_T): New macro.
20589 (COUNTOF): New macro.
20590 (NUM_REGS): Get it from the low target.
20591 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20592 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20593 (thread_rec): Let low target handle debug registers.
20594 (child_add_thread): Likewise.
20595 (child_init_thread_list): Likewise.
20596 (continue_one_thread): Likewise.
20597 (regptr): New.
20598 (do_child_fetch_inferior_registers): Move to ...
20599 * win32-i386-low.c: ... here, and rename to ...
20600 (do_fetch_inferior_registers): ... this.
20601 * win32-low.c (child_fetch_inferior_registers):
20602 Go through the low target.
20603 (do_child_store_inferior_registers): Use regptr.
20604 (strwinerror): New function.
20605 (win32_create_inferior): Handle Windows CE.
20606 Use strwinerror instead of strerror on Windows error
20607 codes. Add program to the error output.
20608 Don't close the main thread handle on Windows CE.
20609 (win32_attach): Use coredll.dll on Windows CE.
20610 (win32_kill): Close current process and current
20611 thread handles.
20612 (win32_detach): Use coredll.dll on Windows CE.
20613 (win32_resume): Let low target handle debug registers, and
20614 step request.
20615 (handle_exception): Add/Remove initial breakpoint. Avoid
20616 non-existant WSTOPSIG on Windows CE.
20617 (win32_read_inferior_memory): Cast to remove warning.
20618 (win32_arch_string): Go through the low target.
20619 (initialize_low): Call set_breakpoint_data with the low
20620 target's breakpoint.
20621 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20622 FOP_REGNUM, mappings): Move to ...
20623 * win32-i386-low.c: ... here.
20624 * win32-low.c (win32_thread_info): Move to ...
20625 * win32-low.h: ... here.
20626 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20627 win32-arm-low.c and wincecompat.c.
20628 (all:): Add $EXEEXT.
20629 (install-only:): Likewise.
20630 (gdbserver:): Likewise.
20631 (gdbreplay:): Likewise.
20632 * config.in: Regenerate.
20633 * configure: Regenerate.
20634
20635 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20636
20637 * win32-low.c: Rename typedef thread_info to
20638 win32_thread_info throughout.
20639
20640 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20641
20642 * win32-i386-low.c: Rename to ...
20643 * win32-low.c: ... this.
20644 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20645 * Makefile.in: Likewise.
20646
20647 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20648
20649 * remote-utils.c (monitor_output): Constify msg parameter.
20650 * server.h (monitor_output): Likewise.
20651 * win32-i386-low.c (handle_output_debug_string): New.
20652 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20653 handle_output_debug_string.
20654 (get_child_debug_event): Likewise.
20655
20656 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20657
20658 * server.c (main): Correct strtoul check.
20659
20660 2007-03-27 Jon Ringle <jon@ringle.org>
20661
20662 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20663
20664 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20665
20666 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20667
20668 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20669
20670 * terminal.h: Check HAVE_SGTTY_H.
20671
20672 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20673
20674 * remote-utils.c (remote_open): Print out the assigned port number.
20675
20676 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20677
20678 * remote-utils.c (monitor_output): New function.
20679 * server.c (debug_threads): Define here.
20680 (monitor_show_help): New function.
20681 (handle_query): Handle qRcmd.
20682 (main): Do not handle 'd' packet.
20683 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20684 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20685 of debug_threads.
20686
20687 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20688
20689 * Makefile.in (EXEEXT): New.
20690 (clean): Use $(EXEEXT).
20691
20692 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20693
20694 * target.h (target_ops): Rename send_signal to request_interrupt,
20695 and remove enum target_signal parameter.
20696 * linux-low.c (linux_request_interrupt): Rename from
20697 linux_send_signal, and always send SIGINT.
20698 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20699 and always send SIGINT.
20700 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20701 of send_signal.
20702 (input_interrupt): Likewise.
20703
20704 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20705
20706 * server.c (get_features_xml): Check if target implemented
20707 arch_string.
20708 * win32-i386-low.c (win32_arch_string): New.
20709 (win32_target_ops): Add win32_arch_string as arch_string member.
20710
20711 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20712
20713 * spu-low.c (spu_arch_string): New.
20714 (spu_target_ops): Add spu_arch_string.
20715
20716 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20717
20718 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20719 * configure.ac: Do not check for terminal.h.
20720 * configure, config.in: Regenerated.
20721
20722 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20723
20724 * Makefile.in (OBS): Add $(XML_BUILTIN).
20725 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20726 (clean): Update.
20727 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20728 (arm-with-iwmmxt.c): New.
20729 * config.in, configure: Regenerate.
20730 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20731 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20732 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20733 (arm*-*-linux*): Add iWMMXt and regset support.
20734 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20735 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20736 (arm_store_wmmxregset, target_regsets): New.
20737 * server.c (get_features_xml): Take annex argument. Check builtin
20738 XML documents.
20739 (handle_query): Handle multiple annexes.
20740
20741 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20742
20743 * remote-utils.c [USE_WIN32API] (read, write): Define.
20744 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20745 write.
20746
20747 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20748
20749 * linux-i386-low.c (the_low_target): Set arch_string.
20750 * linux-x86-64-low.c (the_low_target): Likewise.
20751 * linux-low.c (linux_arch_string): New.
20752 (linux_target_ops): Add it.
20753 * linux-low.h (struct linux_target_ops): Add arch_string.
20754 * server.c (write_qxfer_response): Use const void * for DATA.
20755 (get_features_xml): New.
20756 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20757 * target.h (struct target_ops): Add arch_string method.
20758
20759 2007-01-03 Denis Pilat <denis.pilat@st.com>
20760 Daniel Jacobowitz <dan@codesourcery.com>
20761
20762 * linux-low.c (linux_kill): Handle being called with no threads.
20763 * win32-i386-low.c (win32_kill): Likewise.
20764 (get_child_debug_event): Clear current_process_handle.
20765
20766 2006-12-30 Denis PILAT <denis.pilat@st.com>
20767 Daniel Jacobowitz <dan@codesourcery.com>
20768
20769 * remote-utils.c (remote_open): Check the type of specified
20770 serial port devices before opening them.
20771 * server.c (main): Kill the inferior if an error occurs during
20772 the first remote_open.
20773
20774 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20775
20776 * README: Update supported targets.
20777
20778 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20779
20780 * Makefile.in (clean): Remove reg-mips64.c.
20781 (reg-mips64.c, reg-mips64.o): New rules.
20782 * configure.srv: Handle mips64. Include regset support for mips.
20783 * linux-mips-low.c (union mips_register): New.
20784 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20785 (mips_breakpoint, mips_breakpoint_at): Use int.
20786 (mips_collect_register, mips_supply_register)
20787 (mips_collect_register_32bit, mips_supply_register_32bit)
20788 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20789 (mips_store_fpregset, target_regsets): New.
20790 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20791
20792 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20793
20794 * configure.srv: Add target "spu*-*-*".
20795 * Makefile.in (clean): Remove reg-spu.c.
20796 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20797 * spu-low.c: New file.
20798
20799 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20800
20801 * configure.ac: Correct td_thr_tls_get_addr test.
20802 * configure: Regenerated.
20803
20804 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20805
20806 * linux-low.c (linux_wait_for_event): Reformat. Use the
20807 pass_signals array.
20808 * remote-utils.c (decode_address_to_semicolon): New.
20809 * server.c (pass_signals, handle_general_set): New.
20810 (handle_query): Mention QPassSignals for qSupported.
20811 (main): Call handle_general_set.
20812 * server.h (pass_signals, decode_address_to_semicolon): New.
20813
20814 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20815
20816 * server.c (handle_query): Correct error handling for read_auxv.
20817
20818 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20819
20820 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20821 and srv_linux_thread_db to yes.
20822 * linux-s390-low.c (s390_fill_gregset): New function.
20823 (target_regsets): Define data structure.
20824
20825 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20826
20827 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20828 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20829 * config.in, configure: Regenerated.
20830 * inferiors.c (gdb_id_to_thread): New function.
20831 (gdb_id_to_thread_id): Use it.
20832 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20833 * linux-low.h (struct process_info): Add th member.
20834 (thread_db_get_tls_address): New prototype.
20835 * remote-utils.c (decode_address): Make non-static.
20836 * server.c (handle_query): Handle qGetTLSAddr.
20837 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20838 * target.h (struct target_ops): Add get_tls_address.
20839 * thread-db.c (maybe_attach_thread): Save the thread handle.
20840 (thread_db_get_tls_address): New.
20841
20842 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20843
20844 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20845 (linux_resume_one_process): Take a siginfo_t *. Update all
20846 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20847 (struct pending_signals): Add a siginfo_t.
20848 (linux_wait_for_process): Always set last_status.
20849 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20850 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20851 * linux-low.h (struct process_info): Add last_status.
20852
20853 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20854
20855 * remote-utils.c (try_rle): New function.
20856 (putpkt_binary): Use it.
20857
20858 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20859
20860 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20861 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20862 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20863 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20864 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20865 point registers.
20866
20867 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20868
20869 * server.c (terminal_fd): New variable.
20870 (old_foreground_pgrp): Likewise.
20871 (restore_old_foreground_pgrp): New function.
20872 (start_inferior): Record the terminal file descriptor in terminal_fd
20873 and its original foreground group in old_foreground_pgrp. Register
20874 restore_old_foreground_pgrp with atexit().
20875
20876 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20877
20878 * server.c (handle_query): Correct qPart to qXfer.
20879
20880 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20881
20882 * configure.ac: Check for more headers which are missing on
20883 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20884 * configure.srv: Add Cygwin and mingw32.
20885 * remote-utils.c: Don't include headers unconditionally which
20886 are missing on mingw32. Include <winsock.h> for mingw32.
20887 (remote_open): Adjust for mingw32 support. Flush
20888 standard error after writing to it.
20889 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20890 (unblock_async_io, enable_async_io, disable_async_io)
20891 (readchar, getpkt): Update for Winsock support.
20892 (prepare_resume_reply): Expect a protocol signal number.
20893 * server.c: Disable <sys/wait.h> on mingw32.
20894 (start_inferior): Adjust for mingw32 support. Flush
20895 standard error after writing to it.
20896 (attach_inferior): Likewise. Use protocol signal
20897 numbers.
20898 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20899 and names.
20900 * win32-i386-low.c: New file.
20901 * Makefile.in (XM_CLIBS): Set.
20902 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20903 (win32-i386-low.o): New dependency rule.
20904 * linux-low.c (linux_wait): Use target signal numbers.
20905 * target.h (struct target_ops): Doc fix.
20906 * server.h (target_signal_to_name): New prototype.
20907 * gdbreplay.c: Don't include headers unconditionally which
20908 are missing on mingw32. Include <winsock.h> for mingw32.
20909 (remote_close, remote_open): Adjust for Winsock support.
20910 * configure, config.in: Regenerated.
20911
20912 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20913
20914 * server.c (decode_xfer_read, write_qxfer_response): New.
20915 (handle_query): Take a packet length argument. Handle
20916 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20917 the qSupported response.
20918 (main): Update call to handle_query.
20919
20920 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20921
20922 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20923 (putpkt_binary): Renamed from putpkt and adjusted for binary
20924 data.
20925 (putpkt): New wrapper for putpkt_binary.
20926 (readchar): Don't mask off the high bit.
20927 (decode_X_packet): New function.
20928 * server.c (main): Call putpkt_binary if a handler sets the packet
20929 length. Save the length of the incoming packet. Handle 'X'.
20930 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20931
20932 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20933
20934 * server.c (handle_query): Handle qSupported.
20935
20936 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20937
20938 * remote-utils.c (all_symbols_looked_up): New variable.
20939 (look_up_one_symbol): Check it.
20940 * server.h (look_up_one_symbol): New declaration.
20941 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20942
20943 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20944
20945 * Makefile.in (linux-arm-low.o): Update dependencies.
20946 * linux-arm-low.c: Include "gdb_proc_service.h".
20947 (PTRACE_GET_THREAD_AREA): Define.
20948 (ps_get_thread_area): New function.
20949
20950 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20951
20952 * configure.srv (m68k*-*-uclinux*): New target.
20953 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20954 (linux_resume_one_process): Remove extraneous cast.
20955 (linux_read_offsets): New.
20956 (linux_target_op): Add linux_read_offsets on mmuless systems.
20957 * server.c (handle_query): Add qOffsets logic.
20958 * target.h (struct target_ops): Add read_offsets.
20959
20960 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20961
20962 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20963 (PTRACE_GET_THREAD_AREA): Define.
20964 (ps_get_thread_area): New function.
20965 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20966 (linux-x86-64-low.o): Update.
20967
20968 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20969
20970 * configure.ac: Remove checks for prfpregset_t.
20971 * gdb_proc_service.h: New file.
20972 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20973 new "gdb_proc_service.h".
20974 * proc-service.c: Likewise.
20975 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20976 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20977 * Makefile.in (gdb_proc_service_h): Updated.
20978 * configure, config.in: Regenerated.
20979
20980 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20981
20982 * remote-utils.c (prepare_resume_reply): Move declaration
20983 of gdb_id_from_wait to the top of the block.
20984
20985 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20986
20987 * linux-low.c (regsets_store_inferior_registers): Read the regset
20988 from the target before filling it.
20989
20990 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20991
20992 * server.c (attach_inferior): Return SIGTRAP for a successful
20993 attach.
20994
20995 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20996
20997 * Makefile.in (OBS): Add version.o.
20998 (STAGESTUFF): Delete.
20999 (version.o): Add dependencies.
21000 (version.c): Replace rule.
21001 (clean): Remove version.c.
21002 * server.c (gdbserver_version): New.
21003 (gdbserver_usage): Use printf.
21004 (main): Handle --version and --help.
21005 * server.h (version, host_name): Add declarations.
21006
21007 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21008
21009 * linux-arm-low.c:
21010 * linux-arm-low.c:
21011 * inferiors.c:
21012 * i387-fp.h:
21013 * i387-fp.c:
21014 * gdbreplay.c:
21015 * regcache.c:
21016 * proc-service.c:
21017 * mem-break.h:
21018 * mem-break.c:
21019 * linux-x86-64-low.c:
21020 * linux-sh-low.c:
21021 * linux-s390-low.c:
21022 * linux-ppc64-low.c:
21023 * linux-ppc-low.c:
21024 * linux-mips-low.c:
21025 * linux-m68k-low.c:
21026 * linux-m32r-low.c:
21027 * linux-low.h:
21028 * linux-low.c:
21029 * linux-ia64-low.c:
21030 * linux-i386-low.c:
21031 * linux-crisv32-low.c:
21032 * thread-db.c:
21033 * terminal.h:
21034 * target.h:
21035 * target.c:
21036 * server.h:
21037 * server.c:
21038 * remote-utils.c:
21039 * regcache.h:
21040 * utils.c:
21041 * Makefile.in:
21042 * configure.ac:
21043 * gdbserver.1: Add (C) after Copyright. Update the FSF
21044 address.
21045
21046 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21047
21048 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21049 (arm_breakpoint_at): Recognize both breakpoints.
21050 (the_low_target): Use the correct breakpoint instruction.
21051
21052 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21053
21054 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21055 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21056 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21057 (the_low_target): Update.
21058
21059 2005-10-25 Andreas Schwab <schwab@suse.de>
21060
21061 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21062
21063 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21064 (ia64_num_regs): Reduce to 462.
21065
21066 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21067
21068 * acinclude.m4: Correct quoting.
21069 * aclocal.m4: Regenerated.
21070
21071 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21072 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21073 (thread_db_init): Call thread_db_err_str.
21074 * configure.ac: Check for TD_VERSION.
21075 * config.in, configure: Regenerated.
21076
21077 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21078
21079 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21080
21081 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21082
21083 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21084 is not available. Define HAVE_PTRACE_GETREGS if it is.
21085 * config.in, configure: Regenerated.
21086 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21087 * linux-i386-low.c, linux-m68k-low.c: Update to use
21088 HAVE_PTRACE_GETREGS.
21089 * linux-low.c (regsets_fetch_inferior_registers)
21090 (regsets_store_inferior_registers): Only return 0 if we processed
21091 GENERAL_REGS.
21092 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21093 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21094
21095 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21096
21097 * inferiors.c (struct thread_info): Add gdb_id.
21098 (add_thread): Add gdb_id argument.
21099 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21100 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21101 calls to add_thread.
21102 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21103 * server.c (handle_query): Use thread_to_gdb_id.
21104 (handle_v_cont, main): Use gdb_id_to_thread_id.
21105 * server.h (add_thread): Update prototype.
21106 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21107 prototypes.
21108
21109 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21110
21111 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21112 left-padded registers.
21113 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21114 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21115
21116 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21117
21118 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21119 * configure: Regenerate.
21120 * config.in: Regenerate.
21121 * server.h (NEED_DECLARATION_STRERROR):
21122 Replace with !HAVE_DECL_STRERROR.
21123
21124 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21125
21126 * linux-low.c (linux_wait, linux_send_signal): Don't test
21127 an unsigned long variable for > 0 if it could be MAX_ULONG.
21128 * server.c (myresume): Likewise.
21129 * target.c (set_desired_inferior): Likewise.
21130
21131 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21132
21133 * configure.ac: Simplify and improve check for socklen_t.
21134 * configure, config.in: Regenerate.
21135
21136 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21137
21138 * acconfig.h: Remove.
21139 * configure.ac: Add a test for socklen_t. Use three-argument
21140 AC_DEFINE throughout.
21141 * config.in: Regenerated using autoheader 2.59.
21142 * configure: Regenerated.
21143
21144 * gdbreplay.c (socklen_t): Provide a default.
21145 (remote_open): Use socklen_t.
21146 * remote-utils.c (socklen_t): Provide a default.
21147 (remote_open): Use socklen_t.
21148 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21149 unsigned char.
21150
21151 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21152 char for buffers.
21153 * linux-low.c (linux_read_memory, linux_write_memory)
21154 (linux_read_auxv): Likewise.
21155 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21156 (check_mem_write): Likewise.
21157 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21158 Likewise.
21159 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21160 (registers_from_string, register_data): Likewise.
21161 * server.c (handle_query, main): Likewise.
21162 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21163 (decode_M_packet): Likewise.
21164 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21165 * target.h (struct target_ops): Update read_memory, write_memory,
21166 and read_auxv.
21167 (read_inferior_memory, write_inferior_memory): Update.
21168 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21169 to unsigned char *.
21170 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21171 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21172 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21173 linux-s390-low.c, linux-sh-low.c: Update for changes in
21174 read_inferior_memory and the_low_target->breakpoint.
21175
21176 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21177
21178 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21179 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21180 * configure.srv: Add powerpc64-*-linux*.
21181 * linux-ppc64-low.c: New file.
21182
21183 2005-05-23 Orjan Friberg <orjanf@axis.com>
21184
21185 * linux-cris-low.c: New file with support for CRIS.
21186 * linux-crisv32-low.c: Ditto for CRISv32.
21187 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21188 (clean): Add reg-cris.c and reg-crisv32.c.
21189 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21190 reg-crisv32.o, and reg-crisv32.c to make rules.
21191 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21192 recognized targets.
21193
21194 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21195
21196 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21197 of sizeof (PTRACE_XFER_TYPE).
21198 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21199
21200 2005-05-12 Orjan Friberg <orjanf@axis.com>
21201
21202 * target.h (struct target_ops): Add insert_watchpoint,
21203 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21204 pointers for hardware watchpoint support.
21205 * linux-low.h (struct linux_target_ops): Ditto.
21206 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21207 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21208 to linux_target_ops.
21209 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21210 reply packet.
21211 * server.c (main): Recognize 'Z' and 'z' packets.
21212
21213 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21214
21215 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21216 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21217 (the_low_target): Add new members.
21218
21219 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21220
21221 * proc-service.c (ps_lgetregs): Search all_processes instead of
21222 all_threads.
21223
21224 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21225
21226 * server.c (start_inferior): Change return type to int.
21227 (attach_inferior): Change sigptr to int *.
21228 (handle_v_cont, handle_v_requests): Change signal to int *.
21229 (main): Change signal to int.
21230
21231 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21232
21233 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21234 * configure.srv: Add m32r*-*-linux*.
21235 * linux-m32r-low.c: New file.
21236
21237 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21238
21239 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21240
21241 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21242
21243 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21244 Take unsigned long arguments for PIDs.
21245 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21246 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21247 (wait_for_sigstop, linux_resume_one_process)
21248 (regsets_fetch_inferior_registers, linux_send_signal)
21249 (linux_read_auxv): Likewise. Update the types of variables holding
21250 PIDs. Update format string specifiers.
21251 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21252 * remote-utils.c (prepare_resume_reply): Likewise.
21253 * server.c (cont_thread, general_thread, step_thread)
21254 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21255 unsigned long.
21256 (handle_query): Update format specifiers.
21257 (handle_v_cont, main): Use strtoul for thread IDs.
21258 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21259 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21260 (general_thread, step_thread, thread_from_wait)
21261 (old_thread_from_wait): Update.
21262 * target.h (struct thread_resume): Use unsigned long for THREAD.
21263 (struct target_ops): Use unsigned long for arguments to attach and
21264 thread_alive.
21265
21266 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21267
21268 * acinclude.m4: Include bfd/bfd.m4 directly.
21269 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21270 <agriffis@toolchain.org>.
21271 * aclocal.m4, configure: Regenerated.
21272
21273 2005-01-07 Andrew Cagney <cagney@gnu.org>
21274
21275 * configure.ac: Rename configure.in, require autoconf 2.59.
21276 * configure: Re-generate.
21277
21278 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21279
21280 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21281 LIBS when finished.
21282 * aclocal.m4: Regenerated.
21283 * configure: Regenerated.
21284
21285 2004-11-21 Andreas Schwab <schwab@suse.de>
21286
21287 * linux-m68k-low.c (m68k_num_gregs): Define.
21288 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21289 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21290 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21291 (m68k_breakpoint_at): New. Add to the_low_target.
21292
21293 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21294 srv_linux_thread_db to yes.
21295
21296 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21297
21298 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21299 (ARCH_SET_FS): Likewise.
21300 (ARCH_GET_FS): Likewise.
21301 (ARCH_GET_GS): Likewise.
21302
21303 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21304
21305 * linux-i386-low.c (ps_get_thread_area): New.
21306 * linux-x86-64-low.c (ps_get_thread_area): New.
21307 * linux-low.c: Include <sys/syscall.h>.
21308 (linux_kill_one_process): Don't kill the first thread here.
21309 (linux_kill): Kill the first thread here.
21310 (kill_lwp): New function.
21311 (send_sigstop, linux_send_signal): Use it.
21312 * proc-service.c: Clean up #ifdefs.
21313 (fpregset_info): Delete.
21314 (ps_lgetregs): Update and enable implementation.
21315 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21316 implementations.
21317 * remote-utils.c (struct sym_cache, symbol_cache): New.
21318 (input_interrupt): Print a clearer message.
21319 (async_io_enabled): New variable.
21320 (enable_async_io, disable_async_io): Use it. Update comments.
21321 (look_up_one_symbol): Use the symbol cache.
21322 * thread-db.c (thread_db_look_up_symbols): New function.
21323 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21324
21325 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21326
21327 * configure.in: Test for -rdynamic.
21328 * configure: Regenerated.
21329 * Makefile (INTERNAL_LDFLAGS): New.
21330 (gdbserver, gdbreplay): Use it.
21331
21332 2004-09-02 Andrew Cagney <cagney@gnu.org>
21333
21334 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21335
21336 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21337
21338 * linux-low.c (linux_wait): Clear all_processes list also.
21339
21340 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21341
21342 * linux-low.c: Include <errno.h>. Remove extern declaration of
21343 errno.
21344
21345 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21346
21347 * gdbreplay.c, server.h, utils.c: Update copyright years.
21348
21349 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21350
21351 * server.c (main): Print child status or termination signal from
21352 variable 'signal', not 'sig'.
21353
21354 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21355
21356 * linux-low.c (linux_read_memory): Change return type to
21357 int. Check for and return error from ptrace().
21358 * target.c (read_inferior_memory): Change return type to int. Pass
21359 back return status from the_target->read_memory().
21360 * target.h (struct target_ops): Adapt *read_memory() prototype.
21361 Update comment.
21362 (read_inferior_memory): Adapt prototype.
21363 * server.c (main): Return an error packet if
21364 read_inferior_memory() returns an error.
21365
21366 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21367
21368 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21369 Unify with other clean targets.
21370
21371 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21372
21373 * server.c (handle_v_cont): Call set_desired_inferior.
21374
21375 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21376
21377 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21378
21379 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21380
21381 * linux-low.c (linux_wait): Unblock async I/O.
21382 (linux_resume): Block and enable async I/O.
21383 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21384 * server.h (block_async_io, unblock_async_io): Add prototypes.
21385
21386 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21387
21388 * remote-utils.c (remote_open): Print a status notice after
21389 opening a TCP port.
21390 * server.c (attach_inferior): Print a status notice after
21391 attaching.
21392
21393 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21394
21395 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21396
21397 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21398
21399 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21400 error packet.
21401 * server.c, target.h: Update copyright years.
21402
21403 2004-02-25 Roland McGrath <roland@redhat.com>
21404
21405 * target.h (struct target_ops): New member `read_auxv'.
21406 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21407 * linux-low.c (linux_read_auxv): New function.
21408 (linux_target_ops): Initialize `read_auxv' member to that.
21409
21410 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21411
21412 Committed by Jim Blandy <jimb@redhat.com>.
21413
21414 * linux-s390-low.c (s390_num_regs): Update.
21415 (s390_regmap): Remove control registers. Use __s390x__ predefine
21416 instead of GPR_SIZE to distiguish s390 and s390x targets.
21417
21418 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21419
21420 * linux-low.c: Update copyright year.
21421 (check_removed_breakpoint): Clear pending_is_breakpoint.
21422 (linux_set_resume_request, linux_queue_one_thread)
21423 (resume_status_pending_p): New functions.
21424 (linux_continue_one_thread): Use process->resume.
21425 (linux_resume): Only resume threads if there are no pending events.
21426 * linux-low.h (struct process_info): Add resume request
21427 pointer.
21428
21429 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21430
21431 * regcache.c (new_register_cache): Clear the allocated register
21432 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21433
21434 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21435
21436 * linux-low.c (linux_resume): Take a struct thread_resume *
21437 argument.
21438 (linux_wait): Update call.
21439 (resume_ptr): New static variable.
21440 (linux_continue_one_thread): Renamed from
21441 linux_continue_one_process. Use resume_ptr.
21442 (linux_resume): Use linux_continue_one_thread.
21443 * server.c (handle_v_cont, handle_v_requests): New functions.
21444 (myresume): New function.
21445 (main): Handle 'v' case.
21446 * target.h (struct thread_resume): New type.
21447 (struct target_ops): Change argument of "resume" to struct
21448 thread_resume *.
21449 (myresume): Delete macro.
21450
21451 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21452
21453 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21454 (uninstall): Support DESTDIR.
21455
21456 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21457
21458 * configure.srv: Add xscale*linux copy of arm*linux entry.
21459
21460 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21461
21462 * linux-arm-low.c (arm_reinsert_addr): New function.
21463 (the_low_target): Add arm_reinsert_addr.
21464
21465 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21466
21467 * mem-break.c: Remove whitespace at end of file.
21468
21469 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21470
21471 * configure.in: Check whether we need to prototype strerror.
21472 * server.h: Optionally prototype strerror.
21473 * gdbreplay.c (perror_with_name): Use strerror.
21474 * linux-low.c (linux_attach_lwp): Use strerror.
21475 * utils.c (perror_with_name): Use strerror.
21476 * config.in, configure: Regenerated.
21477
21478 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21479
21480 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21481 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21482
21483 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21484
21485 * Makefile.in (SFILES): Update.
21486 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21487 low-sun3.c: Remove files.
21488
21489 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21490
21491 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21492 (linux_detach_one_process, linux_detach): New functions.
21493 (linux_target_ops): Add linux_detach.
21494 * server.c (main): Handle 'D' packet.
21495 * target.h (struct target_ops): Add "detach" member.
21496 (detach_inferior): Define.
21497
21498 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21499
21500 From Kelley Cook <kelleycook@wideopenwest.com>:
21501 * configure.srv: Accept i[34567]86 variants.
21502
21503 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21504
21505 * linux-low.c (linux_wait_for_event): Correct comment typos.
21506 (linux_resume_one_process): Call check_removed_breakpoint.
21507 (linux_send_signal): New function.
21508 (linux_target_ops): Add linux_send_signal.
21509 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21510 of kill.
21511 * target.h (struct target_ops): Add send_signal.
21512
21513 2003-05-29 Jim Blandy <jimb@redhat.com>
21514
21515 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21516 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21517 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21518 away part of the register's value.
21519
21520 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21521
21522 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21523 (linux_wait_for_event, linux_init_signals): Likewise.
21524
21525 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21526
21527 * configure.in: Check for stdlib.h.
21528 * configure: Regenerated.
21529 * config.in: Regenerated.
21530
21531 2003-01-04 Andreas Schwab <schwab@suse.de>
21532
21533 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21534
21535 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21536
21537 * Makefile.in: Remove obsolete code.
21538
21539 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21540
21541 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21542 defined(PT_FPR0_HI).
21543
21544 2002-11-17 Stuart Hughes <seh@zee2.com>
21545
21546 * linux-arm-low.c (arm_num_regs): Increase.
21547 (arm_regmap): Include status register.
21548
21549 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21550
21551 * linux-low.c (register_addr): Remove incorrect -1 check.
21552
21553 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21554
21555 * linux-low.c (linux_create_inferior): Call setpgid. Return
21556 the new PID.
21557 (unstopped_p, linux_signal_pid): Remove.
21558 (linux_target_ops): Remove linux_signal_pid.
21559 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21560 global instead of target method.
21561 * target.h (struct target_ops): Remove signal_pid. Update comment
21562 for create_inferior.
21563 * server.c (signal_pid): New variable.
21564 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21565 gdbserver. Set the child to be the foreground process group.
21566 (attach_inferior): Set signal_pid.
21567
21568 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21569
21570 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21571
21572 2002-08-20 Jim Blandy <jimb@redhat.com>
21573
21574 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21575 default for this.
21576
21577 2002-08-01 Andrew Cagney <cagney@redhat.com>
21578
21579 * Makefile.in: Make chill references obsolete.
21580
21581 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21582
21583 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21584 * configure: Regenerate.
21585 * config.in: Regenerate.
21586
21587 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21588
21589 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21590 (perror_with_name, remote_close, remote_open, expect, play): Static.
21591
21592 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21593
21594 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21595 byte offsets instead of an array of indexes.
21596 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21597
21598 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21599
21600 * regcache.c: Add comment.
21601
21602 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21603
21604 * thread-db.c: New file.
21605 * proc-service.c: New file.
21606 * acinclude.m4: New file.
21607 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21608 proc-service.o, and thread-db.o.
21609 (linux-low.o): Add USE_THREAD_DB.
21610 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21611 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21612 * aclocal.m4: Regenerated.
21613 * config.in: Regenerated.
21614 * configure: Regenerated.
21615 * configure.in: Check for proc_service.h, sys/procfs.h,
21616 thread_db.h, and linux/elf.h headrs.
21617 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21618 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21619 Check for -lthread_db and thread support.
21620 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21621 PowerPC, and SuperH.
21622 * i387-fp.c: Constify arguments.
21623 * i387-fp.h: Likewise.
21624 * inferiors.c: (struct thread_info): Renamed from
21625 `struct inferior_info'. Remove PID member. Use generic inferior
21626 list header. All uses updated.
21627 (inferiors, signal_pid): Removed.
21628 (all_threads): New variable.
21629 (get_thread): Define.
21630 (add_inferior_to_list): New function.
21631 (for_each_inferior): New function.
21632 (change_inferior_id): New function.
21633 (add_inferior): Removed.
21634 (remove_inferior): New function.
21635 (add_thread): New function.
21636 (free_one_thread): New function.
21637 (remove_thread): New function.
21638 (clear_inferiors): Use for_each_inferior and free_one_thread.
21639 (find_inferior): New function.
21640 (find_inferior_id): New function.
21641 (inferior_target_data): Update argument type.
21642 (set_inferior_target_data): Likewise.
21643 (inferior_regcache_data): Likewise.
21644 (set_inferior_regcache_data): Likewise.
21645 * linux-low.c (linux_bp_reinsert): Remove.
21646 (all_processes, stopping_threads, using_thrads)
21647 (struct pending_signals, debug_threads, pid_of): New.
21648 (inferior_pid): Replace with macro.
21649 (struct inferior_linux_data): Remove.
21650 (get_stop_pc, add_process): New functions.
21651 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21652 Use add_process and add_thread.
21653 (linux_attach_lwp): New function, based on old linux_attach. Use
21654 add_process and add_thread. Set stop_expected for new threads.
21655 (linux_attach): New function.
21656 (linux_kill_one_process): New function.
21657 (linux_kill): Kill all LWPs.
21658 (linux_thread_alive): Use find_inferior_id.
21659 (check_removed_breakpoints, status_pending_p): New functions.
21660 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21661 Update. Use WNOHANG. Wait for cloned processes also. Update process
21662 struct for the found process.
21663 (linux_wait_for_event): New function.
21664 (linux_wait): Use it. Support LWPs.
21665 (send_sigstop, wait_for_sigstop, stop_all_processes)
21666 (linux_resume_one_process, linux_continue_one_process): New functions.
21667 (linux_resume): Support LWPs.
21668 (REGISTER_RAW_SIZE): Remove.
21669 (fetch_register): Use register_size instead. Call supply_register.
21670 (usr_store_inferior_registers): Likewise. Call collect_register.
21671 Fix recursive case.
21672 (regsets_fetch_inferior_registers): Improve error message.
21673 (regsets_store_inferior_registers): Add debugging.
21674 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21675 (unstopped_p, linux_signal_pid): New functions.
21676 (linux_target_ops): Add linux_signal_pid.
21677 (linux_init_signals): New function.
21678 (initialize_low): Call it. Initialize using_threads.
21679 * regcache.c (inferior_regcache_data): Add valid
21680 flag.
21681 (get_regcache): Fetch registers lazily. Add fetch argument
21682 and update all callers.
21683 (regcache_invalidate_one, regcache_invalidate): New
21684 functions.
21685 (new_register_cache): Renamed from create_register_cache.
21686 Return the new regcache.
21687 (free_register_cache): Change argument to a void *.
21688 (registers_to_string, registers_from_string): Call get_regcache
21689 with fetch flag set.
21690 (register_data): Make static. Pass fetch flag to get_regcache.
21691 (supply_register): Call get_regcache with fetch flag clear.
21692 (collect_register): Call get_regcache with fetch flag set.
21693 (collect_register_as_string): New function.
21694 * regcache.h: Update.
21695 * remote-utils.c (putpkt): Flush after debug output and use
21696 stderr.
21697 Handle input interrupts while waiting for an ACK.
21698 (input_interrupt): Use signal_pid method.
21699 (getpkt): Flush after debug output and use stderr.
21700 (outreg): Use collect_register_as_string.
21701 (new_thread_notify, dead_thread_notify): New functions.
21702 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21703 and general_thread.
21704 (look_up_one_symbol): Flush after debug output.
21705 * server.c (step_thread, server_waiting): New variables.
21706 (start_inferior): Don't use signal_pid. Update call to mywait.
21707 (attach_inferior): Update call to mywait.
21708 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21709 (main): Don't fetch/store registers explicitly. Use
21710 set_desired_inferior. Support proposed ``Hs'' packet. Update
21711 calls to mywait.
21712 * server.h: Update.
21713 (struct inferior_list, struct_inferior_list_entry): New.
21714 * target.c (set_desired_inferior): New.
21715 (write_inferior_memory): Constify.
21716 (mywait): New function.
21717 * target.h: Update.
21718 (struct target_ops): New signal_pid method.
21719 (mywait): Removed macro, added prototype.
21720
21721 * linux-low.h (regset_func): Removed.
21722 (regset_fill_func, regset_store_func): New.
21723 (enum regset_type): New.
21724 (struct regset_info): Add type field. Use new operation types.
21725 (struct linux_target_ops): stop_pc renamed to get_pc.
21726 Add decr_pc_after_break and breakpoint_at.
21727 (get_process, get_thread_proess, get_process_thread)
21728 (strut process_info, all_processes, linux_attach_lwp)
21729 (thread_db_init): New.
21730
21731 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21732 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21733 (the_low_target): Add new members.
21734 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21735 (i386_store_fpxregset): Constify.
21736 (target_regsets): Add new kind identifier.
21737 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21738 (i386_set_pc): Add debugging.
21739 (i386_breakpoint_at): New function.
21740 (the_low_target): Add new members.
21741 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21742 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21743 (mips_breakpoint_at): New.
21744 (the_low_target): Add new members.
21745 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21746 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21747 (the_low_target): Add new members.
21748 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21749 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21750 (the_low_target): Add new members.
21751 * linux-x86-64-low.c (target_regsets): Add new kind
21752 identifier.
21753
21754 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21755
21756 From Martin Pool <mbp@samba.org>:
21757 * server.c (gdbserver_usage): New function.
21758 (main): Call it.
21759
21760 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21761
21762 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21763 stop_at -> stop_pc.
21764
21765 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21766
21767 * Makefile.in: Remove obsolete code.
21768
21769 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21770
21771 * linux-low.c (regsets_fetch_inferior_registers),
21772 (regsets_store_inferior_registers): Removed cast to int from
21773 ptrace() calls.
21774 * regcache.h: Added declaration of struct inferior_info.
21775
21776 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21777
21778 * inferiors.c (struct inferior_info): Add regcache_data.
21779 (add_inferior): Call create_register_cache.
21780 (clear_inferiors): Call free_register_cache.
21781 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21782 * regcache.c (struct inferior_regcache_data): New.
21783 (registers): Remove.
21784 (get_regcache): New function.
21785 (create_register_cache, free_register_cache): New functions.
21786 (set_register_cache): Don't initialize the register cache here.
21787 (registers_to_string, registers_from_string, register_data): Call
21788 get_regcache.
21789 * regcache.h: Add prototypes.
21790 * server.h: Likewise.
21791
21792 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21793
21794 * mem-break.c: New file.
21795 * mem-break.h: New file.
21796 * Makefile.in: Add mem-break.o rule; update server.h
21797 dependencies.
21798 * inferiors.c (struct inferior_info): Add target_data
21799 member.
21800 (clear_inferiors): Free target_data member if set.
21801 (inferior_target_data, set_inferior_target_data): New functions.
21802 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21803 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21804 * linux-low.c (linux_bp_reinsert): New variable.
21805 (struct inferior_linux_data): New.
21806 (linux_create_inferior): Use set_inferior_target_data.
21807 (linux_attach): Likewise. Call add_inferior.
21808 (linux_wait_for_one_inferior): New function.
21809 (linux_wait): Call it.
21810 (linux_write_memory): Add const.
21811 (initialize_low): Call set_breakpoint_data.
21812 * linux-low.h (struct linux_target_ops): Add breakpoint
21813 handling members.
21814 * server.c (attach_inferior): Remove extra add_inferior
21815 call.
21816 * server.h: Include mem-break.h. Update inferior.c
21817 prototypes.
21818 * target.c (read_inferior_memory)
21819 (write_inferior_memory): New functions.
21820 * target.h (read_inferior_memory)
21821 (write_inferior_memory): Change macros to prototypes.
21822 (struct target_ops): Update comments. Add const to write_memory
21823 definition.
21824
21825 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21826
21827 * linux-low.c (usr_store_inferior_registers): Support
21828 registers which are allowed to fail to store.
21829 * linux-low.h (linux_target_ops): Likewise.
21830 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21831 (ppc_cannot_store_register): FPSCR may not be storable.
21832
21833 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21834
21835 * server.h: Include <string.h> if HAVE_STRING_H.
21836 * ChangeLog: Correct paths in last ChangeLog entry.
21837
21838 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21839
21840 * linux-low.h: Remove obsolete prototypes.
21841 (struct linux_target_ops): New.
21842 (extern the_low_target): New.
21843 * linux-low.c (num_regs, regmap): Remove declarations.
21844 (register_addr): Use the_low_target explicitly.
21845 (fetch_register): Likewise.
21846 (usr_fetch_inferior_registers): Likewise.
21847 (usr_store_inferior_registers): Likewise.
21848 * linux-arm-low.c (num_regs): Remove.
21849 (arm_num_regs): Define.
21850 (arm_regmap): Renamed from regmap, made static.
21851 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21852 made static.
21853 (arm_cannot_store_register): Renamed from cannot_store_register,
21854 made static.
21855 (the_low_target): New.
21856 * linux-i386-low.c (num_regs): Remove.
21857 (i386_num_regs): Define.
21858 (i386_regmap): Renamed from regmap, made static.
21859 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21860 made static.
21861 (i386_cannot_store_register): Renamed from cannot_store_register,
21862 made static.
21863 (the_low_target): New.
21864 * linux-ia64-low.c (num_regs): Remove.
21865 (ia64_num_regs): Define.
21866 (ia64_regmap): Renamed from regmap, made static.
21867 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21868 made static.
21869 (ia64_cannot_store_register): Renamed from cannot_store_register,
21870 made static.
21871 (the_low_target): New.
21872 * linux-m68k-low.c (num_regs): Remove.
21873 (m68k_num_regs): Define.
21874 (m68k_regmap): Renamed from regmap, made static.
21875 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21876 made static.
21877 (m68k_cannot_store_register): Renamed from cannot_store_register,
21878 made static.
21879 (the_low_target): New.
21880 * linux-mips-low.c (num_regs): Remove.
21881 (mips_num_regs): Define.
21882 (mips_regmap): Renamed from regmap, made static.
21883 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21884 made static.
21885 (mips_cannot_store_register): Renamed from cannot_store_register,
21886 made static.
21887 (the_low_target): New.
21888 * linux-ppc-low.c (num_regs): Remove.
21889 (ppc_num_regs): Define.
21890 (ppc_regmap): Renamed from regmap, made static.
21891 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21892 made static.
21893 (ppc_cannot_store_register): Renamed from cannot_store_register,
21894 made static.
21895 (the_low_target): New.
21896 * linux-s390-low.c (num_regs): Remove.
21897 (s390_num_regs): Define.
21898 (s390_regmap): Renamed from regmap, made static.
21899 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21900 made static.
21901 (s390_cannot_store_register): Renamed from cannot_store_register,
21902 made static.
21903 (the_low_target): New.
21904 * linux-sh-low.c (num_regs): Remove.
21905 (sh_num_regs): Define.
21906 (sh_regmap): Renamed from regmap, made static.
21907 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21908 made static.
21909 (sh_cannot_store_register): Renamed from cannot_store_register,
21910 made static.
21911 (the_low_target): New.
21912 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21913 (the_low_target): New.
21914
21915 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21916
21917 * Makefile.in: Add stamp-h target.
21918 * configure.in: Create stamp-h.
21919 * configure: Regenerated.
21920
21921 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21922
21923 * inferiors.c: New file.
21924 * target.c: New file.
21925 * target.h: New file.
21926 * Makefile.in: Add target.o and inferiors.o. Update
21927 dependencies.
21928 * linux-low.c (inferior_pid): New static variable,
21929 moved from server.c.
21930 (linux_create_inferior): Renamed from create_inferior.
21931 Call add_inferior. Return 0 on success instead of a PID.
21932 (linux_attach): Renamed from myattach.
21933 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21934 (linux_thread_alive): Renamed from mythread_alive.
21935 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21936 child dies.
21937 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21938 (regsets_store_inferior_registers): Correct error message.
21939 Add missing ``return 0''.
21940 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21941 (linux_store_registers): Renamed from store_inferior_registers.
21942 (linux_read_memory): Renamed from read_inferior_memory.
21943 (linux_write_memory): Renamed from write_inferior_memory.
21944 (linux_target_ops): New structure.
21945 (initialize_low): Call set_target_ops ().
21946 * remote-utils.c (unhexify): New function.
21947 (hexify): New function.
21948 (input_interrupt): Send signals to ``signal_pid''.
21949 * server.c (inferior_pid): Remove.
21950 (start_inferior): Update create_inferior call.
21951 (attach_inferior): Call add_inferior.
21952 (handle_query): New function.
21953 (main): Call handle_query for `q' packets.
21954 * server.h: Include "target.h". Remove obsolete prototypes.
21955 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21956
21957 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21958
21959 * Makefile.in: Add WARN_CFLAGS. Update configury
21960 dependencies.
21961 * configure.in: Check for <string.h>
21962 * configure: Regenerate.
21963 * config.in: Regenerate.
21964 * gdbreplay.c: Include needed system headers.
21965 (remote_open): Remove strchr prototype.
21966 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21967 * regcache.c (supply_register): Change buf argument to const void *.
21968 (supply_register_by_name): Likewise.
21969 (collect_register): Change buf argument to void *.
21970 (collect_register_by_name): Likewise.
21971 * regcache.h: Add missing prototypes.
21972 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21973 * server.c (handle_query): New function.
21974 (attached): New static variable, moved out of main.
21975 (main): Quiet longjmp clobber warnings.
21976 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21977 * utils.c (error): Remove NORETURN.
21978 (fatal): Likewise.
This page took 0.749615 seconds and 4 git commands to generate.