gdbserver/linux-low: turn the 'decr_pc_after_break' field into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
d4807ea2
TBA
12020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn the 'decr_pc_after_break' linux_target_ops field into
4 a method of linux_process_target.
5
6 * linux-low.h (struct linux_target_ops)
7 <decr_pc_after_break>: Remove.
8 (class linux_process_target) <low_decr_pc_after_break>: New method
9 declaration.
10 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
11 New method implementation.
12
13 Update the users below.
14
15 (linux_process_target::save_stop_reason)
16 (linux_process_target::wait_1)
17 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
18 New declaration.
19 (x86_target::low_decr_pc_after_break): New method implementation.
20 (the_low_target): Remove the field.
21 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
22 New declaration.
23 (bfin_target::low_decr_pc_after_break): New method implementation.
24 (the_low_target): Remove the field.
25 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
26 New declaration.
27 (m68k_target::low_decr_pc_after_break): New method implementation.
28 (the_low_target): Remove the field.
29 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
30 New declaration.
31 (s390_target::low_decr_pc_after_break): New method implementation.
32 (the_low_target): Remove the field.
33 * linux-aarch64-low.cc (the_low_target): Remove the field.
34 * linux-arm-low.cc (the_low_target): Remove the field.
35 * linux-cris-low.cc (the_low_target): Remove the field.
36 * linux-crisv32-low.cc (the_low_target): Remove the field.
37 * linux-m32r-low.cc (the_low_target): Remove the field.
38 * linux-mips-low.cc (the_low_target): Remove the field.
39 * linux-nios2-low.cc (the_low_target): Remove the field.
40 * linux-ppc-low.cc (the_low_target): Remove the field.
41 * linux-riscv-low.cc (the_low_target): Remove the field.
42 * linux-sh-low.cc (the_low_target): Remove the field.
43 * linux-sparc-low.cc (the_low_target): Remove the field.
44 * linux-tic6x-low.cc (the_low_target): Remove the field.
45 * linux-tile-low.cc (the_low_target): Remove the field.
46 * linux-xtensa-low.cc (the_low_target): Remove the field.
47
7582c77c
TBA
482020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
49
50 Remove the 'supports_software_single_step' linux target op and let
51 the concrete linux target define it by overriding the op in
52 process_stratum_target.
53 Turn the 'get_next_pcs' linux target op into a method of
54 linux_process_target.
55
56 * linux-low.h (struct linux_target_ops): Remove the ops.
57 (class linux_process_target) <supports_software_single_step>:
58 Remove.
59 <low_get_next_pcs>: Declare.
60 * linux-low.cc (can_software_single_step): Remove.
61 (linux_process_target::low_get_next_pcs): Define.
62 (linux_process_target::supports_software_single_step): Remove.
63
64 Update the callers below.
65
66 (linux_process_target::handle_extended_wait)
67 (linux_process_target::wait_1)
68 (linux_process_target::install_software_single_step_breakpoints)
69 (linux_process_target::single_step)
70 (linux_process_target::thread_needs_step_over)
71 (linux_process_target::proceed_one_lwp)
72 (linux_process_target::supports_range_stepping)
73
74 * linux-x86-low.cc (the_low_target): Remove the op field.
75 * linux-aarch64-low.cc (the_low_target): Ditto.
76 * linux-bfin-low.cc (the_low_target): Ditto.
77 * linux-cris-low.cc (the_low_target): Ditto.
78 * linux-crisv32-low.cc (the_low_target): Ditto.
79 * linux-m32r-low.cc (the_low_target): Ditto.
80 * linux-m68k-low.cc (the_low_target): Ditto.
81 * linux-mips-low.cc (the_low_target): Ditto.
82 * linux-nios2-low.cc (the_low_target): Ditto.
83 * linux-ppc-low.cc (the_low_target): Ditto.
84 * linux-riscv-low.cc (the_low_target): Ditto.
85 * linux-s390-low.cc (the_low_target): Ditto.
86 * linux-sh-low.cc (the_low_target): Ditto.
87 * linux-sparc-low.cc (the_low_target): Ditto.
88 * linux-tic6x-low.cc (the_low_target): Ditto.
89 * linux-tile-low.cc (the_low_target): Ditto.
90 * linux-xtensa-low.cc (the_low_target): Ditto.
91 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
92 <supports_software_single_step>: Declare.
93 (arm_target::supports_software_single_step): Define.
94 (arm_gdbserver_get_next_pcs): Turn into...
95 (arm_target::low_get_next_pcs): ...this.
96 (the_low_target): Remove the op field.
97
3ca4edb6
TBA
982020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
99
100 Remove the 'sw_breakpoint_from_kind' linux target op, and let
101 the concrete linux target define it by overriding the op
102 in process_stratum_target.
103
104 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
105 Remove.
106 * linux-low.h (struct linux_target_ops): Remove the op.
107 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
108 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
109 Declare.
110 (x86_sw_breakpoint_from_kind): Turn into...
111 (x86_target::sw_breakpoint_from_kind): ...this.
112 (the_low_target): Remove the op field.
113 * linux-aarch64-low.cc (class aarch64_target)
114 <sw_breakpoint_from_kind>: Declare.
115 (aarch64_sw_breakpoint_from_kind): Turn into...
116 (aarch64_target::sw_breakpoint_from_kind): ...this.
117 (the_low_target): Remove the op field.
118 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
119 Declare.
120 (arm_target::sw_breakpoint_from_kind): Define.
121 (the_low_target): Remove the op field.
122 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
123 Declare.
124 (bfin_sw_breakpoint_from_kind): Turn into...
125 (bfin_target::sw_breakpoint_from_kind): ...this.
126 (the_low_target): Remove the op field.
127 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
128 Declare.
129 (cris_sw_breakpoint_from_kind): Turn into...
130 (cris_target::sw_breakpoint_from_kind): ...this.
131 (the_low_target): Remove the op field.
132 * linux-crisv32-low.cc (class crisv32_target)
133 <sw_breakpoint_from_kind>: Declare.
134 (cris_sw_breakpoint_from_kind): Turn into...
135 (crisv32_target::sw_breakpoint_from_kind): ...this.
136 (the_low_target): Remove the op field.
137 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
138 Declare.
139 (ia64_target::sw_breakpoint_from_kind): Define.
140 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
141 Declare.
142 (m32r_sw_breakpoint_from_kind): Turn into...
143 (m32r_target::sw_breakpoint_from_kind): ...this.
144 (the_low_target): Remove the op field.
145 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
146 Declare.
147 (m68k_sw_breakpoint_from_kind): Turn into...
148 (m68k_target::sw_breakpoint_from_kind): ...this.
149 (the_low_target): Remove the op field.
150 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
151 Declare.
152 (mips_sw_breakpoint_from_kind): Turn into...
153 (mips_target::sw_breakpoint_from_kind): ...this.
154 (the_low_target): Remove the op field.
155 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
156 Declare.
157 (nios2_sw_breakpoint_from_kind): Turn into...
158 (nios2_target::sw_breakpoint_from_kind): ...this.
159 (the_low_target): Remove the op field.
160 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
161 Declare.
162 (ppc_sw_breakpoint_from_kind): Turn into...
163 (ppc_target::sw_breakpoint_from_kind): ...this.
164 (the_low_target): Remove the op field.
165 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
166 Declare.
167 (riscv_sw_breakpoint_from_kind): Turn into...
168 (riscv_target::sw_breakpoint_from_kind): ...this.
169 (the_low_target): Remove the op field.
170 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
171 Declare.
172 (s390_sw_breakpoint_from_kind): Turn into...
173 (s390_target::sw_breakpoint_from_kind): ...this.
174 (the_low_target): Remove the op field.
175 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
176 Declare.
177 (sh_sw_breakpoint_from_kind): Turn into...
178 (sh_target::sw_breakpoint_from_kind): ...this.
179 (the_low_target): Remove the op field.
180 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
181 Declare.
182 (sparc_sw_breakpoint_from_kind): Turn into...
183 (sparc_target::sw_breakpoint_from_kind): ...this.
184 (the_low_target): Remove the op field.
185 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
186 Declare.
187 (tic6x_sw_breakpoint_from_kind): Turn into...
188 (tic6x_target::sw_breakpoint_from_kind): ...this.
189 (the_low_target): Remove the op field.
190 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
191 Declare.
192 (tile_sw_breakpoint_from_kind): Turn into...
193 (tile_target::sw_breakpoint_from_kind): ...this.
194 (the_low_target): Remove the op field.
195 * linux-xtensa-low.cc (class xtensa_target)
196 <sw_breakpoint_from_kind>: Declare.
197 (xtensa_sw_breakpoint_from_kind): Turn into...
198 (xtensa_target::sw_breakpoint_from_kind): ...this.
199 (the_low_target): Remove the op field.
200
06250e4e
TBA
2012020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
202
203 Remove the 'breakpoint_kind_from_pc' and
204 'breakpoint_kind_from_current_state' linux target ops, and let the
205 concrete linux target define them by overriding the ops of
206 process_stratum_target.
207
208 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
209 Remove.
210 (linux_process_target::breakpoint_kind_from_current_state): Remove.
211 * linux-low.h (struct linux_target_ops): Remove ops.
212 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
213 <breakpoint_kind_from_current_state>: Remove.
214 * linux-x86-low.cc (the_low_target): Remove the op fields.
215 * linux-bfin-low.cc (the_low_target): Ditto.
216 * linux-cris-low.cc (the_low_target): Ditto.
217 * linux-crisv32-low.cc (the_low_target): Ditto.
218 * linux-m32r-low.cc (the_low_target): Ditto.
219 * linux-m68k-low.cc (the_low_target): Ditto.
220 * linux-mips-low.cc (the_low_target): Ditto.
221 * linux-nios2-low.cc (the_low_target): Ditto.
222 * linux-ppc-low.cc (the_low_target): Ditto.
223 * linux-s390-low.cc (the_low_target): Ditto.
224 * linux-sh-low.cc (the_low_target): Ditto.
225 * linux-sparc-low.cc (the_low_target): Ditto.
226 * linux-tic6x-low.cc (the_low_target): Ditto.
227 * linux-tile-low.cc (the_low_target): Ditto.
228 * linux-xtensa-low.cc (the_low_target): Ditto.
229 * linux-aarch64-low.cc (class aarch64_target)
230 <breakpoint_kind_from_pc>
231 <breakpoint_kind_from_current_state>: Declare.
232 (aarch64_breakpoint_kind_from_pc): Turn into...
233 (aarch64_target::breakpoint_kind_from_pc): ...this.
234 (aarch64_breakpoint_kind_from_current_state): Turn into...
235 (aarch64_target::breakpoint_kind_from_current_state): ...this.
236 (the_low_target): Remove the op fields.
237 * linux-arm-low.cc (class arm_target):
238 <breakpoint_kind_from_pc>
239 <breakpoint_kind_from_current_state>: Declare.
240 (arm_target::breakpoint_kind_from_pc): Define.
241 (arm_target::breakpoint_kind_from_current_state): Define.
242 (the_low_target): Remove the op fields.
243 * linux-riscv-low.cc (class riscv_target):
244 <breakpoint_kind_from_pc>: Declare.
245 (riscv_breakpoint_kind_from_pc): Turn into...
246 (riscv_target::breakpoint_kind_from_pc): ...this.
247 (the_low_target): Remove the op fields.
248
bf9ae9d8
TBA
2492020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
250
251 Turn the 'get_pc' and 'set_pc' linux target ops into methods
252 of linux_process_target.
253
254 * linux-low.h (struct linux_target_ops): Remove the ops.
255 (class linux_process_target) <low_supports_breakpoints>
256 <low_get_pc>
257 <low_set_pc>: Declare.
258 * linux-low.cc (supports_breakpoints): Turn into...
259 (linux_process_target::low_supports_breakpoints): ...this.
260 (linux_process_target::low_get_pc): Define.
261 (linux_process_target::low_set_pc): Define.
262
263 Update the callers below.
264
265 (linux_process_target::get_pc)
266 (linux_process_target::save_stop_reason)
267 (linux_process_target::maybe_move_out_of_jump_pad)
268 (linux_process_target::wait_1)
269 (linux_process_target::resume_one_lwp_throw)
270 (linux_process_target::resume)
271 (linux_process_target::proceed_all_lwps)
272 (linux_process_target::read_pc)
273 (linux_process_target::write_pc)
274
275 * linux-x86-low.cc (class linux_process_target)
276 <low_supports_breakpoints>
277 <low_get_pc>
278 <low_set_pc>: Declare.
279 (x86_target::low_supports_breakpoints): Define.
280 (x86_get_pc): Turn into...
281 (x86_target::low_get_pc): ...this.
282 (x86_set_pc): Turn into...
283 (x86_target::low_set_pc): ...this.
284 (the_low_target): Remove the op fields.
285 * linux-arm-low.cc (class arm_target)
286 <low_supports_breakpoints>
287 <low_get_pc>
288 <low_set_pc>: Declare.
289 (arm_target::low_supports_breakpoints)
290 (arm_target::low_get_pc)
291 (arm_target::low_set_pc): Define.
292 (the_low_target): Remove the op fields.
293 * linux-bfin-low.cc (class bfin_target)
294 <low_supports_breakpoints>
295 <low_get_pc>
296 <low_set_pc>: Declare.
297 (bfin_target::low_supports_breakpoints)
298 (bfin_target::low_get_pc)
299 (bfin_target::low_set_pc): Define.
300 (the_low_target): Remove the op fields.
301 * linux-cris-low.cc (class cris_target)
302 <low_supports_breakpoints>
303 <low_get_pc>
304 <low_set_pc>: Declare.
305 (cris_target::low_supports_breakpoints)
306 (cris_target::low_get_pc)
307 (cris_target::low_set_pc): Define.
308 (the_low_target): Remove the op fields.
309 * linux-crisv32-low.cc (class crisv32_target)
310 <low_supports_breakpoints>
311 <low_get_pc>
312 <low_set_pc>: Declare.
313 (crisv32_target::low_supports_breakpoints)
314 (crisv32_target::low_get_pc)
315 (crisv32_target::low_set_pc): Define.
316 (the_low_target): Remove the op fields.
317 * linux-m32r-low.cc (class m32r_target)
318 <low_supports_breakpoints>
319 <low_get_pc>
320 <low_set_pc>: Declare.
321 (m32r_target::low_supports_breakpoints)
322 (m32r_target::low_get_pc)
323 (m32r_target::low_set_pc): Define.
324 (the_low_target): Remove the op fields.
325 * linux-m68k-low.cc (class m68k_target)
326 <low_supports_breakpoints>
327 <low_get_pc>
328 <low_set_pc>: Declare.
329 (m68k_target::low_supports_breakpoints)
330 (m68k_target::low_get_pc)
331 (m68k_target::low_set_pc): Define.
332 (the_low_target): Remove the op fields.
333 * linux-nios2-low.cc (class nios2_target)
334 <low_supports_breakpoints>
335 <low_get_pc>
336 <low_set_pc>: Declare.
337 (nios2_target::low_supports_breakpoints)
338 (nios2_target::low_get_pc)
339 (nios2_target::low_set_pc): Define.
340 (the_low_target): Remove the op fields.
341 * linux-sh-low.cc (class sh_target)
342 <low_supports_breakpoints>
343 <low_get_pc>
344 <low_set_pc>: Declare.
345 (sh_target::low_supports_breakpoints)
346 (sh_target::low_get_pc)
347 (sh_target::low_set_pc): Define.
348 (the_low_target): Remove the op fields.
349 * linux-xtensa-low.cc (class xtensa_target)
350 <low_supports_breakpoints>
351 <low_get_pc>
352 <low_set_pc>: Declare.
353 (xtensa_target::low_supports_breakpoints)
354 (xtensa_target::low_get_pc)
355 (xtensa_target::low_set_pc): Define.
356 (the_low_target): Remove the op fields.
357 * linux-sparc-low.cc (class sparc_target)
358 <low_supports_breakpoints>
359 <low_get_pc>: Declare.
360 (sparc_target::low_supports_breakpoints)
361 (sparc_target::low_get_pc): Define.
362 (the_low_target): Remove the op fields.
363 * linux-tile-low.cc (class tile_target)
364 <low_supports_breakpoints>
365 <low_get_pc>
366 <low_set_pc>: Declare.
367 (tile_target::low_supports_breakpoints)
368 (tile_target::low_get_pc)
369 (tile_target::low_set_pc): Define.
370 (the_low_target): Remove the op fields.
371 * linux-aarch64-low.cc (class aarch64_target)
372 <low_supports_breakpoints>
373 <low_get_pc>
374 <low_set_pc>: Declare.
375 (aarch64_target::low_supports_breakpoints): Define.
376 (aarch64_get_pc): Turn into...
377 (aarch64_target::low_get_pc): ...this.
378 (aarch64_set_pc): Turn into...
379 (aarch64_target::low_set_pc): ...this.
380 (the_low_target): Remove the op fields.
381 * linux-mips-low.cc (class mips_target)
382 <low_supports_breakpoints>
383 <low_get_pc>
384 <low_set_pc>: Declare.
385 (mips_target::low_supports_breakpoints): Define.
386 (mips_get_pc): Turn into...
387 (mips_target::low_get_pc): ...this.
388 (mips_set_pc): Turn into...
389 (mips_target::low_set_pc): ...this.
390 (the_low_target): Remove the op fields.
391 * linux-ppc-low.cc (class ppc_target)
392 <low_supports_breakpoints>
393 <low_get_pc>
394 <low_set_pc>: Declare.
395 (ppc_target::low_supports_breakpoints): Define.
396 (ppc_get_pc): Turn into...
397 (ppc_target::low_get_pc): ...this.
398 (ppc_set_pc): Turn into...
399 (ppc_target::low_set_pc): ...this.
400 (the_low_target): Remove the op fields.
401 * linux-riscv-low.cc (class riscv_target)
402 <low_supports_breakpoints>
403 <low_get_pc>
404 <low_set_pc>: Declare.
405 (riscv_target::low_supports_breakpoints): Define.
406 (riscv_get_pc): Turn into...
407 (riscv_target::low_get_pc): ...this.
408 (riscv_set_pc): Turn into...
409 (riscv_target::low_set_pc): ...this.
410 (the_low_target): Remove the op fields.
411 * linux-s390-low.cc (class s390_target)
412 <low_supports_breakpoints>
413 <low_get_pc>
414 <low_set_pc>: Declare.
415 (s390_target::low_supports_breakpoints): Define.
416 (s390_get_pc): Turn into...
417 (s390_target::low_get_pc): ...this.
418 (s390_set_pc): Turn into...
419 (s390_target::low_set_pc): ...this.
420 (the_low_target): Remove the op fields.
421 * linux-tic6x-low.cc (class tic6x_target)
422 <low_supports_breakpoints>
423 <low_get_pc>
424 <low_set_pc>: Declare.
425 (tic6x_target::low_supports_breakpoints): Define.
426 (tic6x_get_pc): Turn into...
427 (tic6x_target::low_get_pc): ...this.
428 (tic6x_set_pc): Turn into...
429 (tic6x_target::low_set_pc): ...this.
430 (the_low_target): Remove the op fields.
431
df95181f
TBA
4322020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
433
434 Turn some more static methods in linux-low into private methods
435 of linux_process_target.
436
437 * linux-low.cc (get_pc): Turn into...
438 (linux_process_target::get_pc): ...this.
439 (save_stop_reason): Turn into...
440 (linux_process_target::save_stop_reason): ...this.
441 (thread_still_has_status_pending_p): Turn into...
442 (linux_process_target::thread_still_has_status_pending): ...this.
443 (status_pending_p_callback): Turn into...
444 (linux_process_target::status_pending_p_callback): ...this.
445 (resume_stopped_resumed_lwps): Turn into...
446 (linux_process_target::resume_stopped_resumed_lwps): ...this.
447 (install_software_single_step_breakpoints): Turn into...
448 (linux_process_target::install_software_single_step_breakpoints):
449 ...this.
450 (single_step): Turn into...
451 (linux_process_target::single_step): ...this.
452 (linux_resume_one_lwp_throw): Turn into...
453 (linux_process_target::resume_one_lwp_throw): ...this.
454 (linux_resume_one_lwp): Turn into...
455 (linux_process_target::resume_one_lwp): ...this.
456 (resume_status_pending_p): Turn into...
457 (linux_process_target::resume_status_pending): ...this.
458 (need_step_over_p): Turn into...
459 (linux_process_target::thread_needs_step_over): ...this.
460 (linux_resume_one_thread): Turn into...
461 (linux_process_target::resume_one_thread): ...this.
462 (proceed_one_lwp): Turn into...
463 (linux_process_target::proceed_one_lwp): ...this.
464 (unsuspend_and_proceed_one_lwp): Turn into...
465 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
466
467 Update the calls/references to the above functions below.
468
469 (linux_process_target::handle_extended_wait)
470 (linux_process_target::filter_event)
471 (linux_process_target::wait_for_event_filtered)
472 (linux_process_target::wait_1)
473 (linux_process_target::move_out_of_jump_pad)
474 (linux_process_target::start_step_over)
475 (linux_process_target::resume)
476 (linux_process_target::proceed_all_lwps)
477 (regsets_store_inferior_registers)
478 (linux_process_target::store_register)
479
480 * linux-low.h (class linux_process_target)
481 <get_pc>
482 <save_stop_reason>
483 <thread_still_has_status_pending>
484 <status_pending_p_callback>
485 <resume_stopped_resumed_lwps>
486 <install_software_single_step_breakpoints>
487 <single_step>
488 <resume_one_lwp_throw>
489 <resume_one_lwp>
490 <resume_status_pending>
491 <thread_needs_step_over>
492 <resume_one_thread>
493 <proceed_one_lwp>
494 <unsuspend_and_proceed_one_lwp>: Declare.
495
bd70b1f2
TBA
4962020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
497
498 Turn the 'fetch_register' linux target op into a method of
499 linux_process_target.
500
501 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
502 (class linux_process_target) <low_fetch_register>: Declare.
503 * linux-x86-low.cc (the_low_target)
504 * linux-aarch64-low.cc (the_low_target)
505 * linux-arm-low.cc (the_low_target)
506 * linux-bfin-low.cc (the_low_target)
507 * linux-cris-low.cc (the_low_target)
508 * linux-crisv32-low.cc (the_low_target)
509 * linux-m32r-low.cc (the_low_target)
510 * linux-m68k-low.cc (the_low_target)
511 * linux-nios2-low.cc (the_low_target)
512 * linux-ppc-low.cc (the_low_target)
513 * linux-s390-low.cc (the_low_target)
514 * linux-sh-low.cc (the_low_target)
515 * linux-sparc-low.cc (the_low_target)
516 * linux-tic6x-low.cc (the_low_target)
517 * linux-tile-low.cc (the_low_target)
518 * linux-xtensa-low.cc (the_low_target): Remove the op field.
519 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
520 Declare.
521 (ia64_fetch_register): Turn into...
522 (ia64_target::low_fetch_register): ...this.
523 (the_low_target): Remove the op field.
524 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
525 Declare.
526 (mips_fetch_register): Turn into...
527 (mips_target::low_fetch_register): ...this.
528 (the_low_target): Remove the op field.
529 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
530 Declare.
531 (riscv_fetch_register): Turn into...
532 (riscv_target::low_fetch_register): ...this.
533 (the_low_target): Remove the op field.
534
535 Update the callers below.
536
537 * linux-low.cc (linux_process_target::fetch_registers)
538 (linux_process_target::low_fetch_register)
539
daca57a7
TBA
5402020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
541
542 Turn the 'cannot_fetch_register' and 'cannot_store_register'
543 linux target ops into methods of linux_process_target.
544
545 * linux-low.h (struct linux_target_ops): Remove the low target ops.
546 (class linux_process_target) <fetch_register>
547 <store_register>
548 <usr_fetch_inferior_registers>
549 <usr_store_inferior_registers>
550 <low_cannot_fetch_register>
551 <low_cannot_fetch_register> Declare.
552 * linux-low.cc (fetch_register): Turn into...
553 (linux_process_target::fetch_register): ...this.
554 (store_register): Turn into ...
555 (linux_process_target::store_register): ...this.
556 (usr_fetch_inferior_registers): Turn into...
557 (linux_process_target::usr_fetch_inferior_registers): ...this.
558 (usr_store_inferior_registers): Turn into...
559 (linux_process_target::usr_store_inferior_registers): ...this.
560 * linux-x86-low.cc (class x86_target)
561 <low_cannot_fetch_register>
562 <low_cannot_store_register>: Declare.
563 (x86_cannot_store_register): Turn into...
564 (x86_target::low_cannot_store_register): ...this.
565 (x86_cannot_fetch_register): Turn into...
566 (x86_target::low_cannot_fetch_register): ...this.
567 (the_low_target): Remove the target op fields.
568 * linux-aarch64-low.cc (class aarch64_target)
569 <low_cannot_fetch_register>
570 <low_cannot_store_register>: Declare.
571 (aarch64_target::low_cannot_fetch_register)
572 (aarch64_target::low_cannot_store_register): Define.
573 (the_low_target): Remove the op fields.
574 * linux-arm-low.cc (class arm_target)
575 <low_cannot_fetch_register>
576 <low_cannot_store_register>: Declare.
577 (arm_cannot_fetch_register): Turn into...
578 (arm_target::low_cannot_fetch_register): ...this.
579 (arm_cannot_store_register): Turn into...
580 (arm_target::low_cannot_store_register): ...this.
581 (the_low_target): Remove the op fields.
582 * linux-bfin-low.cc (class bfin_target)
583 <low_cannot_fetch_register>
584 <low_cannot_store_register>: Declare.
585 (bfin_cannot_fetch_register): Turn into...
586 (bfin_target::low_cannot_fetch_register): ...this.
587 (bfin_cannot_store_register): Turn into...
588 (bfin_target::low_cannot_store_register): ...this.
589 (the_low_target): Remove the op fields.
590 * linux-cris-low.cc (class cris_target)
591 <low_cannot_fetch_register>
592 <low_cannot_store_register>: Declare.
593 (cris_cannot_fetch_register): Turn into...
594 (cris_target::low_cannot_fetch_register): ...this.
595 (cris_cannot_store_register): Turn into...
596 (cris_target::low_cannot_store_register): ...this.
597 (the_low_target): Remove the op fields.
598 * linux-crisv32-low.cc (class crisv32_target)
599 <low_cannot_fetch_register>
600 <low_cannot_store_register>: Declare.
601 (crisv32_target::low_cannot_fetch_register)
602 (crisv32_target::low_cannot_store_register): Define.
603 (the_low_target): Remove the op fields.
604 * linux-ia64-low.cc (class ia64_target)
605 <low_cannot_fetch_register>
606 <low_cannot_store_register>: Declare.
607 (ia64_cannot_fetch_register): Turn into...
608 (ia64_target::low_cannot_fetch_register): ...this.
609 (ia64_cannot_store_register): Turn into...
610 (ia64_target::low_cannot_store_register): ...this.
611 (the_low_target): Remove the op fields.
612 * linux-m32r-low.cc (class m32r_target)
613 <low_cannot_fetch_register>
614 <low_cannot_store_register>: Declare.
615 (m32r_cannot_fetch_register): Turn into...
616 (m32r_target::low_cannot_fetch_register): ...this.
617 (m32r_cannot_store_register): Turn into...
618 (m32r_target::low_cannot_store_register): ...this.
619 (the_low_target): Remove the op fields.
620 * linux-m68k-low.cc (class m68k_target)
621 <low_cannot_fetch_register>
622 <low_cannot_store_register>: Declare.
623 (m68k_cannot_fetch_register): Turn into...
624 (m68k_target::low_cannot_fetch_register): ...this.
625 (m68k_cannot_store_register): Turn into...
626 (m68k_target::low_cannot_store_register): ...this.
627 (the_low_target): Remove the op fields.
628 * linux-mips-low.cc (class mips_target)
629 <low_cannot_fetch_register>
630 <low_cannot_store_register>: Declare.
631 (mips_cannot_fetch_register): Turn into...
632 (mips_target::low_cannot_fetch_register): ...this.
633 (mips_cannot_store_register): Turn into...
634 (mips_target::low_cannot_store_register): ...this.
635 (get_usrregs_info): Inline at the call sites in
636 low_cannot_fetch_register and low_cannot_store_register,
637 and remove.
638 (the_low_target): Remove the op fields.
639 * linux-nios2-low.cc (class nios2_target)
640 <low_cannot_fetch_register>
641 <low_cannot_store_register>: Declare.
642 (nios2_cannot_fetch_register): Turn into...
643 (nios2_target::low_cannot_fetch_register): ...this.
644 (nios2_cannot_store_register): Turn into...
645 (nios2_target::low_cannot_store_register): ...this.
646 (the_low_target): Remove the op fields.
647 * linux-ppc-low.cc (class ppc_target)
648 <low_cannot_fetch_register>
649 <low_cannot_store_register>: Declare.
650 (ppc_cannot_fetch_register): Turn into...
651 (ppc_target::low_cannot_fetch_register): ...this.
652 (ppc_cannot_store_register): Turn into...
653 (ppc_target::low_cannot_store_register): ...this.
654 (the_low_target): Remove the op fields.
655 * linux-riscv-low.cc (class riscv_target)
656 <low_cannot_fetch_register>
657 <low_cannot_store_register>: Declare.
658 (riscv_target::low_cannot_fetch_register)
659 (riscv_target::low_cannot_store_register): Define.
660 (the_low_target): Remove the op fields.
661 * linux-s390-low.cc (class s390_target)
662 <low_cannot_fetch_register>
663 <low_cannot_store_register>: Declare.
664 (s390_cannot_fetch_register): Turn into...
665 (s390_target::low_cannot_fetch_register): ...this.
666 (s390_cannot_store_register): Turn into...
667 (s390_target::low_cannot_store_register): ...this.
668 (the_low_target): Remove the op fields.
669 * linux-sh-low.cc (class sh_target)
670 <low_cannot_fetch_register>
671 <low_cannot_store_register>: Declare.
672 (sh_cannot_fetch_register): Turn into...
673 (sh_target::low_cannot_fetch_register): ...this.
674 (sh_cannot_store_register): Turn into...
675 (sh_target::low_cannot_store_register): ...this.
676 (the_low_target): Remove the op fields.
677 * linux-sparc-low.cc (class sparc_target)
678 <low_cannot_fetch_register>
679 <low_cannot_store_register>: Declare.
680 (sparc_cannot_fetch_register): Turn into...
681 (sparc_target::low_cannot_fetch_register): ...this.
682 (sparc_cannot_store_register): Turn into...
683 (sparc_target::low_cannot_store_register): ...this.
684 (the_low_target): Remove the op fields.
685 * linux-tic6x-low.cc (class tic6x_target)
686 <low_cannot_fetch_register>
687 <low_cannot_store_register>: Declare.
688 (tic6x_cannot_fetch_register): Turn into...
689 (tic6x_target::low_cannot_fetch_register): ...this.
690 (tic6x_cannot_store_register): Turn into...
691 (tic6x_target::low_cannot_store_register): ...this.
692 (the_low_target): Remove the op fields.
693 * linux-tile-low.cc (class tile_target)
694 <low_cannot_fetch_register>
695 <low_cannot_store_register>: Declare.
696 (tile_cannot_fetch_register): Turn into...
697 (tile_target::low_cannot_fetch_register): ...this.
698 (tile_cannot_store_register): Turn into...
699 (tile_target::low_cannot_store_register): ...this.
700 (the_low_target): Remove the op fields.
701 * linux-xtensa-low.cc (class xtensa_target)
702 <low_cannot_fetch_register>
703 <low_cannot_store_register>: Declare.
704 (xtensa_target::low_cannot_fetch_register)
705 (xtensa_target::low_cannot_store_register): Define.
706 (the_low_target): Remove the op fields.
707
aa8d21c9
TBA
7082020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
709
710 Turn the 'regs_info' linux target op into a method of
711 linux_process_target.
712
713 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
714 (class linux_process_target) <get_regs_info>: Define.
715
716 Update the callers below.
717
718 * linux-low.cc (linux_process_target::fetch_registers)
719 (linux_process_target::store_registers)
720 * proc-service.cc (gregset_info)
721
722 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
723 (x86_linux_regs_info): Turn into ...
724 (x86_target::get_regs_info): ...this.
725 (the_low_target): Remove the op field.
726 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
727 Declare.
728 (aarch64_regs_info): Turn into ...
729 (aarch64_target::get_regs_info): ...this.
730 (the_low_target): Remove the op field.
731 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
732 (arm_regs_info): Turn into ...
733 (arm_target::get_regs_info): ...this.
734 (the_low_target): Remove the op field.
735 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
736 (bfin_regs_info): Turn into ...
737 (bfin_target::get_regs_info): ...this.
738 (the_low_target): Remove the op field.
739 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
740 (cris_regs_info): Turn into ...
741 (cris_target::get_regs_info): ...this.
742 (the_low_target): Remove the op field.
743 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
744 Declare.
745 (crisv32_regs_info): Turn into ...
746 (crisv32_target::get_regs_info): ...this.
747 (the_low_target): Remove the op field.
748 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
749 (ia64_regs_info): Turn into ...
750 (ia64_target::get_regs_info): ...this.
751 (the_low_target): Remove the op field.
752 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
753 (m32r_regs_info): Turn into ...
754 (m32r_target::get_regs_info): ...this.
755 (the_low_target): Remove the op field.
756 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
757 (m68k_regs_info): Turn into ...
758 (m68k_target::get_regs_info): ...this.
759 (the_low_target): Remove the op field.
760 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
761 (mips_regs_info): Turn into ...
762 (mips_target::get_regs_info): ...this.
763 (the_low_target): Remove the op field.
764 (get_usrregs_info): Update the call to the op.
765 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
766 (nios2_regs_info): Turn into ...
767 (nios2_target::get_regs_info): ...this.
768 (the_low_target): Remove the op field.
769 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
770 (ppc_regs_info): Turn into ...
771 (ppc_target::get_regs_info): ...this.
772 (the_low_target): Remove the op field.
773 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
774 (riscv_regs_info): Turn into ...
775 (riscv_target::get_regs_info): ...this.
776 (the_low_target): Remove the op field.
777 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
778 (s390_regs_info): Turn into ...
779 (s390_target::get_regs_info): ...this.
780 (the_low_target): Remove the op field.
781 (s390_collect_ptrace_register)
782 (s390_supply_ptrace_register)
783 (s390_fill_gregset): Update the call to the op.
784 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
785 (sh_regs_info): Turn into ...
786 (sh_target::get_regs_info): ...this.
787 (the_low_target): Remove the op field.
788 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
789 (sparc_regs_info): Turn into ...
790 (sparc_target::get_regs_info): ...this.
791 (the_low_target): Remove the op field.
792 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
793 (tic6x_regs_info): Turn into ...
794 (tic6x_target::get_regs_info): ...this.
795 (the_low_target): Remove the op field.
796 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
797 (tile_regs_info): Turn into ...
798 (tile_target::get_regs_info): ...this.
799 (the_low_target): Remove the op field.
800 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
801 Declare.
802 (xtensa_regs_info): Turn into ...
803 (xtensa_target::get_regs_info): ...this.
804 (the_low_target): Remove the op field.
805
797bcff5
TBA
8062020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
807
808 Turn the 'arch_setup' linux target op into a method of
809 linux_process_target.
810
811 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
812 (class linux_process_target) <arch_setup_thread>
813 <low_arch_setup>: New declarations.
814 * linux-low.cc (linux_arch_setup): Delete.
815 (linux_arch_setup_thread): Turn into...
816 (linux_process_target::arch_setup_thread): ... this.
817
818 Update the callers below.
819
820 (linux_process_target::handle_extended_wait)
821 (linux_process_target::post_create_inferior)
822 (linux_process_target::filter_event)
823
824 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
825 declaration.
826 (x86_linux_update_xmltarget): Turn into...
827 (x86_target::update_xmltarget): ...this.
828 (x86_linux_process_qsupported): Update the call to
829 x86_linux_update_xmltarget.
830 (x86_arch_setup): Turn into ...
831 (x86_target::low_arch_setup): ...this.
832 (the_low_target): Remove the op field.
833 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
834 declaration.
835 (aarch64_arch_setup): Turn into ...
836 (aarch64_target::low_arch_setup): ...this.
837 (the_low_target): Remove the op field.
838 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
839 declaration.
840 (arm_arch_setup): Turn into ...
841 (arm_target::low_arch_setup): ...this.
842 (the_low_target): Remove the op field.
843 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
844 declaration.
845 (bfin_arch_setup): Turn into ...
846 (bfin_target::low_arch_setup): ...this.
847 (the_low_target): Remove the op field.
848 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
849 declaration.
850 (cris_arch_setup): Turn into ...
851 (cris_target::low_arch_setup): ...this.
852 (the_low_target): Remove the op field.
853 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
854 declaration.
855 (crisv32_arch_setup): Turn into ...
856 (crisv32_target::low_arch_setup): ...this.
857 (the_low_target): Remove the op field.
858 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
859 declaration.
860 (ia64_arch_setup): Turn into ...
861 (ia64_target::low_arch_setup): ...this.
862 (the_low_target): Remove the op field.
863 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
864 declaration.
865 (m32r_arch_setup): Turn into ...
866 (m32r_target::low_arch_setup): ...this.
867 (the_low_target): Remove the op field.
868 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
869 declaration.
870 (m68k_arch_setup): Turn into ...
871 (m68k_target::low_arch_setup): ...this.
872 (the_low_target): Remove the op field.
873 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
874 declaration.
875 (mips_arch_setup): Turn into ...
876 (mips_target::low_arch_setup): ...this.
877 (the_low_target): Remove the op field.
878 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
879 declaration.
880 (nios2_arch_setup): Turn into ...
881 (nios2_target::low_arch_setup): ...this.
882 (the_low_target): Remove the op field.
883 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
884 declaration.
885 (ppc_arch_setup): Turn into ...
886 (ppc_target::low_arch_setup): ...this.
887 (the_low_target): Remove the op field.
888 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
889 declaration.
890 (riscv_arch_setup): Turn into ...
891 (riscv_target::low_arch_setup): ...this.
892 (the_low_target): Remove the op field.
893 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
894 declaration.
895 (s390_arch_setup): Turn into ...
896 (s390_target::low_arch_setup): ...this.
897 (the_low_target): Remove the op field.
898 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
899 declaration.
900 (sh_arch_setup): Turn into ...
901 (sh_target::low_arch_setup): ...this.
902 (the_low_target): Remove the op field.
903 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
904 declaration.
905 (sparc_arch_setup): Turn into ...
906 (sparc_target::low_arch_setup): ...this.
907 (the_low_target): Remove the op field.
908 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
909 declaration.
910 (tic6x_arch_setup): Turn into ...
911 (tic6x_target::low_arch_setup): ...this.
912 (the_low_target): Remove the op field.
913 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
914 declaration.
915 (tile_arch_setup): Turn into ...
916 (tile_target::low_arch_setup): ...this.
917 (the_low_target): Remove the op field.
918 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
919 declaration.
920 (xtensa_arch_setup): Turn into ...
921 (xtensa_target::low_arch_setup): ...this.
922 (the_low_target): Remove the op field.
923
ef0478f6
TBA
9242020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
925
926 * linux-low.h (the_linux_target): New extern declaration.
927 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
928 'the_target'.
929 (the_linux_target): Remove.
930 * linux-x86-low.cc (class x86_target): New class.
931 (the_x86_target): New static object.
932 (the_linux_target): Define as pointer to the_x86_target.
933 * linux-aarch64-low.cc (class aarch64_target): New class.
934 (the_aarch64_target): New static object.
935 (the_linux_target): Define as pointer to the_aarch64_target.
936 * linux-arm-low.cc (class arm_target): New class.
937 (the_arm_target): New static object.
938 (the_linux_target): Define as pointer to the_arm_target.
939 * linux-bfin-low.cc (class bfin_target): New class.
940 (the_bfin_target): New static object.
941 (the_linux_target): Define as pointer to the_bfin_target.
942 * linux-cris-low.cc (class cris_target): New class.
943 (the_cris_target): New static object.
944 (the_linux_target): Define as pointer to the_cris_target.
945 * linux-crisv32-low.cc (class crisv32_target): New class.
946 (the_crisv32_target): New static object.
947 (the_linux_target): Define as pointer to the_crisv32_target.
948 * linux-ia64-low.cc (class ia64_target): New class.
949 (the_ia64_target): New static object.
950 (the_linux_target): Define as pointer to the_ia64_target.
951 * linux-m32r-low.cc (class m32r_target): New class.
952 (the_m32r_target): New static object.
953 (the_linux_target): Define as pointer to the_m32r_target.
954 * linux-m68k-low.cc (class m68k_target): New class.
955 (the_m68k_target): New static object.
956 (the_linux_target): Define as pointer to the_m68k_target.
957 * linux-mips-low.cc (class mips_target): New class.
958 (the_mips_target): New static object.
959 (the_linux_target): Define as pointer to the_mips_target.
960 * linux-nios2-low.cc (class nios2_target): New class.
961 (the_nios2_target): New static object.
962 (the_linux_target): Define as pointer to the_nios2_target.
963 * linux-ppc-low.cc (class ppc_target): New class.
964 (the_ppc_target): New static object.
965 (the_linux_target): Define as pointer to the_ppc_target.
966 * linux-riscv-low.cc (class riscv_target): New class.
967 (the_riscv_target): New static object.
968 (the_linux_target): Define as pointer to the_riscv_target.
969 * linux-s390-low.cc (class s390_target): New class.
970 (the_s390_target): New static object.
971 (the_linux_target): Define as pointer to the_s390_target.
972 * linux-sh-low.cc (class sh_target): New class.
973 (the_sh_target): New static object.
974 (the_linux_target): Define as pointer to the_sh_target.
975 * linux-sparc-low.cc (class sparc_target): New class.
976 (the_sparc_target): New static object.
977 (the_linux_target): Define as pointer to the_sparc_target.
978 * linux-tic6x-low.cc (class tic6x_target): New class.
979 (the_tic6x_target): New static object.
980 (the_linux_target): Define as pointer to the_tic6x_target.
981 * linux-tile-low.cc (class tile_target): New class.
982 (the_tile_target): New static object.
983 (the_linux_target): Define as pointer to the_tile_target.
984 * linux-xtensa-low.cc (class xtensa_target): New class.
985 (the_xtensa_target): New static object.
986 (the_linux_target): Define as pointer to the_xtensa_target.
987
d16f3f6c
TBA
9882020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
989
990 Turn some static functions in linux-low.cc into private methods of
991 linux_process_target.
992
993 * linux-low.cc (handle_extended_wait): Turn into ...
994 (linux_process_target::handle_extended_wait): ...this. Call
995 'mourn' on 'this' object instead of 'the_target'.
996 (maybe_move_out_of_jump_pad): Turn into...
997 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
998 (linux_low_filter_event): Turn into...
999 (linux_process_target::filter_event): ...this.
1000 (linux_wait_for_event_filtered): Turn into...
1001 (linux_process_target::wait_for_event_filtered): ...this.
1002 (linux_wait_for_event): Turn into...
1003 (linux_process_target::wait_for_event): ...this.
1004 (linux_wait_1): Turn into...
1005 (linux_process_target::wait_1): ...this.
1006 (wait_for_sigstop): Turn into...
1007 (linux_process_target::wait_for_sigstop): ...this.
1008 (move_out_of_jump_pad_callback): Turn into...
1009 (linux_process_target::move_out_of_jump_pad): ...this.
1010 (stop_all_lwps): Turn into...
1011 (linux_process_target::stop_all_lwps): ...this.
1012 (start_step_over): Turn into...
1013 (linux_process_target::start_step_over): ...this.
1014 (complete_ongoing_step_over): Turn into...
1015 (linux_process_target::complete_ongoing_step_over): ...this.
1016 (proceed_all_lwps): Turn into...
1017 (linux_process_target::proceed_all_lwps): ...this.
1018 (unstop_all_lwps): Turn into...
1019 (linux_process_target::unstop_all_lwps): ...this.
1020
1021 * linux-low.h (class linux_process_target)
1022 <handle_extended_wait>
1023 <maybe_move_out_of_jump_pad>
1024 filter_event>
1025 <wait_for_event_filtered>
1026 <wait_for_event>
1027 <wait_1>
1028 <wait_for_sigstop>
1029 <move_out_of_jump_pad>
1030 <stop_all_lwps>
1031 <start_step_over>
1032 <complete_ongoing_step_over>
1033 <proceed_all_lwps>
1034 <unstop_all_lwps>: Declare.
1035
1036 Update the callers below.
1037
1038 * linux-low.cc (linux_process_target::attach): Update.
1039 (linux_process_target::stabilize_threads): Ditto.
1040 (linux_process_target::wait): Ditto.
1041
a5863204
TBA
10422020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1043
1044 * linux-low.h (struct linux_target_ops): Update the comment for
1045 'cannot_store_register' to return 0 or 1.
1046 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1047 of 2.
1048
c884cc46
SM
10492020-03-20 Simon Marchi <simon.marchi@efficios.com>
1050
1051 * config.in: Re-generate.
1052 * configure: Re-generate.
1053
5a82b8a1
KR
10542020-03-17 Kamil Rytarowski <n54@gmx.com>
1055
1056 * regcache.cc (find_register_by_number): Update.
1057 * tdesc.cc (init_target_desc): Likewise.
1058 * tdesc.h (target_desc::reg_defs): Likewise.
1059
4635ff97
TT
10602020-03-12 Tom Tromey <tom@tromey.com>
1061
1062 * configure: Rebuild.
1063 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1064 (WIN32APILIBS): New subst.
1065 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1066 gdbsupport files.
1067 (gdbsupport/%.o): Remove target.
1068 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1069 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1070 (WIN32APILIBS): New variable.
1071 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1072 (gdbreplay$(EXEEXT)): Likewise.
1073
9a665d62
TT
10742020-03-12 Tom Tromey <tom@tromey.com>
1075
1076 * config.in, configure: Rebuild.
1077 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1078 * acinclude.m4: Include gettext-sister.m4.
1079 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1080 variables.
1081 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1082 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1083
272cd5a3
SM
10842020-03-12 Simon Marchi <simon.marchi@efficios.com>
1085
1086 * acinclude.m4: Update path to selftest.m4.
1087
db6878ac
SM
10882020-03-12 Simon Marchi <simon.marchi@efficios.com>
1089
1090 * configure.ac: Don't source bfd/development.sh, move
1091 GDB_AC_COMMON higher.
1092 * configure: Re-generate.
1093
4d696a5c
SM
10942020-03-12 Simon Marchi <simon.marchi@efficios.com>
1095
1096 * configure: Re-generate.
1097
a0761e34
SM
10982020-03-11 Simon Marchi <simon.marchi@efficios.com>
1099
1100 * configure: Re-generate.
1101
20ea4a60
AB
11022020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1103
1104 * .dir-locals.el: New file.
1105
842806cb
TBA
11062020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1107
1108 * .gitattributes: New file.
1109
442131c1
AB
11102020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1111
1112 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1113 reply into an S reply.
1114 * server.cc (disable_packet_T): New global.
1115 (captured_main): Set new global when appropriate.
1116 * server.h (disable_packet_T): Declare.
1117
dda42c0b
TT
11182020-02-21 Tom Tromey <tom@tromey.com>
1119
1120 * Makefile.in (mostlyclean): New target.
1121
52405d85
TBA
11222020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1123
1124 * target.h (struct process_stratum_target): Remove.
1125 (class process_target): Rename to ...
1126 (class process_stratum_target): ... this.
1127 * linux-low.h (class linux_process_target): Derive from
1128 'process_stratum_target'.
1129 * linux-low.cc (linux_target_ops): Remove.
1130 (initialize_low): Set the_target to the singleton instance of
1131 linux_process_target.
1132 * lynx-low.h (class lynx_process_target): Derive from
1133 'process_stratum_target'.
1134 * lynx-low.cc (lynx_target_ops): Remove.
1135 (initialize_low): Set the_target to the singleton instance of
1136 lynx_process_target.
1137 * nto-low.h (class nto_process_target): Derive from
1138 'process_stratum_target'.
1139 * nto-low.cc (nto_target_ops): Remove.
1140 (initialize_low): Set the_target to the singleton instance of
1141 nto_process_target.
1142 * win32-low.h (class win32_process_target): Derive from
1143 'process_stratum_target'.
1144 * win32-low.cc (win32_target_ops): Remove.
1145 (initialize_low): Set the_target to the singleton instance of
1146 win32_process_target.
1147
1148 Replace 'the_target->pt' with 'the_target' in the uses below.
1149
1150 * hostio.cc (hostio_error)
1151 (handle_setfs)
1152 (handle_open)
1153 (handle_unlink)
1154 (handle_readlink)
1155 * linux-aarch32-low.cc (arm_breakpoint_at)
1156 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1157 * linux-arm-low.cc (arm_sigreturn_next_pc)
1158 (arm_get_hwcap)
1159 (arm_get_syscall_trapinfo)
1160 * linux-cris-low.cc (cris_breakpoint_at)
1161 * linux-crisv32-low.cc (cris_breakpoint_at)
1162 * linux-low.cc (handle_extended_wait)
1163 (linux_wait_1)
1164 (linux_read_memory)
1165 (linux_process_target::breakpoint_kind_from_pc)
1166 (linux_get_auxv)
1167 * linux-m32r-low.cc (m32r_breakpoint_at)
1168 * linux-mips-low.cc (mips_breakpoint_at)
1169 * linux-nios2-low.cc (nios2_breakpoint_at)
1170 * linux-ppc-low.cc (ppc_breakpoint_at)
1171 * linux-s390-low.cc (s390_get_hwcap)
1172 * linux-sh-low.cc (sh_breakpoint_at)
1173 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1174 (sparc_store_gregset_from_stack)
1175 (sparc_breakpoint_at)
1176 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1177 * linux-tile-low.cc (tile_breakpoint_at)
1178 * linux-x86-low.cc (x86_breakpoint_at)
1179 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1180 * mem-break.cc (bp_size)
1181 (bp_opcode)
1182 (insert_memory_breakpoint)
1183 (set_raw_breakpoint_at)
1184 (delete_raw_breakpoint)
1185 (z_type_supported)
1186 (uninsert_raw_breakpoint)
1187 (reinsert_raw_breakpoint)
1188 (validate_inserted_breakpoint)
1189 * regcache.cc (regcache_read_pc)
1190 (regcache_write_pc)
1191 * remote-utils.cc (putpkt_binary_1)
1192 (input_interrupt)
1193 (getpkt)
1194 (prepare_resume_reply)
1195 * server.cc (handle_general_set)
1196 (handle_detach)
1197 (handle_qxfer_auxv)
1198 (handle_qxfer_exec_file)
1199 (handle_qxfer_libraries_svr4)
1200 (handle_qxfer_osdata)
1201 (handle_qxfer_siginfo)
1202 (handle_qxfer_fdpic)
1203 (handle_query)
1204 (resume)
1205 (handle_v_requests)
1206 (queue_stop_reply_callback)
1207 (captured_main)
1208 * target.cc (prepare_to_access_memory)
1209 (done_accessing_memory)
1210 (read_inferior_memory)
1211 (target_write_memory)
1212 (target_stop_and_wait)
1213 (target_wait)
1214 (target_mourn_inferior)
1215 (target_continue_no_signal)
1216 (target_continue)
1217 (target_supports_multi_process)
1218 (kill_inferior)
1219 * target.h
1220 (target_create_inferior)
1221 (target_post_create_inferior)
1222 (myattach)
1223 (target_supports_fork_events)
1224 (target_supports_vfork_events)
1225 (target_supports_exec_events)
1226 (target_handle_new_gdb_connection)
1227 (detach_inferior)
1228 (mythread_alive)
1229 (fetch_inferior_registers)
1230 (store_inferior_registers)
1231 (join_inferior)
1232 (target_supports_non_stop)
1233 (target_async)
1234 (target_process_qsupported)
1235 (target_supports_catch_syscall)
1236 (target_get_ipa_tdesc_idx)
1237 (target_supports_tracepoints)
1238 (target_supports_fast_tracepoints)
1239 (target_get_min_fast_tracepoint_insn_len)
1240 (target_thread_stopped)
1241 (target_pause_all)
1242 (target_unpause_all)
1243 (target_stabilize_threads)
1244 (target_install_fast_tracepoint_jump_pad)
1245 (target_emit_ops)
1246 (target_supports_disable_randomization)
1247 (target_supports_agent)
1248 (target_enable_btrace)
1249 (target_disable_btrace)
1250 (target_read_btrace)
1251 (target_read_btrace_conf)
1252 (target_supports_range_stepping)
1253 (target_supports_stopped_by_sw_breakpoint)
1254 (target_stopped_by_sw_breakpoint)
1255 (target_supports_stopped_by_hw_breakpoint)
1256 (target_supports_hardware_single_step)
1257 (target_stopped_by_hw_breakpoint)
1258 (target_breakpoint_kind_from_pc)
1259 (target_breakpoint_kind_from_current_state)
1260 (target_supports_software_single_step)
1261 (target_core_of_thread)
1262 (target_thread_name)
1263 (target_thread_handle)
1264 * win32-low.cc (do_initial_child_stuff)
1265
1266 Rename target op default definitions listed below.
1267
1268 * target.cc (process_target::post_create_inferior): Rename as ...
1269 (process_stratum_target::post_create_inferior): ... this.
1270 (process_target::prepare_to_access_memory): Rename as ...
1271 (process_stratum_target::prepare_to_access_memory): ... this.
1272 (process_target::done_accessing_memory): Rename as ...
1273 (process_stratum_target::done_accessing_memory): ... this.
1274 (process_target::look_up_symbols): Rename as ...
1275 (process_stratum_target::look_up_symbols): ... this.
1276 (process_target::supports_read_auxv): Rename as ...
1277 (process_stratum_target::supports_read_auxv): ... this.
1278 (process_target::read_auxv): Rename as ...
1279 (process_stratum_target::read_auxv): ... this.
1280 (process_target::supports_z_point_type): Rename as ...
1281 (process_stratum_target::supports_z_point_type): ... this.
1282 (process_target::insert_point): Rename as ...
1283 (process_stratum_target::insert_point): ... this.
1284 (process_target::remove_point): Rename as ...
1285 (process_stratum_target::remove_point): ... this.
1286 (process_target::stopped_by_sw_breakpoint): Rename as ...
1287 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1288 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1289 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1290 (process_target::stopped_by_hw_breakpoint): Rename as ...
1291 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1292 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1293 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1294 (process_target::supports_hardware_single_step): Rename as ...
1295 (process_stratum_target::supports_hardware_single_step): ... this.
1296 (process_target::stopped_by_watchpoint): Rename as ...
1297 (process_stratum_target::stopped_by_watchpoint): ... this.
1298 (process_target::stopped_data_address): Rename as ...
1299 (process_stratum_target::stopped_data_address): ... this.
1300 (process_target::supports_read_offsets): Rename as ...
1301 (process_stratum_target::supports_read_offsets): ... this.
1302 (process_target::read_offsets): Rename as ...
1303 (process_stratum_target::read_offsets): ... this.
1304 (process_target::supports_get_tls_address): Rename as ...
1305 (process_stratum_target::supports_get_tls_address): ... this.
1306 (process_target::get_tls_address): Rename as ...
1307 (process_stratum_target::get_tls_address): ... this.
1308 (process_target::hostio_last_error): Rename as ...
1309 (process_stratum_target::hostio_last_error): ... this.
1310 (process_target::supports_qxfer_osdata): Rename as ...
1311 (process_stratum_target::supports_qxfer_osdata): ... this.
1312 (process_target::qxfer_osdata): Rename as ...
1313 (process_stratum_target::qxfer_osdata): ... this.
1314 (process_target::supports_qxfer_siginfo): Rename as ...
1315 (process_stratum_target::supports_qxfer_siginfo): ... this.
1316 (process_target::qxfer_siginfo): Rename as ...
1317 (process_stratum_target::qxfer_siginfo): ... this.
1318 (process_target::supports_non_stop): Rename as ...
1319 (process_stratum_target::supports_non_stop): ... this.
1320 (process_target::async): Rename as ...
1321 (process_stratum_target::async): ... this.
1322 (process_target::start_non_stop): Rename as ...
1323 (process_stratum_target::start_non_stop): ... this.
1324 (process_target::supports_multi_process): Rename as ...
1325 (process_stratum_target::supports_multi_process): ... this.
1326 (process_target::supports_fork_events): Rename as ...
1327 (process_stratum_target::supports_fork_events): ... this.
1328 (process_target::supports_vfork_events): Rename as ...
1329 (process_stratum_target::supports_vfork_events): ... this.
1330 (process_target::supports_exec_events): Rename as ...
1331 (process_stratum_target::supports_exec_events): ... this.
1332 (process_target::handle_new_gdb_connection): Rename as ...
1333 (process_stratum_target::handle_new_gdb_connection): ... this.
1334 (process_target::handle_monitor_command): Rename as ...
1335 (process_stratum_target::handle_monitor_command): ... this.
1336 (process_target::core_of_thread): Rename as ...
1337 (process_stratum_target::core_of_thread): ... this.
1338 (process_target::supports_read_loadmap): Rename as ...
1339 (process_stratum_target::supports_read_loadmap): ... this.
1340 (process_target::read_loadmap): Rename as ...
1341 (process_stratum_target::read_loadmap): ... this.
1342 (process_target::process_qsupported): Rename as ...
1343 (process_stratum_target::process_qsupported): ... this.
1344 (process_target::supports_tracepoints): Rename as ...
1345 (process_stratum_target::supports_tracepoints): ... this.
1346 (process_target::read_pc): Rename as ...
1347 (process_stratum_target::read_pc): ... this.
1348 (process_target::write_pc): Rename as ...
1349 (process_stratum_target::write_pc): ... this.
1350 (process_target::supports_thread_stopped): Rename as ...
1351 (process_stratum_target::supports_thread_stopped): ... this.
1352 (process_target::thread_stopped): Rename as ...
1353 (process_stratum_target::thread_stopped): ... this.
1354 (process_target::supports_get_tib_address): Rename as ...
1355 (process_stratum_target::supports_get_tib_address): ... this.
1356 (process_target::get_tib_address): Rename as ...
1357 (process_stratum_target::get_tib_address): ... this.
1358 (process_target::pause_all): Rename as ...
1359 (process_stratum_target::pause_all): ... this.
1360 (process_target::unpause_all): Rename as ...
1361 (process_stratum_target::unpause_all): ... this.
1362 (process_target::stabilize_threads): Rename as ...
1363 (process_stratum_target::stabilize_threads): ... this.
1364 (process_target::supports_fast_tracepoints): Rename as ...
1365 (process_stratum_target::supports_fast_tracepoints): ... this.
1366 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1367 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1368 (process_target::emit_ops): Rename as ...
1369 (process_stratum_target::emit_ops): ... this.
1370 (process_target::supports_disable_randomization): Rename as ...
1371 (process_stratum_target::supports_disable_randomization): ... this.
1372 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1373 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1374 (process_target::qxfer_libraries_svr4): Rename as ...
1375 (process_stratum_target::qxfer_libraries_svr4): ... this.
1376 (process_target::supports_agent): Rename as ...
1377 (process_stratum_target::supports_agent): ... this.
1378 (process_target::enable_btrace): Rename as ...
1379 (process_stratum_target::enable_btrace): ... this.
1380 (process_target::disable_btrace): Rename as ...
1381 (process_stratum_target::disable_btrace): ... this.
1382 (process_target::read_btrace): Rename as ...
1383 (process_stratum_target::read_btrace): ... this.
1384 (process_target::read_btrace_conf): Rename as ...
1385 (process_stratum_target::read_btrace_conf): ... this.
1386 (process_target::supports_range_stepping): Rename as ...
1387 (process_stratum_target::supports_range_stepping): ... this.
1388 (process_target::supports_pid_to_exec_file): Rename as ...
1389 (process_stratum_target::supports_pid_to_exec_file): ... this.
1390 (process_target::pid_to_exec_file): Rename as ...
1391 (process_stratum_target::pid_to_exec_file): ... this.
1392 (process_target::supports_multifs): Rename as ...
1393 (process_stratum_target::supports_multifs): ... this.
1394 (process_target::multifs_open): Rename as ...
1395 (process_stratum_target::multifs_open): ... this.
1396 (process_target::multifs_unlink): Rename as ...
1397 (process_stratum_target::multifs_unlink): ... this.
1398 (process_target::multifs_readlink): Rename as ...
1399 (process_stratum_target::multifs_readlink): ... this.
1400 (process_target::breakpoint_kind_from_pc): Rename as ...
1401 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1402 (process_target::breakpoint_kind_from_current_state): Rename as ...
1403 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1404 (process_target::thread_name): Rename as ...
1405 (process_stratum_target::thread_name): ... this.
1406 (process_target::thread_handle): Rename as ...
1407 (process_stratum_target::thread_handle): ... this.
1408 (process_target::supports_software_single_step): Rename as ...
1409 (process_stratum_target::supports_software_single_step): ... this.
1410 (process_target::supports_catch_syscall): Rename as ...
1411 (process_stratum_target::supports_catch_syscall): ... this.
1412 (process_target::get_ipa_tdesc_idx): Rename as ...
1413 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1414
478f9adf
PA
14152020-02-20 Pedro Alves <palves@redhat.com>
1416
1417 * target.cc (set_target_ops): Simply copy the given target pointer
1418 instead of creating a copy of the pointed object.
1419
d633e831
TBA
14202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1421
1422 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1423 of process_target.
1424
1425 * target.h (struct process_stratum_target): Remove the target op.
1426 (class process_target): Add the target op.
1427 (target_get_ipa_tdesc_idx): Update the macro.
1428 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1429
1430 Update the derived classes and callers below.
1431
1432 * linux-low.cc (linux_target_ops): Update.
1433 (linux_get_ipa_tdesc_idx): Turn into ...
1434 (linux_process_target::get_ipa_tdesc_idx): ... this.
1435 * linux-low.h (class linux_process_target): Update.
1436 * lynx-low.cc (lynx_target_ops): Update.
1437 * nto-low.cc (nto_target_ops): Update.
1438 * win32-low.cc (win32_target_ops): Update.
1439
bc8d3ae4
TBA
14402020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1441
1442 Turn process_stratum_target's supports_catch_syscall op into a
1443 method of process_target.
1444
1445 * target.h (struct process_stratum_target): Remove the target op.
1446 (class process_target): Add the target op.
1447 (target_supports_catch_syscall): Update the macro.
1448 * target.cc (process_target::supports_catch_syscall): Define.
1449
1450 Update the derived classes and callers below.
1451
1452 * linux-low.cc (linux_target_ops): Update.
1453 (linux_supports_catch_syscall): Turn into ...
1454 (linux_process_target::supports_catch_syscall): ... this.
1455 * linux-low.h (class linux_process_target): Update.
1456 * lynx-low.cc (lynx_target_ops): Update.
1457 * nto-low.cc (nto_target_ops): Update.
1458 * win32-low.cc (win32_target_ops): Update.
1459
5303a34f
TBA
14602020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1461
1462 Turn process_stratum_target's supports_software_single_step op
1463 into a method of process_target.
1464
1465 * target.h (struct process_stratum_target): Remove the target op.
1466 (class process_target): Add the target op.
1467 (target_supports_software_single_step): Update the macro.
1468 * target.cc (process_target::supports_software_single_step): Define.
1469
1470 Update the derived classes and callers below.
1471
1472 * linux-low.cc (linux_target_ops): Update.
1473 (linux_supports_software_single_step): Turn into ...
1474 (linux_process_target::supports_software_single_step): ... this.
1475 * linux-low.h (class linux_process_target): Update.
1476 * lynx-low.cc (lynx_target_ops): Update.
1477 * nto-low.cc (nto_target_ops): Update.
1478 * win32-low.cc (win32_target_ops): Update.
1479
7f63b89b
TBA
14802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1481
1482 Turn process_stratum_target's thread_name and thread_handle ops
1483 into methods of process_target.
1484
1485 * target.h (struct process_stratum_target): Remove the target ops.
1486 (class process_target): Add the target ops.
1487 (target_thread_name): Update the macro.
1488 (target_thread_handle): Update the macro.
1489 * target.cc (process_target::thread_name): Define.
1490 (process_target::thread_handle): Define.
1491
1492 Update the derived classes and callers below.
1493
1494 * linux-low.cc (linux_target_ops): Update.
1495 (linux_process_target::thread_name): Define.
1496 (linux_process_target::thread_handle): Define.
1497 * linux-low.h (class linux_process_target): Update.
1498 * lynx-low.cc (lynx_target_ops): Update.
1499 * nto-low.cc (nto_target_ops): Update.
1500 * win32-low.cc (win32_target_ops): Update.
1501
d367006f
TBA
15022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1503
1504 Turn process_stratum_target's breakpoint_kind_from_pc,
1505 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
1506 ops into methods of process_target.
1507
1508 * target.h (struct process_stratum_target): Remove the target op.
1509 (class process_target): Add the target op.
1510 (target_breakpoint_kind_from_pc): Update the macro.
1511 (target_breakpoint_kind_from_current_state): Update the macro.
1512 (default_breakpoint_kind_from_pc): Remove declaration.
1513 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
1514 (process_target::breakpoint_kind_from_pc): ... this.
1515 (process_target::breakpoint_kind_from_current_state): Define.
1516
1517 Update the derived classes and callers below.
1518
1519 * mem-break.cc (bp_size): Update.
1520 (bp_opcode): Update.
1521 * linux-low.cc (linux_target_ops): Update.
1522 (linux_wait_1): Update.
1523 (linux_breakpoint_kind_from_pc): Turn into ...
1524 (linux_process_target::breakpoint_kind_from_pc): ... this.
1525 (linux_sw_breakpoint_from_kind): Turn into ...
1526 (linux_process_target::sw_breakpoint_from_kind): ... this.
1527 (linux_breakpoint_kind_from_current_state): Turn into ...
1528 (linux_process_target::breakpoint_kind_from_current_state): ... this.
1529 * linux-low.h (class linux_process_target): Update.
1530 * lynx-low.cc (lynx_target_ops): Update.
1531 (lynx_process_target::sw_breakpoint_from_kind): Define.
1532 * lynx-low.h (class lynx_process_target): Update.
1533 * nto-low.cc (nto_target_ops): Update.
1534 (nto_sw_breakpoint_from_kind): Turn into ...
1535 (nto_process_target::sw_breakpoint_from_kind): ... this.
1536 * nto-low.h (class nto_process_target): Update.
1537 * win32-low.cc (win32_target_ops): Update.
1538 (win32_sw_breakpoint_from_kind): Turn into ...
1539 (win32_process_target::sw_breakpoint_from_kind): ... this.
1540 * win32-low.h (class win32_process_target): Update.
1541
c9b7b804
TBA
15422020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1543
1544 Turn process_stratum_target's multifs_open, multifs_readlink,
1545 multifs_unlink ops into methods of process_target.
1546
1547 * target.h (struct process_stratum_target): Remove the target ops.
1548 (class process_target): Add the target ops. Also add
1549 'supports_multifs'.
1550 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
1551 "sys/stat.h".
1552 (process_target::supports_multifs): Define.
1553 (process_target::multifs_open): Define.
1554 (process_target::multifs_readlink): Define.
1555 (process_target::multifs_unlink): Define.
1556
1557 Update the derived classes and callers below.
1558
1559 * hostio.cc (handle_setfs): Update.
1560 (handle_open): Update.
1561 (handle_unlink): Update.
1562 (handle_readlink): Update.
1563 * linux-low.cc (linux_target_ops): Update.
1564 (linux_process_target::supports_multifs): Define.
1565 (linux_process_target::multifs_open): Define.
1566 (linux_process_target::multifs_readlink): Define.
1567 (linux_process_target::multifs_unlink): Define.
1568 * linux-low.h (class linux_process_target): Update.
1569 * lynx-low.cc (lynx_target_ops): Update.
1570 * nto-low.cc (nto_target_ops): Update.
1571 * win32-low.cc (win32_target_ops): Update.
1572
8247b823
TBA
15732020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1574
1575 Turn process_stratum_target's pid_to_exec_file op into a method
1576 of process_target.
1577
1578 * target.h (struct process_stratum_target): Remove the target op.
1579 (class process_target): Add the target op. Also add
1580 'supports_pid_to_exec_file'.
1581 * target.cc (process_target::pid_to_exec_file): Define.
1582 (process_target::supports_pid_to_exec_file): Define.
1583
1584 Update the derived classes and callers below.
1585
1586 * server.cc (handle_qxfer_exec_file): Update.
1587 (handle_query): Update.
1588 * linux-low.cc (linux_target_ops): Update.
1589 (linux_process_target::supports_pid_to_exec_file): Define.
1590 (linux_process_target::pid_to_exec_file): Define.
1591 * linux-low.h (class linux_process_target): Update.
1592 * lynx-low.cc (lynx_target_ops): Update.
1593 * nto-low.cc (nto_target_ops): Update.
1594 * win32-low.cc (win32_target_ops): Update.
1595
2526e0cd
TBA
15962020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1597
1598 Turn process_stratum_target's supports_range_stepping op into a
1599 method of process_target.
1600
1601 * target.h (struct process_stratum_target): Remove the target op.
1602 (class process_target): Add the target op.
1603 (target_supports_range_stepping): Update the macro.
1604 * target.cc (process_target::supports_range_stepping): Define.
1605
1606 Update the derived classes and callers below.
1607
1608 * linux-low.cc (linux_target_ops): Update.
1609 (linux_supports_range_stepping): Turn into ...
1610 (linux_process_target::supports_range_stepping): ... this.
1611 * linux-low.h (class linux_process_target): Update.
1612 * lynx-low.cc (lynx_target_ops): Update.
1613 * nto-low.cc (nto_target_ops): Update.
1614 * win32-low.cc (win32_target_ops): Update.
1615
79597bdd
TBA
16162020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1617
1618 Turn process_stratum_target's btrace-related ops (enable_btrace,
1619 disable_btrace, read_btrace, read_btrace_conf) into methods of
1620 process_target.
1621
1622 * target.h (struct process_stratum_target): Remove the target ops.
1623 (class process_target): Add the target ops.
1624 (target_enable_btrace): Update.
1625 (target_disable_btrace): Update.
1626 (target_read_btrace): Update.
1627 (target_read_btrace_conf): Update.
1628 * target.cc (process_target::enable_btrace): Define.
1629 (process_target::disable_btrace): Define.
1630 (process_target::read_btrace): Define.
1631 (process_target::read_btrace_conf): Define.
1632
1633 Update the derived classes and callers below.
1634
1635 * linux-low.cc (linux_target_ops): Update.
1636 (linux_process_target:enable_btrace): Define as a wrapper around
1637 linux_enable_btrace.
1638 (linux_low_disable_btrace): Turn into ...
1639 (linux_process_target::disable_btrace): ... this.
1640 (linux_low_read_btrace): Turn into ...
1641 (linux_process_target::read_btrace): ... this.
1642 (linux_low_btrace_conf): Turn into ...
1643 (linux_process_target::read_btrace_conf): ... this.
1644 * linux-low.h (class linux_process_target): Update.
1645 * lynx-low.cc (lynx_target_ops): Update.
1646 * nto-low.cc (nto_target_ops): Update.
1647 * win32-low.cc (win32_target_ops): Update.
1648
c0245cb9
TBA
16492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1650
1651 Turn process_stratum_target's supports_agent op into a method of
1652 process_target.
1653
1654 * target.h (struct process_stratum_target): Remove the target op.
1655 (class process_target): Add the target op.
1656 (target_supports_agent): Update the macro.
1657 * target.cc (process_target::supports_agent): Define.
1658
1659 Update the derived classes and callers below.
1660
1661 * linux-low.cc (linux_target_ops): Update.
1662 (linux_supports_agent): Turn into ...
1663 (linux_process_target::supports_agent): ... this.
1664 * linux-low.h (class linux_process_target): Update.
1665 * lynx-low.cc (lynx_target_ops): Update.
1666 * nto-low.cc (nto_target_ops): Update.
1667 * win32-low.cc (win32_target_ops): Update.
1668
974387bb
TBA
16692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1670
1671 Turn process_stratum_target's qxfer_libraries_svr4 op into a
1672 method of process_target.
1673
1674 * target.h (struct process_stratum_target): Remove the target op.
1675 (class process_target): Add the target op. Also add
1676 'supports_qxfer_libraries_svr4'.
1677 * target.cc (process_target::qxfer_libraries_svr4): Define.
1678 (process_target::supports_qxfer_libraries_svr4): Define.
1679
1680 Update the derived classes and callers below.
1681
1682 * server.cc (handle_qxfer_libraries_svr4): Update.
1683 (handle_query): Update.
1684 * linux-low.cc (linux_target_ops): Update.
1685 (linux_process_target::supports_qxfer_libraries_svr4): Define.
1686 (linux_qxfer_libraries_svr4): Turn into ...
1687 (linux_process_target::qxfer_libraries_svr4): ... this.
1688 * linux-low.h (class linux_process_target): Update.
1689 * lynx-low.cc (lynx_target_ops): Update.
1690 * nto-low.cc (nto_target_ops): Update.
1691 * win32-low.cc (win32_target_ops): Update.
1692
c756403b
TBA
16932020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1694
1695 Turn process_stratum_target's supports_disable_randomization op
1696 into a method of process_target.
1697
1698 * target.h (struct process_stratum_target): Remove the target op.
1699 (class process_target): Add the target op.
1700 (target_supports_disable_randomization): Update the macro.
1701 * target.cc (process_target::supports_disable_randomization): Define.
1702
1703 Update the derived classes and callers below.
1704
1705 * linux-low.cc (linux_target_ops): Update.
1706 (linux_supports_disable_randomization): Turn into ...
1707 (linux_process_target::supports_disable_randomization): ... this.
1708 * linux-low.h (class linux_process_target): Update.
1709 * lynx-low.cc (lynx_target_ops): Update.
1710 * nto-low.cc (nto_target_ops): Update.
1711 * win32-low.cc (win32_target_ops): Update.
1712
345dafad
TBA
17132020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1714
1715 Turn process_stratum_target's emit_ops op into a method of
1716 process_target.
1717
1718 * target.h (struct process_stratum_target): Remove the target op.
1719 (class process_target): Add the target op.
1720 (target_emit_ops): Update the macro.
1721 * target.cc (process_target::emit_ops): Define.
1722
1723 Update the derived classes and callers below.
1724
1725 * linux-low.cc (linux_target_ops): Update.
1726 (linux_emit_ops): Turn into ...
1727 (linux_process_target::emit_ops): ... this.
1728 * linux-low.h (class linux_process_target): Update.
1729 * lynx-low.cc (lynx_target_ops): Update.
1730 * nto-low.cc (nto_target_ops): Update.
1731 * win32-low.cc (win32_target_ops): Update.
1732
c23c9391
TBA
17332020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1734
1735 Turn process_stratum_target's install_fast_tracepoint_jump_pad
1736 and get_min_fast_tracepoint_insn_len ops into methods of
1737 process_target.
1738
1739 * target.h (struct process_stratum_target): Remove the target ops.
1740 (class process_target): Add the target ops. Also add
1741 'supports_fast_tracepoints'.
1742 (target_supports_fast_tracepoints): Update the macro.
1743 (target_get_min_fast_tracepoint_insn_len): Update the macro.
1744 (install_fast_tracepoint_jump_pad): Update and rename the macro
1745 to ...
1746 (target_install_fast_tracepoint_jump_pad): ... this.
1747 * target.cc (process_target::supports_fast_tracepoints): Define.
1748 (process_target::install_fast_tracepoint_jump_pad): Define.
1749 (process_target::get_min_fast_tracepoint_insn_len): Define.
1750
1751 Update the derived classes and callers below.
1752
1753 * tracepoint.cc (install_fast_tracepoint): Update.
1754 * linux-low.cc (linux_target_ops): Update.
1755 (linux_process_target::supports_fast_tracepoints): Define.
1756 (linux_install_fast_tracepoint_jump_pad): Turn into ...
1757 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
1758 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
1759 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
1760 * linux-low.h (class linux_process_target): Update.
1761 * lynx-low.cc (lynx_target_ops): Update.
1762 * nto-low.cc (nto_target_ops): Update.
1763 * win32-low.cc (win32_target_ops): Update.
1764
5c9eb2f2
TBA
17652020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1766
1767 Turn process_stratum_target's stabilize_threads op into a
1768 method of process_target.
1769
1770 * target.h (struct process_stratum_target): Remove the target op.
1771 (class process_target): Add the target op.
1772 (target_stabilize_threads): Update the macro.
1773 * target.cc (process_target::stabilize_threads): Define.
1774
1775 Update the derived classes and callers below.
1776
1777 * server.cc (handle_status): Update.
1778 * tracepoint.cc (cmd_qtdp): Update.
1779 (cmd_qtstart): Update.
1780 * linux-low.cc (linux_target_ops): Update.
1781 (linux_stabilize_threads): Turn into ...
1782 (linux_process_target::stabilize_threads): ... this.
1783 (linux_wait_1): Update.
1784 * linux-low.h (class linux_process_target): Update.
1785 * lynx-low.cc (lynx_target_ops): Update.
1786 * nto-low.cc (nto_target_ops): Update.
1787 * win32-low.cc (win32_target_ops): Update.
1788
29e8dc09
TBA
17892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1790
1791 Turn process_stratum_target's pause_all and unpause_all ops
1792 into methods of process_target.
1793
1794 * target.h (struct process_stratum_target): Remove the target ops.
1795 (class process_target): Add the target ops.
1796 (pause_all): Update the macro and rename to...
1797 (target_pause_all): ... this.
1798 (unpause_all): Update the macro and rename to...
1799 (target_unpause_all): ... this.
1800 * target.cc (process_target::pause_all): Define.
1801 (process_target::unpause_all): Define.
1802
1803 Update the derived classes and callers below.
1804
1805 * server.cc (handle_status): Update.
1806 * tracepoint.cc (clear_installed_tracepoints): Update.
1807 (cmd_qtdp): Update.
1808 (cmd_qtstart): Update.
1809 (stop_tracing): Update.
1810 (cmd_qtstatus): Update.
1811 (upload_fast_traceframes): Update.
1812 (run_inferior_command): Update.
1813 * linux-low.cc (linux_target_ops): Update.
1814 (linux_pause_all): Turn into ...
1815 (linux_process_target::pause_all): ... this.
1816 (linux_unpause_all): Turn into ...
1817 (linux_process_target::unpause_all): ... this.
1818 (linux_process_target::prepare_to_access_memory): Update.
1819 (linux_process_target::done_accessing_memory): Update.
1820 * linux-low.h (class linux_process_target): Update.
1821 * lynx-low.cc (lynx_target_ops): Update.
1822 * nto-low.cc (nto_target_ops): Update.
1823 * win32-low.cc (win32_target_ops): Update.
1824
4e2e869c
TBA
18252020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1826
1827 Turn process_stratum_target's get_tib_address op into a method of
1828 process_target.
1829
1830 * target.h (struct process_stratum_target): Remove the target op.
1831 (class process_target): Add the target op. Also add
1832 'supports_get_tib_address'.
1833 * target.cc (process_target::get_tib_address): Define.
1834 (process_target::supports_get_tib_address): Define.
1835
1836 Update the derived classes and callers below.
1837
1838 * server.cc (handle_query): Update.
1839 * linux-low.cc (win32_target_ops): Update.
1840 * lynx-low.cc (lynx_target_ops): Update.
1841 * nto-low.cc (nto_target_ops): Update.
1842 * win32-low.cc (win32_target_ops): Update.
1843 (win32_process_target::supports_get_tib_address): Define.
1844 (win32_get_tib_address): Turn into ...
1845 (win32_process_target::get_tib_address): ... this.
1846 * win32-low.h (class win32_process_target): Update.
1847
68119632
TBA
18482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1849
1850 Turn process_stratum_target's thread_stopped op into a method of
1851 process_target.
1852
1853 * target.h (struct process_stratum_target): Remove the target op.
1854 (class process_target): Add the target op. Also add
1855 'supports_thread_stopped'.
1856 (target_thread_stopped): Update the macro.
1857 * target.cc (process_target::thread_stopped): Define.
1858 (process_target::supports_thread_stopped): Define.
1859 (prepare_to_access_memory): Update.
1860
1861 Update the derived classes and callers below.
1862
1863 * server.cc (queue_stop_reply_callback): Update.
1864 * linux-low.cc (linux_target_ops): Update.
1865 (linux_process_target::supports_thread_stopped): Define.
1866 (linux_thread_stopped): Turn into ...
1867 (linux_process_target::thread_stopped): ... this.
1868 * linux-low.h (class linux_process_target): Update.
1869 * lynx-low.cc (lynx_target_ops): Update.
1870 * nto-low.cc (nto_target_ops): Update.
1871 * win32-low.cc (win32_target_ops): Update.
1872
770d8f6a
TBA
18732020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1874
1875 Turn process_stratum_target's read_pc and write_pc ops into
1876 methods of process_target.
1877
1878 * target.h (struct process_stratum_target): Remove the target ops.
1879 (class process_target): Add the target ops.
1880 * target.cc (process_target::read_pc): Define.
1881 (process_target::write_pc): Define.
1882
1883 Update the derived classes and callers below.
1884
1885 * regcache.cc (regcache_read_pc): Update.
1886 (regcache_write_pc): Update.
1887 * linux-low.cc (linux_target_ops): Update.
1888 (linux_read_pc): Turn into ...
1889 (linux_process_target::read_pc): ... this.
1890 (linux_write_pc): Turn into ...
1891 (linux_process_target::write_pc): ... this.
1892 * linux-low.h (class linux_process_target): Update.
1893 * lynx-low.cc (lynx_target_ops): Update.
1894 * nto-low.cc (nto_target_ops): Update.
1895 * win32-low.cc (win32_target_ops): Update.
1896
290732bf
TBA
18972020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1898
1899 Turn process_stratum_target's supports_tracepoints op into a
1900 method of process_target.
1901
1902 * target.h (struct process_stratum_target): Remove the target op.
1903 (class process_target): Add the target op.
1904 (target_supports_tracepoints): Update the macro.
1905 * target.cc (process_target::supports_tracepoints): Define.
1906
1907 Update the derived classes and callers below.
1908
1909 * linux-low.cc (linux_target_ops): Update.
1910 (linux_supports_tracepoints): Turn into ...
1911 (linux_process_target::supports_tracepoints): ... this.
1912 * linux-low.h (class linux_process_target): Update.
1913 * lynx-low.cc (lynx_target_ops): Update.
1914 * nto-low.cc (nto_target_ops): Update.
1915 * win32-low.cc (win32_target_ops): Update.
1916
0df28b1b
TBA
19172020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1918
1919 Turn process_stratum_target's process_qsupported op into a method
1920 of process_target.
1921
1922 * target.h (struct process_stratum_target): Remove the target op.
1923 (class process_target): Add the target op.
1924 (target_process_qsupported): Update the macro.
1925 * target.cc (process_target::process_qsupported): Define.
1926
1927 Update the derived classes and callers below.
1928
1929 * linux-low.cc (linux_target_ops): Update.
1930 (linux_process_qsupported): Turn into ...
1931 (linux_process_target::process_qsupported): ... this.
1932 * linux-low.h (class linux_process_target): Update.
1933 * lynx-low.cc (lynx_target_ops): Update.
1934 * nto-low.cc (nto_target_ops): Update.
1935 * win32-low.cc (win32_target_ops): Update.
1936
9da41fda
TBA
19372020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1938
1939 Turn process_stratum_target's read_loadmap op into a method of
1940 process_target.
1941
1942 * target.h (struct process_stratum_target): Remove the target op.
1943 (class process_target): Add the target op. Also add
1944 'supports_read_loadmap'.
1945 * target.cc (process_target::read_loadmap): Define.
1946 (process_target::supports_read_loadmap): Define.
1947
1948 Update the derived classes and callers below.
1949
1950 * server.cc (handle_qxfer_fdpic): Update.
1951 (handle_query): Update.
1952 * linux-low.cc (linux_target_ops): Update.
1953 (linux_process_target::supports_read_loadmap): Define.
1954 (linux_read_loadmap): Turn into ...
1955 (linux_process_target::read_loadmap): ... this.
1956 * linux-low.h (class linux_process_target): Update.
1957 * lynx-low.cc (lynx_target_ops): Update.
1958 * nto-low.cc (nto_target_ops): Update.
1959 * win32-low.cc (win32_target_ops): Update.
1960
95a45fc1
TBA
19612020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1962
1963 Turn process_stratum_target's core_of_thread op into a method of
1964 process_target.
1965
1966 * target.h (struct process_stratum_target): Remove the target op.
1967 (class process_target): Add the target op.
1968 (target_core_of_thread): Update the macro.
1969 * target.cc (process_target::core_of_thread): Define.
1970
1971 Update the derived classes and callers below.
1972
1973 * linux-low.cc (linux_target_ops): Update.
1974 (linux_process_target::core_of_thread): Define.
1975 * linux-low.h (class linux_process_target): Update.
1976 * lynx-low.cc (lynx_target_ops): Update.
1977 * nto-low.cc (nto_target_ops): Update.
1978 * win32-low.cc (win32_target_ops): Update.
1979
55cf3021
TBA
19802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1981
1982 Turn process_stratum_target's handle_monitor_command op into a
1983 method of process_target.
1984
1985 * target.h (struct process_stratum_target): Remove the target op.
1986 (class process_target): Add the target op.
1987 (target_handle_monitor_command): Update the macro.
1988 * target.cc (process_target::handle_monitor_command): Define.
1989
1990 Update the derived classes and callers below.
1991
1992 * server.cc (handle_query): Update.
1993 * linux-low.cc (linux_target_ops): Update.
1994 (linux_process_target::handle_monitor_command): Define.
1995 * linux-low.h (class linux_process_target): Update.
1996 * lynx-low.cc (lynx_target_ops): Update.
1997 * nto-low.cc (nto_target_ops): Update.
1998 * win32-low.cc (win32_target_ops): Update.
1999
fb00dfce
TBA
20002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2001
2002 Turn process_stratum_target's handle_new_gdb_connection op into a
2003 method of process_target.
2004
2005 * target.h (struct process_stratum_target): Remove the target op.
2006 (class process_target): Add the target op.
2007 (target_handle_new_gdb_connection): Update the macro.
2008 * target.cc (process_target::handle_new_gdb_connection): Define.
2009
2010 Update the derived classes and callers below.
2011
2012 * linux-low.cc (linux_target_ops): Update.
2013 (linux_handle_new_gdb_connection): Turn into ...
2014 (linux_process_target::handle_new_gdb_connection): ... this.
2015 * linux-low.h (class linux_process_target): Update.
2016 * lynx-low.cc (lynx_target_ops): Update.
2017 * nto-low.cc (nto_target_ops): Update.
2018 * win32-low.cc (win32_target_ops): Update.
2019
9690a72a
TBA
20202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2021
2022 Turn process_stratum_target's supports_fork_events,
2023 supports_vfork_events, and supports_exec_events ops into methods
2024 of process_target.
2025
2026 * target.h (struct process_stratum_target): Remove the target ops.
2027 (class process_target): Add the target ops.
2028 (target_supports_fork_events): Update the macro.
2029 (target_supports_vfork_events): Update the macro.
2030 (target_supports_exec_events): Update the macro.
2031 * target.cc (process_target::supports_fork_events): Define.
2032 (process_target::supports_vfork_events): Define.
2033 (process_target::supports_exec_events): Define.
2034
2035 Update the derived classes and callers below.
2036
2037 * linux-low.cc (linux_target_ops): Update.
2038 (linux_supports_fork_events): Turn into ...
2039 (linux_process_target::supports_fork_events): ... this.
2040 (linux_supports_vfork_events): Turn into ...
2041 (linux_process_target::supports_vfork_events): ... this.
2042 (linux_supports_exec_events): Turn into ...
2043 (linux_process_target::supports_exec_events): ... this.
2044 * linux-low.h (class linux_process_target): Update.
2045 * lynx-low.cc (lynx_target_ops): Update.
2046 * nto-low.cc (nto_target_ops): Update.
2047 * win32-low.cc (win32_target_ops): Update.
2048
652aef77
TBA
20492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2050
2051 Turn process_stratum_target's supports_multi_process op into a
2052 method of process_target.
2053
2054 * target.h (struct process_stratum_target): Remove the target op.
2055 (class process_target): Add the target op.
2056 * target.cc (process_target::supports_multi_process): Define.
2057 (target_supports_multi_process): Update.
2058
2059 Update the derived classes and callers below.
2060
2061 * linux-low.cc (linux_target_ops): Update.
2062 (linux_supports_multi_process): Turn into ...
2063 (linux_process_target::supports_multi_process): ... this.
2064 * linux-low.h (class linux_process_target): Update.
2065 * lynx-low.cc (lynx_target_ops): Update.
2066 * nto-low.cc (nto_target_ops): Update.
2067 * win32-low.cc (win32_target_ops): Update.
2068
0dc587d4
TBA
20692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2070
2071 Turn process_stratum_target's supports_non_stop, async, and
2072 start_non_stop ops into methods of process_target.
2073
2074 * target.h (struct process_stratum_target): Remove the target ops.
2075 (class process_target): Add the target ops.
2076 (target_supports_non_stop): Update the macro.
2077 (target_async): Update the macro.
2078 (start_non_stop): Remove declaration.
2079 * target.cc (process_target::supports_non_stop): Define.
2080 (process_target::async): Define.
2081 (process_target::start_non_stop): Define.
2082 (start_non_stop): Remove.
2083
2084 Update the derived classes and callers below.
2085
2086 * server.cc (handle_qxfer_siginfo): Update.
2087 (handle_query): Update.
2088 * linux-low.cc (linux_target_ops): Update.
2089 (linux_supports_non_stop): Turn into ...
2090 (linux_process_target::supports_non_stop): ... this.
2091 (linux_async): Turn into ...
2092 (linux_process_target::async): ... this.
2093 (linux_start_non_stop): Turn into ...
2094 (linux_process_target::start_non_stop): ... this.
2095 * linux-low.h (class linux_process_target): Update.
2096 * lynx-low.cc (lynx_target_ops): Update.
2097 * nto-low.cc (nto_target_ops): Update.
2098 (nto_supports_non_stop): Remove; rely on the default behavior
2099 instead.
2100 * win32-low.cc (win32_target_ops): Update.
2101
d7abedf7
TBA
21022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2103
2104 Turn process_stratum_target's qxfer_siginfo op into a method of
2105 process_target.
2106
2107 * target.h (struct process_stratum_target): Remove the target op.
2108 (class process_target): Add the target op. Also add
2109 'supports_qxfer_siginfo'.
2110 * target.cc (process_target::qxfer_siginfo): Define.
2111 (process_target::supports_qxfer_siginfo): Define.
2112
2113 Update the derived classes and callers below.
2114
2115 * server.cc (handle_qxfer_siginfo): Update.
2116 (handle_query): Update.
2117 * linux-low.cc (linux_target_ops): Update.
2118 (linux_process_target::supports_qxfer_siginfo): Define.
2119 (linux_xfer_siginfo): Turn into ...
2120 (linux_process_target::qxfer_siginfo): ... this.
2121 * linux-low.h (class linux_process_target): Update.
2122 * lynx-low.cc (lynx_target_ops): Update.
2123 * nto-low.cc (nto_target_ops): Update.
2124 * win32-low.cc (win32_target_ops): Update.
2125
2d0795ee
TBA
21262020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2127
2128 Turn process_stratum_target's qxfer_osdata op into a method of
2129 process_target.
2130
2131 * target.h (struct process_stratum_target): Remove the target op.
2132 (class process_target): Add the target op. Also add
2133 'supports_qxfer_osdata'.
2134 * target.cc (process_target::qxfer_osdata): Define.
2135 (process_target::supports_qxfer_osdata): Define.
2136
2137 Update the derived classes and callers below.
2138
2139 * server.cc (handle_qxfer_osdata): Update.
2140 (handle_query): Update.
2141 * linux-low.cc (linux_target_ops): Update.
2142 (linux_process_target::supports_qxfer_osdata): Define.
2143 (linux_qxfer_osdata): Turn into ...
2144 (linux_process_target::qxfer_osdata): ... this.
2145 * linux-low.h (class linux_process_target): Update.
2146 * lynx-low.cc (lynx_target_ops): Update.
2147 * nto-low.cc (nto_target_ops): Update.
2148 * win32-low.cc (win32_target_ops): Update.
2149
ea06bbaa
TBA
21502020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2151
2152 Turn process_stratum_target's hostio_last_error op into a
2153 method of process_target.
2154
2155 * target.h (struct process_stratum_target): Remove the target op.
2156 (class process_target): Add the target op.
2157 * target.cc: Add "hostio.h" to includes.
2158 (process_target::hostio_last_error): Define.
2159
2160 Update the derived classes and callers below.
2161
2162 * hostio.cc (hostio_error): Update.
2163 * linux-low.cc: Remove "hostio.h" from includes.
2164 (linux_target_ops): Update.
2165 * lynx-low.cc (lynx_target_ops): Update.
2166 * nto-low.cc (nto_target_ops): Update.
2167 * win32-low.h (class win32_process_target): Update.
2168 * win32-low.cc (win32_target_ops): Update.
2169 (wince_hostio_last_error): Turn into ...
2170 (win32_process_target::hostio_last_error): ... this.
2171
6e3fd7e9
TBA
21722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2173
2174 Turn process_stratum_target's get_tls_address op into a method of
2175 process_target.
2176
2177 * target.h (struct process_stratum_target): Remove the target op.
2178 (class process_target): Add the target op. Also add
2179 'supports_get_tls_address'.
2180 * target.cc (process_target::get_tls_address): Define.
2181 (process_target::supports_get_tls_address): Define.
2182
2183 Update the derived classes and callers below.
2184
2185 * server.cc (handle_query): Update.
2186 * linux-low.cc (linux_target_ops): Update.
2187 (linux_process_target::supports_get_tls_address): Define.
2188 (linux_process_target::get_tls_address): Define.
2189 * linux-low.h (class linux_process_target): Update.
2190 * lynx-low.cc (lynx_target_ops): Update.
2191 * nto-low.cc (nto_target_ops): Update.
2192 * win32-low.cc (win32_target_ops): Update.
2193
5203ae1e
TBA
21942020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2195
2196 Turn process_stratum_target's read_offsets op into a method of
2197 process_target.
2198
2199 * target.h (struct process_stratum_target): Remove the target op.
2200 (class process_target): Add the target op. Also add
2201 'supports_read_offsets'.
2202 * target.cc (process_target::read_offsets): Define.
2203 (process_target::supports_read_offsets): Define.
2204
2205 Update the derived classes and callers below.
2206
2207 * server.cc (handle_query): Update.
2208 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2209 (linux_target_ops): Update.
2210 (linux_process_target::supports_read_offsets): Define.
2211 (linux_read_offsets): Turn into ...
2212 (linux_process_target::read_offsets): ... this.
2213 * linux-low.h (class linux_process_target): Update.
2214 * lynx-low.cc (lynx_target_ops): Update.
2215 * nto-low.cc (nto_target_ops): Update.
2216 * win32-low.cc (win32_target_ops): Update.
2217
6eeb5c55
TBA
22182020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2219
2220 Turn process_stratum_target's stopped_by_watchpoint and
2221 stopped_data_address ops into methods of process_target.
2222
2223 * target.h (struct process_stratum_target): Remove the target ops.
2224 (class process_target): Add the target ops.
2225 * target.cc (process_target::stopped_by_watchpoint): Define.
2226 (process_target::stopped_data_address): Define.
2227
2228 Update the derived classes and callers below.
2229
2230 * remote-utils.cc (prepare_resume_reply): Update.
2231 * linux-low.cc (linux_target_ops): Update.
2232 (linux_stopped_by_watchpoint): Turn into ...
2233 (linux_process_target::stopped_by_watchpoint): ... this.
2234 (linux_stopped_data_address): Turn into ...
2235 (linux_process_target::stopped_data_address): ... this.
2236 * linux-low.h (class linux_process_target): Update.
2237 * lynx-low.cc (lynx_target_ops): Update.
2238 * nto-low.cc (nto_target_ops): Update.
2239 (nto_stopped_by_watchpoint): Turn into ...
2240 (nto_process_target::stopped_by_watchpoint): ... this.
2241 (nto_stopped_data_address): Turn into ...
2242 (nto_process_target::stopped_data_address): ... this.
2243 * nto-low.h (class nto_process_target): Update.
2244 * win32-low.cc (win32_target_ops): Update.
2245 (win32_stopped_by_watchpoint): Turn into ...
2246 (win32_process_target::stopped_by_watchpoint): ... this.
2247 (win32_stopped_data_address): Turn into ...
2248 (win32_process_target::stopped_data_address): ... this.
2249 * win32-low.h (class win32_process_target): Update.
2250
22aa6223
TBA
22512020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2252
2253 Turn process_stratum_target's supports_hardware_single_step op into
2254 a method of process_target.
2255
2256 * target.h (struct process_stratum_target): Remove the target op.
2257 (class process_target): Add the target op.
2258 (target_supports_hardware_single_step): Update the macro.
2259 (target_can_do_hardware_single_step): Remove declaration.
2260 * target.cc (process_target::supports_hardware_single_step): Define.
2261 (target_can_do_hardware_single_step): Remove.
2262
2263 Update the derived classes and callers below.
2264
2265 * linux-low.h (class linux_process_target): Update.
2266 * linux-low.cc (linux_target_ops): Update.
2267 (linux_supports_hardware_single_step): Turn into ...
2268 (linux_process_target::supports_hardware_single_step): ... this.
2269 * lynx-low.h (class lynx_process_target): Update.
2270 * lynx-low.cc (lynx_target_ops): Update.
2271 (lynx_process_target::supports_hardware_single_step): Define.
2272 * nto-low.h (class nto_process_target): Update.
2273 * nto-low.cc (nto_target_ops): Update.
2274 (nto_process_target::supports_hardware_single_step): Define.
2275 * win32-low.h (class win32_process_target): Update.
2276 * win32-low.cc (win32_target_ops): Update.
2277 (win32_process_target::supports_hardware_single_step): Define.
2278
93fe88b2
TBA
22792020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2280
2281 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2282 ops into methods of process_target.
2283
2284 * target.h (struct process_stratum_target): Remove the target ops.
2285 (class process_target): Add the target ops.
2286 (target_stopped_by_hw_breakpoint): Update the macro.
2287 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2288 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2289 (process_target::supports_stopped_by_hw_breakpoint): Define.
2290
2291 Update the derived classes and callers below.
2292
2293 * linux-low.cc (linux_target_ops): Update.
2294 (linux_stopped_by_hw_breakpoint): Turn into ...
2295 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2296 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2297 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2298 * linux-low.h (class linux_process_target): Update.
2299 * lynx-low.cc (lynx_target_ops): Update.
2300 * nto-low.cc (nto_target_ops): Update.
2301 * win32-low.cc (win32_target_ops): Update.
2302
84320c4e
TBA
23032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2304
2305 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2306 ops into methods of process_target.
2307
2308 * target.h (struct process_stratum_target): Remove the target ops.
2309 (class process_target): Add the target ops.
2310 (target_stopped_by_sw_breakpoint): Update the macro.
2311 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2312 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2313 (process_target::supports_stopped_by_sw_breakpoint): Define.
2314
2315 Update the derived classes and callers below.
2316
2317 * linux-low.cc (linux_target_ops): Update.
2318 (linux_stopped_by_sw_breakpoint): Turn into ...
2319 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2320 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2321 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2322 * linux-low.h (class linux_process_target): Update.
2323 * lynx-low.cc (lynx_target_ops): Update.
2324 * nto-low.cc (nto_target_ops): Update.
2325 * win32-low.cc (win32_target_ops): Update.
2326
7e0bde70
TBA
23272020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2328
2329 Turn process_stratum_target's insert_point and remove_point ops
2330 into methods of process_target.
2331
2332 * target.h (struct process_stratum_target): Remove the target ops.
2333 (class process_target): Add the target ops.
2334 * target.cc (process_target::insert_point): Define.
2335 (process_target::remove_point): Define.
2336
2337 Update the derived classes and callers below.
2338
2339 * mem-break.cc (set_raw_breakpoint_at): Update.
2340 (delete_raw_breakpoint): Update.
2341 (uninsert_raw_breakpoint): Update.
2342 (reinsert_raw_breakpoint): Update.
2343 * linux-low.cc (linux_target_ops): Update.
2344 (linux_insert_point): Turn into ...
2345 (linux_process_target::insert_point): ... this.
2346 (linux_remove_point): Turn into ...
2347 (linux_process_target::remove_point): ... this.
2348 * linux-low.h (class linux_process_target): Update.
2349 * lynx-low.cc (lynx_target_ops): Update.
2350 * nto-low.cc (nto_target_ops): Update.
2351 (nto_insert_point): Turn into ...
2352 (nto_process_target::insert_point): ... this.
2353 (nto_remove_point): Turn into ...
2354 (nto_process_target::remove_point): ... this.
2355 * nto-low.h (class nto_process_target): Update.
2356 * win32-low.cc (win32_target_ops): Update.
2357 (win32_insert_point): Turn into ...
2358 (win32_process_target::insert_point): ... this.
2359 (win32_remove_point): Turn into ...
2360 (win32_process_target::remove_point): ... this.
2361 * win32-low.h (class win32_process_target): Update.
2362
a2b2297a
TBA
23632020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2364
2365 Turn process_stratum_target's supports_z_point_type op into a
2366 method of process_target.
2367
2368 * target.h (struct process_stratum_target): Remove the target op.
2369 (class process_target): Add the target op.
2370 * target.cc (process_target::supports_z_point_type): Define.
2371
2372 Update the derived classes and callers below.
2373
2374 * mem-break.cc (z_type_supported): Update.
2375 * linux-low.cc (linux_target_ops): Update.
2376 (linux_supports_z_point_type): Turn into ...
2377 (linux_process_target::supports_z_point_type): ... this.
2378 * linux-low.h (class linux_process_target): Update.
2379 * lynx-low.cc (lynx_target_ops): Update.
2380 * nto-low.cc (nto_target_ops): Update.
2381 (nto_supports_z_point_type): Turn into ...
2382 (nto_process_target::supports_z_point_type): ... this.
2383 * nto-low.h (class nto_process_target): Update.
2384 * win32-low.cc (win32_target_ops): Update.
2385 (win32_supports_z_point_type): Turn into ...
2386 (win32_process_target::supports_z_point_type): ... this.
2387 * win32-low.h (class win32_process_target): Update.
2388
eac215cc
TBA
23892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2390
2391 Turn process_stratum_target's read_auxv op into a method of
2392 process_target.
2393
2394 * target.h (class process_stratum_target): Remove the target op.
2395 (struct process_target): Add the target op. Also add
2396 'supports_read_auxv'.
2397 * target.cc (process_target::read_auxv): Define.
2398 (process_target::supports_read_auxv): Define.
2399
2400 Update the derived classes and callers below.
2401
2402 * server.cc (handle_qxfer_auxv): Update.
2403 (handle_query): Update.
2404 * linux-low.cc (linux_target_ops): Update.
2405 (linux_process_target::supports_read_auxv): Define.
2406 (linux_read_auxv): Turn into ...
2407 (linux_process_target::read_auxv): ... this.
2408 * linux-low.h (class linux_process_target): Update.
2409 * lynx-low.cc (lynx_target_ops): Update.
2410 * nto-low.cc (nto_target_ops): Update.
2411 (nto_process_target::supports_read_auxv): Define.
2412 (nto_read_auxv): Turn into ...
2413 (nto_process_target::read_auxv): ... this.
2414 * nto-low.h (class nto_process_target): Update.
2415 * win32-low.cc (win32_target_ops): Update.
2416
eb497a2a
TBA
24172020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2418
2419 Turn process_stratum_target's request_interrupt op into a method of
2420 process_target.
2421
2422 * target.h (struct process_stratum_target): Remove the target op.
2423 (class process_target): Add the target op.
2424
2425 Update the derived classes and callers below.
2426
2427 * remote-utils.cc (putpkt_binary_1): Update.
2428 (input_interrupt): Update.
2429 (getpkt): Update.
2430 * server.cc (handle_v_requests): Update.
2431 * linux-low.cc (linux_target_ops): Update.
2432 (linux_request_interrupt): Turn into ...
2433 (linux_process_target::request_interrupt): ... this.
2434 * linux-low.h (class linux_process_target): Update.
2435 * lynx-low.cc (lynx_target_ops): Update.
2436 (lynx_request_interrupt): Turn into ...
2437 (lynx_process_target::request_interrupt): ... this.
2438 * lynx-low.h (class lynx_process_target): Update.
2439 * nto-low.cc (nto_target_ops): Update.
2440 (nto_request_interrupt): Turn into ...
2441 (nto_process_target::request_interrupt): ... this.
2442 * nto-low.h (class nto_process_target): Update.
2443 * win32-low.cc (win32_target_ops): Update.
2444 (win32_request_interrupt): Turn into ...
2445 (win32_process_target::request_interrupt): ... this.
2446 * win32-low.h (class win32_process_target): Update.
2447
2a31c7aa
TBA
24482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2449
2450 Turn process_stratum_target's look_up_symbols op into a method of
2451 process_target.
2452
2453 * target.h (struct process_stratum_target): Remove the target op.
2454 (class process_target): Add the target op.
2455 * target.cc (process_target::look_up_symbols): Define.
2456
2457 Update the derived classes and callers below.
2458
2459 * server.cc (handle_query): Update.
2460 * linux-low.cc (linux_target_ops): Update.
2461 (linux_look_up_symbols): Turn into ...
2462 (linux_process_target::look_up_symbols): ... this.
2463 * linux-low.h (class linux_process_target): Update.
2464 * lynx-low.cc (lynx_target_ops): Update.
2465 * nto-low.cc (nto_target_ops): Update.
2466 * win32-low.cc (win32_target_ops): Update.
2467
e2558df3
TBA
24682020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2469
2470 Turn process_stratum_target's read_memory and write_memory
2471 ops into methods of process_target.
2472
2473 * target.h (struct process_stratum_target): Remove the target ops.
2474 (class process_target): Add the target ops.
2475
2476 Update the derived classes and callers below.
2477
2478 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2479 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2480 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2481 (arm_get_syscall_trapinfo): Update.
2482 * linux-cris-low.cc (cris_breakpoint_at): Update.
2483 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2484 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2485 * linux-mips-low.cc (mips_breakpoint_at): Update.
2486 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2487 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2488 * linux-sh-low.cc (sh_breakpoint_at): Update.
2489 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2490 (sparc_store_gregset_from_stack): Update.
2491 (sparc_breakpoint_at): Update.
2492 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2493 * linux-tile-low.cc (tile_breakpoint_at): Update.
2494 * linux-x86-low.cc (x86_breakpoint_at): Update.
2495 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2496 * mem-brea.cc (insert_memory_breakpoint): Update.
2497 (validate_inserted_breakpoint): Update.
2498 * target.cc (read_inferior_memory): Update.
2499 (target_write_memory): Update.
2500 * linux-low.cc (linux_target_ops): Update.
2501 (linux_read_memory): Make a wrapper around the read_memory target
2502 op call.
2503 (linux_process_target::read_memory): Rename from linux_read_memory.
2504 (linux_write_memory): Turn into ...
2505 (linux_process_target::write_memory): ... this.
2506 * linux-low.h (class linux_process_target): Update.
2507 * lynx-low.cc (lynx_target_ops): Update.
2508 (lynx_read_memory): Turn into ...
2509 (lynx_process_target::read_memory): ... this.
2510 (lynx_write_memory): Turn into ...
2511 (lynx_process_target::write_memory): ... this.
2512 * lynx-low.h (class lynx_process_target): Update.
2513 * nto-low.cc (nto_target_ops): Update.
2514 (nto_read_memory): Turn into ...
2515 (nto_process_target::read_memory): ... this.
2516 (nto_write_memory): Turn into ...
2517 (nto_process_target::write_memory): ... this.
2518 * nto-low.h (class nto_process_target): Update.
2519 * win32-low.cc (win32_target_ops): Update.
2520 (win32_read_inferior_memory): Turn into ...
2521 (win32_process_target::read_memory): ... this.
2522 (win32_write_inferior_memory): Turn into ...
2523 (win32_process_target::write_memory): ... this.
2524 * win32-low.h (class win32_process_target): Update.
2525
79b44087
TBA
25262020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2527
2528 Turn process_stratum_target's prepare_to_access_memory and
2529 done_accessing_memory ops into methods of process_target.
2530
2531 * target.h (struct process_stratum_target): Remove the target ops.
2532 (class process_target): Add the target ops.
2533 * target.cc (process_target::prepare_to_access_memory): Define.
2534 (process_target::done_accessing_memory): Define.
2535 (prepare_to_access_memory): Update.
2536 (done_accessing_memory): Update.
2537
2538 Update the derived classes and callers below.
2539
2540 * linux-low.cc (linux_target_ops): Update.
2541 (linux_prepare_to_access_memory): Turn into ...
2542 (linux_process_target::prepare_to_access_memory): ... this.
2543 (linux_done_accessing_memory): Turn into ...
2544 (linux_process_target::done_accessing_memory): ... this.
2545 * linux-low.h (class linux_process_target): Update.
2546 * lynx-low.cc (lynx_target_ops): Update.
2547 * nto-low.cc (nto_target_ops): Update.
2548 * win32-low.cc (win32_target_ops): Update.
2549
a5a4d4cd
TBA
25502020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2551
2552 Turn process_stratum_target's fetch_registers and store_registers
2553 ops into methods of process_target.
2554
2555 * target.h (struct process_stratum_target): Remove the target ops.
2556 (class process_target): Add the target ops.
2557 (fetch_inferior_registers): Update the macro.
2558 (store_inferior_registers): Update the macro.
2559
2560 Update the derived classes and callers below.
2561
2562 * linux-low.cc (linux_target_ops): Update.
2563 (linux_fetch_registers): Turn into ...
2564 (linux_process_target::fetch_registers): ... this.
2565 (linux_store_registers): Turn into ...
2566 (linux_process_target::store_registers): ... this.
2567 * linux-low.h (class linux_process_target): Update.
2568 * lynx-low.cc (lynx_target_ops): Update.
2569 (lynx_fetch_registers): Turn into ...
2570 (lynx_process_target::fetch_registers): ... this.
2571 (lynx_store_registers): Turn into ...
2572 (lynx_process_target::store_registers): ... this.
2573 * lynx-low.h (class lynx_process_target): Update.
2574 * nto-low.cc (nto_target_ops): Update.
2575 (nto_fetch_registers): Turn into ...
2576 (nto_process_target::fetch_registers): ... this.
2577 (nto_store_registers): Turn into ...
2578 (nto_process_target::store_registers): ... this.
2579 * nto-low.h (class nto_process_target): Update.
2580 * win32-low.cc (win32_target_ops): Update.
2581 (win32_fetch_inferior_registers): Turn into ...
2582 (win32_process_target::fetch_registers): ... this.
2583 (win32_store_inferior_registers): Turn into ...
2584 (win32_process_target::store_registers): ... this.
2585 * win32-low.h (class win32_process_target): Update.
2586
6532e7e3
TBA
25872020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2588
2589 Turn process_stratum_target's wait op into a method of
2590 process_target.
2591
2592 * target.h (struct process_stratum_target): Remove the target op.
2593 (class process_target): Add the target op.
2594
2595 Update the derived classes and callers below.
2596
2597 * target.cc (target_wait): Update.
2598 * linux-low.cc (linux_target_ops): Update.
2599 (linux_wait): Turn into ...
2600 (linux_process_target::wait): ... this.
2601 * linux-low.h (class linux_process_target): Update.
2602 * lynx-low.cc (lynx_target_ops): Update.
2603 (lynx_wait): Turn into ...
2604 (lynx_process_target::wait): ... this.
2605 * lynx-low.h (class lynx_process_target): Update.
2606 * nto-low.cc (nto_target_ops): Update.
2607 (nto_wait): Turn into ...
2608 (nto_process_target::wait): ... this.
2609 * nto-low.h (class nto_process_target): Update.
2610 * win32-low.cc (win32_target_ops): Update.
2611 (win32_wait): Turn into ...
2612 (win32_process_target::wait): ... this.
2613 (do_initial_child_stuff): Update.
2614 * win32-low.h (class win32_process_target): Update.
2615
0e4d7e35
TBA
26162020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2617
2618 Turn process_stratum_target's resume op into a method of
2619 process_target.
2620
2621 * target.h (struct process_stratum_target): Remove the target op.
2622 (class process_target): Add the target op.
2623
2624 Update the derived classes and callers below.
2625
2626 * server.cc (resume): Update.
2627 * target.cc (target_stop_and_wait): Update.
2628 (target_continue_no_signal): Update.
2629 (target_continue): Update.
2630 * linux-low.cc (linux_target_ops): Update.
2631 (linux_resume): Turn into ...
2632 (linux_process_target::resume): ... this.
2633 * linux-low.h (class linux_process_target): Update.
2634 * lynx-low.cc (lynx_target_ops): Update.
2635 (lynx_resume): Turn into ...
2636 (lynx_process_target::resume): ... this.
2637 * lynx-low.h (class lynx_process_target): Update.
2638 * nto-low.cc (nto_target_ops): Update.
2639 (nto_resume): Turn into ...
2640 (nto_process_target::resume): ... this.
2641 * nto-low.h (class nto_process_target): Update.
2642 * win32-low.cc (win32_target_ops): Update.
2643 (win32_resume): Turn into ...
2644 (win32_process_target::resume): ... this.
2645 (win32_process_target::detach): Update.
2646 (do_initial_child_stuff): Update.
2647 * win32-low.h (class win32_process_target): Update.
2648
13d3d99b
TBA
26492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2650
2651 Turn process_stratum_target's thread_alive op into a method of
2652 process_target.
2653
2654 * target.h (struct process_stratum_target): Remove the target op.
2655 (class process_target): Add the target op.
2656 (mythread_alive): Update the macro.
2657
2658 Update the derived classes and callers below.
2659
2660 * linux-low.cc (linux_target_ops): Update.
2661 (linux_thread_alive): Turn into ...
2662 (linux_process_target::thread_alive): ... this.
2663 (wait_for_sigstop): Update.
2664 * linux-low.h (class linux_process_target): Update.
2665 * lynx-low.cc (lynx_target_ops): Update.
2666 (lynx_thread_alive): Turn into ...
2667 (lynx_process_target::thread_alive): ... this.
2668 * lynx-low.h (class lynx_process_target): Update.
2669 * nto-low.cc (nto_target_ops): Update.
2670 (nto_thread_alive): Turn into ...
2671 (nto_process_target::thread_alive): ... this.
2672 * nto-low.h (class nto_process_target): Update.
2673 * win32-low.cc (win32_target_ops): Update.
2674 (win32_thread_alive): Turn into ...
2675 (win32_process_target::thread_alive): ... this.
2676 * win32-low.h (class win32_process_target): Update.
2677
95a49a39
TBA
26782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2679
2680 Turn process_stratum_target's join op into a method of
2681 process_target.
2682
2683 * target.h (struct process_stratum_target): Remove the target op.
2684 (class process_target): Add the target op.
2685 (join_inferior): Update the macro.
2686
2687 Update the derived classes and callers below.
2688
2689 * linux-low.cc (linux_target_ops): Update.
2690 (linux_join): Turn into ...
2691 (linux_process_target::join): ... this.
2692 * linux-low.h (class linux_process_target): Update.
2693 * lynx-low.cc (lynx_target_ops): Update.
2694 (lynx_join): Turn into ...
2695 (lynx_process_target::join): ... this.
2696 * lynx-low.h (class lynx_process_target): Update.
2697 * nto-low.cc (nto_target_ops): Update.
2698 (nto_process_target::join): Define.
2699 * nto-low.h (class nto_process_target): Update.
2700 * win32-low.cc (win32_target_ops): Update.
2701 (win32_join): Turn into ...
2702 (win32_process_target::join): ... this.
2703 * win32-low.h (class win32_process_target): Update.
2704
8adb37b9
TBA
27052020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2706
2707 Turn process_stratum_target's mourn op into a method of
2708 process_target.
2709
2710 * target.h (struct process_stratum_target): Remove the target op.
2711 (class process_target): Add the target op.
2712
2713 Update the derived classes and callers below.
2714
2715 * target.cc (target_mourn_inferior): Update.
2716 * linux-low.cc (linux_target_ops): Update.
2717 (linux_mourn): Turn into ...
2718 (linux_process_target::mourn): ... this.
2719 (handle_extended_wait): Update.
2720 (linux_process_target::kill): Update.
2721 (linux_process_target::detach): Update.
2722 * linux-low.h (class linux_process_target): Update.
2723 * lynx-low.cc (lynx_target_ops): Update.
2724 (lynx_mourn): Turn into ...
2725 (lynx_process_target::mourn): ... this.
2726 * lynx-low.h (class lynx_process_target): Update.
2727 * nto-low.cc (nto_target_ops): Update.
2728 (nto_mourn): Turn into ...
2729 (nto_process_target::mourn): ... this.
2730 * nto-low.h (class nto_process_target): Update.
2731 * win32-low.cc (win32_target_ops): Update.
2732 (win32_mourn): Turn into ...
2733 (win32_process_target::mourn): ... this.
2734 * win32-low.h (class win32_process_target): Update.
2735
9061c9cf
TBA
27362020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2737
2738 Turn process_stratum_target's detach op into a method of
2739 process_target.
2740
2741 * target.h (struct process_stratum_target): Remove the target op.
2742 (class process_target): Add the target op.
2743 (detach_inferior): Update the macro.
2744
2745 Update the derived classes and callers below.
2746
2747 * linux-low.cc (linux_target_ops): Update.
2748 (linux_detach): Turn into ...
2749 (linux_process_target::detach): ... this.
2750 * linux-low.h (class linux_process_target): Update.
2751 * lynx-low.cc (lynx_target_ops): Update.
2752 (lynx_detach): Turn into ...
2753 (lynx_process_target::detach): ... this.
2754 * lynx-low.h (class lynx_process_target): Update.
2755 * nto-low.cc (nto_target_ops): Update.
2756 (nto_detach): Turn into ...
2757 (nto_process_target::detach): ... this.
2758 * nto-low.h (class nto_process_target): Update.
2759 * win32-low.cc (win32_target_ops): Update.
2760 (win32_detach): Turn into ...
2761 (win32_process_target::detach): ... this.
2762 * win32-low.h (class win32_process_target): Update.
2763
c6885a57
TBA
27642020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2765
2766 Turn process_stratum_target's kill op into a method of
2767 process_target.
2768
2769 * target.h (struct process_stratum_target): Remove the target op.
2770 (class process_target): Add the target op.
2771
2772 Update the derived classes and callers below.
2773
2774 * target.cc (kill_inferior): Update.
2775 * linux-low.cc (linux_target_ops): Update.
2776 (linux_kill): Turn into ...
2777 (linux_process_target::kill): ... this.
2778 * linux-low.h (class linux_process_target): Update.
2779 * lynx-low.cc (lynx_target_ops): Update.
2780 (lynx_kill): Turn into ...
2781 (lynx_process_target::kill): ... this.
2782 * lynx-low.h (class lynx_process_target): Update.
2783 * nto-low.cc (nto_target_ops): Update.
2784 (nto_kill): Turn into ...
2785 (nto_process_target::kill): ... this.
2786 * nto-low.h (class nto_process_target): Update.
2787 * win32-low.cc (win32_target_ops): Update.
2788 (win32_kill): Turn into ...
2789 (win32_process_target::kill): ... this.
2790 * win32-low.h (class win32_process_target): Update.
2791
ef03dad8
TBA
27922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2793
2794 Turn process_stratum_target's attach op into a method of
2795 process_target.
2796
2797 * target.h (struct process_stratum_target): Remove the target op.
2798 (class process_target): Add the target op.
2799 (myattach): Update the macro.
2800
2801 Update the derived classes and callers below.
2802
2803 * linux-low.cc (linux_target_ops): Update.
2804 (linux_attach): Turn into ...
2805 (linux_process_target::attach): ... this.
2806 * linux-low.h (class linux_process_target): Update.
2807 * lynx-low.cc (lynx_target_ops): Update.
2808 (lynx_attach): Turn into ...
2809 (lynx_process_target::attach): ... this.
2810 * lynx-low.h (class lynx_process_target): Update.
2811 * nto-low.cc (nto_target_ops): Update.
2812 (nto_attach): Turn into ...
2813 (nto_process_target::attach): ... this.
2814 * nto-low.h (class nto_process_target): Update.
2815 * win32-low.cc (win32_target_ops): Update.
2816 (win32_attach): Turn into ...
2817 (win32_process_target::attach): ... this.
2818 * win32-low.h (class win32_process_target): Update.
2819
6dee9afb
TBA
28202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2821
2822 Turn process_stratum_target's post_create_inferior op into a method
2823 of process_target.
2824
2825 * target.h (struct process_stratum_target): Remove the target op.
2826 (class process_target): Add the target op.
2827 (target_post_create_inferior): Update the macro.
2828 * target.cc (process_target::post_create_inferior): Define.
2829
2830 Update the derived classes and callers below.
2831
2832 * linux-low.cc (linux_target_ops): Update.
2833 (linux_post_create_inferior): Turn into ...
2834 (linux_process_target::post_create_inferior): ... this.
2835 * linux-low.h (class linux_process_target): Update.
2836 * lynx-low.cc (lynx_target_ops): Update.
2837 * nto-low.cc (nto_target_ops): Update.
2838 * win32-low.cc (win32_target_ops): Update.
2839
15295543
TBA
28402020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2841
2842 Turn process_stratum_target's create_inferior op into a method of
2843 process_target.
2844
2845 * target.h (struct process_stratum_target): Remove the target op.
2846 (class process_target): Add the target op.
2847 (create_inferior): Rename the macro to ...
2848 (target_create_inferior): ... this.
2849
2850 Update the derived classes and callers below.
2851
2852 * server.cc (handle_v_run): Update.
2853 (captured_main): Update.
2854 (process_serial_event): Update.
2855 * linux-low.cc (linux_target_ops): Update.
2856 (linux_create_inferior): Turn into ...
2857 (linux_process_target::create_inferior): ... this.
2858 * linux-low.h (class linux_process_target): Update.
2859 * lynx-low.cc (lynx_target_ops): Update.
2860 (lynx_create_inferior): Turn into ...
2861 (lynx_process_target::create_inferior): ... this.
2862 * lynx-low.h (class lynx_process_target): Update.
2863 * nto-low.cc (nto_target_ops): Update.
2864 (nto_create_inferior): Turn into ...
2865 (nto_process_target::create_inferior): ... this.
2866 * nto-low.h (class nto_process_target): Update.
2867 * win32-low.cc (win32_target_ops): Update.
2868 (win32_create_inferior): Turn into ...
2869 (win32_process_target::create_inferior): ... this.
2870 * win32-low.h (class win32_process_target): Update.
2871
5ef9273d
TBA
28722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2873
2874 * target.h (class process_target): New class definition.
2875 (struct process_stratum_target) <pt>: New field with type
2876 'process_target*'.
2877 * linux-low.h (class linux_process_target): Define as a derived
2878 class of 'process_target'.
2879 * linux-low.cc (linux_target_ops): Add a linux_process_target*
2880 as the 'pt' field.
2881 * lynx-low.h (class lynx_process_target): Define as a derived
2882 class of 'process_target'.
2883 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
2884 as the 'pt' field.
2885 * nto-low.h (class nto_process_target): Define as a derived
2886 class of 'process_target'.
2887 * nto-low.cc (nto_target_ops): Add an nto_process_target*
2888 as the 'pt' field.
2889 * win32-low.h (class win32_process_target): Define as a derived
2890 class of 'process_target'.
2891 * win32-low.cc (win32_target_ops): Add a win32_process_target*
2892 as the 'pt' field.
2893
9f1528a1
AB
28942020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
2895
2896 * configure: Regenerate.
2897
bf84f706
MR
28982020-02-19 Maciej W. Rozycki <macro@wdc.com>
2899 Andrew Burgess <andrew.burgess@embecosm.com>
2900
2901 * linux-riscv-low.cc: New file.
2902 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
2903 and nat/riscv-linux-tdesc.c.
2904 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
2905 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
2906 Define.
2907
1a627e7e
TT
29082020-02-14 Tom Tromey <tom@tromey.com>
2909
2910 * acinclude.m4: Don't include acx_configure_dir.m4.
2911 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
2912 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
2913 (all, install-only, uninstall, clean-info, clean)
2914 (maintainer-clean): Don't recurse.
2915 (subdir_do, all-lib): Remove.
2916 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
2917 (GNULIB_H): Remove.
2918 (generated_files): Update.
2919 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
2920 * configure: Rebuild.
2921 * configure.ac: Don't configure gnulib or libiberty.
2922 (GNULIB): Update.
2923
a9b34532
EZ
29242020-02-14 Eli Zaretskii <eliz@gnu.org>
2925
2926 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
2927 preparing the command line for CreateProcess.
2928 (win32_create_inferior): Reflect the program name in debugging
2929 output that shows the process and its command line.
2930
feacfcac
SM
29312020-02-13 Simon Marchi <simon.marchi@efficios.com>
2932
2933 * Makefile.in: Rename source files from .c to .cc.
2934 * %.c: Rename to %.cc.
2935 * configure.ac: Rename server.c to server.cc.
2936 * configure: Re-generate.
2937
06b3c5bd
SM
29382020-02-13 Simon Marchi <simon.marchi@efficios.com>
2939
2940 * Makefile.in: Rename gdbsupport source files from .c to .cc.
2941
052793ad
HD
29422020-02-12 Hannes Domani <ssbssa@yahoo.de>
2943
2944 * win32-low.c (win32_create_inferior): Set signal_pid.
2945
f20e3e82
MR
29462020-02-12 Maciej W. Rozycki <macro@wdc.com>
2947 Pedro Alves <palves@redhat.com>
2948
2949 Skip building gdbserver in a cross-configuration.
2950 * configure.srv: Set $gdbserver_host depending on whether $target
2951 is $host. Use $gdbserver_host instead of $host.
2952
8ddd8e0e
SM
29532020-02-11 Simon Marchi <simon.marchi@efficios.com>
2954
2955 * configure: Re-generate.
2956
898e7f60
SM
29572020-02-11 Simon Marchi <simon.marchi@efficios.com>
2958
2959 * configure: Re-generate.
2960
58df732b
SM
29612020-02-11 Simon Marchi <simon.marchi@efficios.com>
2962
2963 * acinclude.m4: Update warning.m4 path.
2964
7928d571
HD
29652020-02-09 Hannes Domani <ssbssa@yahoo.de>
2966
2967 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
2968 (handle_exception): Set siginfo_er.
2969 (win32_xfer_siginfo): New function.
2970
919adfe8
TT
29712020-02-07 Tom Tromey <tom@tromey.com>
2972 Pedro Alves <palves@redhat.com>
2973
2974 * README: Update build documentation.
2975 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
2976 host, not target.
2977 * configure.ac: Update paths.
2978 * configure: Rebuild.
2979 * acinclude.m4: Update paths.
2980 * Makefile.in: Update include paths.
2981 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
2982 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
2983 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
2984 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
2985 (%-generated.c): Update paths.
2986 * Move entire directory from ../gdb/gdbserver.
2987
287c844a
MR
29882020-01-29 Maciej W. Rozycki <macro@wdc.com>
2989
2990 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
2991
548a204f
PFC
29922020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2993
2994 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
2995 assignment instead of srv_linux_obj.
2996
a2236a08
HD
29972020-01-28 Hannes Domani <ssbssa@yahoo.de>
2998
2999 * server.c (handle_qxfer_libraries): Write segment-address with
3000 paddress.
3001
bdaed379
HD
30022020-01-24 Hannes Domani <ssbssa@yahoo.de>
3003
3004 * Makefile.in (install-strip): New target.
3005 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3006 * aclocal.m4: Regenerate.
3007 * configure: Regenerate.
3008 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3009
42cd72aa
MR
30102020-01-24 Maciej W. Rozycki <macro@wdc.com>
3011
3012 * Makefile.in (SFILES): Adjust paths to point to real files.
3013 (OBS): Move waitstatus.o to target/waitstatus.o.
3014 (TAGS): Transform paths appropriately.
3015 (%.o): Rename to...
3016 (nat/%.o): ... this pattern rule.
3017 (%.o): Rename to...
3018 (target/%.o): ... this pattern rule.
3019 * configure.srv: Adjust paths throughout to include nat/ prefix
3020 with the revant files.
3021 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3022 * configure: Regenerate.
3023
42ba50ec
MR
30242020-01-24 Maciej W. Rozycki <macro@wdc.com>
3025
3026 * Makefile.in (TAGS): Remove config files from the recipe.
3027
05ea2a05
TT
30282020-01-14 Tom Tromey <tom@tromey.com>
3029
3030 * configure: Rebuild.
3031 * configure.ac: Remove any checks that were added to common.m4.
3032 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3033 lib-link.m4.
3034
01027315
TT
30352020-01-14 Tom Tromey <tom@tromey.com>
3036
3037 * server.h: Include config.h.
3038 * gdbreplay.c: Include config.h.
3039 * configure: Rebuild.
3040 * configure.ac: Don't source common.host.
3041 * acinclude.m4: Update path.
3042 * Makefile.in (INCSUPPORT): New variable.
3043 (INCLUDE_CFLAGS): Add INCSUPPORT.
3044 (SFILES): Update paths.
3045 (version-generated.c): Update path to create-version.sh.
3046 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3047
b2ceabe8
TT
30482020-01-14 Tom Tromey <tom@tromey.com>
3049
3050 * configure.ac (LIBS): Use WIN32APILIBS.
3051 (USE_WIN32API): Don't define.
3052 * configure: Rebuild.
3053
25c51f71
TT
30542020-01-14 Tom Tromey <tom@tromey.com>
3055
3056 * configure: Rebuild.
3057
c0bd321d
SM
30582020-01-13 Simon Marchi <simon.marchi@efficios.com>
3059
3060 * Makefile.in (%-generated.c): Remove rule for files from
3061 regformats/i386.
3062
bb564c58
SM
30632020-01-13 Simon Marchi <simon.marchi@efficios.com>
3064
3065 * configure: Re-generate.
3066
6e37c371
SM
30672020-01-13 Simon Marchi <simon.marchi@efficios.com>
3068
3069 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3070 Define to static.
3071 * tracepoint.c (stop_tracing, flush_trace_buffer,
3072 about_to_request_buffer_space, get_trace_state_variable_value,
3073 set_trace_state_variable_value, gdb_collect): Add declaration.
3074
df4a0200
SM
30752020-01-13 Simon Marchi <simon.marchi@efficios.com>
3076
3077 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3078 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3079 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3080 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3081 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3082 static.
3083
89e94ec9
SM
30842020-01-13 Simon Marchi <simon.marchi@efficios.com>
3085
3086 * inferiors.c: Include gdbsupport/common-inferior.h.
3087
2552728a
SM
30882020-01-13 Simon Marchi <simon.marchi@efficios.com>
3089
3090 * hostio-errno.c: Include hostio.h.
3091
4025fa09
SM
30922020-01-13 Simon Marchi <simon.marchi@efficios.com>
3093
3094 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3095 prerequisite.
3096
c0b0a142
SM
30972020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3098
3099 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3100 * linux-arm-tdesc.h: Include arch/arm.h.
3101
bb1183e2
SM
31022020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3103
3104 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3105
f5df0b5f
SM
31062020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3107
3108 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3109 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3110
5b6d1e4f
PA
31112020-01-10 Pedro Alves <palves@redhat.com>
3112
3113 * fork-child.c (post_fork_inferior): Pass target down to
3114 startup_inferior.
3115 * inferiors.c (switch_to_thread): Add process_stratum_target
3116 parameter.
3117 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3118 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3119 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3120 * remote-utils.c (prepare_resume_reply): Pass the target to
3121 switch_to_thread.
3122 * target.c (the_target): Now a process_stratum_target.
3123 (done_accessing_memory): Pass the target to switch_to_thread.
3124 (set_target_ops): Ajust to use process_stratum_target.
3125 * target.h (struct target_ops): Rename to ...
3126 (struct process_stratum_target): ... this.
3127 (the_target, set_target_ops): Adjust.
3128 (prepare_to_access_memory): Adjust comment.
3129 * win32-low.c (child_xfer_memory): Adjust to use
3130 process_stratum_target.
3131 (win32_target_ops): Now a process_stratum_target.
3132
559e7e50
EZ
31332020-01-06 Eli Zaretskii <eliz@gnu.org>
3134 Pedro Alves <palves@redhat.com>
3135
3136 * win32-low.c (get_child_debug_event): Extract the fatal exception
3137 from the exit status and convert to the equivalent Posix signal
3138 number.
3139 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3140 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3141
48189bec
HD
31422020-01-01 Hannes Domani <ssbssa@yahoo.de>
3143
3144 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3145
5dd8bf88
JB
31462020-01-01 Joel Brobecker <brobecker@adacore.com>
3147
3148 * server.c (gdbserver_version): Change copyright year to 2020.
3149 * gdbreplay.c (gdbreplay_version): Likewise.
3150
0ad6b8ee
CB
31512019-12-19 Christian Biesinger <cbiesinger@google.com>
3152
3153 * configure: Regenerate.
3154 * configure.ac: Quote variable arguments of test.
3155
1ee7b812
BE
31562019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3157
3158 * Makefile.in: Fix build with GNU Make 3.81
3159
d9fa87f4
TT
31602019-12-16 Tom Tromey <tromey@adacore.com>
3161
3162 * server.c (get_exec_file): Constify result.
3163
ab7d13f0
CB
31642019-12-10 Christian Biesinger <cbiesinger@google.com>
3165
3166 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3167 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3168 * config.in: Regenerate.
3169 * configure: Regenerate.
3170 * configure.ac: Don't check for strerror.
3171 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3172 Call safe_strerror instead of strerror.
3173 * server.h (strerror): Remove this now-unnecessary declaration.
3174 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3175 strerror.
3176 (gdb_agent_helper_thread): Likewise.
3177 * utils.c (perror_with_name): Likewise.
3178
4da8c3a8
TT
31792019-11-26 Tom Tromey <tom@tromey.com>
3180
3181 * configure, config.in: Rebuild.
3182
21987b9c
TT
31832019-11-26 Tom Tromey <tom@tromey.com>
3184
3185 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3186 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3187 gdb_sigmask.
3188 * configure, config.in: Rebuild.
3189
5e030278
TT
31902019-11-26 Tom Tromey <tom@tromey.com>
3191
3192 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3193 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3194 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3195 * acinclude.m4: Include ax_pthread.m4.
3196 * config.in, configure: Rebuild.
3197
6d91ce9a
CB
31982019-11-26 Christian Biesinger <cbiesinger@google.com>
3199
3200 * debug.c (debug_set_output): Call safe_strerror instead of
3201 strerror.
3202 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3203 (linux_kill_one_lwp): Likewise.
3204 (linux_detach_one_lwp): Likewise.
3205 (linux_wait_for_event_filtered): Likewise.
3206 (store_register): Likewise.
3207 * lynx-low.c (lynx_attach): Likewise.
3208 * mem-break.c (insert_memory_breakpoint): Likewise.
3209 (remove_memory_breakpoint): Likewise.
3210 (delete_fast_tracepoint_jump): Likewise.
3211 (set_fast_tracepoint_jump): Likewise.
3212 (uninsert_fast_tracepoint_jumps_at): Likewise.
3213 (reinsert_fast_tracepoint_jumps_at): Likewise.
3214 * nto-low.c (nto_xfer_memory): Likewise.
3215 (nto_resume): Likewise.
3216
6cdd651f
LM
32172019-11-20 Luis Machado <luis.machado@linaro.org>
3218
3219 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3220 instead of register count.
3221 * tdesc.c (tdesc_contains_feature): New function.
3222 * tdesc.h (tdesc_contains_feature): New prototype.
3223
cd850b40
CB
32242019-11-15 Christian Biesinger <cbiesinger@google.com>
3225
3226 * Makefile.in: Add safe-strerror.c.
3227 * configure: Regenerate.
3228 * configure.ac: Don't source common.host.
3229
5abebf3c
CB
32302019-11-15 Christian Biesinger <cbiesinger@google.com>
3231
3232 * config.in: Regenerate.
3233 * configure: Regenerate.
3234
e06f3d6e
AB
32352019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3236
3237 * ax.c (ax_printf): Handle size_t_arg.
3238
ca3a04f6
CB
32392019-11-06 Christian Biesinger <cbiesinger@google.com>
3240
3241 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3242 * mi/mi-main.c (output_cores): Likewise.
3243 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3244 (linux_xfer_osdata_modules): Likewise.
3245 * remote.c (register_remote_support_xml): Likewise.
3246 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3247 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3248
e48f6033
CB
32492019-11-01 Christian Biesinger <cbiesinger@google.com>
3250
3251 * configure: Regenerate.
3252 * configure.ac: Remove check for strerror_r.
3253
e7e97a2e
CB
32542019-10-31 Christian Biesinger <cbiesinger@google.com>
3255
3256 * config.in: Regenerate.
3257 * configure: Regenerate.
3258 * configure.ac: Also check for strerror_r.
3259
75cafaa6
CB
32602019-10-31 Christian Biesinger <cbiesinger@google.com>
3261
3262 * ax.h (debug_agent): Remove duplicate declaration.
3263
30baf67b
TV
32642019-10-26 Tom de Vries <tdevries@suse.de>
3265
3266 * linux-aarch64-low.c: Fix typos in comments.
3267 * linux-arm-low.c: Same.
3268 * linux-low.c: Same.
3269 * linux-ppc-low.c: Same.
3270 * proc-service.c: Same.
3271 * regcache.h: Same.
3272 * server.c: Same.
3273 * tracepoint.c: Same.
3274 * win32-low.c: Same.
3275
52c64cf7
TT
32762019-10-25 Tom Tromey <tromey@adacore.com>
3277
3278 * utils.c (xstrdup): Remove.
3279
c12d372d
TT
32802019-10-23 Tom Tromey <tom@tromey.com>
3281
3282 * configure, config.in: Rebuild.
3283
4d0b984b
TT
32842019-10-23 Tom Tromey <tom@tromey.com>
3285
3286 * configure: Rebuild.
3287 * acinclude.m4: Use m4_include, not sinclude.
3288
c5adaa19
TT
32892019-10-17 Tom Tromey <tromey@adacore.com>
3290
3291 * configure: Rebuild.
3292 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3293 in AC_CONFIG_FILES invocation.
3294 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3295 invocation.
3296
fec4e896
CB
32972019-10-16 Christian Biesinger <cbiesinger@google.com>
3298
3299 * server.c: Include xml-builtin.h.
3300 (get_xml_features): Don't declare xml_builtins here.
3301
00975ff6
AB
33022019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3303
3304 * Makefile.in: Remove references to vec-ipa.o.
3305
0dc32745
AB
33062019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3307
3308 * Makefile.in: Remove references to vec.c.
3309
3e6ec53a
CB
33102019-10-02 Christian Biesinger <cbiesinger@google.com>
3311
3312 * server.c (server_waiting): Change to bool.
3313 (extended_protocol): Likewise.
3314 (response_needed): Likewise.
3315 (exit_requested): Likewise.
3316 (run_once): Likewise.
3317 (report_no_resumed): Likewise.
3318 (non_stop): Likewise.
3319 (disable_packet_vCont): Likewise.
3320 (disable_packet_Tthread): Likewise.
3321 (disable_packet_qC): Likewise.
3322 (disable_packet_qfThreadInfo): Likewise.
3323 (handle_general_set): Update.
3324 (handle_detach): Update.
3325 (handle_monitor_command): Update.
3326 (handle_query): Update.
3327 (captured_main): Update.
3328 (process_serial_event): Update.
3329 * server.h (server_waiting): Change to bool.
3330 (disable_packet_vCont): Likewise.
3331 (disable_packet_Tthread): Likewise.
3332 (disable_packet_qC): Likewise.
3333 (disable_packet_qfThreadInfo): Likewise.
3334 (run_once): Likewise.
3335 (non_stop): Likewise.
3336 * target.c (target_stop_and_wait): Update.
3337
80fd2826
TT
33382019-10-02 Tom Tromey <tromey@adacore.com>
3339
3340 * Makefile.in (SFILES): Add common-inferior.c.
3341 (OBS): Add common-inferior.o.
3342 * server.c (startup_with_shell): Don't define.
3343
46f29a9a
AB
33442019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3345
3346 * linux-low.c (linux_low_read_btrace): Update for change to
3347 std::vector.
3348
f9d949fb
CB
33492019-09-20 Christian Biesinger <cbiesinger@google.com>
3350
3351 * debug.c (debug_threads): Remove comment in favor of the header.
3352 * debug.h (using_threads): Add declaration.
3353 (debug_threads): Add comment.
3354 * linux-aarch64-low.c: Include debug.h and remove declaration of
3355 debug_threads.
3356 * nto-low.c: Likewise.
3357 * remote-utils.c: Likewise.
3358 * thread-db.c: Likewise.
3359
abf516c6
UW
33602019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3361
3362 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3363 and powerpc-cell64l-ipa.o.
3364 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3365 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3366 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3367 (spu*-*-*): Remove.
3368
3369 * spu-low.c: Remove file.
3370
3371 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3372 (parse_spufs_run): Remove.
3373 (ppc_get_pc): Remove Cell/B.E. support.
3374 (ppc_set_pc): Likewise.
3375 (ppc_breakpoint_at): Likewise.
3376 (ppc_arch_setup): Likewise.
3377 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3378 tdesc_powerpc_cell32l.
3379 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3380 or init_registers_powerpc_cell32l.
3381 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3382 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3383 or init_registers_powerpc_cell32l.
3384 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3385 (init_registers_powerpc_cell32l): Remove prototype.
3386 (init_registers_powerpc_cell64l): Likewise.
3387
3388 * target.h (struct target_ops): Remove qxfer_spu member.
3389 * server.c (handle_qxfer_spu): Remove.
3390 (qxfer_packets): Remove entry for "spu".
3391 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3392 * linux-low.c (SPUFS_MAGIC): Remove.
3393 (spu_enumerate_spu_ids): Remove.
3394 (linux_qxfer_spu): Remove.
3395 (linux_target_ops): Remove qxfer_spu member.
3396 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3397 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3398 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3399
2d41fa11
SDJ
34002019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3401
3402 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3403 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3404 * config.in: Regenerate.
3405 * configure: Regenerate.
3406
d59b55f0
TT
34072019-08-15 Tom Tromey <tromey@adacore.com>
3408
3409 * target.c (target_write_memory): Use gdb::byte_vector.
3410
4196ab2a
TT
34112019-08-15 Tom Tromey <tromey@adacore.com>
3412
3413 * tracepoint.c (write_inferior_data_pointer)
3414 (write_inferior_integer, write_inferior_int8)
3415 (write_inferior_uinteger, m_tracepoint_action_download)
3416 (r_tracepoint_action_download, x_tracepoint_action_download)
3417 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3418 (download_agent_expr, download_tracepoint_1)
3419 (download_trace_state_variables, upload_fast_traceframes): Update.
3420 * server.c (gdb_write_memory): Update.
3421 * remote-utils.c (relocate_instruction): Update.
3422 * proc-service.c (ps_pdwrite): Update.
3423 * mem-break.c (remove_memory_breakpoint)
3424 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3425 (uninsert_fast_tracepoint_jumps_at)
3426 (reinsert_fast_tracepoint_jumps_at): Update.
3427 * linux-x86-low.c (append_insns)
3428 (i386_install_fast_tracepoint_jump_pad)
3429 (amd64_write_goto_address, i386_write_goto_address): Update.
3430 * linux-s390-low.c (append_insns, s390_write_goto_address):
3431 Update.
3432 * linux-ppc-low.c (ppc_relocate_instruction)
3433 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3434 (ppc_write_goto_address): Update.
3435 * linux-aarch64-low.c (append_insns): Update.
3436 * target.h (struct target_ops): Update.
3437 (write_inferior_memory): Don't declare.
3438 * target.c (target_write_memory): Rename from
3439 write_inferior_memory. Remove old target_write_memory.
3440
c6778d00
TT
34412019-08-15 Tom Tromey <tromey@adacore.com>
3442
3443 * target.c (write_inferior_memory): Use std::vector.
3444
404f2902
FCE
34452019-08-06 Frank Ch. Eigler <fche@redhat.com>
3446
3447 PR build/24886
3448 * configure.ac: Drop enable-libmcheck support.
3449 * configure, config.in: Rebuild.
3450 * acinclude.m4: Don't include it.
3451
4c5aa8e0
AH
34522019-07-19 Alan Hayward <alan.hayward@arm.com>
3453
3454 * configure.srv: Remove Arm xml files.
3455
7cc17433
AH
34562019-07-19 Alan Hayward <alan.hayward@arm.com>
3457
3458 * configure.srv: Add new files. Remove xml generated files.
3459 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3460 registers.
3461 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3462 * linux-aarch32-tdesc.c: New file.
3463 * linux-aarch32-tdesc.h: New file.
3464 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3465 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3466 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3467 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3468 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3469 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3470 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3471 (arm_read_description): Call arm_linux_read_description.
3472 (initialize_low_arch): Don't init registers.
3473 * linux-arm-tdesc.c: New file.
3474 * linux-arm-tdesc.h: New file.
3475
166a82be
AH
34762019-07-10 Alan Hayward <alan.hayward@arm.com>
3477
3478 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3479 Move counter inside for.
3480 (arm_read_description): Check ptrace earlier.
3481 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3482
268a13a5
TT
34832019-07-09 Tom Tromey <tom@tromey.com>
3484
3485 * configure: Rebuild.
3486 * configure.ac: Change common to gdbsupport.
3487 * acinclude.m4: Change common to gdbsupport.
3488 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3489 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3490 common to gdbsupport.
3491 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3492 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3493 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3494 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3495 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3496 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3497 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3498 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3499 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3500 common to gdbsupport.
3501
350fab54
AH
35022019-07-04 Alan Hayward <alan.hayward@arm.com>
3503
3504 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
3505 defines.
3506 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
3507
2b40fda7
AH
35082019-07-04 Alan Hayward <alan.hayward@arm.com>
3509
3510 * configure.srv: Remove legacy xml.
3511 * linux-aarch64-low.c (initialize_low_arch): Remove
3512 initialize_low_tdesc call.
3513 * linux-aarch64-tdesc-selftest.c: Remove file.
3514 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
3515 * linux-x86-low.c (initialize_low_arch): Remove
3516 initialize_low_tdesc call.
3517 * linux-x86-tdesc-selftest.c: Remove file.
3518 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
3519
7d10623d
TV
35202019-06-20 Tom de Vries <tdevries@suse.de>
3521
3522 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
3523 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
3524
8d6a48df
TV
35252019-06-19 Tom de Vries <tdevries@suse.de>
3526
3527 * debug.h (debug_write): Change return type to ssize_t.
3528 * debug.c (debug_write): Same.
3529
73cc7272
TT
35302019-06-14 Tom Tromey <tom@tromey.com>
3531
3532 * configure.ac: Use new path to gnulib.
3533 * configure: Rebuild.
3534 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
3535 to gnulib.
3536
08f10e02
TT
35372019-06-11 Tom Tromey <tom@tromey.com>
3538
3539 * Makefile.in (SFILES): Add alloc.c.
3540 (OBS): Add alloc.o.
3541 (IPA_OBJS): Add alloc-ipa.o.
3542 (alloc-ipa.o): New target.
3543 (%.o: ../%.c): New pattern rule.
3544
422186a9
TT
35452019-06-10 Tom Tromey <tromey@adacore.com>
3546
3547 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
3548 end warning with a newline.
3549 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
3550 newline.
3551 * thread-db.c (attach_thread): Don't end warning with a newline.
3552 (thread_db_notice_clone): Likewise.
3553 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
3554 newline.
3555 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
3556 end warning with a newline.
3557
b02f78f9
PA
35582019-06-04 Pedro Alves <palves@redhat.com>
3559
3560 * server.c (captured_main): Use make_unique_xstrdup.
3561
88ed7edb
TT
35622019-06-02 Tom Tromey <tom@tromey.com>
3563
3564 * gdbreplay.c (fromhex): Remove.
3565 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
3566
33a6bc35
TT
35672019-05-29 Tom Tromey <tromey@adacore.com>
3568
3569 * configure: Rebuild.
3570
e90a813d
KB
35712019-05-06 Kevin Buettner <kevinb@redhat.com>
3572
3573 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
3574 sign extension code on 32-bit builds.
3575
353ea2d1
EZ
35762019-05-03 Eli Zaretskii <eliz@gnu.org>
3577
3578 * remote-utils.c:
3579 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
3580
b494cdff
TT
35812019-04-19 Tom Tromey <tom@tromey.com>
3582
3583 * server.c (struct vstop_notif): Derive from notif_event.
3584 <base>: Remove.
3585 (queue_stop_reply): Update.
3586 (remove_all_on_match_ptid): Change type. Rewrite.
3587 (discard_queued_stop_replies): Rewrite.
3588 (in_queued_stop_replies_ptid): Change type.
3589 (in_queued_stop_replies): Rewrite.
3590 (notif_stop): Update.
3591 (queue_stop_reply_callback): Update.
3592 (captured_main): Don't call initialize_notif.
3593 (push_stop_notification): Update.
3594 * notif.c (notif_write_event, handle_notif_ack)
3595 (notif_event_enque, notif_push): Update.
3596 (notif_event_xfree, initialize_notif): Remove.
3597 * notif.h (struct notif_event): Include <list>, not
3598 "common/queue.h".
3599 (struct notif_server) <queue>: Now a std::list.
3600 (notif_event_p): Remove typedef.
3601 (initialize_notif): Don't declare.
3602 (struct notif_event): Add virtual destructor.
3603
a7e559cc
AH
36042019-04-17 Alan Hayward <alan.hayward@arm.com>
3605
3606 * ax.c (ax_vdebug): Call debug_printf.
3607 * debug.c (debug_write): New function.
3608 * debug.h (debug_write): New declaration.
3609 * linux-low.c (sigchld_handler): Call debug_write.
3610
aeb2e706
AH
36112019-04-17 Alan Hayward <alan.hayward@arm.com>
3612
3613 * debug.c (debug_set_output): New function.
3614 (debug_vprintf): Send output to debug_file.
3615 (debug_flush): Likewise.
3616 * debug.h (debug_set_output): New declaration.
3617 * server.c (handle_monitor_command): Add debug-file option.
3618 (captured_main): Likewise.
3619
c1bc0935
AH
36202019-04-17 Alan Hayward <alan.hayward@arm.com>
3621
3622 * debug.c (remote_debug): Add definition.
3623 * debug.h (remote_debug): Add declaration.
3624 * hostio.c (remote_debug): Remove declaration.
3625 * remote-utils.c (struct ui_file): Likewise.
3626 (remote_debug): Likewise.
3627 * remote-utils.h (remote_debug): Likewise,
3628 * server.c (remote_debug): Remove definition.
3629
3f52fdbc
KB
36302019-04-10 Kevin Buettner <kevinb@redhat.com>
3631
3632 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
3633 when using a 64-bit gdbserver.
3634
b0319eaa
TT
36352019-04-09 Tom Tromey <tromey@adacore.com>
3636
3637 * linux-low.c (select_event_lwp): Use find_thread_in_random.
3638
eedc3f4f
TT
36392019-04-08 Tom Tromey <tom@tromey.com>
3640
3641 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
3642 throw.
3643 (linux_resume_one_lwp): Likewise.
3644
230d2906
TT
36452019-04-08 Tom Tromey <tom@tromey.com>
3646
3647 * gdbreplay.c: Update.
3648 * linux-low.c: Update.
3649 * server.c: Update.
3650
a70b8144
TT
36512019-04-08 Tom Tromey <tom@tromey.com>
3652
3653 * server.c: Use C++ exception handling.
3654 * linux-low.c: Use C++ exception handling.
3655 * gdbreplay.c: Use C++ exception handling.
3656
3d6e9d23
TT
36572019-04-08 Tom Tromey <tom@tromey.com>
3658
3659 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
3660 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
3661 (captured_main, main): Update.
3662 * gdbreplay.c (main): Update.
3663
0570503d
PFC
36642019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3665
3666 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
3667 value in argument pointer, return 1 if the entry is found and 0
3668 otherwise. Move comment.
3669 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
3670 * linux-low.h (linux_get_auxv): Declare.
3671 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
3672
227a9e65
TT
36732019-04-05 Tom Tromey <tromey@adacore.com>
3674
3675 * server.c (gdbserver_usage): Use upper-case for metasyntactic
3676 variables.
3677
69f4c9cc
AH
36782019-03-28 Alan Hayward <alan.hayward@arm.com>
3679
3680 * linux-low.c (AT_HWCAP2): Add define if not already included.
3681
974c89e0
AH
36822019-03-26 Alan Hayward <alan.hayward@arm.com>
3683
3684 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
3685 (aarch64_arch_setup): Call linux_get_hwcap.
3686 * linux-arm-low.c (arm_get_hwcap): Remove function.
3687 (arm_read_description): Call linux_get_hwcap.
3688 * linux-low.c (linux_get_auxv): New function.
3689 (linux_get_hwcap): Likewise.
3690 (linux_get_hwcap2): Likewise.
3691 * linux-low.h (linux_get_hwcap): New declaration.
3692 (linux_get_hwcap2): Likewise.
3693 * linux-ppc-low.c (ppc_get_auxv): Remove function.
3694 (ppc_arch_setup): Call linux_get_hwcap.
3695 * linux-s390-low.c (s390_get_hwcap): Remove function.
3696 (s390_arch_setup): Call linux_get_hwcap.
3697
1ef53e6b
AH
36982019-03-22 Alan Hayward <alan.hayward@arm.com>
3699 Jiong Wang <jiong.wang@arm.com>
3700
3701 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
3702 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
3703 to fail.
3704 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
3705
ee4fbcfa
AH
37062019-03-22 Alan Hayward <alan.hayward@arm.com>
3707 Jiong Wang <jiong.wang@arm.com>
3708
3709 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
3710 (aarch64_get_hwcap): New function.
3711 (aarch64_arch_setup): Read APIA hwcap.
3712
6dc0ebde
AH
37132019-03-22 Alan Hayward <alan.hayward@arm.com>
3714 Jiong Wang <jiong.wang@arm.com>
3715
3716 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
3717 (initialize_low_tracepoint): Likewise.
3718 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
3719 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
3720 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
3721 (aarch64_linux_read_description): Likewise.
3722 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
3723
1163a4b7
JB
37242019-03-12 John Baldwin <jhb@FreeBSD.org>
3725
3726 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
3727 i386_create_target_description for 'segments' parameter.
3728 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
3729 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3730 * win32-i386-low.c (i386_arch_setup): Likewise.
3731
d3a70e03
TT
37322019-03-12 Tom Tromey <tromey@adacore.com>
3733
3734 * linux-low.c (iterate_over_lwps): Update.
3735
37991b4f
TT
37362019-03-06 Tom Tromey <tom@tromey.com>
3737
3738 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
3739 (captured_main): Use SCOPE_EXIT.
3740
45950eb6
SDJ
37412019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
3742
3743 * configure.srv: Use '$enable_unittest' instead of '$development'
3744 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
3745 case.
3746
43ac54fc
TT
37472019-02-27 Tom Tromey <tromey@adacore.com>
3748
3749 * gdbreplay.c (logchar): Handle \r\n.
3750
df0da8a2
AH
37512019-02-07 Alan Hayward <alan.hayward@arm.com>
3752
3753 * linux-low.c (linux_attach): Add process before lwp.
3754 * server.c (attach_inferior): Check if already attached.
3755
1a5c2598
TT
37562019-02-07 Tom Tromey <tom@tromey.com>
3757
3758 * x86-tdesc.h: Rename include guard.
3759 * x86-low.h: Add include guard.
3760 * wincecompat.h: Rename include guard.
3761 * win32-low.h: Add include guard.
3762 * utils.h: Rename include guard.
3763 * tracepoint.h: Rename include guard.
3764 * tdesc.h: Rename include guard.
3765 * target.h: Rename include guard.
3766 * server.h: Rename include guard.
3767 * remote-utils.h: Rename include guard.
3768 * regcache.h: Rename include guard.
3769 * nto-low.h: Rename include guard.
3770 * notif.h: Add include guard.
3771 * mem-break.h: Rename include guard.
3772 * lynx-low.h: Add include guard.
3773 * linux-x86-tdesc.h: Add include guard.
3774 * linux-s390-tdesc.h: Add include guard.
3775 * linux-ppc-tdesc-init.h: Add include guard.
3776 * linux-low.h: Add include guard.
3777 * linux-aarch64-tdesc.h: Add include guard.
3778 * linux-aarch32-low.h: Add include guard.
3779 * inferiors.h: Rename include guard.
3780 * i387-fp.h: Rename include guard.
3781 * hostio.h: Rename include guard.
3782 * gdbthread.h: Rename include guard.
3783 * gdb_proc_service.h: Rename include guard.
3784 * event-loop.h: Rename include guard.
3785 * dll.h: Rename include guard.
3786 * debug.h: Rename include guard.
3787 * ax.h: Rename include guard.
3788
956cc47c
SN
37892018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
3790
3791 PR gdb/23985
3792 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
3793 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
3794
a0707f3c
TT
37952019-01-25 Tom Tromey <tom@tromey.com>
3796
3797 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
3798
0747795c
TT
37992019-01-25 Tom Tromey <tom@tromey.com>
3800
3801 * win32-low.c: Fix common/ includes.
3802 * win32-i386-low.c: Fix common/ includes.
3803 * tracepoint.c: Fix common/ includes.
3804 * thread-db.c: Fix common/ includes.
3805 * target.h: Fix common/ includes.
3806 * symbol.c: Fix common/ includes.
3807 * spu-low.c: Fix common/ includes.
3808 * server.h: Fix common/ includes.
3809 * server.c: Fix common/ includes.
3810 * remote-utils.c: Fix common/ includes.
3811 * regcache.h: Fix common/ includes.
3812 * regcache.c: Fix common/ includes.
3813 * nto-x86-low.c: Fix common/ includes.
3814 * notif.h: Fix common/ includes.
3815 * mem-break.h: Fix common/ includes.
3816 * lynx-low.c: Fix common/ includes.
3817 * lynx-i386-low.c: Fix common/ includes.
3818 * linux-x86-tdesc-selftest.c: Fix common/ includes.
3819 * linux-x86-low.c: Fix common/ includes.
3820 * linux-low.c: Fix common/ includes.
3821 * inferiors.h: Fix common/ includes.
3822 * i387-fp.c: Fix common/ includes.
3823 * hostio.c: Fix common/ includes.
3824 * hostio-errno.c: Fix common/ includes.
3825 * gdbthread.h: Fix common/ includes.
3826 * gdbreplay.c: Fix common/ includes.
3827 * fork-child.c: Fix common/ includes.
3828 * event-loop.c: Fix common/ includes.
3829 * ax.c:
3830 (enum gdb_agent_op): Fix common/ includes.
3831
be6d4f74
TT
38322019-01-21 Tom Tromey <tom@tromey.com>
3833
3834 * tracepoint.c: Fix includes.
3835 * remote-utils.c: Fix includes.
3836 * linux-x86-low.c: Fix includes.
3837
66d91b39
JB
38382019-01-01 Joel Brobecker <brobecker@adacore.com>
3839
3840 * gdbreplay.c (gdbreplay_version): Update copyright year in
3841 version message.
3842 * server.c (gdbserver_version): Likewise.
3843
754e3168
AH
38442018-12-05 Alan Hayward <alan.hayward@arm.com>
3845
3846 * linux-low.c (add_lwp): Switch ordering.
3847
d105de22
TT
38482018-11-29 Tom Tromey <tom@tromey.com>
3849
3850 * win32-low.c (win32_join): Take pid, not process.
3851 * target.h (struct target_ops) <join>: Change argument type.
3852 (join_inferior): Change argument name.
3853 * spu-low.c (spu_join): Take pid, not process.
3854 * server.c (handle_detach): Preserve pid before destroying
3855 process.
3856 * lynx-low.c (lynx_join): Take pid, not process.
3857 * linux-low.c (linux_join): Take pid, not process.
3858
50138245
AH
38592018-11-23 Alan Hayward <alan.hayward@arm.com>
3860
3861 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
3862 (aarch64_cannot_fetch_register): Likewise.
3863 (struct linux_target_ops): Update references.
3864
64f57f3d
PFC
38652018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3866
3867 * linux-ppc-low.c: Include nat/linux-ptrace.h.
3868
8d619c01
EBM
38692018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3870
3871 * configure.srv (ipa_ppc_linux_regobj): Add
3872 powerpc-isa207-htm-vsx32l-ipa.o and
3873 powerpc-isa207-htm-vsx64l-ipa.o.
3874 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
3875 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
3876 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
3877 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
3878 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
3879 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
3880 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
3881 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
3882 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3883 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
3884 (init_registers_powerpc_isa207_htm_vsx32l)
3885 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
3886 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
3887 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
3888 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
3889 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
3890 (ppc_store_tm_ctarregset): New functions.
3891 (ppc_regsets): Add entries for HTM regsets.
3892 (ppc_arch_setup): Set htm in features struct when needed. Set
3893 sizes for the HTM regsets.
3894 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
3895 (initialize_low_arch): Call
3896 init_registers_powerpc_isa207_htm_vsx32l and
3897 init_registers_powerpc_isa207_htm_vsx64l.
3898 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3899 PPC_TDESC_ISA207_HTM_VSX.
3900 (initialize_low_tracepoint): Call
3901 init_registers_powerpc_isa207_htm_vsx32l and
3902 init_registers_powerpc_isa207_htm_vsx64l.
3903
232bfb86
EBM
39042018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3905
3906 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
3907 rs6000/power-linux-pmu.xml to srv_xmlfiles.
3908 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
3909 (ppc_store_pmuregset): New functions.
3910 (ppc_regsets): Add entries for ebb and pmu regsets.
3911 (ppc_arch_setup): Set isa207 in features struct if the ebb and
3912 pmu regsets are available. Set sizes for these regsets.
3913
f2cf6173
EBM
39142018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3915
3916 * configure.srv (ipa_ppc_linux_regobj): Add
3917 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
3918 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
3919 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
3920 rs6000/powerpc-isa207-vsx32l.xml, and
3921 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
3922 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3923 <PPC_TDESC_ISA207_VSX>: New enum value.
3924 (init_registers_powerpc_isa207_vsx32l): Declare.
3925 (init_registers_powerpc_isa207_vsx64l): Declare.
3926 * linux-ppc-low.c (ppc_fill_tarregset): New function.
3927 (ppc_store_tarregset): New function.
3928 (ppc_regsets): Add entry for the TAR regset.
3929 (ppc_arch_setup): Set isa207 in features struct when needed. Set
3930 size for the TAR regsets.
3931 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
3932 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
3933 and init_registers_powerpc_isa207_vsx64l.
3934 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
3935 (initialize_low_tracepoint): Call
3936 init_registers_powerpc_isa207_vsx32l and
3937 init_registers_powerpc_isa207_vsx64l.
3938
7ca18ed6
EBM
39392018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3940 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3941
3942 * configure.srv (ipa_ppc_linux_regobj): Add
3943 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
3944 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
3945 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
3946 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
3947 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
3948 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
3949 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
3950 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3951 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
3952 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
3953 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
3954 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
3955 (ppc_hwcap): Add comment.
3956 (ppc_hwcap2): New global.
3957 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
3958 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
3959 (ppc_regsets): Add entries for the DSCR and PPR regsets.
3960 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
3961 when needed. Set sizes for the the DSCR and PPR regsets.
3962 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
3963 (initialize_low_arch): Call
3964 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3965 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3966 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3967 PPC_TDESC_ISA205_PPR_DSCR_VSX.
3968 (initialize_low_tracepoint): Call
3969 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3970 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3971
5c849b22
PFC
39722018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3973
3974 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
3975
8ecfd7bd
SDJ
39762018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
3977 Simon Marchi <simark@simark.ca>
3978
3979 * acinclude.m4: Include "../selftest.m4".
3980 * configure: Regenerate.
3981 * configure.ac: Use "GDB_AC_SELFTEST".
3982 * configure.srv: Use "$enable_unittests" instead of
3983 "$development" when checking whether unit tests have been
3984 enabled.
3985 * server.c (captured_main): Update message informing that
3986 selftests have been disabled.
3987
96643e35
TT
39882018-10-04 Tom Tromey <tom@tromey.com>
3989
3990 * configure: Rebuild.
3991
da4ae14a
TT
39922018-10-04 Tom Tromey <tom@tromey.com>
3993
3994 * server.c (handle_status): Rename inner "thread".
3995 (process_serial_event): Declare "res" in 'm' case.
3996 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
3997 (iterate_over_lwps): Rename inner "thread".
3998 (linux_qxfer_libraries_svr4): Rename inner "len".
3999 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4000
7c619dbd
GB
40012018-10-01 Gary Benson <gbenson@redhat.com>
4002
4003 * gdb_proc_service.h: Moved common code to
4004 common/gdb_proc_service.h.
4005
3795e814
GB
40062018-10-01 Gary Benson <gbenson@redhat.com>
4007
4008 * gdb_proc_service.h: Synchronize comments and whitespace with
4009 GDB's version of this file.
4010
49b036f1
TT
40112018-09-25 Tom Tromey <tom@tromey.com>
4012
4013 * configure: Rebuild.
4014 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4015
8ff03f0b
SM
40162018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4017
4018 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4019 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4020 ($(IPA_LIB)): Sort IPA_OBJS.
4021
a1cd91dc
SM
40222018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4023
4024 * Makefile.in: Remove references to $(ADD_DEPS).
4025
752312ba
TT
40262018-09-16 Tom Tromey <tom@tromey.com>
4027
4028 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4029 variables.
4030 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4031 variables.
4032
f1628857
TT
40332018-09-05 Tom Tromey <tom@tromey.com>
4034
4035 * configure: Rebuild.
4036
ad202fcc
SM
40372018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4038
4039 PR build/23399
4040 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4041
d3d8724a
TT
40422018-08-27 Tom Tromey <tom@tromey.com>
4043
4044 PR build/23087:
4045 * configure: Rebuild.
4046
b4f183d2
TT
40472018-08-27 Tom Tromey <tom@tromey.com>
4048
4049 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4050 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4051 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4052 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4053 (s390x_emit_stack_adjust): Add casts to unsigned char.
4054
4e2aa472
SM
40552018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 PR gdb/23374
4058 PR gdb/23375
4059 * server.h (struct client_state) <disable_randomization>:
4060 Initialize to 1.
4061
cf4088a9
SM
40622018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4063
4064 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4065 variable.
4066 (mips_supply_ptrace_register): Likewise.
4067
a0de763e
TT
40682018-07-22 Tom Tromey <tom@tromey.com>
4069
4070 * configure: Rebuild.
4071
b0a7723d
TT
40722018-07-22 Tom Tromey <tom@tromey.com>
4073
4074 * win32-low.c (win32_create_inferior): Remove unused variables.
4075 * gdbreplay.c (remote_open): Remove unused variable.
4076 * remote-utils.c (remote_prepare): Remove unused variable.
4077 * x86-tdesc.h (X86_TDESC_H): Define.
4078 (amd64_expedite_regs): Define conditionally.
4079 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4080 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4081 * remote-utils.c (readchar): Remove unused variable.
4082
a780ef4f
PA
40832018-07-13 Pedro Alves <palves@redhat.com>
4084
4085 * linux-low.c (linux_kill): Change parameter to process_info
4086 pointer instead of pid. Adjust.
4087 * lynx-low.c (lynx_kill): Likewise.
4088 * nto-low.c (nto_kill): Likewise.
4089 * spu-low.c (spu_kill): Likewise.
4090 * win32-low.c (win32_kill): Likewise.
4091 * server.c (handle_v_kill, kill_inferior_callback)
4092 (detach_or_kill_for_exit): Adjust.
4093 * target.c (kill_inferior): Change parameter to process_info
4094 pointer instead of pid. Adjust.
4095 * target.h (struct target_ops) <kill>: Change parameter to
4096 process_info pointer instead of pid. Adjust all implementations
4097 and callers.
4098 (kill_inferior): Likewise.
4099
ef2ddb33
PA
41002018-07-13 Pedro Alves <palves@redhat.com>
4101
4102 * linux-low.c (linux_detach, linux_join): Change parameter to
4103 process_info pointer instead of pid. Adjust.
4104 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4105 * nto-low.c (nto_detach): Likewise.
4106 * spu-low.c (spu_detach, spu_join): Likewise.
4107 * win32-low.c (win32_detach, win32_join): Likewise.
4108 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4109 * target.h (struct target_ops) <detach, join>: Change parameter to
4110 process_info pointer instead of pid. Adjust all implementations
4111 and callers.
4112 (detach_inferior, join_inferior): Rename 'pid' parameter to
4113 'proc'.
4114
c7ab0aef
SDJ
41152018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4116 Jan Kratochvil <jan.kratochvil@redhat.com>
4117 Paul Fertser <fercerpav@gmail.com>
4118 Tsutomu Seki <sekiriki@gmail.com>
4119
4120 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4121 (OBS): Add 'common/netstuff.o'.
4122 (GDBREPLAY_OBS): Likewise.
4123 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4124 (remote_open): Implement support for IPv6
4125 connections.
4126 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4127 and 'wspiapi.h'.
4128 (handle_accept_event): Accept connections from IPv6 sources.
4129 (remote_prepare): Handle IPv6-style hostnames; implement
4130 support for IPv6 connections.
4131 (remote_open): Implement support for printing connections from
4132 IPv6 sources.
4133
31445d10
PA
41342018-07-11 Pedro Alves <palves@redhat.com>
4135
4136 PR gdb/23377
4137 * mem-break.c (any_persistent_commands): Add process_info
4138 parameter and use it instead of relying on the current process.
4139 Change return type to bool.
4140 * mem-break.h (any_persistent_commands): Add process_info
4141 parameter and change return type to bool.
4142 * server.c (handle_detach): Remove require_running_or_return call.
4143 Look up the process_info for the process we're about to detach.
4144 If not found, return back error to GDB. Adjust
4145 any_persistent_commands call to pass down a process pointer.
4146
cb197132
PA
41472018-07-11 Pedro Alves <palves@redhat.com>
4148
4149 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4150 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4151 instead of collect_register_by_name.
4152 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4153 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4154
1b919490
VB
41552018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4156 Pedro Alves <palves@redhat.com>
4157
4158 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4159
d7e15655
TT
41602018-07-03 Tom Tromey <tom@tromey.com>
4161
4162 * linux-low.c: Update.
4163 * lynx-low.c: Update.
4164 * mem-break.c: Update.
4165 * nto-low.c: Update.
4166 * remote-utils.c: Update.
4167 * server.c: Update.
4168 * spu-low.c: Update.
4169 * target.c: Update.
4170 * win32-low.c: Update.
4171
26a57c92
TT
41722018-07-03 Tom Tromey <tom@tromey.com>
4173
4174 * server.c: Update.
4175
0e998d96
TT
41762018-07-03 Tom Tromey <tom@tromey.com>
4177
4178 * linux-low.c: Update.
4179
cc6bcb54
TT
41802018-07-03 Tom Tromey <tom@tromey.com>
4181
4182 * target.c: Update.
4183
e38504b3
TT
41842018-07-03 Tom Tromey <tom@tromey.com>
4185
4186 * linux-low.c: Update.
4187 * linux-mips-low.c: Update.
4188 * lynx-low.c: Update.
4189 * nto-low.c: Update.
4190 * remote-utils.c: Update.
4191 * server.c: Update.
4192 * spu-low.c: Update.
4193 * target.c: Update.
4194 * thread-db.c: Update.
4195
e99b03dc
TT
41962018-07-03 Tom Tromey <tom@tromey.com>
4197
4198 * linux-low.c: Update.
4199 * linux-mips-low.c: Update.
4200 * lynx-low.c: Update.
4201 * mem-break.c: Update.
4202 * nto-low.c: Update.
4203 * remote-utils.c: Update.
4204 * server.c: Update.
4205 * spu-low.c: Update.
4206 * target.c: Update.
4207 * tracepoint.c: Update.
4208
f2907e49
TT
42092018-07-03 Tom Tromey <tom@tromey.com>
4210
4211 * linux-low.c: Update.
4212 * linux-ppc-low.c: Update.
4213 * linux-x86-low.c: Update.
4214 * proc-service.c: Update.
4215 * server.c: Update.
4216 * spu-low.c: Update.
4217 * thread-db.c: Update.
4218 * win32-low.c: Update.
4219
fd79271b
TT
42202018-07-03 Tom Tromey <tom@tromey.com>
4221
4222 * linux-low.c: Update.
4223 * lynx-low.c: Update.
4224 * nto-low.c: Update.
4225 * remote-utils.c: Update.
4226 * spu-low.c: Update.
4227 * thread-db.c: Update.
4228 * win32-low.c: Update.
4229
c0867626
SDJ
42302018-06-29 Joel Brobecker <brobecker@adacore.com>
4231
4232 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4233 parameter in call to 'amd64_create_target_description'.
4234
2512d7ef
JK
42352018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4236
4237 * x86-tdesc.h: Remove executable permission flag.
4238
d0ac1c44
SM
42392018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4240
4241 * configure.ac: Remove AC_PREREQ, add missing quoting.
4242 * configure: Re-generate.
4243 * config.in: Re-generate.
4244 * aclocal.m4: Re-generate.
4245
c4eb05ff
SM
42462018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4247
4248 * tracepoint.h (current_traceframe): Remove declaration.
4249
02895270
AH
42502018-06-18 Alan Hayward <alan.hayward@arm.com>
4251
4252 * linux-aarch64-low.c (is_sve_tdesc): New function.
4253 (aarch64_sve_regs_copy_to_regcache): Likewise.
4254 (aarch64_sve_regs_copy_from_regcache): Likewise.
4255 (aarch64_regs_info): Add SVE checks.
4256 (initialize_low_arch): Initialize SVE.
4257
e9902bfc
AH
42582018-06-18 Alan Hayward <alan.hayward@arm.com>
4259
4260 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4261
fefa175e
AH
42622018-06-11 Alan Hayward <alan.hayward@arm.com>
4263
4264 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4265 (initialize_low_tracepoint): Likewise
4266 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4267 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4268 param.
4269 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4270 checks.
4271 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4272
b91ad3ff
AH
42732018-06-11 Alan Hayward <alan.hayward@arm.com>
4274
4275 * server.h (PBUFSIZ): Increase size
4276
f868386e
AH
42772018-06-11 Alan Hayward <alan.hayward@arm.com>
4278
4279 * regcache.c (regcache::raw_compare): New function.
4280 * regcache.h (regcache::raw_compare): New declaration.
4281
9c861883
AH
42822018-06-11 Alan Hayward <alan.hayward@arm.com>
4283
4284 * regcache.c (new_register_cache): Use new.
4285 (free_register_cache): Use delete.
4286 (register_data): Use const.
4287 (supply_register): Move body inside regcache.
4288 (regcache::raw_supply): New override function.
4289 (collect_register): Move body inside regcache.
4290 (regcache::raw_collect): New override function.
4291 (regcache::get_register_status): New override function.
4292 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4293
40591844
TT
42942018-06-09 Tom Tromey <tom@tromey.com>
4295
4296 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4297 declare queue.
4298 (event_queue): Use std::queue.
4299 (gdb_event_xfree): Remove.
4300 (initialize_event_loop, process_event, wait_for_event): Update.
4301
6341380d
SC
43022018-06-08 Stan Cox <scox@redhat.com>
4303
4304 * win32-low.c (win32_create_inferior): last_ptid and last_status
4305 moved to client_state.
4306
03349c93
PA
43072018-06-08 Pedro Alves <palves@redhat.com>
4308
4309 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4310 common/common-exceptions.o, common/common-utils.o,
4311 common/errors.o, common/print-utils.o and utils.o.
4312 * gdbreplay.c: Include "common-defs.h" instead of the two
4313 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4314 string.h or alloca.h.
4315 (perror_with_name): Delete.
4316 (remote_open): Use xstrdup instead of strdup.
4317 (main): Rename to ...
4318 (captured_main): ... this.
4319 (main): New.
4320
8dcc53b3
TT
43212018-06-08 Tom Tromey <tom@tromey.com>
4322
4323 * linux-low.c (linux_low_read_btrace): Update.
4324
c12a5089
SC
43252018-06-04 Stan Cox <scox@redhat.com>
4326
4327 * server.h (struct client_state): New.
4328 * server.c (cont_thread, general_thread, multi_process)
4329 (report_fork_events, report_vfork_events, report_exec_events)
4330 (report_thread_events, swbreak_feature, hwbreak_feature)
4331 (vCont_supported, disable_randomization, pass_signals)
4332 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4333 Moved to client_state.
4334 * remote-utils.c (remote_debug, noack_mode)
4335 (transport_is_reliable): Moved to client_state.
4336 * tracepoint.c (current_traceframe): Moved to client_state.
4337
4338 Update all callers.
4339 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4340 linux-low.c, remote-utils.h, target.c: Use client_state.
4341
122394f1
AH
43422018-05-31 Alan Hayward <alan.hayward@arm.com>
4343
4344 * configure.srv: Add new c/h file.
4345
95228a0d
AH
43462018-05-31 Alan Hayward <alan.hayward@arm.com>
4347
4348 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4349 null VQ.
4350
d8dab6c3
MR
43512018-05-25 Maciej W. Rozycki <macro@mips.com>
4352
4353 * gdb.arch/mips-fpregset-core.exp: New test.
4354 * gdb.arch/mips-fpregset-core.c: New test source.
4355
81e25b7c
EK
43562018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4357
4358 PR server/23198
4359 * hostio.c (require_int): Do not report overflow for integers
4360 between 0xfffffff and 0x7fffffff.
4361
7e947ad3
MR
43622018-05-22 Maciej W. Rozycki <macro@mips.com>
4363
4364 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4365 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4366 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4367 functions.
4368 (the_low_target): Wire them.
4369
1d75a658
PFC
43702018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4371
4372 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4373 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4374 mode. Call collect_register_by_name with vscr using
4375 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4376 (ppc_store_vrregset): Add and set vscr_offset variable as in
4377 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4378 vscr_offset.
4379
d078308a
PFC
43802018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4381
4382 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4383 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4384 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4385
7273b5fc
PFC
43862018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4387
4388 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4389 (ppc_store_vsxregset): Likewise.
4390 (ppc_fill_vrregset): Likewise.
4391 (ppc_store_vrregset): Likewise.
4392 (ppc_fill_evrregset): Likewise.
4393 (ppc_store_evrregset): Likewise.
4394 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4395 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4396 needed.
4397
2e077f5e
PFC
43982018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4399
4400 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4401 wordsize of the inferior. Call ppc_linux_target_wordsize.
4402
bd64614e
PFC
44032018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4404
4405 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4406 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4407 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4408 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4409 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4410 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4411 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4412 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4413 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4414 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4415 (tdesc_powerpc_e500l): Remove.
4416 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4417 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4418 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4419 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4420 linux-ppc-tdesc.h.
4421 (ppc_arch_setup): Remove target description matching code. Fill a
4422 ppc_linux_features struct and call ppc_linux_match_description
4423 with it.
4424
75d74cca
MR
44252018-05-22 Maciej W. Rozycki <macro@mips.com>
4426
4427 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4428 width of the requested register exceeds the width of the
4429 `ptrace' data type.
4430 (mips_cannot_store_register): Likewise.
4431
e4439e43
MR
44322018-05-21 Maciej W. Rozycki <macro@mips.com>
4433
4434 * linux-mips-low.c (mips_fetch_register): New function. Update
4435 preceding comment.
4436 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4437 (the_low_target): Wire `mips_fetch_register'.
4438
55271bf9
JB
44392018-05-10 Joel Brobecker <brobecker@adacore.com>
4440
4441 * lynx-i386-low.c (LYNXOS_178): New macro.
4442 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4443 the layout on LynxOS-178.
4444 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4445 handle floating point registers that are not supported by
4446 LynxOS-178.
4447
1a34f210
TT
44482018-05-10 Tom Tromey <tom@tromey.com>
4449
4450 * configure: Rebuild.
4451
190852c8
JB
44522018-05-10 Joel Brobecker <brobecker@adacore.com>
4453
4454 PR server/23158:
4455 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4456 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4457 Use it to set the expedite_regs field in the given tdesc.
4458 * x86-tdesc.h: New file.
4459 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4460 Adjust following the addition of the new expedite_regs parameter
4461 to init_target_desc.
4462 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4463 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4464 (i386_linux_read_description, amd64_linux_read_description):
4465 Adjust following the addition of the new expedite_regs parameter
4466 to init_target_desc.
4467 * lynx-i386-low.c: #include "x86-tdesc.h".
4468 (lynx_i386_arch_setup): Adjust following the addition of the new
4469 expedite_regs parameter to init_target_desc.
4470 * nto-x86-low.c: #include "x86-tdesc.h".
4471 (nto_x86_arch_setup): Adjust following the addition of the new
4472 expedite_regs parameter to init_target_desc.
4473 * win32-i386-low.c: #include "x86-tdesc.h".
4474 (i386_arch_setup): Adjust following the addition of the new
4475 expedite_regs parameter to init_target_desc.
4476
7dbac825
JB
44772018-05-10 Joel Brobecker <brobecker@adacore.com>
4478
4479 PR server/23158:
4480 * win32-low.c (win32_create_inferior): Add call to my_wait
4481 setting last_status global.
4482
906994d9
JB
44832018-05-10 Joel Brobecker <brobecker@adacore.com>
4484
4485 PR server/23158:
4486 * win32-low.c (create_process): Only call gdb_tilde_expand if
4487 inferior_cwd is not NULL.
4488
8ee22052
AB
44892018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4490
4491 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4492 registers to the cache if their values have changed.
4493 (i387_xsave_to_cache): Provide default values for x87 control
4494 registers when these features are available, but disabled.
4495 * regcache.c (supply_register_by_name_zeroed): New function.
4496 * regcache.h (supply_register_by_name_zeroed): Declare new
4497 function.
4498
aff689d3
TT
44992018-05-07 Tom Tromey <tom@tromey.com>
4500
4501 * configure: Rebuild.
4502
85e26832
TT
45032018-05-04 Tom Tromey <tom@tromey.com>
4504
4505 * configure: Rebuild.
4506
a3b60e45
JK
45072018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4508 Pedro Alves <palves@redhat.com>
4509
4510 * linux-aarch64-low.c (aarch64_stopped_data_address):
4511 Likewise.
4512
632e107b
TT
45132018-04-27 Tom Tromey <tom@tromey.com>
4514
4515 * configure: Rebuild.
4516
458412c3
TT
45172018-04-23 Tom Tromey <tom@tromey.com>
4518
4519 * configure: Rebuild.
4520
f31c089e
SM
45212018-04-19 Simon Marchi <simon.marchi@ericsson.com>
4522
4523 * Makefile.in (depcomp): Add "..".
4524 (all_deps_files): New and use it.
4525
b319b098
AH
45262018-04-18 Alan Hayward <alan.hayward@arm.com>
4527
4528 * configure.srv (aarch64*-*-linux*): Don't include xml.
4529 (i[34567]86-*-cygwin*): Likewise.
4530 (i[34567]86-*-linux*): Likewise.
4531 (i[34567]86-*-lynxos*): Likewise.
4532 (i[34567]86-*-mingw32ce*): Likewise.
4533 (i[34567]86-*-mingw*): Likewise.
4534 (i[34567]86-*-nto*): Likewise.
4535 (tic6x-*-uclinux): Likewise.
4536 (x86_64-*-linux*): Likewise.
4537 (x86_64-*-mingw*): Likewise.
4538 (x86_64-*-cygwin*): Likewise.
4539
3b74854b
AH
45402018-04-18 Alan Hayward <alan.hayward@arm.com>
4541
4542 * tdesc.c: Remove xml parameter.
4543
e98577a9
AH
45442018-04-18 Alan Hayward <alan.hayward@arm.com>
4545
4546 * server.c (get_features_xml): Remove cast.
4547 * tdesc.c (void target_desc::accept): Fill in function.
4548 (tdesc_get_features_xml): Remove old xml creation.
4549 (print_xml_feature::visit_pre): Add xml vistor.
4550 * tdesc.h (struct target_desc): Make xmltarget mutable.
4551 (tdesc_get_features_xml): Remove declaration.
4552
d278f585
AH
45532018-04-18 Alan Hayward <alan.hayward@arm.com>
4554
4555 * tdesc.c (tdesc_architecture_name): Add new function.
4556 (tdesc_osabi_name): Likewise.
4557 (tdesc_get_features_xml): Use new functions.
4558
eee8a18d
AH
45592018-04-18 Alan Hayward <alan.hayward@arm.com>
4560
4561 * tdesc.c (tdesc_create_flags): Remove.
4562 (tdesc_add_flag): Likewise.
4563 (tdesc_named_type): Likewise.
4564 (tdesc_create_union): Likewise.
4565 (tdesc_create_struct): Likewise.
4566 (tdesc_create_vector): Likewise.
4567 (tdesc_add_bitfield): Likewise.
4568 (tdesc_add_field): Likewise.
4569 (tdesc_set_struct_size): Likewise.
4570
82ec9bc7
AH
45712018-04-18 Alan Hayward <alan.hayward@arm.com>
4572
4573 * tdesc.c (~target_desc): Remove implictly deleted items.
4574 (init_target_desc): Iterate all features.
4575 (tdesc_get_features_xml): Use vector.
4576 (tdesc_create_feature): Create feature.
4577 * tdesc.h (tdesc_feature) Remove
4578 (target_desc): Add features.
4579
ea3e7d71
AH
45802018-04-18 Alan Hayward <alan.hayward@arm.com>
4581
4582 * Makefile.in: Add common/tdesc.c
4583 * tdesc.c (init_target_desc): init all reg_defs from register
4584 vector.
4585 (tdesc_create_reg): Create tdesc_reg.
4586 * tdesc.h (tdesc_feature): Add register vector.
4587
17d08cd4
SM
45882018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4589
4590 * tdesc.h (struct target_desc) <features>: Change type to
4591 std::vector<std::string>.
4592 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
4593 changes.
4594 (tdesc_get_features_xml): Likewise.
4595 (tdesc_create_feature): Likewise.
4596
5cd3e386
AH
45972018-03-26 Alan Hayward <alan.hayward@arm.com>
4598
4599 * regcache.c (find_register_by_number): Return a ref.
4600 (find_regno): Use references.
4601 (register_size): Likewise.
4602 (register_data): Likewise.
4603 * tdesc.c (target_desc::~target_desc): Remove free calls.
4604 (target_desc::operator==): Use std::vector compare.
4605 (init_target_desc): Use reference.
4606 (tdesc_create_reg): Use reg constructors.
4607 * tdesc.h (struct target_desc): Replace pointer with object.
4608
dff7492c
AH
46092018-03-23 Alan Hayward <alan.hayward@arm.com>
4610
4611 * regcache.c (find_register_by_number): Make static.
4612 (find_regno): Use find_register_by_number
4613 * regcache.h (struct reg): Remove declaration.
4614
d80e5242
AH
46152018-03-23 Alan Hayward <alan.hayward@arm.com>
4616
4617 * tdesc.c (target_desc::~target_desc): Move to here.
4618 (target_desc::operator==): Likewise.
4619 * tdesc.h (target_desc::~target_desc): Move from here.
4620 (target_desc::operator==): Likewise.
4621
f69c5afb
AA
46222018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4623
4624 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4625
ce29f843
AA
46262018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4627
4628 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4629 S390_TDESC_GS.
4630 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
4631 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
4632 and init_registers_s390_gs_linux64.
4633
c49bd90b
AA
46342018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4635
4636 * linux-s390-low.c (s390_fill_gs): Remove function.
4637 (s390_fill_gsbc): Remove function.
4638 (s390_regsets): Set fill functions for the guarded storage regsets
4639 to NULL.
4640
7edb9bd3
AA
46412018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4642
4643 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4644 the word size. Add comment.
4645 (s390_get_wordsize): New function.
4646 (s390_arch_setup): No longer select a temporary tdesc to fetch the
4647 pswm with it. Instead, use s390_get_wordsize to determine the
4648 word size first and derive the correct tdesc from that directly.
4649
39be3c7e
SM
46502018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4651
4652 * Makefile.in: Include silent-rules.mk.
4653 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
4654 (COMPILE): Add ECHO_CXX.
4655 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4656 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4657 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
4658 (version-generated.c): Add ECHO_GEN.
4659 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
4660 (IPAGENT_COMPILE): Add ECHO_CXX.
4661 (%-generated.c): Add ECHO_REGDAT.
4662
3ae9ce5d
TT
46632018-03-14 Tom Tromey <tom@tromey.com>
4664
4665 PR cli/14977:
4666 * ax.c (ax_printf): Special case for NULL.
4667
e6a58aa8
SM
46682018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4669
4670 * linux-low.c (linux_qxfer_libraries_svr4): Use
4671 xml_escape_text_append.
4672
f6e8a41e
SM
46732018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4674
4675 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
4676
b9671caf
SM
46772018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4678
4679 * server.c (handle_general_set): Remove unnecessary xstrdup.
4680
e80aaf61
SM
46812018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4682
4683 * server.c (parse_debug_format_options): Adjust to
4684 delim_string_to_char_ptr_vec changes.
4685 * thread-db.c (thread_db_load_search): Adjust to
4686 dirnames_to_char_ptr_vec changes.
4687
b1223e78
MM
46882018-03-01 Markus Metzger <markus.t.metzger@intel.com>
4689
4690 * target.h (target_enable_btrace, target_disable_btrace)
4691 (target_read_btrace, target_read_btrace_conf): Turn macro into
4692 inline function. Throw error if target method is not defined.
4693 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
4694 check for btrace target method. Be prepared to handle exceptions
4695 from btrace target methods.
4696
81561546
SDJ
46972018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4698
4699 * server.c (captured_main): Change order of error message printed
4700 when the current working directory cannot be found.
4701
25e3c82c
SDJ
47022018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4703
4704 * server.c: Include "filenames.h" and "pathstuff.h".
4705 (program_name): Delete variable.
4706 (program_path): New anonymous class.
4707 (get_exec_wrapper): Use "program_path" instead of
4708 "program_name".
4709 (handle_v_run): Likewise.
4710 (captured_main): Likewise.
4711 (process_serial_event): Likewise.
4712
b4987c95
SDJ
47132018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4714
4715 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
4716 (OBJS): Add "pathstuff.o".
4717 * server.c (current_directory): New global variable.
4718 (captured_main): Initialize "current_directory".
4719
f46cd62a
AH
47202018-02-26 Alan Hayward <alan.hayward@arm.com>
4721
4722 * tdesc.c: Use common/tdesc.h.
4723 * tdesc.h: Likewise.
4724
a543c5ca
AH
47252018-02-20 Alan Hayward <alan.hayward@arm.com>
4726 Simon Marchi <simon.marchi@ericsson.com>
4727
4728 * Makefile.in: Switch order of make rules.
4729
b5884fa7
AH
47302018-02-19 Alan Hayward <alan.hayward@arm.com>
4731
4732 * Makefile.in: Add common directory in build.
4733 * configure.ac: Add common reference.
4734 * configure: Regenerate.
4735
de6242d3
MM
47362018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4737
4738 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
4739 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
4740 * spu-low.c (spu_target_ops): Likewise.
4741 * win32-low.c (win32_target_ops): Likewise.
4742 * server.c (supported_btrace_packets): Report packets unconditionally.
4743 * target.h (target_ops) <supports_btrace>: Remove.
4744 (target_supports_btrace): Remove.
4745
9ee23a85
MM
47462018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4747
4748 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
4749 (handle_btrace_disable): Change return type to void. Use exceptions
4750 to report errors.
4751 (handle_btrace_general_set): Catch exception and copy message to
4752 return message.
4753
8ce47547
TT
47542018-02-08 Tom Tromey <tom@tromey.com>
4755
4756 * linux-low.c (install_software_single_step_breakpoints): Use
4757 make_scoped_restore.
4758 * inferiors.c (make_cleanup_restore_current_thread): Remove.
4759 (do_restore_current_thread_cleanup): Remove.
4760 * gdbthread.h (make_cleanup_restore_current_thread): Don't
4761 declare.
4762
45dd3607
TT
47632018-02-08 Tom Tromey <tom@tromey.com>
4764
4765 * mem-break.c (set_raw_breakpoint_at): Use
4766 gdb::unique_xmalloc_ptr.
4767
e671cd59
PA
47682018-01-30 Pedro Alves <palves@redhat.com>
4769
4770 PR gdb/13211
4771 * target.c (target_terminal::terminal_state): Rename to ...
4772 (target_terminal::m_terminal_state): ... this.
4773
a0aad537
JC
47742018-01-19 James Clarke <jrtc27@jrtc27.com>
4775
4776 * linux-low.c (handle_extended_wait): Surround call to
4777 thread_db_notice_clone with #ifdef USE_THREAD_DB.
4778
4d9b86e1
SM
47792018-01-17 Simon Marchi <simon.marchi@ericsson.com>
4780
4781 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
4782 linux_ptrace_attach_fail_reason_string now returning an
4783 std::string.
4784 (linux_attach): Likewise.
4785 * thread-db.c (attach_thread): Likewise.
4786
f517c180
EA
47872018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
4788
4789 PR gdb/21559
4790 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
4791 checking for fs_base/gs_base fields in struct user_regs_struct.
4792 * configure: Regenerate.
4793
9a70f35c
YQ
47942018-01-16 Yao Qi <yao.qi@linaro.org>
4795
4796 PR gdb/18749
4797 * linux-low.c (fetch_register): Call supply_register instead of
4798 error.
4799
605fd3c6
YQ
48002018-01-08 Yao Qi <yao.qi@linaro.org>
4801 Simon Marchi <simon.marchi@ericsson.com>
4802
4803 * Makefile.in (OBS): Remove selftest.o.
4804 * configure.ac: Set srv_selftest_objs if $development is true.
4805 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
4806 * configure: Re-generated.
4807 * server.c (captured_main): Wrap variable selftest_filter with
4808 GDB_SELF_TEST.
4809
2cc05030
SM
48102018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4811
4812 * server.c (parse_debug_format_options): Return std::string.
4813 (handle_monitor_command, captured_main): Adjust.
4814
e379cee6
PA
48152018-01-05 Pedro Alves <palves@redhat.com>
4816
4817 PR gdb/18653
4818 * server.c (captured_main): Pass quiet=false to
4819 save_original_signals_state.
4820
82e1e79a
JB
48212018-01-01 Joel Brobecker <brobecker@adacore.com>
4822
4823 * gdbreplay.c (gdbreplay_version): Update copyright year in
4824 version message.
4825 * server.c (gdbserver_version): Likewise.
4826
8e481c3b
TT
48272017-12-08 Tom Tromey <tom@tromey.com>
4828
4829 * ax.c (ax_printf): Update.
4830
a8806230
YQ
48312017-12-07 Yao Qi <yao.qi@linaro.org>
4832
4833 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
4834 aarch64_linux_read_description.
4835 * linux-amd64-ipa.c (idx2mask): New array.
4836 (get_ipa_tdesc): Move idx2mask out.
4837 (initialize_low_tracepoint): Initialize target descriptions.
4838 * linux-i386-ipa.c (idx2mask): New array.
4839 (get_ipa_tdesc): Move idx2mask out.
4840 (initialize_low_tracepoint): Initialize target descriptions.
4841
d4a0e8b5
SM
48422017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
4843
4844 * tdesc.c (struct tdesc_type): Change return type.
4845 (tdesc_add_flag): Change parameter type.
4846 (tdesc_add_bitfield): Likewise.
4847 (tdesc_add_field): Likewise.
4848 (tdesc_set_struct_size): Likewise.
4849
798a7429
SM
48502017-12-05 Simon Marchi <simon.marchi@ericsson.com>
4851
4852 * regcache.c (registers_to_string): Remove unused variable.
4853
c0e15c9b
SM
48542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4855
4856 * inferiors.c (for_each_inferior_with_data): Remove.
4857 * inferiors.h (for_each_inferior_with_data): Remove.
4858 * server.c (handle_qxfer_threads_worker): Change parameter type.
4859 (handle_qxfer_threads_proper): Use for_each_thread.
4860
f0045347
SM
48612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4862
4863 * inferiors.c (for_each_inferior): Remove.
4864 (clear_inferiors): Use for_each_thread.
4865 * inferiors.h (for_each_inferior): Remove.
4866 * linux-low.c (linux_wait_for_event_filtered): Use
4867 for_each_thread.
4868 (linux_stabilize_threads): Likewise.
4869 * regcache.c (regcache_release): Likewise.
4870 * server.c (gdb_wants_all_threads_stopped): Likewise.
4871 (clear_pending_status_callback): Remove.
4872 (handle_status): Use for_each_thread.
4873 (captured_main): Likewise.
4874 * win32-low.c (child_init_thread_list): Likewise.
4875 (win32_clear_inferiors): Likewise.
4876 (fake_breakpoint_event): Likewise.
4877
9521758b
SM
48782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4879
4880 * inferiors.h (find_inferior): Remove.
4881 * inferiors.c (find_inferior): Remove.
4882
8f86d7aa
SM
48832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4884
4885 * linux-low.c (resume_status_pending_p): Update comment.
4886 (need_step_over_p): Update comment.
4887
e2b44075
SM
48882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4889
4890 * linux-low.c (proceed_one_lwp): Return void, change parameter
4891 type.
4892 (unsuspend_and_proceed_one_lwp): Likewise.
4893 (proceed_all_lwps): Use for_each_thread.
4894 (unstop_all_lwps): Likewise.
4895
c80825ff
SM
48962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4897
4898 * linux-low.c (linux_resume_one_thread): Return void, take
4899 parameter directly.
4900 (linux_resume): Use for_each_thread.
4901
df3e4dbe
SM
49022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4903
4904 * linux-low.c (send_sigstop_callback): Return void, change
4905 parameter type. Rename to...
4906 (send_sigstop): ... this.
4907 (suspend_and_send_sigstop_callback): Return void, change parameter
4908 type. Rename to...
4909 (suspend_and_send_sigstop): ... this.
4910 (stop_all_lwps): Use for_each_thread.
4911
5a6b0a41
SM
49122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4913
4914 * linux-low.c (lwp_running): Return bool, remove unused
4915 argument.
4916 (linux_stabilize_threads): Use find_thread.
4917
39a64da5
SM
49182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4919
4920 * linux-low.c (select_singlestep_lwp_callback): Remove.
4921 (count_events_callback): Remove.
4922 (select_event_lwp_callback): Remove.
4923 (select_event_lwp): Use find_thread/for_each_thread.
4924
a1385b7b
SM
49252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4926
4927 * linux-low.c (not_stopped_callback): Return bool, take filter
4928 argument directly.
4929 (linux_wait_for_event_filtered): Use find_thread.
4930 (linux_wait_1): Likewise.
4931
454296a2
SM
49322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4933
4934 * linux-low.c (same_lwp): Remove.
4935 (find_lwp_pid): Use find_thread.
4936
6b2a85da
SM
49372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4938
4939 * linux-low.c (delete_lwp_callback): Remove.
4940 (linux_mourn): Use for_each_thread.
4941
798a38e8
SM
49422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4943
4944 * linux-low.c (linux_detach_lwp_callback): Return void, remove
4945 args parameter, don't check for pid.
4946 (linux_detach): Use for_each_thread.
4947
e4eb0dec
SM
49482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4949
4950 * linux-low.c (struct counter): Remove.
4951 (second_thread_of_pid_p): Remove.
4952 (last_thread_of_process_p): Use find_thread.
4953
83e1b6c1
SM
49542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4955
4956 * inferiors.c (find_inferior_in_random): Remove.
4957 * inferiors.h (find_inferior_in_random): Remove.
4958 * linux-low.c (status_pending_p_callback): Return bool, accept
4959 parameter ptid directly.
4960 (linux_wait_for_event_filtered): Use find_thread_in_random.
4961 (linux_wait_1): Likewise.
4962
8dc7b443
SM
49632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4964
4965 * inferiors.c (find_inferior_id): Remove.
4966 (find_thread_ptid): Move implemention from find_inferior_id to
4967 here.
4968 * inferiors.h (find_inferior_id): Remove.
4969 * server.c (handle_status): Use find_thread_ptid.
4970 (process_serial_event): Likewise.
4971 * thread-db.c (find_one_thread): Likewise.
4972 (thread_db_thread_handle): Likewise.
4973 * win32-low.c (thread_rec): Likewise.
4974 (child_delete_thread): Likewise.
4975 (win32_thread_alive): Likewise.
4976 (get_child_debug_event): Likewise.
4977
da25033c
SM
49782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4979
4980 * linux-mips-low.c (update_watch_registers_callback): Return
4981 void, remove pid_p parameter, don't check for pid.
4982 (mips_insert_point, mips_remove_point): Use for_each_thread.
4983
c91bb56b
SM
49842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4985
4986 * lynx.low (lynx_delete_thread_callback): Remove.
4987 (lynx_mourn): Use for_each_thread.
4988
634a3254
SM
49892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4990
4991 * regcache.c (regcache_invalidate_one): Remove.
4992 (regcache_invalidate_pid): use for_each_thread.
4993
41272101
TT
49942017-11-26 Tom Tromey <tom@tromey.com>
4995
4996 * linux-low.c (linux_create_inferior): Update.
4997
f5291a6f
UW
49982017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
4999
5000 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5001
6654d750
AH
50022017-11-24 Alan Hayward <alan.hayward@arm.com>
5003
5004 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5005 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5006 * linux-aarch64-tdesc-selftest.c: New file.
5007 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5008
50092017-11-24 Alan Hayward <alan.hayward@arm.com>
5010
5011 * configure.srv: Add new file.
5012 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5013 * linux-aarch64-tdesc-selftest.c: New file.
5014 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5015
49bdb7ee
AH
50162017-11-24 Alan Hayward <alan.hayward@arm.com>
5017
5018 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5019 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5020 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5021
d6d7ce56
AH
50222017-11-24 Alan Hayward <alan.hayward@arm.com>
5023
5024 * configure.srv: Add new files.
5025 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5026 aarch64_linux_read_description.
5027 * linux-aarch64-low.c (aarch64_linux_read_description):
5028 Merge with aarch64_arch_setup.
5029 (aarch64_arch_setup): Call aarch64_linux_read_description.
5030 * linux-aarch64-tdesc.c: New file.
5031 * linux-aarch64-tdesc.h: New file.
5032
506fe5f4
YQ
50332017-11-24 Yao Qi <yao.qi@linaro.org>
5034
5035 * configure.srv: Set $srv_regobj for tic6x-linux.
5036 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5037 (tic6x_read_description): Move some code to tic6x_arch_setup.
5038 (tic6x_tdesc_test): New function.
5039 (initialize_low_arch): Call selftests::register_test.
5040
29f9a567
YQ
50412017-11-22 Yao Qi <yao.qi@linaro.org>
5042
5043 * remote-utils.c (prepare_resume_reply): Use memcpy.
5044
578290ec
SM
50452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5046
5047 * linux-low.c (kill_one_lwp_callback): Return void, take
5048 argument directly, don't filter on pid.
5049 (linux_kill): Use for_each_thread.
5050
eca55aec
SM
50512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5052
5053 * linux-low.c (need_step_over_p): Return bool, remove dummy
5054 argument.
5055 (linux_resume, proceed_all_lwps): Use find_thread.
5056
25c28b4d
SM
50572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5058
5059 * linux-low.c (resume_status_pending_p): Return bool, remove
5060 flag_p argument.
5061 (linux_resume): Use find_thread.
5062
5fdda392
SM
50632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5064
5065 * linux-low.c (struct thread_resume_array): Remove.
5066 (linux_set_resume_request): Return void, take arguments
5067 directly.
5068 (linux_resume): Use for_each_thread.
5069
fcb056a5
SM
50702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5071
5072 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5073 return bool, remove data argument.
5074 (linux_stabilize_threads): Use find_thread.
5075
139720c5
SM
50762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5077
5078 * linux-low.c (unsuspend_one_lwp): Remove.
5079 (unsuspend_all_lwps): Use for_each_thread, inline code from
5080 unsuspend_one_lwp.
5081
6d1e5673
SM
50822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5083
5084 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5085 * linux-low.c (struct iterate_over_lwps_args): Remove.
5086 (iterate_over_lwps_filter): Remove.
5087 (iterate_over_lwps): Use find_thread.
5088
bbf550d5
SM
50892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5090
5091 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5092 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5093 code from reset_lwp_ptrace_options_callback.
5094
00192f77
SM
50952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5096
5097 * linux-arm-low.c (struct update_registers_data): Remove.
5098 (update_registers_callback): Return void, take arguments
5099 directly, don't check thread's pid.
5100 (arm_insert_point, arm_remove_point): Use for_each_thread.
5101
2bee2b6c
SM
51022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5103
5104 * win32-low.c (continue_one_thread): Return void, take argument
5105 directly.
5106 (child_continue): Use for_each_thread.
5107
0b360f19
SM
51082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5109
5110 * win32-i386-low.c (update_debug_registers_callback): Rename
5111 to ...
5112 (update_debug_registers): ... this, return void, remove pid_p arg.
5113 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5114
f27866ba
SM
51152017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5116
5117 * inferiors.h (struct process_info): Add constructor, initialize
5118 fields..
5119 <syscalls_to_catch>: Change type to std::vector<int>.
5120 * inferiors.c (add_process): Allocate process_info with new.
5121 (remove_process): Free process_info with delete.
5122 * linux-low.c (handle_extended_wait): Adjust.
5123 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5124 * server.c (handle_general_set): Adjust.
5125
e849ea89
PA
51262017-11-16 Pedro Alves <palves@redhat.com>
5127
5128 * remote-utils.c (remote_close): Block SIGIO signals instead of
5129 uninstalling the SIGIO handler.
5130
1d0aa65c
AH
51312017-11-16 Alan Hayward <alan.hayward@arm.com>
5132
5133 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5134
3491a34c
YQ
51352017-11-16 Yao Qi <yao.qi@linaro.org>
5136
5137 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5138 (tic6x_store_gregset): Likewise.
5139 (tic6x_usrregs_info): Move it up.
5140
a602f924
AH
51412017-11-15 Alan Hayward <alan.hayward@arm.com>
5142
5143 * Makefile.in: Update arch rules.
5144 * configure.srv: Explicitly mark arch/ files.
5145
5616b6c3
AS
51462017-11-13 Andreas Schwab <schwab@suse.de>
5147
5148 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5149 function.
5150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5151
d1928160
PA
51522017-11-06 Pedro Alves <palves@redhat.com>
5153
5154 * config.in, configure: Regenerate.
5155
bac608e7
SM
51562017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5157
5158 * target.c (struct thread_search): Remove.
5159 (thread_search_callback): Remove.
5160 (prepare_to_access_memory): Use for_each_thread instead of
5161 find_inferior. Inline code from thread_search_callback.
5162
eaddb425
SM
51632017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5164
5165 * server.c (struct visit_actioned_threads_data): Remove.
5166 (visit_actioned_threads): Change prototype to take arguments
5167 directly.
5168 (resume): Use find_thread instead of find_inferior.
5169
99078d34
SM
51702017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5171
5172 * server.c (queue_stop_reply_callback): Change prototype, return
5173 void.
5174 (find_status_pending_thread_callback): Remove.
5175 (handle_status): Replace find_inferior with find_thread and
5176 for_each_thread.
5177
cc628f3d
AH
51782017-10-25 Alan Hayward <alan.hayward@arm.com>
5179
5180 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5181 with REGNO.
5182 (aarch64_store_gregset): Likewise.
5183 (aarch64_fill_fpregset): Likewise.
5184 (aarch64_store_fpregset): Likewise.
5185
4d3bb80e
SM
51862017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5187
5188 * gdbthread.h (find_thread, for_each_thread): New functions.
5189 * inferiors.c (thread_of_pid): Remove.
5190 (find_any_thread_of_pid): Use find_thread.
5191 * linux-low.c (num_lwps): Use for_each_thread.
5192
7a7cdfa0
YQ
51932017-10-17 Yao Qi <yao.qi@linaro.org>
5194
5195 * Makefile.in: Remove one rule.
5196 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5197
e675d170
YQ
51982017-10-17 Yao Qi <yao.qi@linaro.org>
5199
5200 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5201 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5202
7eb4e0f9
YQ
52032017-10-17 Yao Qi <yao.qi@linaro.org>
5204
5205 * configure.srv: Rename arm.o with arch/arm.o.
5206
60d6cfc9
YQ
52072017-10-17 Yao Qi <yao.qi@linaro.org>
5208
5209 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5210 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5211 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5212 (arch-i386.o, arch-amd64.o): Remove rules.
5213 (arch/%.o): New rule.
5214 Update POSTCOMPILE and COMPILE.pre.
5215 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5216 * configure: Re-generated.
5217 * configure.srv: Replace arch-i386.o with arch/i386.o.
5218 Replace arch-amd64.o with arch/amd64.o.
5219
5bfda255
YQ
52202017-10-16 Yao Qi <yao.qi@linaro.org>
5221
5222 * configure: Regenerated.
5223
9c80ecd6
SM
52242017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5225
5226 * inferiors.h: (struct inferior_list): Remove.
5227 (struct inferior_list_entry); Remove.
5228 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5229 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5230 get_first_inferior): Remove.
5231 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5232 find_inferior_id, find_inferior_in_random): Change signature.
5233 * inferiors.c (all_threads): Change type to
5234 std::list<thread_info *>.
5235 (get_thread): Remove macro.
5236 (find_inferior, find_inferior_id): Change signature, implement
5237 using find_thread.
5238 (find_inferior_in_random): Change signature, implement using
5239 find_thread_in_random.
5240 (for_each_inferior, for_each_inferior_with_data): Change
5241 signature, implement using for_each_thread.
5242 (add_inferior_to_list, remove_inferior): Remove.
5243 (add_thread, get_first_thread, thread_of_pid,
5244 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5245 (get_first_inferior, one_inferior_p, clear_inferior_list):
5246 Remove.
5247 (clear_inferiors, get_thread_process): Update.
5248 * gdbthread.h: Include <list>.
5249 (struct thread_info) <entry>: Remove field.
5250 <id>: New field.
5251 (all_threads): Change type to std::list<thread_info *>.
5252 (get_first_inferior): Add doc.
5253 (find_thread, for_each_thread, find_thread_in_random): New
5254 functions.
5255 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5256 * linux-arm-low.c (update_registers_callback): Update.
5257 * linux-low.c (second_thread_of_pid_p): Update.
5258 (kill_one_lwp_callback, linux_detach_lwp_callback,
5259 delete_lwp_callback, status_pending_p_callback, same_lwp,
5260 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5261 iterate_over_lwps, not_stopped_callback,
5262 resume_stopped_resumed_lwps, count_events_callback,
5263 select_singlestep_lwp_callback, select_event_lwp_callback,
5264 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5265 suspend_and_send_sigstop_callback, wait_for_sigstop,
5266 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5267 lwp_running, linux_set_resume_request, resume_status_pending_p,
5268 need_step_over_p, start_step_over, linux_resume_one_thread,
5269 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5270 reset_lwp_ptrace_options_callback): Update.
5271 * linux-mips-low.c (update_watch_registers_callback): Update.
5272 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5273 Update.
5274 (free_register_cache_thread_one): Remove.
5275 (regcache_release): Update.
5276 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5277 handle_qxfer_threads_worker): Update.
5278 (handle_query): Update, use list iterator.
5279 (visit_actioned_threads, handle_pending_status,
5280 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5281 clear_pending_status_callback, set_pending_status_callback,
5282 find_status_pending_thread_callback, handle_status,
5283 process_serial_event): Update.
5284 * target.c (thread_search_callback): Update.
5285 * thread-db.c (thread_db_get_tls_address): Update.
5286 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5287 Update.
5288 * win32-i386-low.c (update_debug_registers_callback): Update.
5289 * win32-low.c (delete_thread_info, child_delete_thread,
5290 continue_one_thread, suspend_one_thread,
5291 get_child_debug_event): Adjust.
5292
9179355e
SM
52932017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5294
5295 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5296 * inferiors.h: Include <list>.
5297 (struct process_info) <entry>: Remove field.
5298 <pid>: New field.
5299 (pid_of): Change macro to function.
5300 (ptid_of, lwpid_of): Remove macro.
5301 (all_processes): Change type to std::list<process_info *>.
5302 (ALL_PROCESSES): Remove macro.
5303 (for_each_process, find_process): New function.
5304 * inferiors.c (all_processes): Change type to
5305 std::list<process_info *>.
5306 (find_thread_process): Adjust.
5307 (add_process): Likewise.
5308 (remove_process): Likewise.
5309 (find_process_pid): Likewise.
5310 (get_first_process): Likewise.
5311 (started_inferior_callback): Remove.
5312 (have_started_inferiors_p): Adjust.
5313 (attached_inferior_callback): Remove.
5314 (have_attached_inferiors_p): Adjust.
5315 * linux-low.c (check_zombie_leaders): Likewise.
5316 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5317 (x86_linux_update_xmltarget): Adjust.
5318 * server.c (handle_query): Likewise.
5319 (gdb_reattached_process): Remove.
5320 (handle_status): Adjust.
5321 (kill_inferior_callback): Likewise.
5322 (detach_or_kill_inferior): Remove.
5323 (print_started_pid): Likewise.
5324 (print_attached_pid): Likewise.
5325 (detach_or_kill_for_exit): Update.
5326 (process_serial_event): Likewise.
5327 * linux-arm-low.c (arm_new_fork): Likewise.
5328
c9cb8905
SM
53292017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5330
5331 * dll.h: Include <list>.
5332 (struct dll_info): Add constructor.
5333 <entry>: Remove field.
5334 (all_dlls): Change type to std::list<dll_info>.
5335 * dll.c: Include <algorithm>.
5336 (get_dll): Remove macro.
5337 (all_dlls): Change type to std::list<dll_info *>.
5338 (free_one_dll): Remove.
5339 (match_dll): Likewise.
5340 (loaded_dll): Adjust.
5341 (unloaded_dll): Adjust to all_dlls type change, use
5342 std::find_if. Inline code from match_dll.
5343 (clear_dlls): Adjust to all_dlls type change.
5344 * server.c (emit_dll_description): Remove.
5345 (handle_qxfer_libraries): Adjust to all_dlls type change,
5346 integrate emit_dll_description's functionality.
5347
04ec7890
SM
53482017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5349
5350 * linux-low.h (struct linux_target_ops) <delete_process>: New
5351 field.
5352 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5353 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5354 (struct linux_target_ops): Add delete_process callback.
5355 * linux-arm-low.c (arm_delete_process): New.
5356 (struct linux_target_ops): Add delete_process callback.
5357 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5358 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5359 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5360 * linux-mips-low.c (mips_linux_delete_process): New.
5361 (struct linux_target_ops): Add delete_process callback.
5362 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5363 * linux-s390-low.c (struct linux_target_ops): Likewise.
5364 * linux-sh-low.c (struct linux_target_ops): Likewise.
5365 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5366 * linux-tile-low.c (struct linux_target_ops): Likewise.
5367 * linux-x86-low.c (x86_linux_delete_process): New.
5368 (struct linux_target_ops): Add delete_process callback.
5369 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5370
466eecee
SM
53712017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5372
5373 * linux-aarch64-low.c (the_low_target): Add thread delete
5374 callback.
5375 * linux-arm-low.c (arm_delete_thread): New function.
5376 (the_low_target): Add thread delete callback.
5377 * linux-bfin-low.c (the_low_target): Likewise.
5378 * linux-crisv32-low.c (the_low_target): Likewise.
5379 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5380 set.
5381 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5382 field.
5383 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5384 * linux-mips-low.c (mips_linux_delete_thread): New function.
5385 (the_low_target): Add thread delete callback.
5386 * linux-ppc-low.c (the_low_target): Likewise.
5387 * linux-s390-low.c (the_low_target): Likewise.
5388 * linux-sh-low.c (the_low_target): Likewise.
5389 * linux-tic6x-low.c (the_low_target): Likewise.
5390 * linux-tile-low.c (the_low_target): Likewise.
5391 * linux-x86-low.c (the_low_target): Likewise.
5392 * linux-xtensa-low.c (the_low_target): Likewise.
5393
b79f7801
YZ
53942017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5395
5396 * win32-low.c: Include "common-inferior.h".
5397
bc3b087d
SDJ
53982017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5399
5400 * inferiors.c (set_inferior_cwd): New function.
5401 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5402 (handle_query): Inform that QSetWorkingDir is supported.
5403 * win32-low.c (create_process): Pass the inferior's cwd to
5404 CreateProcess.
5405
d092c5a2
SDJ
54062017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5407
5408 * inferiors.c (current_inferior_cwd): New global variable.
5409 (get_inferior_cwd): New function.
5410 * inferiors.h (struct process_info) <cwd>: New field.
5411
7da0a886
SDJ
54122017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5413
5414 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5415 (OBS): Add gdb_tilde_expand.o.
5416
289a6840
SM
54172017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5418
5419 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5420 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5421
256642e8
PA
54222017-09-29 Pedro Alves <palves@redhat.com>
5423
5424 * ax.c (gdb_parse_agent_expr): Constify.
5425 * ax.h (gdb_parse_agent_expr): Constify.
5426 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5427 Constify.
5428 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5429 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5430 * remote-utils.h (read_ptid): Constify.
5431 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5432 (process_point_options, process_serial_event): Constify.
5433 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5434 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5435 (cmd_qtbuffer): Constify.
5436
5b9ca4d4
PA
54372017-09-29 Pedro Alves <palves@redhat.com>
5438
5439 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5440 fails.
5441
94c207e0
PA
54422017-09-29 Pedro Alves <palves@redhat.com>
5443
5444 * linux-low.c (handle_extended_wait): Pass parent thread instead
5445 of process to thread_db_notice_clone.
5446 * linux-low.h (thread_db_notice_clone): Replace parent process
5447 parameter with parent thread parameter.
5448 * thread-db.c (find_one_thread): Add comment.
5449 (thread_db_notice_clone): Replace parent process parameter with
5450 parent thread parameter. Temporarily switch to the parent thread.
5451
75352e28
SDJ
54522017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5453
5454 * gdbthread.h: Include "common-gdbthread.h".
5455 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5456 "if" when validating the ptid.
5457 * remote-utils.c: Include "gdbthread.h".
5458 (prepare_resume_reply): Use "switch_to_thread".
5459 * target.c (done_accessing_memory): Likewise.
5460
ad339634
AA
54612017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5462
5463 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5464 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5465 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5466 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5467 s390x-gs-linux64-ipa.o to ipa_obj.
5468 * linux-s390-low.c (HWCAP_S390_GS): New define.
5469 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5470 New functions.
5471 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5472 (s390_arch_setup): Check for guarded-storage support and choose
5473 appropriate tdesc.
5474 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5475 init_registers_s390x_gs_linux64.
5476 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5477 enum value.
5478 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5479 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5480
cc4d742f
SM
54812017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5482
5483 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5484
f6327dcb
KB
54852017-09-21 Kevin Buettner <kevinb@redhat.com>
5486
5487 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5488 (thread_db_thread_handle): Declare.
5489 * linux-low.c (linux_target_ops): Initialize thread_handle.
5490 * server.c (handle_qxfer_threads_worker): Add support for
5491 "handle" attribute.
5492 * target.h (struct target_ops): Add new function pointer,
5493 thread_handle.
5494 (target_thread_handle): Define.
5495 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5496 field in lwp.
5497 (thread_db_thread_handle): New function.
5498
86299109
KB
54992017-09-21 Kevin Buettner <kevinb@redhat.com>
5500
5501 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
5502 * linux-low.h (thread_db_notice_clone): Declare.
5503 * thread-db.c (thread_db_notice_clone): New function.
5504
f557a88a
PA
55052017-09-21 Pedro Alves <palves@redhat.com>
5506
5507 * server.c (gdb_read_memory, handle_status, process_serial_event)
5508 (handle_serial_event, handle_target_event): Adjust to
5509 set_desired_thread prototype change.
5510 * target.c (set_desired_thread): Remove 'use_general' parameter
5511 and adjust.
5512 * target.h (set_desired_thread): Remove 'use_general' parameter.
5513
223ffa71
TT
55142017-09-20 Tom Tromey <tom@tromey.com>
5515
5516 * target.c (target_terminal::terminal_state): Define.
5517 (target_terminal::init): Rename from target_terminal_init.
5518 (target_terminal::inferior): Rename from
5519 target_terminal_inferior.
5520 (target_terminal::ours): Rename from target_terminal_ours.
5521 (target_terminal::ours_for_output, target_terminal::info): New.
5522
04fd3ba9
SM
55232017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5524
5525 * server.c (accumulate_file_name_length): Remove.
5526 (emit_dll_description): Adjust to std::string change.
5527 (handle_qxfer_libraries): Use std::string to hold document.
5528
5e187554
SM
55292017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5530
5531 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
5532 return type of xml_escape_text.
5533 * server.c (emit_dll_description): Likewise.
5534
1526853e
SM
55352017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5536
5537 * server.c (captured_main): Accept argument for --selftest.
5538 Update run_tests call.
5539 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
5540 when registering selftests.
5541
c4dfafab
SDJ
55422017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
5543
5544 * regcache.c (get_thread_regcache): Update code to use "std::vector"
5545 instead of "VEC" for "target_desc.reg_defs".
5546 (regcache_cpy): Likewise.
5547 (registers_to_string): Likewise.
5548 (registers_from_string): Likewise.
5549 (find_regno): Likewise.
5550 (supply_regblock): Likewise.
5551 (regcache_raw_read_unsigned): Likewise.
5552 * tdesc.c (init_target_desc): Likewise.
5553 (tdesc_create_reg): Likewise.
5554 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
5555 (struct target_desc) <reg_defs>: Convert to "std::vector".
5556 (target_desc): Do not initialize "reg_defs".
5557 (~target_desc): Update code to use "std::vector" instead of "VEC"
5558 for "target_desc.reg_defs".
5559 (operator==): Likewise.
5560
124aceb4
SM
55612017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5562
5563 * inferiors.h (thread_to_gdb_id): Remove.
5564 * inferiors.c (thread_to_gdb_id): Remove.
5565 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
5566 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
5567 lynx_store_registers, lynx_read_memory, lynx_write_memory):
5568 Likewise.
5569 * nto-low.c (nto_fetch_registers, nto_store_registers,
5570 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
5571
96cde54f
SM
55722017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5573
5574 * inferiors.h (gdb_id_to_thread_id): Remove.
5575 * inferiors.c (gdb_id_to_thread_id): Remove.
5576 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
5577 removal. Move pid declaration closer to where it's used.
5578
e8ca139e
SM
55792017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5580
5581 * server.c (handle_detach): New function.
5582 (process_serial_event): Move code out, call handle_detach.
5583
f8a4e119
SM
55842017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5585
5586 * server.c (require_running): Rename to ...
5587 (require_running_or_return): ... this ...
5588 (require_running_or_break): ... and this.
5589 (handle_query, process_serial_event): Adjust.
5590
0eb0a407
SM
55912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5592
5593 * linux-low.c (linux_set_resume_request): Remove unused
5594 variables.
5595
785922a5
SM
55962017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5597
5598 * server.c (first_thread_of): Remove.
5599 (process_serial_event): Replace usage of first_thread_of with
5600 find_any_thread_of_pid.
5601 * tracepoint.c (same_process_p): Remove.
5602 (gdb_agent_about_to_close): Replace usage of same_process_p with
5603 find_any_thread_of_pid.
5604 * linux-x86-low.c (same_process_callback): Remove.
5605 (x86_arch_setup_process_callback): Replace usage of
5606 same_process_callback with find_any_thread_of_pid.
5607 * thread-db.c (any_thread_of): Remove.
5608 (switch_to_process): Replace usage of any_thread_of with
5609 find_any_thread_of_pid.
5610 * inferiors.c (thread_pid_matches_callback): Remove.
5611 (find_thread_process): Adjust to use find_any_thread_of_pid.
5612
a059f00c
SDJ
56132017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5614
5615 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 5616 with "!VEC_empty".
a059f00c 5617
cc397f3a
SDJ
56182017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5619
5620 * linux-low.c (handle_extended_wait): Use
5621 "allocate_target_description" instead of "XNEW".
5622 * linux-x86-low.c (initialize_low_arch): Likewise.
5623
22916b07
YQ
56242017-09-05 Yao Qi <yao.qi@linaro.org>
5625
5626 * configure.srv (srv_i386_regobj): Remove.
5627 (srv_amd64_regobj): Remove.
5628 (srv_regobj): Set it to "" for x86 non-linux targets.
5629 * linux-x86-tdesc.c (i386_linux_read_description):
5630 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
5631 (init_registers_i386): Remove the declaration.
5632 (tdesc_i386): Remove the declaration.
5633 (lynx_i386_arch_setup): Call i386_create_target_description.
5634 * nto-x86-low.c: Likewise.
5635 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
5636 [!__x86_64__]: include arch/i386.h.
5637 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
5638
38602d55
YQ
56392017-09-05 Yao Qi <yao.qi@linaro.org>
5640
5641 * configure.srv (srv_amd64_linux_xmlfiles): Remove
5642 i386/amd64-XXX-linux from it.
5643
44b886ff
YQ
56442017-09-05 Yao Qi <yao.qi@linaro.org>
5645
5646 * configure.srv: Empty srv_amd64_linux_regobj if $development is
5647 false.
5648 (ipa_amd64_linux_regobj): Remove.
5649 (ipa_x32_linux_regobj): Remove.
5650
b4570e4b
YQ
56512017-09-05 Yao Qi <yao.qi@linaro.org>
5652
5653 * Makefile.in (arch-amd64.o): New rule.
5654 * configure.srv: Append arch-amd64.o.
5655 * linux-amd64-ipa.c: Include common/x86-xstate.h.
5656 (get_ipa_tdesc): Call amd64_linux_read_description.
5657 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
5658 and init_registers_amd64_XXX.
5659 * linux-x86-low.c (x86_linux_read_description): Call
5660 amd64_linux_read_description.
5661 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
5662 (initialize_low_arch): Don't call init_registers_x32_XXX and
5663 init_registers_amd64_XXX.
5664 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
5665 and tdesc_amd64_XXX.
5666 [__x86_64__] (amd64_tdesc_test): New function.
5667 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
5668 and init_registers_amd64_XXX.
5669 * linux-x86-tdesc.c: Include arch/amd64.h.
5670 (xcr0_to_tdesc_idx): New function.
5671 (i386_linux_read_description): New function.
5672 (amd64_get_ipa_tdesc_idx): New function.
5673 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
5674 (amd64_get_ipa_tdesc): Declare.
5675
d1f28ea2
YQ
56762017-09-05 Yao Qi <yao.qi@linaro.org>
5677
5678 * configure.srv (srv_i386_linux_xmlfiles): Remove
5679 i386/i386-XXX-linux.xml from it.
5680
25a93583
YQ
56812017-09-05 Yao Qi <yao.qi@linaro.org>
5682
5683 * configure.srv: Set srv_i386_linux_regobj empty if $development
5684 is false.
5685 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
5686 initialize_low_tdesc.
5687 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
5688 with #if initialize_low_tdesc.
5689 * linux-x86-tdesc-selftest.c: New file.
5690 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
5691
5f035c07
YQ
56922017-09-05 Yao Qi <yao.qi@linaro.org>
5693
5694 * Makefile.in (arch-i386.o): New rule.
5695 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
5696 (x86_64-*-linux*): Likewise.
5697 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
5698 include arch/i386.h.
5699 (i386_linux_read_description): Remove code and call
5700 i386_create_target_description.
5701 * tdesc.c (allocate_target_description): New function.
5702 * tdesc.h (set_tdesc_architecture): Remove declaration.
5703 (set_tdesc_osabi): Likewise.
5704
0abe8a89
YQ
57052017-09-05 Yao Qi <yao.qi@linaro.org>
5706
5707 * linux-x86-tdesc.c: Don't include <inttypes.h>.
5708 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5709 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
5710 .xmltarget.
5711 * server.c (get_features_xml): Call tdesc_get_features_xml.
5712 * tdesc.c (set_tdesc_architecture): New function.
5713 (set_tdesc_osabi): New function.
5714 (tdesc_get_features_xml): New function.
5715 (tdesc_create_feature): Add an argument.
5716 * tdesc.h (struct target_desc) <features>: New field.
5717 <arch, osabi>: New field.
5718 (~target_desc): xfree features, arch, and osabi.
5719 (target_desc::oerator==): Don't compare .xmltarget.
5720 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
5721 (set_tdesc_osabi): Likewise.
5722 (tdesc_get_features_xml): Likewise.
5723
0a188386
YQ
57242017-09-05 Yao Qi <yao.qi@linaro.org>
5725
5726 * linux-x86-tdesc.c: Include selftest.h.
5727 (i386_tdesc_test): New function.
5728 (initialize_low_tdesc): Call selftests::register_test.
5729 * tdesc.h: Include regdef.h.
5730 (target_desc): Override operator == and !=.
5731
f49ff000
YQ
57322017-09-05 Yao Qi <yao.qi@linaro.org>
5733
5734 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
5735 (ipa_obj): Likewise.
5736 * linux-i386-ipa.c: Include common/x86-xstate.h
5737 (get_ipa_tdesc): Call i386_linux_read_description.
5738 (initialize_low_tracepoint): Don't call init_registers_XXX
5739 functions, call initialize_low_tdesc instead.
5740 * linux-x86-low.c (x86_linux_read_description): Call
5741 i386_linux_read_description.
5742 (initialize_low_arch): Don't call init_registers_i386_XXX
5743 functions, call initialize_low_tdesc.
5744 * linux-x86-tdesc.c: New file.
5745 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
5746 (i386_get_ipa_tdesc_idx): Declare.
5747 (i386_get_ipa_tdesc): Declare.
5748 (initialize_low_tdesc): Declare.
5749
2b68ef2f
YQ
57502017-09-05 Yao Qi <yao.qi@linaro.org>
5751
5752 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
5753 instead of 0.
5754
f7000548
YQ
57552017-09-05 Yao Qi <yao.qi@linaro.org>
5756
5757 * Makefile.in (IPA_OBJS): Add vec-ipa.o
5758 * regcache.c (get_thread_regcache): Use VEC_length.
5759 (init_register_cache): Likewise.
5760 (regcache_cpy): Likewise.
5761 (registers_to_string): Iterate reg_defs via VEC_iterate.
5762 (find_regno): Likewise.
5763 (find_register_by_number): Use VEC_index.
5764 (register_size): Call find_register_by_number.
5765 (register_data): Call find_register_by_number.
5766 (supply_regblock): Use VEC_length.
5767 (regcache_raw_read_unsigned): Likewise.
5768 * tdesc.c (init_target_desc): Iterate reg_defs via
5769 VEC_iterate.
5770 (default_description): Update initializer.
5771 (copy_target_description): Don't update field num_registers.
5772 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
5773 <num_registers>: Remove.
5774
50a421ac
SM
57752017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5776
5777 * Makefile.in (.SECONDARY): Define target.
5778
23fdd69e
SM
57792017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5780
5781 * linux-low.c (linux_wait_1): Adjust.
5782 * server.c (queue_stop_reply_callback): Adjust.
5783
0a2dde4a
SDJ
57842017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5785
5786 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
5787 QEnvironmentUnset and QEnvironmentReset packets.
5788 (handle_query): Inform remote that QEnvironmentHexEncoded,
5789 QEnvironmentUnset and QEnvironmentReset are supported.
5790
6afd337d
SM
57912017-08-25 Simon Marchi <simon.marchi@ericsson.com>
5792
5793 * inferiors.h (inferior_target_data): Rename to ...
5794 (thread_target_data): ... this.
5795 (inferior_regcache_data): Rename to ...
5796 (thread_regcache_data): ... this.
5797 (set_inferior_regcache_data): Rename to ...
5798 (set_thread_regcache_data): ... this.
5799 * inferiors.c (inferior_target_data): Rename to ...
5800 (thread_target_data): ... this.
5801 (inferior_regcache_data): Rename to ...
5802 (thread_regcache_data): ... this.
5803 (set_inferior_regcache_data): Rename to ...
5804 (set_thread_regcache_data): ... this.
5805 (free_one_thread): Update.
5806 * linux-low.h (get_thread_lwp): Update.
5807 * regcache.c (get_thread_regcache): Update.
5808 (regcache_invalidate_thread): Update.
5809 (free_register_cache_thread): Update.
5810 * win32-i386-low.c (update_debug_registers_callback): Update.
5811 (win32_get_current_dr): Update.
5812 * win32-low.c (thread_rec): Update.
5813 (delete_thread_info): Update.
5814 (continue_one_thread): Update.
5815 (suspend_one_thread): Update.
5816
a160cc46
SM
58172017-08-24 Simon Marchi <simon.marchi@ericsson.com>
5818
5819 * inferiors.c (set_inferior_target_data): Remove.
5820 * inferiors.h (set_inferior_target_data): Remove.
5821
6d580b63
YQ
58222017-08-18 Yao Qi <yao.qi@linaro.org>
5823
5824 * Makefile.in (OBS): Add selftest.o.
5825 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
5826 * configure, config.in: Re-generated.
5827 * server.c: Include common/sefltest.h.
5828 (captured_main): Handle option --selftest.
5829
f5a29eb0
YQ
58302017-08-09 Yao Qi <yao.qi@linaro.org>
5831
5832 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
5833 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
5834 i386-avx-mpx.o and i386-mmx.o.
5835 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
5836 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
5837 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
5838 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
5839 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
5840 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
5841 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
5842 i386/amd64-avx-mpx.xml.
5843
57757c2f
YQ
58442017-08-09 Yao Qi <yao.qi@linaro.org>
5845
5846 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
5847 and x32-avx-avx512.o.
5848 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
5849 i386/x32-avx-avx512.xml.
5850
229d26fc
SM
58512017-07-26 Simon Marchi <simon.marchi@ericsson.com>
5852
5853 * tracepoint.h (enum class fast_tpoint_collect_result): New
5854 enumeration.
5855 (fast_tracepoint_collecting): Change return type to
5856 fast_tpoint_collect_result.
5857 * tracepoint.c (fast_tracepoint_collecting): Likewise.
5858 * linux-low.h: Include tracepoint.h.
5859 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
5860 fast_tpoint_collect_result.
5861 * linux-low.c (handle_tracepoints): Adjust.
5862 (linux_fast_tracepoint_collecting): Change return type to
5863 fast_tpoint_collect_result.
5864 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
5865 linux_wait_1, stuck_in_jump_pad_callback,
5866 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
5867 proceed_one_lwp): Adjust to type change.
5868
2e1e43e1
YQ
58692017-07-10 Yao Qi <yao.qi@linaro.org>
5870
5871 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
5872
adc764e7
YQ
58732017-06-29 Yao Qi <yao.qi@linaro.org>
5874
5875 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
5876 Remove.
5877 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
5878
a206891a
SM
58792017-06-20 Simon Marchi <simon.marchi@ericsson.com>
5880
5881 * Makefile.in (IPA_OBJS): Sort and format one item per line.
5882
9a6c7d9c
SDJ
58832017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5884
5885 * linux-low.c (linux_create_inferior): Adjust code to access the
5886 environment information via 'gdb_environ' class.
5887 * lynx-low.c (lynx_create_inferior): Likewise.
5888 * server.c (our_environ): Make it an instance of 'gdb_environ'.
5889 (get_environ): Return a pointer to 'our_environ'.
5890 (captured_main): Initialize 'our_environ'.
5891 * server.h (get_environ): Adjust prototype.
5892 * spu-low.c (spu_create_inferior): Adjust code to access the
5893 environment information via 'gdb_environ' class.
5894
ae3e2ccf
SM
58952017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5896
5897 * linux-low.c (linux_read_memory, linux_write_memory): Remove
5898 usage of "register" keyword.
5899
3e019bdc
SM
59002017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5901
5902 * configure: Re-generate.
5903
8465943a
SM
59042017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5905
5906 * configure: Re-generate.
5907
cf0dd6f0
SM
59082017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5909
5910 * Makefile.in (COMPILE.pre): Add "-x c++".
5911
9845682b
SDJ
59122017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
5913
5914 * fork-child.c: Conditionally include <signal.h>.
5915
aefd8b33
SDJ
59162017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5917
5918 * server.c (handle_general_set): Handle new packet
5919 "QStartupWithShell".
5920 (handle_query): Add "QStartupWithShell" to the list of supported
5921 packets.
5922 (gdbserver_usage): Add help text explaining the
5923 new "--startup-with-shell" and "--no-startup-with-shell" CLI
5924 options.
5925 (captured_main): Recognize and act upon the presence of the new
5926 CLI options.
5927
2090129c
SDJ
59282017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5929 Pedro Alves <palves@redhat.com>
5930
5931 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
5932 * configure: Regenerate.
5933 * configure.srv (srv_linux_obj): Add "fork-child.o" and
5934 "fork-inferior.o".
5935 (i[34567]86-*-lynxos*): Likewise.
5936 (spu*-*-*): Likewise.
5937 * fork-child.c: New file.
5938 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
5939 and "environ.h".
5940 (linux_ptrace_fun): New function.
5941 (linux_create_inferior): Adjust function prototype to reflect
5942 change on "target.h". Adjust function code to use
5943 "fork_inferior".
5944 (linux_request_interrupt): Delete "signal_pid".
5945 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5946 (lynx_ptrace_fun): New function.
5947 (lynx_create_inferior): Adjust function prototype to reflect
5948 change on "target.h". Adjust function code to use
5949 "fork_inferior".
5950 * nto-low.c (nto_create_inferior): Adjust function prototype and
5951 code to reflect change on "target.h". Update comments.
5952 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
5953 "common-terminal.h" and "environ.h".
5954 (terminal_fd): Moved to fork-child.c.
5955 (old_foreground_pgrp): Likewise.
5956 (restore_old_foreground_pgrp): Likewise.
5957 (last_status): Make it global.
5958 (last_ptid): Likewise.
5959 (our_environ): New variable.
5960 (startup_with_shell): Likewise.
5961 (program_name): Likewise.
5962 (program_argv): Rename to...
5963 (program_args): ...this.
5964 (wrapper_argv): New variable.
5965 (start_inferior): Delete function.
5966 (get_exec_wrapper): New function.
5967 (get_exec_file): Likewise.
5968 (get_environ): Likewise.
5969 (prefork_hook): Likewise.
5970 (post_fork_inferior): Likewise.
5971 (postfork_hook): Likewise.
5972 (postfork_child_hook): Likewise.
5973 (handle_v_run): Update code to deal with arguments coming from the
5974 remote host. Update calls from "start_inferior" to
5975 "create_inferior".
5976 (captured_main): Likewise. Initialize environment variable. Call
5977 "have_job_control".
5978 * server.h (post_fork_inferior): New prototype.
5979 (get_environ): Likewise.
5980 (last_status): Declare.
5981 (last_ptid): Likewise.
5982 (signal_pid): Likewise.
5983 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5984 (spu_ptrace_fun): New function.
5985 (spu_create_inferior): Adjust function prototype to reflect change
5986 on "target.h". Adjust function code to use "fork_inferior".
5987 * target.c (target_terminal_init): New function.
5988 (target_terminal_inferior): Likewise.
5989 (target_terminal_ours): Likewise.
5990 * target.h: Include <vector>.
5991 (struct target_ops) <create_inferior>: Update prototype.
5992 (create_inferior): Update macro.
5993 * utils.c (gdb_flush_out_err): New function.
5994 * win32-low.c (win32_create_inferior): Adjust function prototype
5995 and code to reflect change on "target.h".
5996
043a4934
SDJ
59972017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5998
5999 * inferiors.c (switch_to_thread): New function.
6000
15652511
SDJ
60012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6002
6003 * Makefile.in (SFILE): Add "common/job-control.c".
6004 (OBS): Add "job-control.o".
6005
21ea5acd
SDJ
60062017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6007
6008 * Makefile: Remove "@host_makefile_frag@".
6009
e13cb306
PA
60102017-05-05 Pedro Alves <palves@redhat.com>
6011
6012 * configure: Regenerate.
6013
c94fee56
SDJ
60142017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6015
6016 * configure: Regenerate.
6017
a0ff9e1a
SM
60182017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6019
6020 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6021 software_single_step change of return type to
6022 std::vector<CORE_ADDR>.
6023 * linux-low.c (install_software_single_step_breakpoints):
6024 Likewise.
6025 * linux-low.h (install_software_single_step_breakpoints):
6026 Likewise.
6027
be628ab8
SDJ
60282017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6029
6030 * remote-utils.c: Include "gdb_termios.h" instead of
6031 "terminal.h".
6032 * terminal.h: Delete file.
6033
7c5ded6a
SDJ
60342017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6035
6036 * server.c: Include <vector>.
6037 <program_argv, wrapper_argv>: Convert to std::vector.
6038 (start_inferior): Rewrite function to use C++.
6039 (handle_v_run): Likewise. Update code that calculates the argv
6040 based on the vRun packet; use C++.
6041 (captured_main): Likewise.
6042
436252de
SM
60432017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6044
6045 * server.c (handle_v_cont): Initialize thread_resume::thread
6046 with null_ptid.
6047
9bf2a700
PA
60482017-04-05 Pedro Alves <palves@redhat.com>
6049
6050 * configure: Regenerate.
6051
a121b7c1
PA
60522017-04-05 Pedro Alves <palves@redhat.com>
6053
6054 * gdbreplay.c (sync_error): Constify.
6055 * linux-x86-low.c (push_opcode): Constify.
6056
21c8a587
PA
60572017-04-05 Pedro Alves <palves@redhat.com>
6058
6059 * win32-low.c (get_child_debug_event)
6060 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6061 Report TARGET_WAITKIND_SPURIOUS instead.
6062
fb32b4f7
PA
60632017-04-05 Pedro Alves <palves@redhat.com>
6064
e79be6e5
SM
6065 * remote-utils.c (remote_prepare, remote_open): Constify.
6066 * remote-utils.h (remote_prepare, remote_open): Constify.
6067 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 6068
65dd1e59
SM
60692017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6070
6071 * Makefile.in (clean): Clear .deps.
6072
8fa5b777
SM
60732017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6074
6075 * .gitignore: Remove generated files, replace with wildcard.
6076 * (clean): Replace removal of generated files with wildcard.
6077 (version.c): Replace with...
6078 (version-generated.c): ...this.
6079 (xml-builtin.c): Replace with...
6080 (xml-builtin-generated.c): ...this.
6081 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6082 (%.c: *regformats*): Replace with...
6083 (%-generated.c: *regformats*): ...this.
6084
a12e714b
MF
60852017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6086
6087 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6088 (xtensa_fill_gregset): Call collect_register_by_name for
6089 threadptr register.
6090 (xtensa_store_gregset): Call supply_register_by_name for
6091 threadptr register.
6092
1a09b50a
MF
60932017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6094
6095 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6096 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6097 (xtensa_store_gregset): Call supply_register for all registers in
6098 a0_regnum..a0_regnum + C0_NREGS range.
6099
1a01e7c6
SM
61002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6101
6102 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6103 (ax-ipa.o: ax.c): Remove.
6104 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6105 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6106 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6107 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6108 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6109
36bc18a8
SM
61102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6111
6112 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6113 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6114 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6115 (errors-ipa.o: ../common/errors.c): Remove.
6116 (format-ipa.o: ../common/format.c): Remove.
6117 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6118
a8ebe3d5
SM
61192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6120
6121 * Makefile.in (%-ipa.o: %.c): New rule.
6122 (tracepoint-ipa.o: tracepoint.c): Remove.
6123 (utils-ipa.o: utils.c): Remove.
6124 (remote-utils-ipa.o: remote-utils.c): Remove.
6125 (regcache-ipa.o: regcache.c): Remove.
6126 (i386-linux-ipa.o: i386-linux.c): Remove.
6127 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6128 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6129 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6130 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6131 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6132 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6133 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6134 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6135 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6136 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6137 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6138 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6139 (aarch64-ipa.o: aarch64.c): Remove.
6140 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6141 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6142 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6143 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6144 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6145 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6146 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6147 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6148 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6149 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6150 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6151 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6152 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6153 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6154 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6155 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6156 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6157 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6158 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6159 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6160 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6161 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6162 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6163 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6164 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6165 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6166 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6167 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6168 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6169 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6170 (tdesc-ipa.o: tdesc.c): Remove.
6171 (x32-linux-ipa.o: x32-linux.c): Remove.
6172 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6173 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6174
50cfacb7
SM
61752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6176
6177 * Makefile.in (%.o: ../arch/%.c): New rule.
6178 (arm.o: ../arch/arm.c): Remove.
6179 (arm-linux.o: ../arch/arm-linux.c): Remove.
6180 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6181 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6182
c5a22423
SM
61832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6184
6185 * Makefile.in (%.o: ../nat/%.c): New rule.
6186 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6187 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6188 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6189 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6190 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6191 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6192 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6193 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6194 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6195 (linux-personality.o: ../nat/linux-personality.c): Remove.
6196 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6197 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6198 (x86-linux.o: ../nat/x86-linux.c): Remove.
6199 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6200 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6201
6bda016b
SM
62022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6203
6204 * Makefile.in (%.o: ../common/%.c): New rule.
6205 (signals.o: ../common/signals.c): Remove.
6206 (print-utils.o: ../common/print-utils.c): Remove.
6207 (rsp-low.o: ../common/rsp-low.c): Remove.
6208 (common-utils.o: ../common/common-utils.c): Remove.
6209 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6210 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6211 (vec.o: ../common/vec.c): Remove.
6212 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6213 (xml-utils.o: ../common/xml-utils.c): Remove.
6214 (ptid.o: ../common/ptid.c): Remove.
6215 (buffer.o: ../common/buffer.c): Remove.
6216 (format.o: ../common/format.c): Remove.
6217 (filestuff.o: ../common/filestuff.c): Remove.
6218 (agent.o: ../common/agent.c): Remove.
6219 (errors.o: ../common/errors.c): Remove.
6220 (environ.o: ../common/environ.c): Remove.
6221 (common-debug.o: ../common/common-debug.c): Remove.
6222 (cleanups.o: ../common/cleanups.c): Remove.
6223 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6224 (fileio.o: ../common/fileio.c): Remove.
6225 (common-regcache.o: ../common/common-regcache.c): Remove.
6226 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6227 (new-op.o: ../common/new-op.c): Remove.
6228 (btrace-common.o: ../common/btrace-common.c): Remove.
6229
21122961
SM
62302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6231
6232 * Makefile.in (%.o: ../target/%.c): New rule.
6233 (waitstatus.o: ../target/waitstatus.c): Remove.
6234
c362e621
SM
62352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6236
6237 * Makefile.in
6238 (%.c: ../regformats/%.dat,
6239 (%.c: ../regformats/arm/%.dat,
6240 (%.c: ../regformats/i386/%.dat,
6241 (%.c: ../regformats/rs6000/%.dat): New rules.
6242 (aarch64.c): Remove.
6243 (reg-arm.c): Remove.
6244 (arm-with-iwmmxt.c): Remove.
6245 (arm-with-vfpv2.c): Remove.
6246 (arm-with-vfpv3.c): Remove.
6247 (arm-with-neon.c): Remove.
6248 (reg-bfin.c): Remove.
6249 (reg-cris.c): Remove.
6250 (reg-crisv32.c): Remove.
6251 (i386.c): Remove.
6252 (i386-linux.c): Remove.
6253 (i386-avx.c): Remove.
6254 (i386-avx-linux.c): Remove.
6255 (i386-avx-avx512.c): Remove.
6256 (i386-avx-avx512-linux.c): Remove.
6257 (i386-mpx.c): Remove.
6258 (i386-mpx-linux.c): Remove.
6259 (i386-avx-mpx-avx512-pku.c): Remove.
6260 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6261 (i386-avx-mpx.c): Remove.
6262 (i386-avx-mpx-linux.c): Remove.
6263 (i386-mmx.c): Remove.
6264 (i386-mmx-linux.c): Remove.
6265 (reg-ia64.c): Remove.
6266 (reg-m32r.c): Remove.
6267 (reg-m68k.c): Remove.
6268 (reg-cf.c): Remove.
6269 (mips-linux.c): Remove.
6270 (mips-dsp-linux.c): Remove.
6271 (mips64-linux.c): Remove.
6272 (mips64-dsp-linux.c): Remove.
6273 (nios2-linux.c): Remove.
6274 (powerpc-32.c): Remove.
6275 (powerpc-32l.c): Remove.
6276 (powerpc-altivec32l.c): Remove.
6277 (powerpc-cell32l.c): Remove.
6278 (powerpc-vsx32l.c): Remove.
6279 (powerpc-isa205-32l.c): Remove.
6280 (powerpc-isa205-altivec32l.c): Remove.
6281 (powerpc-isa205-vsx32l.c): Remove.
6282 (powerpc-e500l.c): Remove.
6283 (powerpc-64l.c): Remove.
6284 (powerpc-altivec64l.c): Remove.
6285 (powerpc-cell64l.c): Remove.
6286 (powerpc-vsx64l.c): Remove.
6287 (powerpc-isa205-64l.c): Remove.
6288 (powerpc-isa205-altivec64l.c): Remove.
6289 (powerpc-isa205-vsx64l.c): Remove.
6290 (s390-linux32.c): Remove.
6291 (s390-linux32v1.c): Remove.
6292 (s390-linux32v2.c): Remove.
6293 (s390-linux64.c): Remove.
6294 (s390-linux64v1.c): Remove.
6295 (s390-linux64v2.c): Remove.
6296 (s390-te-linux64.c): Remove.
6297 (s390-vx-linux64.c): Remove.
6298 (s390-tevx-linux64.c): Remove.
6299 (s390x-linux64.c): Remove.
6300 (s390x-linux64v1.c): Remove.
6301 (s390x-linux64v2.c): Remove.
6302 (s390x-te-linux64.c): Remove.
6303 (s390x-vx-linux64.c): Remove.
6304 (s390x-tevx-linux64.c): Remove.
6305 (tic6x-c64xp-linux.c): Remove.
6306 (tic6x-c64x-linux.c): Remove.
6307 (tic6x-c62x-linux.c): Remove.
6308 (reg-sh.c): Remove.
6309 (reg-sparc64.c): Remove.
6310 (reg-spu.c): Remove.
6311 (amd64.c): Remove.
6312 (amd64-linux.c): Remove.
6313 (amd64-avx.c): Remove.
6314 (amd64-avx-linux.c): Remove.
6315 (amd64-avx-avx512.c): Remove.
6316 (amd64-avx-avx512-linux.c): Remove.
6317 (amd64-mpx.c): Remove.
6318 (amd64-mpx-linux.c): Remove.
6319 (amd64-avx-mpx-avx512-pku.c): Remove.
6320 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6321 (amd64-avx-mpx.c): Remove.
6322 (amd64-avx-mpx-linux.c): Remove.
6323 (x32.c): Remove.
6324 (x32-linux.c): Remove.
6325 (x32-avx.c): Remove.
6326 (x32-avx-linux.c): Remove.
6327 (x32-avx-avx512.c): Remove.
6328 (x32-avx-avx512-linux.c): Remove.
6329 (reg-xtensa.c): Remove.
6330 (reg-tilegx.c): Remove.
6331 (reg-tilegx32.c): Remove.
6332
1672e0d9
SDJ
63332017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6334
6335 * Makefile.in (SFILES): Add "common/environ.c".
6336 (OBJS): Add "common/environ.h".
6337
239b6d10
WT
63382017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6339
6340 * configure.ac: Check if the fs_base and gs_base members of
6341 `struct user_regs_struct' exist.
6342 * config.in: Regenerated.
6343 * configure: Likewise.
6344
694b382c
AT
63452017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6346
6347 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6348 target_read_memory.
6349 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6350 (get_next_pcs_syscall_next_pc): Likewise.
6351
7dc53023
LM
63522016-12-23 Luis Machado <lgustavo@codesourcery.com>
6353
6354 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6355 * nto-x86-low.c: Likewise.
6356
ad02e4fe
SM
63572016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6358
6359 * Makefile.in: Include disable-implicit-rules.mk.
6360
dcb07cfa
PA
63612016-11-23 Pedro Alves <palves@redhat.com>
6362
6363 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6364 (debug_vprintf): Use std::chrono::steady_clock instead of
6365 gettimeofday. Use '.' instead of ':'.
6366 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6367 (get_timestamp): Use std::chrono::steady_clock instead of
6368 gettimeofday.
6369
8629c02c
SM
63702016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6371
6372 * Makefile.in: Fix whitespace formatting.
6373
b593ecca
SM
63742016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6375
6376 * Makefile.in (SFILES, OBS): Flatten list and order
6377 alphabetically.
6378
9986ba08
PA
63792016-11-23 Pedro Alves <palves@redhat.com>
6380
6381 * event-loop.c (handle_file_event): Use warning.
6382 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6383 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6384 Use warning.
6385
4eefa7bc
PA
63862016-11-23 Pedro Alves <palves@redhat.com>
6387
6388 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6389 output.
6390 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6391 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6392 debug_printf and debug_flush for debug output.
6393 * server.c (handle_general_set): Likewise.
6394 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6395 output.
6396
5443506e
SM
63972016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6398
6399 * Makefile.in (.c.o): Replace rule with ...
6400 (%.o: %.c): ... this one.
6401
3b165252
SM
64022016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6403
6404 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6405 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6406 make.
6407 * configure.ac: Remove checks for the make program.
6408 * configure: Re-generate.
6409
0bcda685
PA
64102016-10-28 Pedro Alves <palves@redhat.com>
6411
6412 * Makefile.in (CXX_DIALECT): Get from configure.
6413 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6414 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6415 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6416 * config.in: Regenerate.
6417 * configure: Regenerate.
6418
c3805894
YQ
64192016-10-27 Yao Qi <yao.qi@linaro.org>
6420
6421 * linux-low.c (linux_supports_range_stepping): Return true if
6422 can_software_single_step return true.
6423
89342618
YQ
64242016-10-27 Yao Qi <yao.qi@linaro.org>
6425
6426 * inferiors.c (find_inferior_in_random): New function.
6427 * inferiors.h (find_inferior_in_random): Declare.
6428 * linux-low.c (linux_wait_for_event_filtered): Call
6429 find_inferior_in_random instead of find_inferior.
6430
e3652c84
YQ
64312016-10-27 Yao Qi <yao.qi@linaro.org>
6432
6433 * linux-low.c (linux_wait_1): If single-step breakpoints are
6434 inserted, remove them.
6435
5a04c4cf
PA
64362016-10-26 Pedro Alves <palves@redhat.com>
6437
6438 * linux-low.c (handle_extended_wait): Link parent/child fork
6439 threads.
6440 (linux_wait_1): Unlink them.
6441 (linux_set_resume_request): Ignore resume requests for
6442 already-resumed and unhandled fork child threads.
6443 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6444 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6445 New functions.
6446 (handle_v_requests) <vCont>: Don't call require_running.
6447 * server.h (in_queued_stop_replies): New declaration.
6448
cb93dc7f
YQ
64492016-10-24 Yao Qi <yao.qi@linaro.org>
6450
6451 PR server/20733
6452 * linux-aarch64-low.c (append_insns): Cast the return value to
6453 'uint32_t *'.
6454
a1078bea
YQ
64552016-10-10 Yao Qi <yao.qi@linaro.org>
6456
6457 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6458
1fb77080
SDJ
64592016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6460
6461 * target.c (target_supports_multi_process): New function, moved
6462 from...
6463 * target.h (target_supports_multi_process): ... here. Remove
6464 macro.
6465
39b5a3b9
TT
64662016-10-05 Tom Tromey <tom@tromey.com>
6467
6468 PR remote/20655:
6469 * tracepoint.c (handle_tracepoint_bkpts): Check
6470 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6471
c1d0b70a
YQ
64722016-10-05 Yao Qi <yao.qi@linaro.org>
6473
6474 * configure.srv: Update the path of arm-*.xml files.
6475
0a69eedb
YQ
64762016-10-05 Terry Guo <terry.guo@arm.com>
6477 Yao Qi <yao.qi@linaro.org>
6478
6479 * Makefile.in: Adjust the path of rules.
6480 * configure.srv: Update the path of xml files.
6481 * regformats/arm-with-iwmmxt.dat: Regenerated.
6482 * regformats/arm-with-neon.dat: Likewise.
6483 * regformats/arm-with-vfpv2.dat: Likewise.
6484 * regformats/arm-with-vfpv3.dat Likewise.
6485
17e16485
YQ
64862016-09-30 Yao Qi <yao.qi@linaro.org>
6487
6488 PR gdbserver/20627
6489 * target.c (target_stop_and_wait): Don't call
6490 target_continue_no_signal, use resume_stop instead.
6491
edeeb602
YQ
64922016-09-26 Yao Qi <yao.qi@linaro.org>
6493
6494 * linux-low.c (linux_wait_1): Call debug_exit.
6495
503b1c39
PA
64962016-09-23 Pedro Alves <palves@redhat.com>
6497
6498 * Makefile.in (SFILES): Add common/new-op.c.
6499 (OBS): Add common/new-op.o.
6500 (new-op.o): New rule.
6501
74172ecf
SM
65022016-09-21 Simon Marchi <simon.marchi@ericsson.com>
6503
6504 * .gitinore: Ignore more files.
6505
fc6cda2e
YQ
65062016-09-21 Yao Qi <yao.qi@linaro.org>
6507
6508 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
6509 23.
6510
bc1e6c81
SDJ
65112016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
6512
6513 * server.c (start_inferior): Call target_mourn_inferior instead of
6514 mourn_inferior; pass ptid_t argument to it.
6515 (resume): Likewise.
6516 (handle_target_event): Likewise.
6517 * target.c (target_mourn_inferior): New function.
6518 * target.h (mourn_inferior): Delete macro.
6519
0e00e962
AA
65202016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6521
6522 * linux-low.c (lwp_is_stepping): New function.
6523
1d8cb77d
CL
65242016-09-06 Carl Love <cel@us.ibm.com>
6525
6526 * server.c (start_inferior): Fixed comment, requested comment change
6527 didn't get updated correctly. Removed reference to ptrace () call as
6528 it is only true on Linux systems.
6529
7313bced
CL
65302016-09-06 Carl Love <cel@us.ibm.com>
6531
6532 * server.c (start_inferior): Do not call
6533 function target_post_create_inferior () if the
6534 inferior process has already exited.
6535
cf6de44d
PA
65362016-09-05 Pedro Alves <palves@redhat.com>
6537
6538 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
6539 (COMPILE.pre, CC_LD): Use CXX directly.
6540 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6541 * acinclude.m4: Don't include build-with-cxx.m4.
6542 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
6543 * configure: Regenerate.
6544
c1da6748
AT
65452016-09-02 Akash Trehan <akash.trehan123@gmail.com>
6546
6547 PR gdb/19495
6548 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
6549 call writing data to own_buf.
6550
f2b9e3df
SDJ
65512016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6552
6553 * target.c (mywait): Call target_wait instead of
6554 the_target->wait.
6555 (target_wait): New function.
6556
049a8570
SDJ
65572016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6558
6559 * server.c (start_inferior): New variable 'ptid'. Replace calls
6560 to the_target->resume by target_continue{,_no_signal}, depending
6561 on the case.
6562 * target.c (target_stop_and_wait): Call target_continue_no_signal
6563 instead of the_target->resume.
6564 (target_continue): New function.
6565
3aa5cfa0
AT
65662016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
6567
6568 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
6569
754653a7
AZ
65702016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
6571
6572 PR server/20491
6573 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
6574 ps_prochandle.
6575 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
6576 * linux-arm-low.c (ps_get_thread_area): Likewise.
6577 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
6578 * linux-m68k-low.c (ps_get_thread_area): Likewise.
6579 * linux-mips-low.c (ps_get_thread_area): Likewise.
6580 * linux-nios2-low.c (ps_get_thread_area): Likewise.
6581 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
6582 * linux-x86-low.c (ps_get_thread_area): Likewise.
6583 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
6584
ed036b40
PA
65852016-08-19 Pedro Alves <palves@redhat.com>
6586
6587 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
6588
c8ef42ee
PA
65892016-08-19 Pedro Alves <palves@redhat.com>
6590
6591 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
6592 comment. Use memcpy instead of casting through unsigned long.
6593
9c235a72
PA
65942016-08-19 Pedro Alves <palves@redhat.com>
6595
6596 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
6597 allocating around 0x80000000.
6598
201506da
PA
65992016-08-19 Pedro Alves <palves@redhat.com>
6600
6601 PR gdb/20415
6602 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
6603 (x32-avx512-linux-ipa.o): New rules.
6604 * configure.ac (x86_64-*-linux*): New x32 check.
6605 * configure.srv (ipa_x32_linux_regobj): New.
6606 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
6607 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
6608 descriptions.
6609 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
6610 descriptions.
6611 * configure: Regenerate.
6612
f348d89a
PA
66132016-08-09 Pedro Alves <palves@redhat.com>
6614
6615 PR gdb/18653
6616 * Makefile.in (OBS): Add signals-state-save-restore.o.
6617 (signals-state-save-restore.o): New rule.
6618 * config.in: Regenerate.
6619 * configure: Regenerate.
6620 * linux-low.c: Include "signals-state-save-restore.h".
6621 (linux_create_inferior): Call
6622 restore_original_signals_state.
6623 * server.c: Include "dispositions-save-restore.h".
6624 (captured_main): Call save_original_signals_state.
6625
1baf5149
PA
66262016-08-05 Pedro Alves <palves@redhat.com>
6627
6628 * configure: Regenerate.
6629
fcd4a73d
YQ
66302016-08-04 Yao Qi <yao.qi@linaro.org>
6631
6632 * linux-low.c (regsets_fetch_inferior_registers): Check
6633 errno is ESRCH or not.
6634
979659d0
YQ
66352016-08-02 Yao Qi <yao.qi@linaro.org>
6636
6637 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
6638 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
6639 (thread_db_load_search): Update.
6640 (try_thread_db_load_1): Don't look for td_ta_event_addr,
6641 td_ta_set_event and td_ta_event_getmsg.
6642
6598661d
PA
66432016-07-26 Pedro Alves <palves@redhat.com>
6644
6645 PR server/20414
6646 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
6647 of unsigned long for 64-bit registers and use uint32_t instead of
6648 unsigned int for 32-bit registers.
6649
9cf12d57
PA
66502016-07-26 Pedro Alves <palves@redhat.com>
6651
6652 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
6653 to 'ptrace'.
6654
305450ed
TT
66552016-07-21 Tom Tromey <tom@tromey.com>
6656
6657 * configure: Rebuild.
6658
2583da7c
YQ
66592016-07-21 Yao Qi <yao.qi@linaro.org>
6660
6661 * mem-break.c (find_gdb_breakpoint): Cast bp to
6662 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
6663
21536b36
YQ
66642016-07-21 Yao Qi <yao.qi@linaro.org>
6665
6666 * server.c (handle_v_requests): Support s and S actions
6667 if target_supports_software_single_step return true.
6668
8901d193
YQ
66692016-07-21 Yao Qi <yao.qi@linaro.org>
6670
6671 * linux-low.c (resume_stopped_resumed_lwps): If resume request
6672 is resume_step, call maybe_hw_step.
6673 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
6674 and unstop them.
6675 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
6676 breakpoints or not.
6677 (proceed_one_lwp): If resume request is resume_step, install
6678 reinsert breakpoints and call maybe_hw_step.
6679
0e9a339e
YQ
66802016-07-21 Yao Qi <yao.qi@linaro.org>
6681
6682 * linux-low.c (proceed_one_lwp): Declare.
6683 (linux_resume_one_thread): Remove local variable 'step'.
6684 Lift code enqueue signal. Call proceed_one_lwp instead of
6685 linux_resume_one_lwp.
6686
4281b351
YQ
66872016-07-21 Yao Qi <yao.qi@linaro.org>
6688
6689 * linux-low.c (linux_resume_one_thread): Call
6690 enqueue_pending_signal.
6691
984a2c04
YQ
66922016-07-21 Yao Qi <yao.qi@linaro.org>
6693
6694 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
6695 * inferiors.c (do_restore_current_thread_cleanup): New function.
6696 (make_cleanup_restore_current_thread): Likewise.
6697 * linux-low.c (install_software_single_step_breakpoints): Call
6698 make_cleanup_restore_current_thread. Switch current_thread to
6699 thread.
6700
bec903c9
YQ
67012016-07-21 Yao Qi <yao.qi@linaro.org>
6702
6703 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
6704 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
6705 (clone_one_breakpoint): Likewise.
6706 (delete_reinsert_breakpoints): Change parameter to thread.
6707 Callers updated.
6708 (has_reinsert_breakpoints): Likewise.
6709 (uninsert_reinsert_breakpoints): Likewise.
6710 (reinsert_reinsert_breakpoints): Likewise.
6711 * mem-break.h (set_reinsert_breakpoint): Update declaration.
6712 (delete_reinsert_breakpoints): Likewise.
6713 (reinsert_reinsert_breakpoints): Likewise.
6714 (uninsert_reinsert_breakpoints): Likewise.
6715 (has_reinsert_breakpoints): Likewise.
6716
63c40ec7
YQ
67172016-07-21 Yao Qi <yao.qi@linaro.org>
6718
6719 * inferiors.c (get_thread_process): Make parameter const.
6720 * inferiors.h (get_thread_process): Update declaration.
6721 * mem-break.c (clone_all_breakpoints): Remove all parameters.
6722 Add new parameters child_thread and parent_thread. Callers
6723 updated.
6724 * mem-break.h (clone_all_breakpoints): Update declaration.
6725
9aa76cd0
YQ
67262016-07-21 Yao Qi <yao.qi@linaro.org>
6727
6728 * mem-break.c (struct breakpoint) <cond_list>: Remove.
6729 <command_list, handler>: Remove.
6730 (struct gdb_breakpoint): New.
6731 (struct other_breakpoint): New.
6732 (struct reinsert_breakpoint): New.
6733 (is_gdb_breakpoint): New function.
6734 (any_persistent_commands): Update command_list if
6735 is_gdb_breakpoint returns true.
6736 (set_breakpoint): Create breakpoints according to their types.
6737 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
6738 (set_gdb_breakpoint_1): Likewise.
6739 (set_gdb_breakpoint): Likewise.
6740 (clear_breakpoint_conditions): Change parameter type to
6741 'struct gdb_breakpoint *'.
6742 (clear_breakpoint_commands): Likewise.
6743 (clear_breakpoint_conditions_and_commands): Likewise.
6744 (add_condition_to_breakpoint): Likewise.
6745 (add_breakpoint_condition): Likewise.
6746 (add_commands_to_breakpoint): Likewise.
6747 (check_breakpoints): Check other_breakpoint.
6748 (clone_one_breakpoint): Clone breakpopint according to its type.
6749 * mem-break.h (struct gdb_breakpoint): Declare.
6750 (set_gdb_breakpoint): Update declaration.
6751 (clear_breakpoint_conditions_and_commands): Likewise.
6752 (add_breakpoint_condition): Likewise.
6753 (add_breakpoint_commands): Likewise.
6754 * server.c (process_point_options): Change parameter type to
6755 'struct gdb_breakpoint *'.
6756
811f8301
YQ
67572016-07-21 Yao Qi <yao.qi@linaro.org>
6758
6759 * mem-break.c (set_breakpoint_at): Rename it to ...
6760 (set_breakpoint_type_at): ... it.
6761 (set_breakpoint_at): Call set_breakpoint_type_at.
6762 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
6763 * mem-break.h (set_breakpoint_at): Update comments.
6764
b1c51e36
CLT
67652016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
6766
6767 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
6768 to buf parameter.
6769 (nios2_store_gregset): Likewise.
6770
ced2dffb
PA
67712016-07-01 Pedro Alves <palves@redhat.com>
6772 Antoine Tremblay <antoine.tremblay@ericsson.com>
6773
6774 * linux-low.c: Change interface to take the target lwp_info
6775 pointer directly and return void. Handle detaching from a zombie
6776 thread.
6777 (linux_detach_lwp_callback): New function.
6778 (linux_detach): Detach from the leader thread after detaching from
6779 the clone threads.
6780
2ac09a5b
YQ
67812016-06-28 Yao Qi <yao.qi@linaro.org>
6782
6783 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
6784 for variable new_offset.
6785 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6786 (aarch64_ftrace_insn_reloc_cb): Likewise.
6787 (aarch64_ftrace_insn_reloc_tb): Likewise.
6788 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
6789 PRIx64 instead of PRIx32.
6790
79e7fd4f
YQ
67912016-06-28 Yao Qi <yao.qi@linaro.org>
6792
6793 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
6794 (the_low_target): Install arm_get_syscall_trapinfo.
6795
061fc021
YQ
67962016-06-28 Yao Qi <yao.qi@linaro.org>
6797
6798 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
6799 function.
6800 (the_low_target): Install aarch64_get_syscall_trapinfo.
6801
4cc32bec
YQ
68022016-06-28 Yao Qi <yao.qi@linaro.org>
6803
6804 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
6805 Callers updated.
6806 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
6807 Remove parameter sysno.
6808 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
6809 sysret.
6810
782c1122
AA
68112016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6812
6813 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
6814 (s390_emit_ne_goto): Likewise.
6815 (s390_emit_lt_goto): Likewise.
6816 (s390_emit_le_goto): Likewise.
6817 (s390_emit_gt_goto): Likewise.
6818 (s390_emit_ge_goto): Likewise.
6819 (s390x_emit_eq_goto): Likewise.
6820 (s390x_emit_ne_goto): Likewise.
6821 (s390x_emit_lt_goto): Likewise.
6822 (s390x_emit_le_goto): Likewise.
6823 (s390x_emit_gt_goto): Likewise.
6824 (s390x_emit_ge_goto): Likewise.
6825 (s390_emit_ops_impl): Mark variable static.
6826 (s390x_emit_ops): Likewise.
6827
2e7b624b
YQ
68282016-06-17 Yao Qi <yao.qi@linaro.org>
6829
6830 * linux-low.c (handle_extended_wait): Call
6831 uninsert_reinsert_breakpoints for the parent process. Remove
6832 reinsert breakpoints from the child process. Reinsert them to
6833 the parent process when vfork is done.
6834 * mem-break.c (uninsert_reinsert_breakpoints): New function.
6835 (reinsert_reinsert_breakpoints): New function.
6836 * mem-break.h (uninsert_reinsert_breakpoints): Declare
6837 (reinsert_reinsert_breakpoints): Declare.
6838
8a81c5d7
YQ
68392016-06-17 Yao Qi <yao.qi@linaro.org>
6840
6841 * linux-low.c (handle_extended_wait): If the parent is doing
6842 step-over, remove the reinsert breakpoints from the forked child.
6843
f50bf8e5
YQ
68442016-06-17 Yao Qi <yao.qi@linaro.org>
6845
6846 * linux-low.c (unsuspend_all_lwps): Declare.
6847 (linux_low_filter_event): If thread exited, call finish_step_over.
6848 If step-over is finished, unsuspend other threads.
6849
8376a3cb
YQ
68502016-06-17 Yao Qi <yao.qi@linaro.org>
6851
6852 * linux-low.c (linux_resume_one_lwp_throw): Assert
6853 has_reinsert_breakpoints returns false.
6854 * mem-break.c (delete_disabled_breakpoints): Assert
6855 bp type isn't reinsert_breakpoint.
6856
f79b145d
YQ
68572016-06-17 Yao Qi <yao.qi@linaro.org>
6858
6859 * linux-low.c (maybe_hw_step): New function.
6860 (linux_resume_one_lwp_throw): Call maybe_hw_step.
6861 (finish_step_over): Switch current_thread to lwp temporarily,
6862 and assert has_reinsert_breakpoints returns true.
6863 (proceed_one_lwp): Call maybe_hw_step.
6864 * mem-break.c (has_reinsert_breakpoints): New function.
6865 * mem-break.h (has_reinsert_breakpoints): Declare.
6866
0ae534d2
JT
68672016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
6868
6869 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
6870
fcdad592
YQ
68712016-05-17 Yao Qi <yao.qi@linaro.org>
6872
6873 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
6874 instead of find_inferior.
6875
9e784964
YQ
68762016-05-05 Yao Qi <yao.qi@linaro.org>
6877
6878 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
6879 Initialize res to zero.
6880
cf2ebb6e
YQ
68812016-05-05 Yao Qi <yao.qi@linaro.org>
6882
6883 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
6884 to uint32_t.
6885
c1aebf87
UW
68862016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6887
6888 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
6889 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
6890 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
6891
35fd2deb 68922016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 6893 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
6894
6895 * tracepoint.c (write_inferior_int8): New function.
6896 (cmd_qtenable_disable): Write enable flag using
6897 write_inferior_int8.
6898
484b3c32
YQ
68992016-04-25 Yao Qi <yao.qi@linaro.org>
6900
6901 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
6902 (need_step_over_p): Return zero if the LWP has pending signals
6903 can be delivered on software single step target.
6904
85ba7d86
YQ
69052016-04-25 Yao Qi <yao.qi@linaro.org>
6906
6907 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
6908 return instead of error.
6909
3539aa13
YQ
69102016-04-22 Yao Qi <yao.qi@linaro.org>
6911
6912 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
6913 to 23.
6914
5b061e98
YQ
69152016-04-22 Yao Qi <yao.qi@linaro.org>
6916
6917 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
6918 signal when stepping over breakpoint with software single
6919 step.
6920
3451269c
PA
69212016-04-21 Pedro Alves <palves@redhat.com>
6922
6923 * linux-s390-low.c (s390_collect_ptrace_register)
6924 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
6925 add casts.
6926 (s390_check_regset): Use void * instead of gdb_byte *.
6927
a2358508
PA
69282016-04-20 Pedro Alves <palves@redhat.com>
6929
6930 * configure: Renegerate.
6931
6885166d
YQ
69322016-04-20 Yao Qi <yao.qi@linaro.org>
6933
6934 * linux-aarch32-low.c: Include "arch/arm-linux.h".
6935 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
6936 number 16.
6937 (arm_store_gregset): Likewise.
6938
2b863f51
WT
69392016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
6940
6941 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
6942 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
6943 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
6944 (amd64-avx-mpx-linux.c): New rules.
6945 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
6946 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
6947 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
6948 (srv_amd64_regobj): Add amd64-avx-mpx.o.
6949 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
6950 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
6951 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
6952 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
6953 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
6954 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
6955 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
6956 * linux-x86-low.c (x86_linux_read_description): Add case for
6957 X86_XSTATE_AVX_MPX_MASK.
6958 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
6959 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
6960 init_registers_i386_avx_mpx_linux.
6961 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6962 (initialize_low_tracepoint): Call
6963 init_registers_i386_avx_mpx_linux.
6964 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6965 (initialize_low_tracepoint): Call
6966 init_registers_amd64_avx_mpx_linux.
6967 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
6968 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
6969 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
6970 declarations.
6971
9b30624b
PA
69722016-04-18 Pedro Alves <palves@redhat.com>
6973
6974 * configure: Regenerate.
6975
45e3745e
AT
69762016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
6977
6978 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
6979 (aarch64_emit_sub): Likewise.
6980
2afc13ff
PA
69812016-04-12 Pedro Alves <palves@redhat.com>
6982
6983 * utils.c (prepare_to_throw_exception): Delete.
6984
6e774b13
SM
69852016-04-05 Simon Marchi <simon.marchi@ericsson.com>
6986
6987 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
6988
4dca19f8
MK
69892016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
6990
6991 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
6992
d0a9981f
MK
69932016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
6994
6995 * linux-aarch64-ipa.c: Add <elf.h> include.
6996 * linux-ppc-ipa.c: Add <elf.h> include.
6997 * linux-s390-ipa.c: Add <elf.h> include.
6998
252db07e
MK
69992016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7000
7001 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7002 (get_raw_reg_ptr): Likewise.
7003 (get_trace_state_variable_value_ptr): Likewise.
7004 (set_trace_state_variable_value_ptr): Likewise.
7005 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7006 char *.
7007
14e2b6d9
MK
70082016-03-31 Wei-cheng Wang <cole945@gmail.com>
7009 Marcin Kościelnicki <koriakin@0x04.net>
7010
7011 PR/17221
7012 * linux-ppc-low.c (emit_insns): New function.
7013 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7014 (ppc_emit_prologue): New function.
7015 (ppc_emit_epilogue): New function.
7016 (ppc_emit_add): New function.
7017 (ppc_emit_sub): New function.
7018 (ppc_emit_mul): New function.
7019 (ppc_emit_lsh): New function.
7020 (ppc_emit_rsh_signed): New function.
7021 (ppc_emit_rsh_unsigned): New function.
7022 (ppc_emit_ext): New function.
7023 (ppc_emit_zero_ext): New function.
7024 (ppc_emit_log_not): New function.
7025 (ppc_emit_bit_and): New function.
7026 (ppc_emit_bit_or): New function.
7027 (ppc_emit_bit_xor): New function.
7028 (ppc_emit_bit_not): New function.
7029 (ppc_emit_equal): New function.
7030 (ppc_emit_less_signed): New function.
7031 (ppc_emit_less_unsigned): New function.
7032 (ppc_emit_ref): New function.
7033 (ppc_emit_const): New function.
7034 (ppc_emit_reg): New function.
7035 (ppc_emit_pop): New function.
7036 (ppc_emit_stack_flush): New function.
7037 (ppc_emit_swap): New function.
7038 (ppc_emit_stack_adjust): New function.
7039 (ppc_emit_call): New function.
7040 (ppc_emit_int_call_1): New function.
7041 (ppc_emit_void_call_2): New function.
7042 (ppc_emit_if_goto): New function.
7043 (ppc_emit_goto): New function.
7044 (ppc_emit_eq_goto): New function.
7045 (ppc_emit_ne_goto): New function.
7046 (ppc_emit_lt_goto): New function.
7047 (ppc_emit_le_goto): New function.
7048 (ppc_emit_gt_goto): New function.
7049 (ppc_emit_ge_goto): New function.
7050 (ppc_write_goto_address): New function.
7051 (ppc_emit_ops_impl): New static variable.
7052 (ppc64v1_emit_prologue): New function.
7053 (ppc64v2_emit_prologue): New function.
7054 (ppc64_emit_epilogue): New function.
7055 (ppc64_emit_add): New function.
7056 (ppc64_emit_sub): New function.
7057 (ppc64_emit_mul): New function.
7058 (ppc64_emit_lsh): New function.
7059 (ppc64_emit_rsh_signed): New function.
7060 (ppc64_emit_rsh_unsigned): New function.
7061 (ppc64_emit_ext): New function.
7062 (ppc64_emit_zero_ext): New function.
7063 (ppc64_emit_log_not): New function.
7064 (ppc64_emit_bit_and): New function.
7065 (ppc64_emit_bit_or): New function.
7066 (ppc64_emit_bit_xor): New function.
7067 (ppc64_emit_bit_not): New function.
7068 (ppc64_emit_equal): New function.
7069 (ppc64_emit_less_signed): New function.
7070 (ppc64_emit_less_unsigned): New function.
7071 (ppc64_emit_ref): New function.
7072 (ppc64_emit_const): New function.
7073 (ppc64v1_emit_reg): New function.
7074 (ppc64v2_emit_reg): New function.
7075 (ppc64_emit_pop): New function.
7076 (ppc64_emit_stack_flush): New function.
7077 (ppc64_emit_swap): New function.
7078 (ppc64v1_emit_call): New function.
7079 (ppc64v2_emit_call): New function.
7080 (ppc64v1_emit_int_call_1): New function.
7081 (ppc64v2_emit_int_call_1): New function.
7082 (ppc64v1_emit_void_call_2): New function.
7083 (ppc64v2_emit_void_call_2): New function.
7084 (ppc64_emit_if_goto): New function.
7085 (ppc64_emit_eq_goto): New function.
7086 (ppc64_emit_ne_goto): New function.
7087 (ppc64_emit_lt_goto): New function.
7088 (ppc64_emit_le_goto): New function.
7089 (ppc64_emit_gt_goto): New function.
7090 (ppc64_emit_ge_goto): New function.
7091 (ppc64v1_emit_ops_impl): New static variable.
7092 (ppc64v2_emit_ops_impl): New static variable.
7093 (ppc_emit_ops): New function.
7094 (linux_low_target): Wire in ppc_emit_ops.
7095
a2174ba4
MK
70962016-03-31 Wei-cheng Wang <cole945@gmail.com>
7097 Marcin Kościelnicki <koriakin@0x04.net>
7098
7099 PR/17221
7100 * Makefile.in: Add powerpc-*-ipa.o
7101 * configure.srv: Add ipa_obj for powerpc*-linux.
7102 * linux-ppc-ipa.c: New file.
7103 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7104 includes.
7105 (PPC_FIELD): New macro.
7106 (PPC_SEXT): New macro.
7107 (PPC_OP6): New macro.
7108 (PPC_BO): New macro.
7109 (PPC_LI): New macro.
7110 (PPC_BD): New macro.
7111 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7112 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7113 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7114 (ppc_get_thread_area): New function.
7115 (is_elfv2_inferior): New function.
7116 (gen_ds_form): New function.
7117 (GEN_STD): New macro.
7118 (GEN_STDU): New macro.
7119 (GEN_LD): New macro.
7120 (GEN_LDU): New macro.
7121 (gen_d_form): New function.
7122 (GEN_ADDI): New macro.
7123 (GEN_ADDIS): New macro.
7124 (GEN_LI): New macro.
7125 (GEN_LIS): New macro.
7126 (GEN_ORI): New macro.
7127 (GEN_ORIS): New macro.
7128 (GEN_LWZ): New macro.
7129 (GEN_STW): New macro.
7130 (GEN_STWU): New macro.
7131 (gen_xfx_form): New function.
7132 (GEN_MFSPR): New macro.
7133 (GEN_MTSPR): New macro.
7134 (GEN_MFCR): New macro.
7135 (GEN_MTCR): New macro.
7136 (GEN_SYNC): New macro.
7137 (GEN_LWSYNC): New macro.
7138 (gen_x_form): New function.
7139 (GEN_OR): New macro.
7140 (GEN_MR): New macro.
7141 (GEN_LWARX): New macro.
7142 (GEN_STWCX): New macro.
7143 (GEN_CMPW): New macro.
7144 (gen_md_form): New function.
7145 (GEN_RLDICL): New macro.
7146 (GEN_RLDICR): New macro.
7147 (gen_i_form): New function.
7148 (GEN_B): New macro.
7149 (GEN_BL): New macro.
7150 (gen_b_form): New function.
7151 (GEN_BNE): New macro.
7152 (GEN_LOAD): New macro.
7153 (GEN_STORE): New macro.
7154 (gen_limm): New function.
7155 (gen_atomic_xchg): New function.
7156 (gen_call): New function.
7157 (ppc_relocate_instruction): New function.
7158 (ppc_install_fast_tracepoint_jump_pad): New function.
7159 (ppc_get_min_fast_tracepoint_insn_len): New function.
7160 (ppc_get_ipa_tdesc_idx): New function.
7161 (the_low_target): Wire in the new functions.
7162 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7163 tdescs.
7164 * linux-ppc-tdesc.h: New file.
7165
a13c4696
MK
71662016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7167
7168 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7169 (alloc_jump_pad_buffer): New function.
7170 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7171 (alloc_jump_pad_buffer): New function.
7172 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7173 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7174 (alloc_jump_pad_buffer): New function.
7175 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7176 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7177 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7178 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7179
1cda1512
MK
71802016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7181
7182 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7183 * linux-amd64-ipa.c: Likewise.
7184 * linux-i386-ipa.c: Likewise.
7185 * linux-s390-ipa.c: Likewise.
7186 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7187 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7188 set_trace_state_variable_value_ptr.
7189 (struct ipa_sym_addresses): Likewise.
7190 (symbol_list): Likewise.
7191 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7192 accessing gdb_collect directly.
7193 (gdb_collect_ptr_type): New typedef.
7194 (get_raw_reg_ptr_type): New typedef.
7195 (get_trace_state_variable_value_ptr_type): New typedef.
7196 (set_trace_state_variable_value_ptr_type): New typedef.
7197 (gdb_collect_ptr): New global.
7198 (get_raw_reg_ptr): New global.
7199 (get_trace_state_variable_value_ptr): New global.
7200 (set_trace_state_variable_value_ptr): New global.
7201 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7202 accessing get_raw_reg directly.
7203 (get_get_tsv_func_addr): Likewise for
7204 get_trace_state_variable_value_ptr.
7205 (get_set_tsv_func_addr): Likewise for
7206 set_trace_state_variable_value_ptr.
7207 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7208
72fb5488
SM
72092016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7210
7211 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7212
28170b88
MK
72132016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7214
7215 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7216 packets.
7217 (relocate_instruction): Remove own_buf.
7218 * server.c (own_buf): Make global.
7219 (handle_v_requests): Make global.
7220 * server.h (own_buf): New declaration.
7221 (handle_v_requests): New prototype.
7222
f39e8743
MK
72232016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7224
7225 PR 18377
7226 * linux-s390-low.c (add_insns): New function.
7227 (s390_emit_prologue): New function.
7228 (s390_emit_epilogue): New function.
7229 (s390_emit_add): New function.
7230 (s390_emit_sub): New function.
7231 (s390_emit_mul): New function.
7232 (s390_emit_lsh): New function.
7233 (s390_emit_rsh_signed): New function.
7234 (s390_emit_rsh_unsigned): New function.
7235 (s390_emit_ext): New function.
7236 (s390_emit_log_not): New function.
7237 (s390_emit_bit_and): New function.
7238 (s390_emit_bit_or): New function.
7239 (s390_emit_bit_xor): New function.
7240 (s390_emit_bit_not): New function.
7241 (s390_emit_equal): New function.
7242 (s390_emit_less_signed): New function.
7243 (s390_emit_less_unsigned): New function.
7244 (s390_emit_ref): New function.
7245 (s390_emit_if_goto): New function.
7246 (s390_emit_goto): New function.
7247 (s390_write_goto_address): New function.
7248 (s390_emit_litpool): New function.
7249 (s390_emit_const): New function.
7250 (s390_emit_call): New function.
7251 (s390_emit_reg): New function.
7252 (s390_emit_pop): New function.
7253 (s390_emit_stack_flush): New function.
7254 (s390_emit_zero_ext): New function.
7255 (s390_emit_swap): New function.
7256 (s390_emit_stack_adjust): New function.
7257 (s390_emit_set_r2): New function.
7258 (s390_emit_int_call_1): New function.
7259 (s390_emit_void_call_2): New function.
7260 (s390_emit_eq_goto): New function.
7261 (s390_emit_ne_goto): New function.
7262 (s390_emit_lt_goto): New function.
7263 (s390_emit_le_goto): New function.
7264 (s390_emit_gt_goto): New function.
7265 (s390_emit_ge_goto): New function.
7266 (s390x_emit_prologue): New function.
7267 (s390x_emit_epilogue): New function.
7268 (s390x_emit_add): New function.
7269 (s390x_emit_sub): New function.
7270 (s390x_emit_mul): New function.
7271 (s390x_emit_lsh): New function.
7272 (s390x_emit_rsh_signed): New function.
7273 (s390x_emit_rsh_unsigned): New function.
7274 (s390x_emit_ext): New function.
7275 (s390x_emit_log_not): New function.
7276 (s390x_emit_bit_and): New function.
7277 (s390x_emit_bit_or): New function.
7278 (s390x_emit_bit_xor): New function.
7279 (s390x_emit_bit_not): New function.
7280 (s390x_emit_equal): New function.
7281 (s390x_emit_less_signed): New function.
7282 (s390x_emit_less_unsigned): New function.
7283 (s390x_emit_ref): New function.
7284 (s390x_emit_if_goto): New function.
7285 (s390x_emit_const): New function.
7286 (s390x_emit_call): New function.
7287 (s390x_emit_reg): New function.
7288 (s390x_emit_pop): New function.
7289 (s390x_emit_stack_flush): New function.
7290 (s390x_emit_zero_ext): New function.
7291 (s390x_emit_swap): New function.
7292 (s390x_emit_stack_adjust): New function.
7293 (s390x_emit_int_call_1): New function.
7294 (s390x_emit_void_call_2): New function.
7295 (s390x_emit_eq_goto): New function.
7296 (s390x_emit_ne_goto): New function.
7297 (s390x_emit_lt_goto): New function.
7298 (s390x_emit_le_goto): New function.
7299 (s390x_emit_gt_goto): New function.
7300 (s390x_emit_ge_goto): New function.
7301 (s390_emit_ops): New function.
7302 (struct linux_target_ops): Fill in emit_ops hook.
7303
abd9baf9
MK
73042016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7305
7306 PR 18377
7307 * Makefile.in: Add s390 IPA files.
7308 * configure.srv: Build IPA for s390.
7309 * linux-s390-ipa.c: New file.
7310 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7311 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7312 (tdesc_s390_linux32): Likewise.
7313 (init_registers_s390_linux32v1): Likewise.
7314 (tdesc_s390_linux32v1): Likewise.
7315 (init_registers_s390_linux32v2): Likewise.
7316 (tdesc_s390_linux32v2): Likewise.
7317 (init_registers_s390_linux64): Likewise.
7318 (tdesc_s390_linux64): Likewise.
7319 (init_registers_s390_linux64v1): Likewise.
7320 (tdesc_s390_linux64v1): Likewise.
7321 (init_registers_s390_linux64v2): Likewise.
7322 (tdesc_s390_linux64v2): Likewise.
7323 (init_registers_s390_te_linux64): Likewise.
7324 (tdesc_s390_te_linux64): Likewise.
7325 (init_registers_s390_vx_linux64): Likewise.
7326 (tdesc_s390_vx_linux64): Likewise.
7327 (init_registers_s390_tevx_linux64): Likewise.
7328 (tdesc_s390_tevx_linux64): Likewise.
7329 (init_registers_s390x_linux64): Likewise.
7330 (tdesc_s390x_linux64): Likewise.
7331 (init_registers_s390x_linux64v1): Likewise.
7332 (tdesc_s390x_linux64v1): Likewise.
7333 (init_registers_s390x_linux64v2): Likewise.
7334 (tdesc_s390x_linux64v2): Likewise.
7335 (init_registers_s390x_te_linux64): Likewise.
7336 (tdesc_s390x_te_linux64): Likewise.
7337 (init_registers_s390x_vx_linux64): Likewise.
7338 (tdesc_s390x_vx_linux64): Likewise.
7339 (init_registers_s390x_tevx_linux64): Likewise.
7340 (tdesc_s390x_tevx_linux64): Likewise.
7341 (have_hwcap_s390_vx): New static variable.
7342 (s390_arch_setup): Fill have_hwcap_s390_vx.
7343 (s390_get_thread_area): New function.
7344 (s390_ft_entry_gpr_esa): New const.
7345 (s390_ft_entry_gpr_zarch): New const.
7346 (s390_ft_entry_misc): New const.
7347 (s390_ft_entry_fr): New const.
7348 (s390_ft_entry_vr): New const.
7349 (s390_ft_main_31): New const.
7350 (s390_ft_main_64): New const.
7351 (s390_ft_exit_fr): New const.
7352 (s390_ft_exit_vr): New const.
7353 (s390_ft_exit_misc): New const.
7354 (s390_ft_exit_gpr_esa): New const.
7355 (s390_ft_exit_gpr_zarch): New const.
7356 (append_insns): New function.
7357 (s390_relocate_instruction): New function.
7358 (s390_install_fast_tracepoint_jump_pad): New function.
7359 (s390_get_min_fast_tracepoint_insn_len): New function.
7360 (s390_get_ipa_tdesc_idx): New function.
7361 (struct linux_target_ops): Wire in the above functions.
7362 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7363 * linux-s390-tdesc.h: New file.
7364
a4105d04
MK
73652016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7366
7367 * linux-s390-low.c (s390_supports_tracepoints): New function.
7368 (struct linux_target_ops): Fill supports_tracepoints hook.
7369
35ac8b3e
YQ
73702016-03-18 Yao Qi <yao.qi@linaro.org>
7371
7372 * linux-low.c (lwp_signal_can_be_delivered): New function.
7373 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7374
94610ec4
YQ
73752016-03-18 Yao Qi <yao.qi@linaro.org>
7376
7377 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7378 0 if signal is enqueued. Remove 'signal' from one debugging
7379 message. Move one debugging message to some lines below.
7380 Remove code setting 'signal' to 0.
7381
80aea927
YQ
73822016-03-18 Yao Qi <yao.qi@linaro.org>
7383
7384 * linux-low.c (linux_low_filter_event): Remove redundant
7385 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7386
b04fd3be
MK
73872016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7388
7389 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7390 (struct linux_target_ops): Wire in the above.
7391
c40c8d4b
YQ
73922016-03-03 Yao Qi <yao.qi@linaro.org>
7393
7394 * linux-low.c: Update comments to start_step_over.
7395
0f8288ae
YQ
73962016-03-03 Yao Qi <yao.qi@linaro.org>
7397
7398 PR server/19736
7399 * linux-low.c (handle_extended_wait): Set child suspended
7400 if event_lwp->bp_reinsert isn't zero.
7401
fdbd04a8
YQ
74022016-03-02 Yao Qi <yao.qi@linaro.org>
7403
7404 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7405 enqueue_pending_signal.
7406
6896a8fa
MK
74072016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7408
7409 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7410 is actually loaded.
7411
ab503087
MK
74122016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7413
7414 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7415 (s390_regmap_3264) [!__s390x__]: New global.
7416 (s390_collect_ptrace_register): Skip map entries containing -1.
7417 (s390_supply_ptrace_register): Ditto.
7418 (s390_fill_gprs_high): New function.
7419 (s390_store_gprs_high): New function.
7420 (s390_regsets): Add NT_S390_HIGH_GPRS.
7421 (s390_get_hwcap): Enable on 31-bit.
7422 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7423 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7424 Detect NT_S390_HIGH_GPRS.
7425 (s390_usrregs_info_3264): Enable on 31-bit.
7426 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7427 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7428
ae91f625
MK
74292016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7430
7431 PR gdb/13808
7432 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7433 * configure.srv: Ditto.
7434 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7435 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7436 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7437 (init_registers_amd64_linux): Remove prototype.
7438 (tdesc_amd64_linux): Remove declaration.
7439 (get_ipa_tdesc): New function.
7440 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7441 initialize remaining tdescs.
7442 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7443 (init_registers_i386_linux): Remove prototype.
7444 (tdesc_i386_linux): Remove declaration.
7445 (get_ipa_tdesc): New function.
7446 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7447 initialize remaining tdescs.
7448 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7449 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7450 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7451 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7452 (x86_get_ipa_tdesc_idx): New function.
7453 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7454 * linux-x86-tdesc.h: New file.
7455 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7456 (target_get_ipa_tdesc_idx): New macro.
7457 * tracepoint.c (ipa_tdesc_idx): New macro.
7458 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7459 (symbol_list): Add ipa_tdesc_idx.
7460 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7461 (ipa_tdesc): Remove.
7462 (ipa_tdesc_idx): New variable.
7463 (get_context_regcache): Use get_ipa_tdesc.
7464 (gdb_collect): Ditto.
7465 (gdb_probe): Ditto.
7466 * tracepoint.h (get_ipa_tdesc): New prototype.
7467 (ipa_tdesc): Remove.
7468
e7ad2f14
PA
74692016-02-24 Pedro Alves <palves@redhat.com>
7470
7471 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7472 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7473 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7474 Factor out common code between the USE_SIGTRAP_SIGINFO and
7475 !USE_SIGTRAP_SIGINFO blocks.
7476 (linux_low_filter_event): Call save_stop_reason instead of
7477 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7478 Update comments.
7479 (linux_wait_1): Update comments.
7480
657f9cde
WW
74812016-02-24 Wei-cheng Wang <cole945@gmail.com>
7482
7483 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7484 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7485 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7486 ppc_insert_point, ppc_remove_point.
7487
b00b61e1
MK
74882016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7489
7490 * linux-s390-low.c (s390_supports_z_point_type): New function.
7491 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7492
553cb527
YQ
74932016-02-16 Yao Qi <yao.qi@linaro.org>
7494
7495 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7496 PC. Get pc from regcache_read_pc.
7497
a5652c21
YQ
74982016-02-12 Yao Qi <yao.qi@linaro.org>
7499
7500 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
7501 or linux_get_pc_32bit.
7502 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
7503
ed443b61
YQ
75042016-02-12 Yao Qi <yao.qi@linaro.org>
7505
7506 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
7507 arm_linux_get_next_pcs_fixup.
7508
020ecd38
MK
75092016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
7510
7511 * tracepoint.c (x_tracepoint_action_download): Change
7512 write_inferior_data_ptr to write_inferior_data_pointer.
7513 (cmd_qtstart): Likewise.
7514 (write_inferior_data_ptr): Remove.
7515 (download_agent_expr): Change write_inferior_data_ptr to
7516 write_inferior_data_pointer.
7517 (download_tracepoint_1): Likewise.
7518 (download_tracepoint): Likewise.
7519 (download_trace_state_variables): Likewise.
7520
7cae9051
WW
75212016-02-11 Wei-cheng Wang <cole945@gmail.com>
7522 Marcin Kościelnicki <koriakin@0x04.net>
7523
7524 * tracepoint.c (struct tracepoint_action_ops): Remove.
7525 (struct tracepoint_action): Remove ops.
7526 (m_tracepoint_action_download, r_tracepoint_action_download)
7527 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
7528 size and offset accordingly.
7529 (m_tracepoint_action_ops, r_tracepoint_action_ops)
7530 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
7531 (tracepoint_action_send, tracepoint_action_download): New functions.
7532 Helpers for trace action handlers.
7533 (add_tracepoint_action): Remove setup actions ops.
7534 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
7535
9f6a71b4
YQ
75362016-02-10 Yao Qi <yao.qi@linaro.org>
7537
7538 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
7539
1e94266c
SM
75402016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7541
7542 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
7543 to AC_OUTPUT.
7544 * configure: Regenerate.
7545
8adce034
SM
75462016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7547
7548 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
7549 void * to gdb_byte *.
7550 * linux-low.c (siginfo_fixup): Likewise.
7551 (linux_xfer_siginfo): Likewise.
7552 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
7553 Likewise.
7554 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7555
93813b37
WT
75562016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7557
7558 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
7559 to srv_tgtobj.
7560 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
7561 to srv_tgtobj.
7562 * linux-x86-low.c [__x86_64__]: Include
7563 "nat/amd64-linux-siginfo.h".
7564 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7565 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
7566 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
7567 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
7568 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
7569 (cpt_si_fd, si_timerid, si_overrun): Move from
7570 nat/amd64-linux-siginfo.c.
7571 * Makefile.in (amd64-linux-siginfo.o:): New rule.
7572
8424cc97
SM
75732016-01-28 Simon Marchi <simon.marchi@ericsson.com>
7574
7575 * server.c (skip_to_semicolon): Remove.
7576 (process_point_options): Use strchrnul instead of
7577 skip_to_semicolon.
7578
4d18591b
YQ
75792016-01-26 Yao Qi <yao.qi@linaro.org>
7580
7581 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
7582 * linux-low.c (install_software_single_step_breakpoints): Don't
7583 call regcache_read_pc.
7584 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7585 argument pc.
7586
d8020970
YQ
75872016-01-26 Yao Qi <yao.qi@linaro.org>
7588
7589 * linux-low.c (install_software_single_step_breakpoints): Call
7590 regcache_read_pc instead of get_pc.
7591
8b207339
YQ
75922016-01-26 Yao Qi <yao.qi@linaro.org>
7593
7594 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
7595 (unblock_async_io): Rename to ...
7596 (block_unblock_async_io): ... it. New function.
7597 (enable_async_io): Don't install SIGIO handler. Unblock it
7598 instead.
7599 (disable_async_io): Don't ignore SIGIO. Block it instead.
7600 (initialize_async_io): Install SIGIO handler. Don't call
7601 unblock_async_io.
7602
18879fef
YQ
76032016-01-26 Yao Qi <yao.qi@linaro.org>
7604
7605 * remote-utils.c (getpkt): If the buffer isn't empty, and the
7606 first character is '\003', call *the_target->request_interrupt.
7607
a0f8e08a
YQ
76082016-01-25 Yao Qi <yao.qi@linaro.org>
7609
7610 * remote-utils.c (new_thread_notify): Remove.
7611 (dead_thread_notify): Likewise.
7612 * remote-utils.h (new_thread_notify): Remove declaration.
7613 (dead_thread_notify): Likewise.
7614
cc5fd9ab
MK
76152016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
7616
7617 * gdb.trace/pending.exp: Fix expected message on continue.
7618
99e8eb11
MK
76192016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
7620
7621 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
7622 it works properly on big-endian machines where sizeof (CORE_ADDR)
7623 != sizeof (void *).
7624
a994041d
PA
76252016-01-21 Pedro Alves <palves@redhat.com>
7626
7627 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
7628 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
7629 * configure: Regenerate.
7630
f7a6a40d
YQ
76312016-01-21 Yao Qi <yao.qi@linaro.org>
7632
7633 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
7634 is_thumb and set it according to CPSR saved on the stack.
7635 (get_next_pcs_syscall_next_pc): Pass is_thumb to
7636 arm_sigreturn_next_pc.
7637
6f69e520
YQ
76382016-01-18 Yao Qi <yao.qi@linaro.org>
7639
7640 * linux-low.c (linux_set_pc_64bit): New function.
7641 (linux_get_pc_64bit): New function.
7642 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
7643 Declare.
7644 * linux-sparc-low.c (debug_threads): Remove declaration.
7645 (sparc_get_pc): Remove.
7646 (the_low_target): Use linux_get_pc_64bit instead of
7647 sparc_get_pc.
7648 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
7649 (the_low_target): Use linux_get_pc_64bit and
7650 linux_set_pc_64bit.
7651
276d4552
YQ
76522016-01-18 Yao Qi <yao.qi@linaro.org>
7653
7654 * linux-arm-low.c (debug_threads): Remove declaration.
7655 (arm_get_pc, arm_set_pc): Remove.
7656 (the_low_target): Use linux_get_pc_32bit and
7657 linux_set_pc_32bit.
7658 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
7659 (the_low_target): Use linux_get_pc_32bit and
7660 linux_set_pc_32bit.
7661 * linux-cris-low.c (debug_threads): Remove declaration.
7662 (cris_get_pc, cris_set_pc,): Remove.
7663 (the_low_target): Use linux_get_pc_32bit and
7664 linux_set_pc_32bit.
7665 * linux-crisv32-low.c (debug_threads): Remove declaration.
7666 (cris_get_pc, cris_set_pc): Remove.
7667 (the_low_target): Use linux_get_pc_32bit and
7668 linux_set_pc_32bit.
7669 * linux-low.c: Include inttypes.h.
7670 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
7671 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
7672 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
7673 (the_low_target): Use linux_get_pc_32bit and
7674 linux_set_pc_32bit.
7675 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
7676 (the_low_target): Use linux_get_pc_32bit and
7677 linux_set_pc_32bit.
7678 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
7679 (the_low_target): Use linux_get_pc_32bit and
7680 linux_set_pc_32bit.
7681 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
7682 (the_low_target): Use linux_get_pc_32bit and
7683 linux_set_pc_32bit.
7684 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
7685 (the_low_target): Use linux_get_pc_32bit and
7686 linux_set_pc_32bit.
7687
eb0edac8
GB
76882016-01-18 Gary Benson <gbenson@redhat.com>
7689
7690 * configure.ac (AC_FUNC_FORK): New check.
7691 * config.in: Regenerate.
7692 * configure: Likewise.
7693
1b451dda
YQ
76942016-01-14 Yao Qi <yao.qi@linaro.org>
7695
7696 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
7697 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
7698 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
7699 arm_get_next_pcs_ctor.
7700
82075af2
JS
77012016-01-12 Josh Stone <jistone@redhat.com>
7702 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7703
7704 * inferiors.h: Include "gdb_vecs.h".
7705 (struct process_info): Add syscalls_to_catch.
7706 * inferiors.c (remove_process): Free syscalls_to_catch.
7707 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
7708 syscall_return stops.
7709 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
7710 * server.c (handle_general_set): Handle QCatchSyscalls.
7711 (handle_query): Report support for QCatchSyscalls.
7712 * target.h (struct target_ops): Add supports_catch_syscall.
7713 (target_supports_catch_syscall): New macro.
7714 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
7715 (struct lwp_info): Add syscall_state.
7716 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
7717 Maintain syscall_state and syscalls_to_catch across exec.
7718 (get_syscall_trapinfo): New function, proxy to the_low_target.
7719 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
7720 (linux_low_filter_event): Toggle syscall_state entry/return for
7721 syscall traps, and set it ignored for all others.
7722 (gdb_catching_syscalls_p): New function.
7723 (gdb_catch_this_syscall_p): New function.
7724 (linux_wait_1): Handle SYSCALL_SIGTRAP.
7725 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
7726 (linux_supports_catch_syscall): New function.
7727 (linux_target_ops): Install it.
7728 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
7729 (the_low_target): Install it.
7730
8f13a3ce
MF
77312016-01-12 Mike Frysinger <vapier@gentoo.org>
7732
7733 * acinclude.m4: Include new ../warning.m4 file.
7734 * configure: Regenerated.
7735 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
7736
5b3da067
MF
77372016-01-12 Mike Frysinger <vapier@gentoo.org>
7738
7739 * ax.c (is_goto_target): Mark static.
7740 * linux-low.c (register_addr): Likewise.
7741 (linux_fetch_registers, linux_store_registers): Likewise.
7742 * mem-break.c (any_persistent_commands): Fix old prototype.
7743 (add_commands_to_breakpoint): Mark static.
7744 * regcache.c (find_register_by_name): Delete unused func.
7745 * remote-utils.c (hex_or_minus_one): Mark static.
7746 * server.c (monitor_show_help): Mark static.
7747 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
7748 handle_v_requests): Likewise.
7749
bc504a31
PA
77502016-01-12 Pedro Alves <palves@redhat.com>
7751
7752 Remove use of the registered trademark symbol throughout.
7753
5a0dd67a
YQ
77542016-01-08 Yao Qi <yao.qi@linaro.org>
7755
7756 * remote-utils.c (getpkt): If c is '\003', call target hook
7757 request_interrupt.
7758
b2ca446f
YQ
77592016-01-06 Yao Qi <yao.qi@linaro.org>
7760
7761 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
7762 linux-aarch32-low.c.
7763 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7764 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7765 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7766 (thumb2_breakpoint): Declare.
7767 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
7768 linux-aarch32-low.h.
7769 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7770 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7771 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7772
edd88788
JB
77732016-01-01 Joel Brobecker <brobecker@adacore.com>
7774
7775 * gdbreplay.c (gdbreplay_version): Change copyright year in
7776 version message.
7777 * server.c (gdbserver_version): Likewise.
7778
65da7f14
PP
77792015-12-28 Patrick Palka <patrick@parcs.ath.cx>
7780
7781 * server.c (crc32_table): Delete.
7782 (crc32): Use libiberty's xcrc32 function.
7783
4abd5ed2
JB
77842015-12-22 Joel Brobecker <brobecker@adacore.com>
7785
7786 * lynx-low.c (lynx_delete_thread_callback): New function.
7787 (lynx_mourn): Properly delete our process and all of its
7788 threads. Remove call to clear_inferiors.
7789
0e50fe5c
JB
77902015-12-22 Joel Brobecker <brobecker@adacore.com>
7791
7792 * target.c (thread_search_callback): Add check that
7793 the thread_stopped target callback is not NULL before
7794 calling it.
7795
35adc03f
YQ
77962015-12-21 Yao Qi <yao.qi@linaro.org>
7797
7798 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
7799 arm breakpoint.
7800
bd2b2909
AT
78012015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7802
7803 * server.c (handle_query): Call target_supports_software_single_step.
7804
7fe5e27e
AT
78052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7806
7807 * linux-low.c (single_step): New function.
7808 (linux_resume_one_lwp_throw): Call single_step.
7809 (start_step_over): Likewise.
7810
d9311bfa
AT
78112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7812
7813 * Makefile.in (SFILES): Append arch/arm-linux.c,
7814 arch/arm-get-next-pcs.c.
7815 (arm-linux.o): New rule.
7816 (arm-get-next-pcs.o): New rule.
7817 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
7818 arm-linux.o.
7819 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
7820 to linux-aarch32-low.c.
7821 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7822 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7823 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7824 (thumb2_breakpoint_len): Likewise.
7825 (arm_is_thumb_mode): Make non-static.
7826 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
7827 from linux-aarch32-low.c.
7828 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7829 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7830 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7831 (thumb2_breakpoint_len): Likewise.
7832 (arm_is_thumb_mode): New declaration.
7833 * linux-arm-low.c: Include arch/arm-linux.h
7834 aarch/arm-get-next-pcs.h, sys/syscall.h.
7835 (get_next_pcs_ops): New struct.
7836 (get_next_pcs_addr_bits_remove): New function.
7837 (get_next_pcs_is_thumb): New function.
7838 (get_next_pcs_read_memory_unsigned_integer): Likewise.
7839 (arm_sigreturn_next_pc): Likewise.
7840 (get_next_pcs_syscall_next_pc): Likewise.
7841 (arm_gdbserver_get_next_pcs): Likewise.
7842 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
7843 Initialize.
7844 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
7845 * server.h: Include gdb_vecs.h.
7846
68ce2059
AT
78472015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7848
7849 * Makefile.in (SFILES): Append common/common-regcache.c.
7850 (OBS): Append common-regcache.o.
7851 (common-regcache.o): New rule.
7852 * regcache.c (init_register_cache): Initialize cache to
7853 REG_UNAVAILABLE.
7854 (regcache_raw_read_unsigned): New function.
7855 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
7856 register_status enum.
7857
fa5308bd
AT
78582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7859
7860 * linux-aarch64-low.c (the_low_targets): Rename
7861 breakpoint_reinsert_addr to get_next_pcs.
7862 * linux-arm-low.c (the_low_targets): Likewise.
7863 * linux-bfin-low.c (the_low_targets): Likewise.
7864 * linux-cris-low.c (the_low_targets): Likewise.
7865 * linux-crisv32-low.c (the_low_targets): Likewise.
7866 * linux-low.c (can_software_single_step): Likewise.
7867 (install_software_single_step_breakpoints): New function.
7868 (start_step_over): Use install_software_single_step_breakpoints.
7869 * linux-low.h: New CORE_ADDR vector.
7870 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
7871 get_next_pcs.
7872 * linux-mips-low.c (the_low_targets): Likewise.
7873 * linux-nios2-low.c (the_low_targets): Likewise.
7874 * linux-sparc-low.c (the_low_targets): Likewise.
7875
4a6ed09b
PA
78762015-12-17 Pedro Alves <palves@redhat.com>
7877
7878 * linux-low.c (linux_kill_one_lwp): Remove references to
7879 LinuxThreads.
7880 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
7881 to 'kill'.
7882 (linux_init_signals): Delete.
7883 (initialize_low): Adjust.
7884 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
7885
7544db95
PA
78862015-12-16 Pedro Alves <palves@redhat.com>
7887
7888 * configure.ac (compiler warning flags): When testing a
7889 -Wno-foo option, check whether -Wfoo works instead.
7890 * configure: Regenerate.
7891
8020350c
DB
78922015-12-11 Don Breazeal <donb@codesourcery.com>
7893
7894 * server.c (process_serial_event): Don't exit from gdbserver
7895 in remote mode if there are still active inferiors.
7896
db91f502
YQ
78972015-12-11 Yao Qi <yao.qi@linaro.org>
7898
7899 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
7900 arm_breakpoint_at if the process is 32-bit.
7901
b37a6290
YQ
79022015-12-11 Yao Qi <yao.qi@linaro.org>
7903
7904 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
7905 arm breakpoint.
7906
17b1509a
YQ
79072015-12-07 Yao Qi <yao.qi@linaro.org>
7908
7909 * configure.srv: Append arm.o to srv_tgtobj for
7910 aarch64*-*-linux* target.
7911 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
7912 from linux-arm-low.c.
7913 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7914 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7915 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7916 (thumb2_breakpoint_len): Likewise.
7917 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
7918 (arm_breakpoint_kinds): Likewise.
7919 (arm_breakpoint_kind_from_pc): Likewise.
7920 (arm_sw_breakpoint_from_kind): Likewise.
7921 (arm_breakpoint_kind_from_current_state): Likewise.
7922 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
7923 (arm_sw_breakpoint_from_kind): Declare.
7924 (arm_breakpoint_kind_from_current_state): Declare.
7925 (arm_breakpoint_at): Declare.
7926 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
7927 arm_sw_breakpoint_from_kind if process is 32-bit.
7928 (aarch64_breakpoint_kind_from_pc): New function.
7929 (aarch64_breakpoint_kind_from_current_state): New function.
7930 (the_low_target): Initialize fields breakpoint_kind_from_pc
7931 and breakpoint_kind_from_current_state.
7932 * linux-arm-low.c (arm_breakpoint_kinds): Move to
7933 linux-aarch32-low.c.
7934 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
7935 (arm_breakpoint, arm_breakpoint_len): Likewise.
7936 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
7937 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7938 (arm_is_thumb_mode): Likewise.
7939 (arm_breakpoint_at): Likewise.
7940 (arm_breakpoint_kind_from_pc): Likewise.
7941 (arm_sw_breakpoint_from_kind): Likewise.
7942 (arm_breakpoint_kind_from_current_state): Likewise.
7943
7944 Revert:
7945 2015-08-04 Yao Qi <yao.qi@linaro.org>
7946
7947 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7948 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7949 * server.c (extended_protocol): Remove "static".
7950 * server.h (extended_protocol): Declare it.
7951
ece66d65
JS
79522015-12-04 Josh Stone <jistone@redhat.com>
7953
7954 * target.h (struct target_ops) <arch_setup>: Rename to ...
7955 (struct target_ops) <post_create_inferior>: ... this.
7956 (target_arch_setup): Rename to ...
7957 (target_post_create_inferior): ... this, calling post_create_inferior.
7958 * server.c (start_inferior): Update target_arch_setup calls to
7959 target_post_create_inferior.
7960 * linux-low.c (linux_low_ptrace_options): Forward declare.
7961 (linux_arch_setup): Update its comment for general use.
7962 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
7963 (struct linux_target_ops): Use linux_post_create_inferior.
7964 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
7965 to post_create_inferior.
7966 * nto-low.c (struct nto_target_ops): Likewise.
7967 * spu-low.c (struct spu_target_ops): Likewise.
7968 * win32-low.c (struct win32_target_ops): Likewise.
7969
e58c48b4
AT
79702015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
7971
7972 * linux-arm-low.c: Remove duplicate arch/arm.h include.
7973
fbec8956
AT
79742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7975
7976 * linux-arm-low.c (arm_reinsert_addr): Remove function.
7977 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
7978 * linux-cris-low.c (cris_reinsert_addr> Remove function.
7979 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7980 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
7981 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7982 * linux-mips-low.c (mips_reinsert_addr): Remove function.
7983 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7984 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
7985 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7986 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
7987 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7988
9b4c5f87
AT
79892015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7990
7991 * linux-low.c (linux_look_up_symbols): Don't call
7992 linux_supports_traceclone.
7993 * linux-low.h (thread_db_init): Remove use_events argument.
7994 * thread-db.c (thread_db_use_event): Remove global variable.
7995 (struct thread_db) <td_thr_event_enable_p>: Remove field.
7996 (struct thread_db) <td_create_bp>: Remove field.
7997 (thread_db_create_event): Remove function.
7998 (thread_db_enable_reporting): Likewise.
7999 (find_one_thread): Don't check for thread_db_use_events.
8000 (attach_thread): Likewise.
8001 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8002 (try_thread_db_load_1): Don't check for thread_db_use_events.
8003 (thread_db_init): Remove use_events argument and thread events
8004 handling.
8005 (remove_thread_event_breakpoints): Remove function.
8006 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8007
7d00775e
AT
80082015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8009
8010 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8011 New function.
8012 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8013 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8014 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8015 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8016 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8017 Initialize.
8018 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8019 New function.
8020 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8021 * linux-low.c (can_hardware_single_step): Use
8022 supports_hardware_single_step.
8023 (can_software_single_step): New function.
8024 (start_step_over): Call can_software_single_step.
8025 (linux_supports_hardware_single_step): New function.
8026 (struct target_ops) <supports_software_single_step>: Initialize.
8027 * linux-low.h (struct linux_target_ops)
8028 <supports_hardware_single_step>: Initialize.
8029 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8030 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8031 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8032 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8033 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8035 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8036 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8037 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8038 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8039 Initialize.
8040 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8041 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8042 Initialize.
8043 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8044 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8045 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8046 New function.
8047 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8048 * target.h (struct target_ops): <supports_software_single_step>:
8049 New field.
8050 (target_supports_software_single_step): New macro.
8051
2d97cd35
AT
80522015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8053
8054 * linux-low.c (linux_wait_1): Fix pc advance condition.
8055 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8056 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8057
769ef81f
AT
80582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8059
8060 * linux-arm-low.c (arm_is_thumb_mode): New function.
8061 (arm_breakpoint_at): Use arm_is_thumb_mode.
8062 (arm_breakpoint_kind_from_current_state): New function.
8063 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8064 Initialize.
8065 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8066 (linux_breakpoint_kind_from_current_state): New function.
8067 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8068 * linux-low.h (struct linux_target_ops)
8069 <breakpoint_kind_from_current_state>: New field.
8070 * target.h (struct target_ops): Likewise.
8071 (target_breakpoint_kind_from_current_state): New macro.
8072
1bebeeca
PA
80732015-11-30 Pedro Alves <palves@redhat.com>
8074
8075 * linux-low.c (linux_resume): Wake up the event loop before
8076 returning.
8077
a67a9fae
PA
80782015-11-30 Pedro Alves <palves@redhat.com>
8079
8080 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8081 check.
8082 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8083 to -1.
8084 * target.c (struct thread_search): New structure.
8085 (thread_search_callback): New function.
8086 (prev_general_thread): New global.
8087 (prepare_to_access_memory, done_accessing_memory): New functions.
8088 * target.h (prepare_to_access_memory, done_accessing_memory):
8089 Replace macros with function declarations.
8090
f2faf941
PA
80912015-11-30 Pedro Alves <palves@redhat.com>
8092
8093 PR 14618
8094 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8095 report TARGET_WAITKIND_NO_RESUMED.
8096 * remote-utils.c (prepare_resume_reply): Handle
8097 TARGET_WAITKIND_NO_RESUMED.
8098 * server.c (report_no_resumed): New global.
8099 (handle_query) <qSupported>: Handle "no-resumed+". Report
8100 "no-resumed+" support.
8101 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8102 return error if the client doesn't support no-resumed events.
8103 (push_stop_notification): New function.
8104 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8105 events if the client supports them.
8106
a681f9c9
PA
81072015-11-30 Pedro Alves <palves@redhat.com>
8108
8109 * linux-low.c (thread_still_has_status_pending_p): Don't check
8110 vCont;t here.
8111 (lwp_resumed): New function.
8112 (status_pending_p_callback): Return early if the LWP is not
8113 supposed to be resumed.
8114
65706a29
PA
81152015-11-30 Pedro Alves <palves@redhat.com>
8116
8117 * linux-low.c (handle_extended_wait): Assert that the LWP's
8118 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8119 thread create events, leave the new child's status pending.
8120 (linux_low_filter_event): If GDB wants to hear about thread exit
8121 events, leave the LWP marked dead and don't delete it.
8122 (linux_wait_for_event_filtered): Don't check for thread exit.
8123 (filter_exit_event): New function.
8124 (linux_wait_1): Use it, when returning an exit event.
8125 (linux_resume_one_lwp_throw): Assert that the LWP's
8126 waitstatus is TARGET_WAITKIND_IGNORE.
8127 * remote-utils.c (prepare_resume_reply): Handle
8128 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8129 * server.c (report_thread_events): New global.
8130 (handle_general_set): Handle QThreadEvents.
8131 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8132 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8133 TARGET_WAITKIND_THREAD_EXITED.
8134 * server.h (report_thread_events): Declare.
8135
56cf4bed
PA
81362015-11-30 Pedro Alves <palves@redhat.com>
8137
8138 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8139 the thread's last_resume_kind was resume_stop.
8140
500c1d85
PA
81412015-11-30 Pedro Alves <palves@redhat.com>
8142
8143 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8144 before returning.
8145
de979965
PA
81462015-11-30 Pedro Alves <palves@redhat.com>
8147
8148 * server.c (handle_v_requests): Handle vCtrlC.
8149
34c65914
PA
81502015-11-30 Pedro Alves <palves@redhat.com>
8151
8152 * gdbthread.h (find_any_thread_of_pid): Declare.
8153 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8154 functions.
8155 * server.c (handle_query): If current_thread is NULL, look for
8156 another thread of the selected process.
8157
79efa585 81582015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 8159 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
8160
8161 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8162 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8163 name in reply.
8164 * target.h (struct target_ops) <thread_name>: New field.
8165 (target_thread_name): New macro.
8166
80d82c19
JB
81672015-11-23 Joel Brobecker <brobecker@adacore.com>
8168
8169 * regcache.h (regcache_invalidate_pid): Add declaration.
8170 * regcache.c (regcache_invalidate_pid): New function, extracted
8171 from regcache_invalidate.
8172 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8173 Add trivial documentation comment.
8174 * lynx-low.c: Use regcache_invalidate_pid instead of
8175 regcache_invalidate.
8176
64da5dd5
JB
81772015-11-23 Joel Brobecker <brobecker@adacore.com>
8178
8179 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8180 and Elf64_auxv_t if the target is Android.
8181
37ce4055
DE
81822015-11-22 Doug Evans <xdje42@gmail.com>
8183
8184 * target.h: #include <sys/types.h>.
8185
06e03fff
PA
81862015-11-19 Pedro Alves <palves@redhat.com>
8187
8188 * linux-low.c (linux_process_qsupported): Change prototype.
8189 Adjust.
8190 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8191 Change prototype.
8192 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8193 and adjust to loop over all features.
8194 * server.c (handle_query) <qSupported>: Adjust to call
8195 target_process_qsupported once, passing it a vector of unprocessed
8196 features.
8197 * target.h (struct target_ops) <process_qsupported>: Change
8198 prototype.
8199 (target_process_qsupported): Adjust.
8200
9a084706
PA
82012015-11-19 Pedro Alves <palves@redhat.com>
8202
8203 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8204 mode.
8205 * configure: Regenerate.
8206
dad44a1f
PA
82072015-11-19 Pedro Alves <palves@redhat.com>
8208
8209 * configure: Regenerate.
8210
231c0592
YQ
82112015-11-19 Yao Qi <yao.qi@linaro.org>
8212
8213 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8214 type to uint32_t.
8215
6c1c9a8b
YQ
82162015-11-19 Yao Qi <yao.qi@linaro.org>
8217
8218 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8219 (struct aarch64_operand): Move enum out.
8220
9caa3311
YQ
82212015-11-19 Yao Qi <yao.qi@linaro.org>
8222
8223 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8224 struct user_fpsimd_state *.
8225 (aarch64_store_fpregset): Likewise.
8226
6a69a054
YQ
82272015-11-19 Yao Qi <yao.qi@linaro.org>
8228
8229 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8230 struct user_pt_regs *.
8231 (aarch64_store_gregset): Likewise.
8232
1798301e
PA
82332015-11-18 Pedro Alves <palves@redhat.com>
8234
8235 * Makefile.in (all_object_files): Add $IPA_OBJS.
8236
ce7715e2
PA
82372015-11-17 Pedro Alves <palves@redhat.com>
8238
8239 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8240 GDB_SIGNAL_0 and gdb_signal_to_string.
8241
c0879059
PA
82422015-11-17 Pedro Alves <palves@redhat.com>
8243
8244 * win32-low.c (handle_output_debug_string): Remove parameter.
8245 (win32_kill): Remove our_status local and adjust call to
8246 handle_output_debug_string.
8247 (get_child_debug_event): Adjust call to
8248 handle_output_debug_string.
8249
1996e237
SM
82502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8251
8252 * linux-mips-low.c (mips_fill_gregset): Add cast.
8253 (mips_store_gregset): Likewise.
8254 (mips_fill_fpregset): Likewise.
8255 (mips_store_fpregset): Likewise.
8256
cbec665b
SM
82572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8258
8259 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8260 priv.
8261
eb3e3c67
SM
82622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8263
8264 * linux-mips-low.c (mips_linux_new_thread): Change type of
8265 watch_type to enum target_hw_bp_type.
8266
171de4b8
SM
82672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8268
8269 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8270 Change return type to arm_hwbp_type.
8271
04248ead
SM
82722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8273
8274 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8275 (arm_store_gregset): Likewise.
8276 * linux-arm-low.c (arm_get_hwcap): Likewise.
8277 (arm_read_description): Likewise.
8278
04b3479c
SM
82792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8280
8281 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8282
2bc84e8a
SM
82832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8284
8285 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8286 (ppc_fill_vsxregset): Likewise.
8287 (ppc_store_vsxregset): Likewise.
8288 (ppc_fill_vrregset): Likewise.
8289 (ppc_store_vrregset): Likewise.
8290 (ppc_fill_evrregset): Likewise.
8291 (ppc_store_evrregset): Likewise.
8292
e6c5bb05
SM
82932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8294
8295 * linux-ppc-low.c (ppc_usrregs_info): Remove
8296 forward-declaration.
8297 (ppc_arch_setup): Move lower in file.
8298
7ea45d72
SM
82992015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8300
8301 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8302 (ps_pdwrite): Likewise.
8303
69291610
HW
83042015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8305
8306 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8307 to after assert checks.
8308
b42945fd
SM
83092015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8310
8311 * proc-service.c (ps_pdread): Add/adjust casts.
8312 (ps_pdwrite): Add/adjust casts.
8313
d6f85c84
SM
83142015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8315
8316 * server.c (handle_search_memory_1): Cast return value of
8317 memmem.
8318
f98cd059
SM
83192015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8320
8321 * server.c (write_qxfer_response): Change type of data to
8322 gdb_byte *.
8323
d2412fa5
PA
83242015-10-29 Pedro Alves <palves@redhat.com>
8325
8326 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8327
c17414a2
PA
83282015-10-29 Pedro Alves <palves@redhat.com>
8329
8330 * tracepoint.c (clear_installed_tracepoints): Add casts.
8331
e053fbc4
PA
83322015-10-29 Pedro Alves <palves@redhat.com>
8333
8334 * server.c (handle_v_cont, process_serial_event): Add enum
8335 gdb_signal casts to signal parsing code.
8336
add67df8
PA
83372015-10-29 Pedro Alves <palves@redhat.com>
8338
8339 * linux-low.h (NULL_REGSET): Define.
8340 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8341 * linux-arm-low.c (arm_regsets): Likewise.
8342 * linux-crisv32-low.c (cris_regsets): Likewise.
8343 * linux-m68k-low.c (m68k_regsets): Likewise.
8344 * linux-mips-low.c (mips_regsets): Likewise.
8345 * linux-nios2-low.c (nios2_regsets): Likewise.
8346 * linux-ppc-low.c (ppc_regsets): Likewise.
8347 * linux-s390-low.c (s390_regsets): Likewise.
8348 * linux-sh-low.c (sh_regsets): Likewise.
8349 * linux-sparc-low.c (sparc_regsets): Likewise.
8350 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8351 * linux-tile-low.c (tile_regsets): Likewise.
8352 * linux-x86-low.c (x86_regsets): Likewise.
8353 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8354
50bc912a
PA
83552015-10-29 Pedro Alves <palves@redhat.com>
8356
8357 * linux-low.h (NULL_REGSET): Define.
8358 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8359 * linux-arm-low.c (arm_regsets): Likewise.
8360 * linux-crisv32-low.c (cris_regsets): Likewise.
8361 * linux-m68k-low.c (m68k_regsets): Likewise.
8362 * linux-mips-low.c (mips_regsets): Likewise.
8363 * linux-nios2-low.c (nios2_regsets): Likewise.
8364 * linux-ppc-low.c (ppc_regsets): Likewise.
8365 * linux-s390-low.c (s390_regsets): Likewise.
8366 * linux-sh-low.c (sh_regsets): Likewise.
8367 * linux-sparc-low.c (sparc_regsets): Likewise.
8368 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8369 * linux-tile-low.c (tile_regsets): Likewise.
8370 * linux-x86-low.c (x86_regsets): Likewise.
8371 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8372
682b2546
DE
83732015-10-26 Doug Evans <dje@google.com>
8374
8375 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8376
963843d4
DE
83772015-10-26 Doug Evans <dje@google.com>
8378
8379 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8380
d41401ac
DE
83812015-10-26 Doug Evans <dje@google.com>
8382
8383 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8384 for debug_printf.
8385 (attach_thread, find_new_threads_callback): Ditto.
8386
3db28855
AT
83872015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8388
8389 * mem-break.h (set_breakpoint_data): Remove.
8390
fb78e89c
AT
83912015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8392
8393 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8394 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8395 (initialize_low): Remove set_breakpoint_data call.
8396 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8397 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8398 (initialize_low): Remove set_breakpoint_data call.
8399 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8400 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8401 (initialize_low): Remove set_breakpoint_data call.
8402
2e6ee069
AT
84032015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8404
8405 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8406 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8407 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8408 * target.h (target_breakpoint_kind_from_pc): New macro.
8409
1652a986
AT
84102015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8411
8412 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8413 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8414 the default breakpoint kind.
8415
abeead09
AT
84162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8417
8418 * linux-arm-low.c (arm_supports_z_point_type): Add software
8419 breakpoint support.
8420
b0b4b501
AT
84212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8422
8423 * linux-arm-low.c: Refactor breakpoint definitions.
8424 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8425 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8426
8689682c
AT
84272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8428
8429 * Makefile.in: Add arm.c/o.
8430 * configure.srv: Likewise.
8431 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8432 (arm_breakpoint_kind_from_pc): New function.
8433 (arm_sw_breakpoint_from_kind): Return proper kind.
8434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8435
27165294
AT
84362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8437
8438 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8439 removal.
8440 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8441 (struct raw_breakpoint) <size>: Remove.
8442 (struct raw_breakpoint) <kind>: Add.
8443 (bp_size): New function.
8444 (bp_opcode): Likewise.
8445 (find_raw_breakpoint_at): Adjust for kind.
8446 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8447 (remove_memory_breakpoint): Adjust for kind call bp_size.
8448 (set_raw_breakpoint_at): Adjust for kind.
8449 (set_breakpoint): Likewise.
8450 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8451 (delete_raw_breakpoint): Adjust for kind.
8452 (delete_breakpoint): Likewise.
8453 (find_gdb_breakpoint): Likewise.
8454 (set_gdb_breakpoint_1): Likewise.
8455 (set_gdb_breakpoint): Likewise.
8456 (delete_gdb_breakpoint_1): Likewise.
8457 (delete_gdb_breakpoint): Likewise.
8458 (uninsert_raw_breakpoint): Likewise.
8459 (reinsert_raw_breakpoint): Likewise.
8460 (set_breakpoint_data): Remove.
8461 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8462 (check_mem_read): Adjust for kind call bp_size.
8463 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8464 (clone_one_breakpoint): Adjust for kind.
8465 * mem-break.h (set_gdb_breakpoint): Likewise.
8466 (delete_gdb_breakpoint): Likewise.
8467 * server.c (process_serial_event): Likewise.
8468
dd373349
AT
84692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8470
8471 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8472 (struct linux_target_ops) <breakpoint>: Remove.
8473 (struct linux_target_ops) <breakpoint_len>: Remove.
8474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8476 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8477 (arm_sw_breakpoint_from_kind): New function.
8478 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8479 (struct linux_target_ops) <breakpoint>: Remove.
8480 (struct linux_target_ops) <breakpoint_len>: Remove.
8481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8483 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8484 (struct linux_target_ops) <breakpoint>: Remove.
8485 (struct linux_target_ops) <breakpoint_len>: Remove.
8486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8488 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8489 (struct linux_target_ops) <breakpoint>: Remove.
8490 (struct linux_target_ops) <breakpoint_len>: Remove.
8491 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8492 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8493 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8494 and sw_breakpoint_from_kind to increment the pc.
8495 (linux_breakpoint_kind_from_pc): New function.
8496 (linux_sw_breakpoint_from_kind): New function.
8497 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8498 (initialize_low): Call breakpoint_kind_from_pc and
8499 sw_breakpoint_from_kind to replace breakpoint_data/len.
8500 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
8501 New field.
8502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
8503 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
8504 (struct linux_target_ops) <breakpoint>: Remove.
8505 (struct linux_target_ops) <breakpoint_len>: Remove.
8506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8508 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
8509 (struct linux_target_ops) <breakpoint>: Remove.
8510 (struct linux_target_ops) <breakpoint_len>: Remove.
8511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8513 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
8514 (struct linux_target_ops) <breakpoint>: Remove.
8515 (struct linux_target_ops) <breakpoint_len>: Remove.
8516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8518 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
8519 (struct linux_target_ops) <breakpoint>: Remove.
8520 (struct linux_target_ops) <breakpoint_len>: Remove.
8521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8523 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
8524 (struct linux_target_ops) <breakpoint>: Remove.
8525 (struct linux_target_ops) <breakpoint_len>: Remove.
8526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8528 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
8529 (struct linux_target_ops) <breakpoint>: Remove.
8530 (struct linux_target_ops) <breakpoint_len>: Remove.
8531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8533 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
8534 (struct linux_target_ops) <breakpoint>: Remove.
8535 (struct linux_target_ops) <breakpoint_len>: Remove.
8536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8538 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
8539 (struct linux_target_ops) <breakpoint>: Remove.
8540 (struct linux_target_ops) <breakpoint_len>: Remove.
8541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8543 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
8544 (struct linux_target_ops) <breakpoint>: Remove.
8545 (struct linux_target_ops) <breakpoint_len>: Remove.
8546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8548 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
8549 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
8550 (struct linux_target_ops) <breakpoint>: Remove.
8551 (struct linux_target_ops) <breakpoint_len>: Remove.
8552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8554 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
8555 (struct linux_target_ops) <breakpoint>: Remove.
8556 (struct linux_target_ops) <breakpoint_len>: Remove.
8557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8558 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8559
4cd98a19
AT
85602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8561
8562 * linux-cris-low.c (cris_get_pc): Remove void arg.
8563
774ee6d2
AR
85642015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8565
8566 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
8567 variable name.
8568
833dcd29
AR
85692015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8570
8571 * inferiors.c (thread_pid_matches_callback): New function.
8572 (find_thread_process): New function.
8573 (remove_thread): Reset current_thread.
8574 (remove_process): Assert threads have been removed first.
8575
8d689ee5
YQ
85762015-10-15 Yao Qi <yao.qi@linaro.org>
8577
8578 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
8579 if it is 3.
8580 (aarch64_remove_point): Likewise.
8581 * regcache.c (regcache_register_size): New function.
8582
1c2e1515
YQ
85832015-10-12 Yao Qi <yao.qi@linaro.org>
8584
8585 * linux-aarch64-low.c: Update all callers as emit_load_store
8586 is renamed to aarch64_emit_load_store.
8587
e1c587c3
YQ
85882015-10-12 Yao Qi <yao.qi@linaro.org>
8589
8590 * linux-aarch64-low.c: Update all callers of function renaming
8591 from emit_insn to aarch64_emit_insn.
8592
b6542f81
YQ
85932015-10-12 Yao Qi <yao.qi@linaro.org>
8594
8595 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
8596 arch/aarch64-insn.h.
8597 (struct aarch64_memory_operand): Likewise.
8598 (ENCODE): Likewise.
8599 (emit_insn): Move to arch/aarch64-insn.c.
8600 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
8601 (emit_load_store): Move to arch/aarch64-insn.c.
8602 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
8603 (can_encode_int32): Remove.
8604
246994ce
YQ
86052015-10-12 Yao Qi <yao.qi@linaro.org>
8606
8607 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
8608 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
8609 (aarch64_relocate_instruction): Likewise.
8610 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
8611 (struct aarch64_insn_visitor): Likewise.
8612
0badd99f
YQ
86132015-10-12 Yao Qi <yao.qi@linaro.org>
8614
8615 * linux-aarch64-low.c (struct aarch64_insn_data): New.
8616 (struct aarch64_insn_visitor): New.
8617 (struct aarch64_insn_relocation_data): New.
8618 (aarch64_ftrace_insn_reloc_b): New function.
8619 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8620 (aarch64_ftrace_insn_reloc_cb): Likewise.
8621 (aarch64_ftrace_insn_reloc_tb): Likewise.
8622 (aarch64_ftrace_insn_reloc_adr): Likewise.
8623 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
8624 (aarch64_ftrace_insn_reloc_others): Likewise.
8625 (visitor): New.
8626 (aarch64_relocate_instruction): Use visitor.
8627
dfaffe9d
YQ
86282015-10-12 Yao Qi <yao.qi@linaro.org>
8629
8630 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
8631 int. Add argument buf.
8632 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
8633 aarch64_relocate_instruction.
8634
70b439f0
YQ
86352015-10-12 Yao Qi <yao.qi@linaro.org>
8636
8637 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
8638 argument insn. Remove local variable insn. Don't call
8639 target_read_uint32.
8640 (aarch64_install_fast_tracepoint_jump_pad): Call
8641 target_read_uint32.
8642
7781c06f
YQ
86432015-09-30 Yao Qi <yao.qi@linaro.org>
8644
8645 * linux-aarch64-low.c (emit_movk): Shorten a long line.
8646 (emit_load_store_pair): Likewise.
8647
9a3c8263
SM
86482015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8649
8650 * dll.c (match_dll): Add cast(s).
8651 (unloaded_dll): Likewise.
8652 * linux-low.c (second_thread_of_pid_p): Likewise.
8653 (delete_lwp_callback): Likewise.
8654 (count_events_callback): Likewise.
8655 (select_event_lwp_callback): Likewise.
8656 (linux_set_resume_request): Likewise.
8657 * server.c (accumulate_file_name_length): Likewise.
8658 (emit_dll_description): Likewise.
8659 (handle_qxfer_threads_worker): Likewise.
8660 (visit_actioned_threads): Likewise.
8661 * thread-db.c (any_thread_of): Likewise.
8662 * tracepoint.c (same_process_p): Likewise.
8663 (match_blocktype): Likewise.
8664 (build_traceframe_info_xml): Likewise.
8665
224c3ddb
SM
86662015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8667
8668 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
8669 assignment.
8670 (gdb_unparse_agent_expr): Likewise.
8671 * hostio.c (require_data): Likewise.
8672 (handle_pread): Likewise.
8673 * linux-low.c (disable_regset): Likewise.
8674 (fetch_register): Likewise.
8675 (store_register): Likewise.
8676 (get_dynamic): Likewise.
8677 (linux_qxfer_libraries_svr4): Likewise.
8678 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
8679 (set_fast_tracepoint_jump): Likewise.
8680 (uninsert_fast_tracepoint_jumps_at): Likewise.
8681 (reinsert_fast_tracepoint_jumps_at): Likewise.
8682 (validate_inserted_breakpoint): Likewise.
8683 (clone_agent_expr): Likewise.
8684 * regcache.c (init_register_cache): Likewise.
8685 * remote-utils.c (putpkt_binary_1): Likewise.
8686 (decode_M_packet): Likewise.
8687 (decode_X_packet): Likewise.
8688 (look_up_one_symbol): Likewise.
8689 (relocate_instruction): Likewise.
8690 (monitor_output): Likewise.
8691 * server.c (handle_search_memory): Likewise.
8692 (handle_qxfer_exec_file): Likewise.
8693 (handle_qxfer_libraries): Likewise.
8694 (handle_qxfer): Likewise.
8695 (handle_query): Likewise.
8696 (handle_v_cont): Likewise.
8697 (handle_v_run): Likewise.
8698 (captured_main): Likewise.
8699 * target.c (write_inferior_memory): Likewise.
8700 * thread-db.c (try_thread_db_load_from_dir): Likewise.
8701 * tracepoint.c (init_trace_buffer): Likewise.
8702 (add_tracepoint_action): Likewise.
8703 (add_traceframe): Likewise.
8704 (add_traceframe_block): Likewise.
8705 (cmd_qtdpsrc): Likewise.
8706 (cmd_qtdv): Likewise.
8707 (cmd_qtstatus): Likewise.
8708 (response_source): Likewise.
8709 (response_tsv): Likewise.
8710 (cmd_qtnotes): Likewise.
8711 (gdb_collect): Likewise.
8712 (initialize_tracepoint): Likewise.
8713
afbe19f8
PL
87142015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8715
8716 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
8717 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
8718 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
8719 <NOP>: New.
8720 (enum aarch64_condition_codes): New enum.
8721 (w0): New static global.
8722 (fp): Likewise.
8723 (lr): Likewise.
8724 (struct aarch64_memory_operand) <type>: New
8725 MEMORY_OPERAND_POSTINDEX type.
8726 (postindex_memory_operand): New helper function.
8727 (emit_ret): New function.
8728 (emit_load_store_pair): New function, factored out of emit_stp
8729 with support for MEMORY_OPERAND_POSTINDEX.
8730 (emit_stp): Rewrite using emit_load_store_pair.
8731 (emit_ldp): New function.
8732 (emit_load_store): Likewise.
8733 (emit_ldr): Mention post-index instruction in comment.
8734 (emit_ldrh): New function.
8735 (emit_ldrb): New function.
8736 (emit_ldrsw): Mention post-index instruction in comment.
8737 (emit_str): Likewise.
8738 (emit_subs): New function.
8739 (emit_cmp): Likewise.
8740 (emit_and): Likewise.
8741 (emit_orr): Likewise.
8742 (emit_orn): Likewise.
8743 (emit_eor): Likewise.
8744 (emit_mvn): Likewise.
8745 (emit_lslv): Likewise.
8746 (emit_lsrv): Likewise.
8747 (emit_asrv): Likewise.
8748 (emit_mul): Likewise.
8749 (emit_sbfm): Likewise.
8750 (emit_sbfx): Likewise.
8751 (emit_ubfm): Likewise.
8752 (emit_ubfx): Likewise.
8753 (emit_csinc): Likewise.
8754 (emit_cset): Likewise.
8755 (emit_nop): Likewise.
8756 (emit_ops_insns): New helper function.
8757 (emit_pop): Likewise.
8758 (emit_push): Likewise.
8759 (aarch64_emit_prologue): New function.
8760 (aarch64_emit_epilogue): Likewise.
8761 (aarch64_emit_add): Likewise.
8762 (aarch64_emit_sub): Likewise.
8763 (aarch64_emit_mul): Likewise.
8764 (aarch64_emit_lsh): Likewise.
8765 (aarch64_emit_rsh_signed): Likewise.
8766 (aarch64_emit_rsh_unsigned): Likewise.
8767 (aarch64_emit_ext): Likewise.
8768 (aarch64_emit_log_not): Likewise.
8769 (aarch64_emit_bit_and): Likewise.
8770 (aarch64_emit_bit_or): Likewise.
8771 (aarch64_emit_bit_xor): Likewise.
8772 (aarch64_emit_bit_not): Likewise.
8773 (aarch64_emit_equal): Likewise.
8774 (aarch64_emit_less_signed): Likewise.
8775 (aarch64_emit_less_unsigned): Likewise.
8776 (aarch64_emit_ref): Likewise.
8777 (aarch64_emit_if_goto): Likewise.
8778 (aarch64_emit_goto): Likewise.
8779 (aarch64_write_goto_address): Likewise.
8780 (aarch64_emit_const): Likewise.
8781 (aarch64_emit_call): Likewise.
8782 (aarch64_emit_reg): Likewise.
8783 (aarch64_emit_pop): Likewise.
8784 (aarch64_emit_stack_flush): Likewise.
8785 (aarch64_emit_zero_ext): Likewise.
8786 (aarch64_emit_swap): Likewise.
8787 (aarch64_emit_stack_adjust): Likewise.
8788 (aarch64_emit_int_call_1): Likewise.
8789 (aarch64_emit_void_call_2): Likewise.
8790 (aarch64_emit_eq_goto): Likewise.
8791 (aarch64_emit_ne_goto): Likewise.
8792 (aarch64_emit_lt_goto): Likewise.
8793 (aarch64_emit_le_goto): Likewise.
8794 (aarch64_emit_gt_goto): Likewise.
8795 (aarch64_emit_ge_got): Likewise.
8796 (aarch64_emit_ops_impl): New static global variable.
8797 (aarch64_emit_ops): New target function, return
8798 &aarch64_emit_ops_impl.
8799 (struct linux_target_ops): Install it.
8800
bb903df0
PL
88012015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8802
8803 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
8804 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
8805 aarch64-ipa.o.
8806 * linux-aarch64-ipa.c: New file.
8807 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
8808 and endian.h.
8809 (aarch64_get_thread_area): New target method.
8810 (extract_signed_bitfield): New helper function.
8811 (aarch64_decode_ldr_literal): New function.
8812 (enum aarch64_opcodes): New enum.
8813 (struct aarch64_register): New struct.
8814 (struct aarch64_operand): New struct.
8815 (x0): New static global.
8816 (x1): Likewise.
8817 (x2): Likewise.
8818 (x3): Likewise.
8819 (x4): Likewise.
8820 (w2): Likewise.
8821 (ip0): Likewise.
8822 (sp): Likewise.
8823 (xzr): Likewise.
8824 (aarch64_register): New helper function.
8825 (register_operand): Likewise.
8826 (immediate_operand): Likewise.
8827 (struct aarch64_memory_operand): New struct.
8828 (offset_memory_operand): New helper function.
8829 (preindex_memory_operand): Likewise.
8830 (enum aarch64_system_control_registers): New enum.
8831 (ENCODE): New macro.
8832 (emit_insn): New helper function.
8833 (emit_b): New function.
8834 (emit_bcond): Likewise.
8835 (emit_cb): Likewise.
8836 (emit_tb): Likewise.
8837 (emit_blr): Likewise.
8838 (emit_stp): Likewise.
8839 (emit_ldp_q_offset): Likewise.
8840 (emit_stp_q_offset): Likewise.
8841 (emit_load_store): Likewise.
8842 (emit_ldr): Likewise.
8843 (emit_ldrsw): Likewise.
8844 (emit_str): Likewise.
8845 (emit_ldaxr): Likewise.
8846 (emit_stxr): Likewise.
8847 (emit_stlr): Likewise.
8848 (emit_data_processing_reg): Likewise.
8849 (emit_data_processing): Likewise.
8850 (emit_add): Likewise.
8851 (emit_sub): Likewise.
8852 (emit_mov): Likewise.
8853 (emit_movk): Likewise.
8854 (emit_mov_addr): Likewise.
8855 (emit_mrs): Likewise.
8856 (emit_msr): Likewise.
8857 (emit_sevl): Likewise.
8858 (emit_wfe): Likewise.
8859 (append_insns): Likewise.
8860 (can_encode_int32_in): New helper function.
8861 (aarch64_relocate_instruction): New function.
8862 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
8863 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
8864 (struct linux_target_ops): Install aarch64_get_thread_area,
8865 aarch64_install_fast_tracepoint_jump_pad and
8866 aarch64_get_min_fast_tracepoint_insn_len.
8867
787749ea
PL
88682015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8869
8870 * Makefile.in (aarch64-insn.o): New rule.
8871 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
8872
9812b2e6
YQ
88732015-09-21 Yao Qi <yao.qi@linaro.org>
8874
8875 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
8876
18fe412b
YQ
88772015-09-21 Yao Qi <yao.qi@linaro.org>
8878
8879 * tracepoint.c (max_jump_pad_size): Remove.
8880
a0cc84cd
YQ
88812015-09-18 Yao Qi <yao.qi@linaro.org>
8882
8883 * linux-aarch64-low.c: Don't include sys/uio.h.
8884 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
8885
d78908cf
WW
88862015-09-16 Wei-cheng Wang <cole945@gmail.com>
8887
8888 * tracepoint.c (eval_result_type): Change prototype.
8889 (condition_true_at_tracepoint): Fix argument to compiled_cond.
8890
d57e0d50
PA
88912015-09-15 Pedro Alves <palves@redhat.com>
8892
8893 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
8894 Check whether to report exec events instead of checking whether
8895 multiprocess is enabled.
8896
5a676acc
PA
88972015-09-15 Pedro Alves <palves@redhat.com>
8898
8899 PR remote/18965
8900 * remote-utils.c (prepare_resume_reply): Merge
8901 TARGET_WAITKIND_VFORK_DONE switch case with the
8902 TARGET_WAITKIND_FORKED case.
8903
7c5d0fad
YQ
89042015-09-15 Yao Qi <yao.qi@linaro.org>
8905
8906 * server.c (handle_query): Check string comparison using
8907 "else if" instead of "if".
8908
750ce8d1
YQ
89092015-09-15 Yao Qi <yao.qi@linaro.org>
8910
8911 * server.c (vCont_supported): New global variable.
8912 (handle_query): Set vCont_supported to 1 if "vContSupported+"
8913 matches. Append ";vContSupported+" to own_buf.
8914 (handle_v_requests): Append ";s;S" to own_buf if target supports
8915 hardware single step or vCont_supported is false.
8916 (capture_main): Set vCont_supported to zero.
8917
70b90b91
YQ
89182015-09-15 Yao Qi <yao.qi@linaro.org>
8919
8920 * linux-low.c (linux_supports_conditional_breakpoints): Rename
8921 it to ...
8922 (linux_supports_hardware_single_step): ... New function.
8923 (linux_target_ops): Update.
8924 * lynx-low.c (lynx_target_ops): Set field
8925 supports_hardware_single_step to target_can_do_hardware_single_step.
8926 * nto-low.c (nto_target_ops): Likewise.
8927 * spu-low.c (spu_target_ops): Likewise.
8928 * win32-low.c (win32_target_ops): Likewise.
8929 * target.c (target_can_do_hardware_single_step): New function.
8930 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8931 Remove. <supports_hardware_single_step>: New field.
8932 (target_supports_conditional_breakpoints): Remove.
8933 (target_supports_hardware_single_step): New macro.
8934 (target_can_do_hardware_single_step): Declare.
8935 * server.c (handle_query): Use target_supports_hardware_single_step
8936 instead of target_supports_conditional_breakpoints.
8937
ade90bde
YQ
89382015-09-15 Yao Qi <yao.qi@linaro.org>
8939
8940 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
8941 function.
8942 (struct linux_target_ops the_low_target): Install
8943 aarch64_linux_siginfo_fixup.
8944
94585166
DB
89452015-09-11 Don Breazeal <donb@codesourcery.com>
8946 Luis Machado <lgustavo@codesourcery.com>
8947
8948 * linux-low.c (linux_mourn): Static declaration.
8949 (linux_arch_setup): Move in front of
8950 handle_extended_wait.
8951 (linux_arch_setup_thread): New function.
8952 (handle_extended_wait): Handle exec events. Call
8953 linux_arch_setup_thread. Make event_lwp argument a
8954 pointer-to-a-pointer.
8955 (check_zombie_leaders): Do not check stopped threads.
8956 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
8957 (linux_low_filter_event): Add lwp and thread for exec'ing
8958 non-leader thread if leader thread has been deleted.
8959 Refactor code into linux_arch_setup_thread and call it.
8960 Pass child lwp pointer by reference to handle_extended_wait.
8961 (linux_wait_for_event_filtered): Update comment.
8962 (linux_wait_1): Prevent clobbering exec event status.
8963 (linux_supports_exec_events): New function.
8964 (linux_target_ops) <supports_exec_events>: Initialize new member.
8965 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
8966 new member.
8967 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
8968 * server.c (report_exec_events): New global variable.
8969 (handle_query): Handle qSupported query for exec-events feature.
8970 (captured_main): Initialize report_exec_events.
8971 * server.h (report_exec_events): Declare new global variable.
8972 * target.h (struct target_ops) <supports_exec_events>: New
8973 member.
8974 (target_supports_exec_events): New macro.
8975 * win32-low.c (win32_target_ops) <supports_exec_events>:
8976 Initialize new member.
8977
0568462b
MM
89782015-09-09 Markus Metzger <markus.t.metzger@intel.com>
8979
8980 * linux-low.c (linux_low_enable_btrace): Remove.
8981 (linux_target_ops): Replace linux_low_enable_btrace with
8982 linux_enable_btrace.
8983
39edd165
YQ
89842015-09-03 Yao Qi <yao.qi@linaro.org>
8985
8986 * linux-aarch64-low.c (aarch64_insert_point): Call
8987 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
8988 returns true.
8989
1db33b5a
UW
89902015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8991
8992 * linux-low.c (check_stopped_by_breakpoint): Use
8993 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
8994
ab290430
PA
89952015-08-27 Pedro Alves <palves@redhat.com>
8996
8997 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
8998
8d749320
SM
89992015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9000
6711b7f8
SM
9001 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9002 the XNEW-family equivalent.
8d749320
SM
9003 (compile_bytecodes): Likewise.
9004 * dll.c (loaded_dll): Likewise.
9005 * event-loop.c (append_callback_event): Likewise.
9006 (create_file_handler): Likewise.
9007 (create_file_event): Likewise.
9008 * hostio.c (handle_open): Likewise.
9009 * inferiors.c (add_thread): Likewise.
9010 (add_process): Likewise.
9011 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9012 * linux-arm-low.c (arm_new_process): Likewise.
9013 (arm_new_thread): Likewise.
9014 * linux-low.c (add_to_pid_list): Likewise.
9015 (linux_add_process): Likewise.
9016 (handle_extended_wait): Likewise.
9017 (add_lwp): Likewise.
9018 (enqueue_one_deferred_signal): Likewise.
9019 (enqueue_pending_signal): Likewise.
9020 (linux_resume_one_lwp_throw): Likewise.
9021 (linux_resume_one_thread): Likewise.
9022 (linux_read_memory): Likewise.
9023 (linux_write_memory): Likewise.
9024 * linux-mips-low.c (mips_linux_new_process): Likewise.
9025 (mips_linux_new_thread): Likewise.
9026 (mips_add_watchpoint): Likewise.
9027 * linux-x86-low.c (initialize_low_arch): Likewise.
9028 * lynx-low.c (lynx_add_process): Likewise.
9029 * mem-break.c (set_raw_breakpoint_at): Likewise.
9030 (set_breakpoint): Likewise.
9031 (add_condition_to_breakpoint): Likewise.
9032 (add_commands_to_breakpoint): Likewise.
9033 (clone_agent_expr): Likewise.
9034 (clone_one_breakpoint): Likewise.
9035 * regcache.c (new_register_cache): Likewise.
9036 * remote-utils.c (look_up_one_symbol): Likewise.
9037 * server.c (queue_stop_reply): Likewise.
9038 (start_inferior): Likewise.
9039 (queue_stop_reply_callback): Likewise.
9040 (handle_target_event): Likewise.
9041 * spu-low.c (fetch_ppc_memory): Likewise.
9042 (store_ppc_memory): Likewise.
9043 * target.c (set_target_ops): Likewise.
9044 * thread-db.c (thread_db_load_search): Likewise.
9045 (try_thread_db_load_1): Likewise.
9046 * tracepoint.c (add_tracepoint): Likewise.
9047 (add_tracepoint_action): Likewise.
9048 (create_trace_state_variable): Likewise.
9049 (cmd_qtdpsrc): Likewise.
9050 (cmd_qtro): Likewise.
9051 (add_while_stepping_state): Likewise.
9052 * win32-low.c (child_add_thread): Likewise.
9053 (get_image_name): Likewise.
9054
ed8b7b42
YQ
90552015-08-25 Yao Qi <yao.qi@linaro.org>
9056
9057 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9058
db3cb7cb
YQ
90592015-08-25 Yao Qi <yao.qi@linaro.org>
9060
9061 * Makefile.in (aarch64-linux.o): New rule.
9062 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9063 srv_tgtobj.
9064 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9065 (aarch64_init_debug_reg_state): Make it extern.
9066 (aarch64_linux_prepare_to_resume): Remove.
9067
f6011a1c
YQ
90682015-08-25 Yao Qi <yao.qi@linaro.org>
9069
9070 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9071 lwp_arch_private_info and ptid_of_lwp.
9072
88e2cf7e
YQ
90732015-08-25 Yao Qi <yao.qi@linaro.org>
9074
9075 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9076 Find proc_info by find_process_pid. All callers updated.
9077
5e35436e
YQ
90782015-08-25 Yao Qi <yao.qi@linaro.org>
9079
9080 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9081 Remove.
9082 (debug_reg_change_callback): Remove.
9083 (aarch64_notify_debug_reg_change): Remove.
9084
4a8a7965
YQ
90852015-08-25 Yao Qi <yao.qi@linaro.org>
9086
9087 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9088 Call current_lwp_ptid.
9089
32a271ee
YQ
90902015-08-25 Yao Qi <yao.qi@linaro.org>
9091
9092 * linux-aarch64-low.c (debug_reg_change_callback): Use
9093 debug_printf.
9094
0d51c8d7
YQ
90952015-08-25 Yao Qi <yao.qi@linaro.org>
9096
9097 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9098
31a43dd5
YQ
90992015-08-25 Yao Qi <yao.qi@linaro.org>
9100
9101 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9102
8ee52567
YQ
91032015-08-25 Yao Qi <yao.qi@linaro.org>
9104
9105 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9106 the code.
9107
ff3f0f45
YQ
91082015-08-25 Yao Qi <yao.qi@linaro.org>
9109
9110 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9111 Remove.
9112 (debug_reg_change_callback): Remove argument entry and add argument
9113 lwp. Remove local variable thread. Don't print thread id in the
9114 debugging output. Don't check whether pid of thread equals to pid.
9115 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9116 iterate_over_lwps instead find_inferior.
9117
3d40fbb5
PA
91182015-08-24 Pedro Alves <palves@redhat.com>
9119
9120 * inferiors.c (get_first_process): New function.
9121 * inferiors.h (get_first_process): New declaration.
9122 * remote-utils.c (read_ptid): Default to the first process in the
9123 list, instead of to the current thread's process.
9124
438e1e42
PA
91252015-08-24 Pedro Alves <palves@redhat.com>
9126
9127 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9128 * event-loop.c: Likewise.
9129 * remote-utils.c: Likewise.
9130 * tracepoint.c: Likewise.
9131
a8c6d4fc
PA
91322015-08-24 Pedro Alves <palves@redhat.com>
9133
9134 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9135 ptid_get_lwp.
9136
99b0bb12
PA
91372015-08-21 Pedro Alves <palves@redhat.com>
9138
9139 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9140 instead of literal 1.
9141
f8904751
PA
91422015-08-21 Pedro Alves <palves@redhat.com>
9143
9144 * tdesc.c (default_description): Explicitly zero-initialize.
9145
465a859e
PA
91462015-08-21 Pedro Alves <palves@redhat.com>
9147
9148 PR gdb/18749
9149 * inferiors.c (remove_thread): Discard any pending stop reply for
9150 this thread.
9151 * server.c (remove_all_on_match_pid): Rename to ...
9152 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9153 instead of a pid.
9154 (discard_queued_stop_replies): Change parameter to a ptid. Now
9155 extern.
9156 (handle_v_kill, kill_inferior_callback, captured_main)
9157 (process_serial_event): Adjust.
9158 * server.h (discard_queued_stop_replies): Declare.
9159
f0db101d
PA
91602015-08-21 Pedro Alves <palves@redhat.com>
9161
9162 * linux-low.c (wait_for_sigstop): Always switch to no thread
9163 selected if the previously current thread dies.
9164 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9165 process instead of the current thread's.
9166 * remote-utils.c (input_interrupt): Don't check if there's no
9167 current thread.
9168 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9169 current thread to the general thread fails, error out.
9170 (handle_qxfer_auxv, handle_qxfer_libraries)
9171 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9172 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9173 (handle_query): Check if there's a thread selected instead of
9174 checking whether there's any thread in the thread list.
9175 (handle_qxfer_threads, handle_qxfer_btrace)
9176 (handle_qxfer_btrace_conf): Don't error out early if there's no
9177 thread in the thread list.
9178 (handle_v_cont, myresume): Don't set the current thread to the
9179 continue thread.
9180 (process_serial_event) <Hg handling>: Also set thread_id if the
9181 previous general thread is still alive.
9182 (process_serial_event) <g/G handling>: If setting the current
9183 thread to the general thread fails, error out.
9184 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9185 thread's lwp instead of the current thread's.
9186 * target.c (set_desired_thread): If the desired thread was not
9187 found, leave the current thread pointing to NULL. Return an int
9188 (boolean) indicating success.
9189 * target.h (set_desired_thread): Change return type to int.
9190
40045d91
MF
91912015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9192
9193 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9194 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9195 #includes.
9196 (ps_get_thread_area): New function.
9197
45face3b
GB
91982015-08-19 Gary Benson <gbenson@redhat.com>
9199
9200 * hostio.c (handle_pread): Do not attempt to read more data
9201 than hostio_reply_with_data can fit in a packet.
9202
16d5f642
JB
92032015-08-18 Joel Brobecker <brobecker@adacore.com>
9204
9205 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9206
a738da3a
MF
92072015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9208
9209 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9210
33ebda9d
PA
92112015-08-06 Pedro Alves <palves@redhat.com>
9212
9213 * tracepoint.c (expr_eval_result): Now an int.
9214
a44892be
PA
92152015-08-06 Pedro Alves <palves@redhat.com>
9216
9217 * gdbthread.h (struct regcache): Forward declare.
9218 (struct thread_info) <regcache_data>: Now a struct regcache
9219 pointer.
9220 * inferiors.c (inferior_regcache_data)
9221 (set_inferior_regcache_data): Now work with struct regcache
9222 pointers.
9223 * inferiors.h (struct regcache): Forward declare.
9224 (inferior_regcache_data, set_inferior_regcache_data): Now work
9225 with struct regcache pointers.
9226 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9227 (free_register_cache_thread): Remove struct regcache pointer
9228 casts.
9229
608a1e46
PA
92302015-08-06 Pedro Alves <palves@redhat.com>
9231
9232 * server.c (captured_main): On error, print the exception message
9233 to stderr, and if run_once is set, throw a quit.
9234
f0ce0d3a
PA
92352015-08-06 Pedro Alves <palves@redhat.com>
9236
9237 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9238 the current thread.
9239
bf47e248
PA
92402015-08-06 Pedro Alves <palves@redhat.com>
9241
9242 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9243 reading beyond the passed in buffer length.
9244
b6b9ffcc
PL
92452015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9246
9247 * tracepoint.c (symbol_list) <required>: Remove.
9248
863d01bd
PA
92492015-08-06 Pedro Alves <palves@redhat.com>
9250
9251 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9252 count if stopping and suspending threads.
9253 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9254 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9255 (linux_detach): Complete an ongoing step-over.
9256 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9257 throughout.
9258 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9259 (linux_wait_1): If passing a signal to the inferior after
9260 finishing a step-over, unsuspend and re-resume all lwps. If we
9261 see a single-step event but the thread should be continuing, don't
9262 pass the trap to gdb.
9263 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9264 internal_error instead of gdb_assert.
9265 (enqueue_pending_signal): New function.
9266 (check_ptrace_stopped_lwp_gone): Add debug output.
9267 (start_step_over): Use internal_error instead of gdb_assert.
9268 (complete_ongoing_step_over): New function.
9269 (linux_resume_one_thread): Don't resume a suspended thread.
9270 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9271 it stepping.
9272
00db26fa
PA
92732015-08-06 Pedro Alves <palves@redhat.com>
9274
9275 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9276 (linux_thread_alive): Use lwp_is_marked_dead.
9277 (extended_event_reported): Delete.
9278 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9279 instead of extended_event_reported.
9280 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9281 as well.
9282 (lwp_is_marked_dead): New function.
9283 (lwp_running): Use lwp_is_marked_dead.
9284 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9285 comment.
9286
ad071a30
PA
92872015-08-06 Pedro Alves <palves@redhat.com>
9288
9289 * linux-low.c (linux_wait_1): Move fork event output out of the
9290 !report_to_gdb check. Pass event_child->waitstatus to
9291 target_waitstatus_to_string instead of ourstatus.
9292
524b57e6
YQ
92932015-08-04 Yao Qi <yao.qi@linaro.org>
9294
9295 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9296 if current_thread is 32 bit.
9297
6085d6f6
YQ
92982015-08-04 Yao Qi <yao.qi@linaro.org>
9299
9300 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9301 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9302 * server.c (extended_protocol): Remove "static".
9303 * server.h (extended_protocol): Declare it.
9304
8a7e4587
YQ
93052015-08-04 Yao Qi <yao.qi@linaro.org>
9306
9307 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9308 both aarch64 and aarch32.
9309 (aarch64_set_pc): Likewise.
9310
3b53ae99
YQ
93112015-08-04 Yao Qi <yao.qi@linaro.org>
9312
9313 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9314 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9315 arm-with-neon.xml to srv_xmlfiles.
9316 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9317 (is_64bit_tdesc): New function.
9318 (aarch64_linux_read_description): New function.
9319 (aarch64_arch_setup): Call aarch64_linux_read_description.
9320 (regs_info): Rename to regs_info_aarch64.
9321 (aarch64_regs_info): Return right regs_info.
9322 (initialize_low_arch): Call initialize_low_arch_aarch32.
9323
bd9e6534
YQ
93242015-08-04 Yao Qi <yao.qi@linaro.org>
9325
9326 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9327 * linux-aarch32-low.c: New file.
9328 * linux-aarch32-low.h: New file.
9329 * linux-arm-low.c (arm_fill_gregset): Move it to
9330 linux-aarch32-low.c.
9331 (arm_store_gregset): Likewise.
9332 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9333 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9334 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9335 (regs_info): Rename to regs_info_arm.
9336 (arm_regs_info): Return regs_info_aarch32 if
9337 have_ptrace_getregset is 1 and target description is
9338 arm_with_neon or arm_with_vfpv3.
9339 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9340 Call initialize_low_arch_aarch32 instead.
9341
ded48a5e
YQ
93422015-08-04 Yao Qi <yao.qi@linaro.org>
9343
9344 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9345 * linux-low.c: ... here.
9346 * linux-low.h (have_ptrace_getregset): Declare it.
9347
96e9210f
PA
93482015-08-04 Pedro Alves <palves@redhat.com>
9349
9350 * thread-db.c (struct thread_db): Use new typedefs.
9351 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9352 CHK calls.
9353 (disable_thread_event_reporting): Cast result of dlsym to
9354 destination function pointer type.
9355 (thread_db_mourn): Use td_ta_delete_ftype.
9356
af60a1ef
SL
93572015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9358
9359 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9360 arch variant.
9361 (CDX_BREAKPOINT): Define for R2.
9362 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9363 (the_low_target): Add comments.
9364
e8b41681
YQ
93652015-07-30 Yao Qi <yao.qi@linaro.org>
9366
9367 * linux-arm-low.c (arm_hwcap): Remove it.
9368 (arm_read_description): New local variable arm_hwcap. Don't
9369 set arm_hwcap to zero.
9370
89abb039
YQ
93712015-07-30 Yao Qi <yao.qi@linaro.org>
9372
9373 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9374 Use regcache->tdesc instead.
9375 (arm_store_wmmxregset): Likewise.
9376 (arm_fill_vfpregset): Likewise.
9377 (arm_store_vfpregset): Likewise.
9378
deca266c
YQ
93792015-07-30 Yao Qi <yao.qi@linaro.org>
9380
9381 * linux-arm-low.c: Include arch/arm.h.
9382 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9383 (arm_store_gregset): Likewise.
9384
aa58a496
SM
93852015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9386
9387 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9388 ptrace's 4th parameter.
9389
50904b25
YQ
93902015-07-27 Yao Qi <yao.qi@linaro.org>
9391
9392 * configure.srv (case aarch64*-*-linux*): Don't set
9393 srv_linux_usrregs.
9394
5826e159
PA
93952015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9396
9397 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9398 sys/ptrace.h.
9399 * linux-arm-low.c: Likewise.
9400 * linux-cris-low.c: Likewise.
9401 * linux-crisv32-low.c: Likewise.
9402 * linux-low.c: Likewise.
9403 * linux-m68k-low.c: Likewise.
9404 * linux-mips-low.c: Likewise.
9405 * linux-nios2-low.c: Likewise.
9406 * linux-s390-low.c: Likewise.
9407 * linux-sparc-low.c: Likewise.
9408 * linux-tic6x-low.c: Likewise.
9409 * linux-tile-low.c: Likewise.
9410 * linux-x86-low.c: Likewise.
9411
54019719
PA
94122015-07-24 Pedro Alves <palves@redhat.com>
9413
9414 * config.in: Regenerate.
9415 * configure: Regenerate.
9416
eb7aa561
PA
94172015-07-24 Pedro Alves <palves@redhat.com>
9418
9419 * acinclude.m4: Include ../ptrace.m4.
9420 * configure.ac: Call GDB_AC_PTRACE.
9421 * config.in, configure: Regenerate.
9422
55d7b841
YQ
94232015-07-24 Yao Qi <yao.qi@linaro.org>
9424
9425 * linux-low.c (linux_create_inferior): Remove setting to
9426 proc->priv->new_inferior.
9427 (linux_attach): Likewise.
9428 (linux_low_filter_event): Likewise.
9429 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9430
c06cbd92
YQ
94312015-07-24 Yao Qi <yao.qi@linaro.org>
9432
9433 * linux-low.c (linux_arch_setup): New function.
9434 (linux_low_filter_event): If proc->tdesc is NULL and
9435 proc->attached is true, call the_low_target.arch_setup.
9436 Otherwise, keep status pending, and return.
9437 (linux_resume_one_lwp_throw): Don't call get_pc if
9438 thread->while_stepping isn't NULL. Don't call
9439 get_thread_regcache if proc->tdesc is NULL.
9440 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9441 (linux_target_ops): Install arch_setup.
9442 * server.c (start_inferior): Call the_target->arch_setup.
9443 * target.h (struct target_ops) <arch_setup>: New field.
9444 (target_arch_setup): New marco.
9445 * lynx-low.c (lynx_target_ops): Update.
9446 * nto-low.c (nto_target_ops): Update.
9447 * spu-low.c (spu_target_ops): Update.
9448 * win32-low.c (win32_target_ops): Update.
9449
5ae3ebba
YQ
94502015-07-24 Yao Qi <yao.qi@linaro.org>
9451
9452 * linux-low.c (linux_add_process): Don't set
9453 proc->priv->new_inferior.
9454 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9455 (linux_attach): Likewise.
9456
eb97750b
YQ
94572015-07-24 Yao Qi <yao.qi@linaro.org>
9458
9459 * server.c (start_inferior): Code refactor.
9460
51aee833
YQ
94612015-07-24 Yao Qi <yao.qi@linaro.org>
9462
9463 * server.c (process_serial_event): Set general_thread.
9464
af1b22f3
YQ
94652015-07-21 Yao Qi <yao.qi@linaro.org>
9466
9467 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9468 aarch64_linux_get_debug_reg_capacity.
9469
554717a3
YQ
94702015-07-17 Yao Qi <yao.qi@linaro.org>
9471
9472 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9473 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9474 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9475 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9476 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9477 (AARCH64_HWP_ALIGNMENT): Likewise.
9478 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9479 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9480 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9481 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9482 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9483 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9484 (struct aarch64_debug_reg_state): Likewise.
9485 (struct arch_lwp_info): Likewise.
9486 (aarch64_align_watchpoint): Likewise.
9487 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9488 (aarch64_watchpoint_length): Likewise.
9489 (aarch64_point_encode_ctrl_reg): Likewise
9490 (aarch64_point_is_aligned): Likewise.
9491 (aarch64_align_watchpoint): Likewise.
9492 (aarch64_linux_set_debug_regs):
9493 (aarch64_dr_state_insert_one_point): Likewise.
9494 (aarch64_dr_state_remove_one_point): Likewise.
9495 (aarch64_handle_breakpoint): Likewise.
9496 (aarch64_handle_aligned_watchpoint): Likewise.
9497 (aarch64_handle_unaligned_watchpoint): Likewise.
9498 (aarch64_handle_watchpoint): Likewise.
9499
c67ca4de
YQ
95002015-07-17 Yao Qi <yao.qi@linaro.org>
9501
9502 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
9503 and don't aarch64_get_debug_reg_state. All callers update.
9504 (aarch64_handle_aligned_watchpoint): Likewise.
9505 (aarch64_handle_unaligned_watchpoint): Likewise.
9506 (aarch64_handle_watchpoint): Likewise.
9507 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
9508 (aarch64_remove_point): Likewise.
9509
25abf979
YQ
95102015-07-17 Yao Qi <yao.qi@linaro.org>
9511
9512 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
9513 debug_printf.
9514 (aarch64_handle_unaligned_watchpoint): Likewise.
9515
db1ff28b
JK
95162015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9517
9518 Revert the previous 3 commits:
9519 Move gdb_regex* to common/
9520 Move linux_find_memory_regions_full & co.
9521 gdbserver build-id attribute generator
9522
700ca40f
JK
95232015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9524 Jan Kratochvil <jan.kratochvil@redhat.com>
9525
9526 gdbserver build-id attribute generator.
9527 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
9528 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
9529 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
9530 (find_phdr): New.
9531 (get_dynamic): Use find_pdhr to traverse program headers.
9532 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
9533 (compare_mapping_entry_range, struct find_memory_region_callback_data)
9534 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
9535 (get_hex_build_id): New.
9536 (linux_qxfer_libraries_svr4): Add optional build-id attribute
9537 to reply XML document.
9538
9904185c
JK
95392015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9540 Jan Kratochvil <jan.kratochvil@redhat.com>
9541
9542 * target.c: Include target/target-utils.h and fcntl.h.
9543 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
9544 (target_fileio_read_stralloc): New functions.
9545
6e5b4429
JK
95462015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9547
9548 * Makefile.in (OBS): Add gdb_regex.o.
9549 (gdb_regex.o): New.
9550 * config.in: Rebuilt.
9551 * configure: Rebuilt.
9552
ddc98fbf
JK
95532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9554 Jan Kratochvil <jan.kratochvil@redhat.com>
9555
9556 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
9557 * Makefile.in (OBS): Add target-utils.o.
9558 (linux-maps.o, target-utils.o): New.
9559 * configure.srv (srv_linux_obj): Add linux-maps.o.
9560
e57bb7a0
PL
95612015-07-15 Pierre Langlois <pierre.langlois@arm.com>
9562
9563 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
9564 function, return 1.
9565 (the_low_target): Install it.
9566
586b02a9
PA
95672015-07-14 Pedro Alves <palves@redhat.com>
9568
9569 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
9570 Instead, ignore ECHILD, and throw an error for other errnos.
9571
58c1b36c
PA
95722015-07-10 Pedro Alves <palves@redhat.com>
9573
9574 * event-loop.c (struct callback_event) <data>: Change type to
9575 gdb_client_data instance instead of gdb_client_data pointer.
9576 (append_callback_event): Adjust.
9577
421530db
PL
95782015-07-10 Pierre Langlois <pierre.langlois@arm.com>
9579
9580 * linux-aarch64-low.c: Add comments for each linux_target_ops
9581 method. Remove comments already covered in target_ops and
9582 linux_target_ops definitions.
9583 (the_low_target): Add comments for each unimplemented method.
9584
c2d65f38
YQ
95852015-07-09 Yao Qi <yao.qi@linaro.org>
9586
9587 * linux-aarch64-low.c (aarch64_regmap): Remove.
9588 (aarch64_usrregs_info): Remove.
9589 (regs_info): Set field usrregs to NULL.
9590
b20a6524
MM
95912015-07-02 Markus Metzger <markus.t.metzger@intel.com>
9592
9593 * linux-low.c: Include "rsp-low.h"
9594 (linux_low_encode_pt_config, linux_low_encode_raw): New.
9595 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
9596 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
9597 (handle_btrace_enable_pt): New.
9598 (handle_btrace_general_set): Support "pt".
9599 (handle_btrace_conf_general_set): Support "pt:size".
9600
96c97461
PL
96012015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9602
9603 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
9604 Z_PACKET_SW_BP.
9605
37d66942
PL
96062015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9607
9608 * linux-aarch64-low.c: Remove comment about endianness.
9609 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
9610 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
9611 memcmp.
9612
dc06243f
GB
96132015-06-24 Gary Benson <gbenson@redhat.com>
9614
9615 * linux-i386-ipa.c (stdint.h): Do not include.
9616 * lynx-i386-low.c (stdint.h): Likewise.
9617 * lynx-ppc-low.c (stdint.h): Likewise.
9618 * mem-break.c (stdint.h): Likewise.
9619 * thread-db.c (stdint.h): Likewise.
9620 * tracepoint.c (stdint.h): Likewise.
9621 * win32-low.c (stdint.h): Likewise.
9622
124e13d9
SM
96232015-06-18 Simon Marchi <simon.marchi@ericsson.com>
9624
9625 * server.c (write_qxfer_response): Update call to
9626 remote_escape_output.
9627
909c2cda
JK
96282015-06-15 Aleksandar Ristovski <aristovski@qnx.com
9629 Jan Kratochvil <jan.kratochvil@redhat.com>
9630
9631 Merge multiple hex conversions.
9632 * gdbreplay.c (tohex): Rename to 'fromhex'.
9633 (logchar): Use fromhex.
9634
24c05f46
JK
96352015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9636
9637 * server.c (handle_qxfer_libraries): Set `version' attribute for
9638 <library-list>.
9639
14d2069a
GB
96402015-06-10 Gary Benson <gbenson@redhat.com>
9641
9642 * target.h (struct target_ops) <multifs_open>: New field.
9643 <multifs_unlink>: Likewise.
9644 <multifs_readlink>: Likewise.
9645 * linux-low.c (nat/linux-namespaces.h): New include.
9646 (linux_target_ops): Initialize the_target->multifs_open,
9647 the_target->multifs_unlink and the_target->multifs_readlink.
9648 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
9649 * hostio.c (hostio_fs_pid): New static variable.
9650 (hostio_handle_new_gdb_connection): New function.
9651 (handle_setfs): Likewise.
9652 (handle_open): Use the_target->multifs_open as appropriate.
9653 (handle_unlink): Use the_target->multifs_unlink as appropriate.
9654 (handle_readlink): Use the_target->multifs_readlink as
9655 appropriate.
9656 (handle_vFile): Handle vFile:setfs packets.
9657 * server.c (handle_query): Call hostio_handle_new_gdb_connection
9658 after target_handle_new_gdb_connection.
9659
4b8b5e72
GB
96602015-06-10 Gary Benson <gbenson@redhat.com>
9661
9662 * configure.ac (AC_CHECK_FUNCS): Add setns.
9663 * config.in: Regenerate.
9664 * configure: Likewise.
9665 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
9666 (linux-namespaces.o): New rule.
9667 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
9668
3ac2e371
GB
96692015-06-09 Gary Benson <gbenson@redhat.com>
9670
9671 * hostio.c (handle_open): Process mode argument with
9672 fileio_to_host_mode.
9673
ca9b78ce
YQ
96742015-06-01 Yao Qi <yao.qi@linaro.org>
9675
9676 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
9677 * linux-x86-low.c: Likewise.
9678
bfacd19d
DB
96792015-05-28 Don Breazeal <donb@codesourcery.com>
9680
9681 * linux-low.c (handle_extended_wait): Initialize
9682 thread_info.last_resume_kind for new fork children.
9683
452003ef
PA
96842015-05-15 Pedro Alves <palves@redhat.com>
9685
9686 * target.h (target_handle_new_gdb_connection): Rewrite using if
9687 wrapped in do/while.
9688
1041a03c
JB
96892015-05-14 Joel Brobecker <brobecker@adacore.com>
9690
9691 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
9692 * configure, config.in: Regenerate.
9693 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
9694 Declare typedef.
9695
c269dbdb
DB
96962015-05-12 Don Breazeal <donb@codesourcery.com>
9697
9698 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
9699 PTRACE_EVENT_VFORK_DONE.
9700 (linux_low_ptrace_options, extended_event_reported): Add vfork
9701 events.
9702 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
9703 and "vforkdone" for RSP 'T' Stop Reply Packet.
9704 * server.h (report_vfork_events): Declare
9705 global variable.
9706
3a8a0396
DB
97072015-05-12 Don Breazeal <donb@codesourcery.com>
9708
9709 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
9710 (the_low_target) <new_fork>: Initialize new member.
9711 * linux-arm-low.c (arm_new_fork): New function.
9712 (the_low_target) <new_fork>: Initialize new member.
9713 * linux-low.c (handle_extended_wait): Call new target function
9714 new_fork.
9715 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
9716 * linux-mips-low.c (mips_add_watchpoint): New function
9717 extracted from mips_insert_point.
9718 (the_low_target) <new_fork>: Initialize new member.
9719 (mips_linux_new_fork): New function.
9720 (mips_insert_point): Call mips_add_watchpoint.
9721 * linux-x86-low.c (x86_linux_new_fork): New function.
9722 (the_low_target) <new_fork>: Initialize new member.
9723
de0d863e
DB
97242015-05-12 Don Breazeal <donb@codesourcery.com>
9725
9726 * linux-low.c (handle_extended_wait): Implement return value,
9727 rename argument 'event_child' to 'event_lwp', handle
9728 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
9729 (linux_low_ptrace_options): New function.
9730 (linux_low_filter_event): Call linux_low_ptrace_options,
9731 use different argument fo linux_enable_event_reporting,
9732 use return value from handle_extended_wait.
9733 (extended_event_reported): New function.
9734 (linux_wait_1): Call extended_event_reported and set
9735 status to report fork events.
9736 (linux_write_memory): Add pid to debug message.
9737 (reset_lwp_ptrace_options_callback): New function.
9738 (linux_handle_new_gdb_connection): New function.
9739 (linux_target_ops): Initialize new structure member.
9740 * linux-low.h (struct lwp_info) <waitstatus>: New member.
9741 * lynx-low.c: Initialize new structure member.
9742 * remote-utils.c (prepare_resume_reply): Implement stop reason
9743 "fork" for "T" stop message.
9744 * server.c (handle_query): Call handle_new_gdb_connection.
9745 * server.h (report_fork_events): Declare global flag.
9746 * target.h (struct target_ops) <handle_new_gdb_connection>:
9747 New member.
9748 (target_handle_new_gdb_connection): New macro.
9749 * win32-low.c: Initialize new structure member.
9750
ddcbc397
DB
97512015-05-12 Don Breazeal <donb@codesourcery.com>
9752
9753 * mem-break.c (APPEND_TO_LIST): Define macro.
9754 (clone_agent_expr): New function.
9755 (clone_one_breakpoint): New function.
9756 (clone_all_breakpoints): New function.
9757 * mem-break.h: Declare new functions.
9758
89245bc0
DB
97592015-05-12 Don Breazeal <donb@codesourcery.com>
9760
9761 * linux-low.c (linux_supports_fork_events): New function.
9762 (linux_supports_vfork_events): New function.
9763 (linux_target_ops): Initialize new structure members.
9764 (initialize_low): Call linux_check_ptrace_features.
9765 * lynx-low.c (lynx_target_ops): Initialize new structure
9766 members.
9767 * server.c (report_fork_events, report_vfork_events):
9768 New global flags.
9769 (handle_query): Add new features to qSupported packet and
9770 response.
9771 (captured_main): Initialize new global variables.
9772 * target.h (struct target_ops) <supports_fork_events>:
9773 New member.
9774 <supports_vfork_events>: New member.
9775 (target_supports_fork_events): New macro.
9776 (target_supports_vfork_events): New macro.
9777 * win32-low.c (win32_target_ops): Initialize new structure
9778 members.
9779
835205d0
GB
97802015-05-12 Gary Benson <gbenson@redhat.com>
9781
9782 * server.c (handle_qxfer_exec_file): Use current process
9783 if annex is empty.
9784
21e94bd9
SL
97852015-05-08 Sandra Loosemore <sandra@codesourcery.com>
9786
9787 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
9788 Remove HAVE_PTRACE_GETREGS conditionals.
9789 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
9790 instead of PTRACE_GETREGS and PTRACE_SETREGS.
9791
45614f15
YQ
97922015-05-08 Yao Qi <yao.qi@linaro.org>
9793
9794 * linux-low.c (linux_supports_conditional_breakpoints): New
9795 function.
9796 (linux_target_ops): Install new target method.
9797 * lynx-low.c (lynx_target_ops): Install NULL hook for
9798 supports_conditional_breakpoints.
9799 * nto-low.c (nto_target_ops): Likewise.
9800 * spu-low.c (spu_target_ops): Likewise.
9801 * win32-low.c (win32_target_ops): Likewise.
9802 * server.c (handle_query): Check
9803 target_supports_conditional_breakpoints.
9804 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9805 New field.
9806 (target_supports_conditional_breakpoints): New macro.
9807
80ad801e
PA
98082015-05-06 Pedro Alves <palves@redhat.com>
9809
9810 PR server/18081
9811 * server.c (start_inferior): If the process exits, mourn it.
9812
819843c7
GB
98132015-04-21 Gary Benson <gbenson@redhat.com>
9814
9815 * hostio.c (fileio_open_flags_to_host): Factored out to
9816 fileio_to_host_openflags in common/fileio.c. Single use
9817 updated.
9818
a2d5a9d7
MF
98192015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9820
9821 * linux-xtensa-low.c (xtensa_fill_gregset)
9822 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
9823 XCHAL_HAVE_LOOP.
9824
deb44829
MF
98252015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9826
9827 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
9828 (regs_info): Replace usrregs pointer with NULL.
9829
e57f1de3
GB
98302015-04-17 Gary Benson <gbenson@redhat.com>
9831
9832 * target.h (struct target_ops) <pid_to_exec_file>: New field.
9833 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
9834 * server.c (handle_qxfer_exec_file): New function.
9835 (qxfer_packets): Add exec-file entry.
9836 (handle_query): Report qXfer:exec-file:read as supported packet.
9837
62828379
RN
98382015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
9839
9840 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
9841
b88bb450
GB
98422015-04-09 Gary Benson <gbenson@redhat.com>
9843
9844 * hostio-errno.c (errno_to_fileio_error): Remove function.
9845 Update caller to use remote_fileio_to_fio_error.
9846
c8f4bfdd
YQ
98472015-04-09 Yao Qi <yao.qi@linaro.org>
9848
9849 * linux-low.c (linux_insert_point): Call
9850 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
9851 (linux_remove_point): Call remove_memory_breakpoint if type is
9852 raw_bkpt_type_sw.
9853 * linux-x86-low.c (x86_insert_point): Don't call
9854 insert_memory_breakpoint.
9855 (x86_remove_point): Don't call remove_memory_breakpoint.
9856
41f98f02
PA
98572015-04-01 Pedro Alves <palves@redhat.com>
9858 Cleber Rosa <crosa@redhat.com>
9859
9860 * server.c (gdbserver_usage): Reorganize and extend the usage
9861 message.
9862
2bf6fb9d
PA
98632015-03-24 Pedro Alves <palves@redhat.com>
9864
9865 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
9866 output. Also dump TRAP_TRACE.
9867 (linux_low_filter_event): In debug output, distinguish a
9868 resume_stop SIGSTOP from a delayed SIGSTOP.
9869
369f6daa
GB
98702015-03-24 Gary Benson <gbenson@redhat.com>
9871
9872 * linux-x86-low.c (x86_linux_new_thread): Moved to
9873 nat/x86-linux.c.
9874 (x86_linux_prepare_to_resume): Likewise.
9875
8e5d4070
GB
98762015-03-24 Gary Benson <gbenson@redhat.com>
9877
9878 * Makefile.in (x86-linux-dregs.o): New rule.
9879 * configure.srv: Add x86-linux-dregs.o to relevant targets.
9880 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
9881 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
9882 (x86_linux_dr_get): Likewise.
9883 (x86_linux_dr_set): Likewise.
9884 (update_debug_registers_callback): Likewise.
9885 (x86_linux_dr_set_addr): Likewise.
9886 (x86_linux_dr_get_addr): Likewise.
9887 (x86_linux_dr_set_control): Likewise.
9888 (x86_linux_dr_get_control): Likewise.
9889 (x86_linux_dr_get_status): Likewise.
9890 (x86_linux_update_debug_registers): Likewise.
9891
2b95d440
GB
98922015-03-24 Gary Benson <gbenson@redhat.com>
9893
9894 * linux-x86-low.c (x86_linux_update_debug_registers):
9895 New function, factored out from...
9896 (x86_linux_prepare_to_resume): ...this.
9897
14b0bc68
GB
98982015-03-24 Gary Benson <gbenson@redhat.com>
9899
9900 * linux-x86-low.c (x86_linux_dr_get): Update comments.
9901 (x86_linux_dr_set): Likewise.
9902 (update_debug_registers_callback): Likewise.
9903 (x86_linux_dr_set_addr): Likewise.
9904 (x86_linux_dr_get_addr): Likewise.
9905 (x86_linux_dr_set_control): Likewise.
9906 (x86_linux_dr_get_control): Likewise.
9907 (x86_linux_dr_get_status): Likewise.
9908 (x86_linux_prepare_to_resume): Likewise.
9909
5dfe6ca8
GB
99102015-03-24 Gary Benson <gbenson@redhat.com>
9911
9912 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
9913 Use perror_with_name. Pass string through gettext.
9914 (x86_linux_dr_set): Likewise.
9915
d33472ad
GB
99162015-03-24 Gary Benson <gbenson@redhat.com>
9917
9918 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
9919 (x86_linux_dr_set_addr): ...this.
9920 (x86_dr_low_get_addr): Rename to...
9921 (x86_linux_dr_get_addr): ...this.
9922 (x86_dr_low_set_control): Rename to...
9923 (x86_linux_dr_set_control): ...this.
9924 (x86_dr_low_get_control): Rename to...
9925 (x86_linux_dr_get_control): ...this.
9926 (x86_dr_low_get_status): Rename to...
9927 (x86_linux_dr_get_status): ...this.
9928 (x86_dr_low): Update with new function names.
9929
4b134ca1
GB
99302015-03-24 Gary Benson <gbenson@redhat.com>
9931
9932 * Makefile.in (x86-linux.o): New rule.
9933 * configure.srv: Add x86-linux.o to relevant targets.
9934 * linux-low.c (lwp_set_arch_private_info): New function.
9935 (lwp_arch_private_info): Likewise.
9936 * linux-x86-low.c: Include nat/x86-linux.h.
9937 (arch_lwp_info): Removed structure.
9938 (update_debug_registers_callback):
9939 Use lwp_set_debug_registers_changed.
9940 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
9941 and lwp_set_debug_registers_changed.
9942 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
9943
34c703da
GB
99442015-03-24 Gary Benson <gbenson@redhat.com>
9945
9946 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
9947 * linux-arm-low.c (arm_new_thread): Likewise.
9948 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
9949 * linux-mips-low.c (mips_linux_new_thread): Likewise.
9950 * linux-x86-low.c (x86_linux_new_thread): Likewise.
9951 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
9952
cff068da
GB
99532015-03-24 Gary Benson <gbenson@redhat.com>
9954
9955 * linux-low.c (ptid_of_lwp): New function.
9956 (lwp_is_stopped): Likewise.
9957 (lwp_stop_reason): Likewise.
9958 * linux-x86-low.c (update_debug_registers_callback):
9959 Use lwp_is_stopped.
9960 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
9961 lwp_stop_reason.
9962
b2f7c7e8
GB
99632015-03-24 Gary Benson <gbenson@redhat.com>
9964
9965 * linux-low.h (linux_stop_lwp): Remove declaration.
9966
6d4ee8c6
GB
99672015-03-24 Gary Benson <gbenson@redhat.com>
9968
9969 * linux-low.h: Include nat/linux-nat.h.
9970 * linux-low.c (iterate_over_lwps_args): New structure.
9971 (iterate_over_lwps_filter): New function.
9972 (iterate_over_lwps): Likewise.
9973 * linux-x86-low.c (update_debug_registers_callback):
9974 Update signature to what iterate_over_lwps expects.
9975 Remove PID check that iterate_over_lwps now performs.
9976 (x86_dr_low_set_addr): Use iterate_over_lwps.
9977 (x86_dr_low_set_control): Likewise.
9978
70a0bb6b
GB
99792015-03-24 Gary Benson <gbenson@redhat.com>
9980
9981 * linux-x86-low.c (x86_debug_reg_state): New function.
9982 (x86_linux_prepare_to_resume): Use the above.
9983
7b669087
GB
99842015-03-24 Gary Benson <gbenson@redhat.com>
9985
9986 * linux-low.c (current_lwp_ptid): New function.
9987 * linux-x86-low.c: Include nat/linux-nat.h.
9988 (x86_dr_low_get_addr): Use current_lwp_ptid.
9989 (x86_dr_low_get_control): Likewise.
9990 (x86_dr_low_get_status): Likewise.
9991
eef49a3d
PA
99922015-03-20 Pedro Alves <palves@redhat.com>
9993
9994 * tracepoint.c (cmd_qtstatus): Make "str" const.
9995
b2333d22
PA
99962015-03-20 Pedro Alves <palves@redhat.com>
9997
9998 * server.c (handle_general_set): Make "req_str" const.
9999
23f238d3
PA
100002015-03-19 Pedro Alves <palves@redhat.com>
10001
10002 * linux-low.c (linux_resume_one_lwp): Rename to ...
10003 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10004 instead call perror_with_name.
10005 (check_ptrace_stopped_lwp_gone): New function.
10006 (linux_resume_one_lwp): Reimplement as wrapper around
10007 linux_resume_one_lwp_throw that swallows errors if the LWP is
10008 gone.
10009
91baf43f
PA
100102015-03-19 Pedro Alves <palves@redhat.com>
10011
10012 * linux-low.c (count_events_callback, select_event_lwp_callback):
10013 No longer check whether the thread has resume_stop as last resume
10014 kind.
10015
8bf3b159
PA
100162015-03-19 Pedro Alves <palves@redhat.com>
10017
10018 * linux-low.c (count_events_callback, select_event_lwp_callback):
10019 Use the lwp's status_pending_p field, not the thread's.
10020
b90fc188
PA
100212015-03-19 Pedro Alves <palves@redhat.com>
10022
10023 * linux-low.c (select_event_lwp_callback): Update comments to
10024 no longer mention SIGTRAP.
10025
464b0089
GB
100262015-03-18 Gary Benson <gbenson@redhat.com>
10027
10028 * server.c (handle_query): Do not report vFile:fstat as supported.
10029
aa9e327f
GB
100302015-03-11 Gary Benson <gbenson@redhat.com>
10031
10032 * hostio.c (sys/types.h): New include.
10033 (sys/stat.h): Likewise.
10034 (common-remote-fileio.h): Likewise.
10035 (handle_fstat): New function.
10036 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 10037
791c0056
GB
100382015-03-11 Gary Benson <gbenson@redhat.com>
10039
10040 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10041 struct stat.st_blocks and struct stat.st_blksize.
10042 * configure: Regenerate.
10043 * config.in: Likewise.
10044 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10045 (OBS): Add common-remote-fileio.o.
10046 (common-remote-fileio.o): New rule.
10047
9a9df970
PA
100482015-03-09 Pedro Alves <palves@redhat.com>
10049
10050 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10051 'struct sockaddr' pointer in 'accept' call.
10052
9eb1356e
PA
100532015-03-09 Pedro Alves <palves@redhat.com>
10054
10055 Revert:
10056 2015-03-07 Pedro Alves <palves@redhat.com>
10057 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10058 or <winsock2.h> here. Instead include "gdb_socket.h".
10059 (remote_open): Use union gdb_sockaddr_u.
10060 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10061 or <winsock2.h> here. Instead include "gdb_socket.h".
10062 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10063 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10064 or <sys/un.h>.
10065 (init_named_socket, gdb_agent_helper_thread): Use union
10066 gdb_sockaddr_u.
10067
aac331e4
PA
100682015-03-07 Pedro Alves <palves@redhat.com>
10069
10070 * configure.ac (build_warnings): Move
10071 -Wdeclaration-after-statement to the C-specific set.
10072 * configure: Regenerate.
10073
366c75fc
PA
100742015-03-07 Pedro Alves <palves@redhat.com>
10075
10076 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10077 or <winsock2.h> here. Instead include "gdb_socket.h".
10078 (remote_open): Use union gdb_sockaddr_u.
10079 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10080 or <winsock2.h> here. Instead include "gdb_socket.h".
10081 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10082 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10083 or <sys/un.h>.
10084 (init_named_socket, gdb_agent_helper_thread): Use union
10085 gdb_sockaddr_u.
10086
492d29ea
PA
100872015-03-07 Pedro Alves <palves@redhat.com>
10088
10089 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10090 instead.
10091
60a191ed
YQ
100922015-03-06 Yao Qi <yao.qi@linaro.org>
10093
10094 * linux-aarch64-low.c (aarch64_insert_point): Use
10095 show_debug_regs as a boolean.
10096 (aarch64_remove_point): Likewise.
10097
f5771b1d
PA
100982015-03-05 Pedro Alves <palves@redhat.com>
10099
10100 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10101 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10102 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10103 * nto-low.c (nto_target_ops): Likewise.
10104 * spu-low.c (spu_target_ops): Likewise.
10105 * win32-low.c (win32_target_ops): Likewise.
10106
3e572f71
PA
101072015-03-04 Pedro Alves <palves@redhat.com>
10108
72f4393d 10109 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
10110 Decide whether a breakpoint triggered based on the SIGTRAP's
10111 siginfo.si_code.
72f4393d
L
10112 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10113 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
10114 (linux_low_filter_event): Check for breakpoints before checking
10115 watchpoints.
10116 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10117 siginfo.si_code.
72f4393d
L
10118 (linux_stopped_by_sw_breakpoint)
10119 (linux_supports_stopped_by_sw_breakpoint)
10120 (linux_stopped_by_hw_breakpoint)
10121 (linux_supports_stopped_by_hw_breakpoint): New functions.
10122 (linux_target_ops): Install new target methods.
3e572f71 10123
1ec68e26
PA
101242015-03-04 Pedro Alves <palves@redhat.com>
10125
10126 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10127 * server.c (swbreak_feature, hwbreak_feature): New globals.
10128 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10129 (captured_main): Clear swbreak_feature and hwbreak_feature.
10130 * server.h (swbreak_feature, hwbreak_feature): Declare.
10131 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10132 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10133 supports_stopped_by_hw_breakpoint>: New fields.
10134 (target_supports_stopped_by_sw_breakpoint)
10135 (target_stopped_by_sw_breakpoint)
10136 (target_supports_stopped_by_hw_breakpoint)
10137 (target_stopped_by_hw_breakpoint): Declare.
10138
15c66dd6
PA
101392015-03-04 Pedro Alves <palves@redhat.com>
10140
10141 enum lwp_stop_reason -> enum target_stop_reason
10142 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10143 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10144 (linux_wait_1, stuck_in_jump_pad_callback)
10145 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10146 (linux_stopped_by_watchpoint):
10147 * linux-low.h (enum lwp_stop_reason): Delete.
10148 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10149 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10150
98fc70d6
YQ
101512015-03-04 Yao Qi <yao.qi@linaro.org>
10152
10153 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10154
dd2ac174
GB
101552015-03-03 Gary Benson <gbenson@redhat.com>
10156
10157 * hostio.c (handle_vFile): Fix prefix lengths.
10158
d68e53f4
MM
101592015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10160
10161 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10162 ptr_bits.
10163
bf2d68ab
AA
101642015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10165
10166 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10167 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10168 (clean): Add "rm -f" for above C files.
10169 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10170 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10171 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10172 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10173 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10174 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10175 (init_registers_s390x_vx_linux64)
10176 (init_registers_s390x_tevx_linux64)
10177 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10178 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10179 declarations.
10180 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10181 (s390_store_vxrs_high): New functions.
10182 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10183 NT_S390_VXRS_HIGH.
10184 (s390_arch_setup): Add logic for selecting one of the new target
10185 descriptions. Activate the new vector regsets if applicable.
10186 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10187 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10188 and init_registers_s390x_tevx_linux64.
10189
c966a859
PA
101902015-03-01 Pedro Alves <palves@redhat.com>
10191
10192 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10193 parameter.
10194
4180215b
PA
101952015-02-27 Pedro Alves <palves@redhat.com>
10196
10197 * linux-x86-low.c (u_debugreg_offset): New function.
10198 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10199
749bab01
PA
102002015-02-27 Pedro Alves <palves@redhat.com>
10201
10202 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10203 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10204 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10205 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10206 (ps_lsetfpregs, ps_getpid)
10207 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10208 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10209 (ps_lsetxregs, ps_plog): Declare.
10210
3c14e5a3
PA
102112015-02-27 Pedro Alves <palves@redhat.com>
10212
10213 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10214 IP_AGENT_EXPORT_FUNC.
10215 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10216 IP_AGENT_EXPORT_FUNC.
10217 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10218 (IP_AGENT_EXPORT): Delete.
10219 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10220 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10221 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10222 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10223 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10224 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10225 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10226 (traceframe_read_count, traceframe_write_count)
10227 (traceframes_created, trace_state_variables, get_raw_reg)
10228 (get_trace_state_variable_value, set_trace_state_variable_value)
10229 (ust_loaded, helper_thread_id, cmd_buf): Use
10230 IPA_SYM_EXPORTED_NAME.
10231 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10232 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10233 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10234 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10235 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10236 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10237 EXTERN_C_PUSH/EXTERN_C_POP.
10238 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10239 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10240 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10241 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10242 (traceframe_write_count, traceframe_read_count)
10243 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10244 (about_to_request_buffer_space, get_trace_state_variable_value)
10245 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10246 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10247 EXTERN_C_PUSH/EXTERN_C_POP.
10248 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10249 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10250 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10251 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10252 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10253 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10254 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10255 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10256 Define.
10257 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10258 (IP_AGENT_EXPORT_VAR_DECL): Define.
10259 (tracing): Declare.
10260 (gdb_agent_get_raw_reg): Declare.
10261
fe978cb0
PA
102622015-02-27 Tom Tromey <tromey@redhat.com>
10263 Pedro Alves <palves@redhat.com>
10264
10265 Rename symbols whose names are reserved C++ keywords throughout.
10266
3bc3d82a
PA
102672015-02-27 Pedro Alves <palves@redhat.com>
10268
10269 * Makefile.in (COMPILER): New, get it from autoconf.
10270 (CXX): Get from autoconf instead.
10271 (COMPILE.pre): Use COMPILER.
10272 (CC-LD): Rename to ...
10273 (CC_LD): ... this. Use COMPILER.
10274 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10275 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10276 * acinclude.m4: Include build-with-cxx.m4.
10277 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10278 Disable -Werror by default if building in C++ mode.
10279 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10280 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10281 the C++ compiler. Save/restore CXXFLAGS too.
10282 * configure: Regenerate.
10283
07697489
PA
102842015-02-27 Pedro Alves <palves@redhat.com>
10285
10286 * acinclude.m4: Include libiberty.m4.
10287 * configure.ac: Call libiberty_INIT.
10288 * config.in, configure: Regenerate.
10289
9beb7c4e
PA
102902015-02-26 Pedro Alves <palves@redhat.com>
10291
10292 * linux-low.c (linux_wait_1): When incrementing the PC past a
10293 program breakpoint always use the_low_target.breakpoint_len as
10294 increment, rather than the maximum between that and
10295 the_low_target.decr_pc_after_break.
10296
8090aef2
PA
102972015-02-23 Pedro Alves <palves@redhat.com>
10298
10299 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10300 thread was doing a step-over; always adjust the PC if
10301 we stepped over a permanent breakpoint.
10302 (linux_wait_1): If we stepped over breakpoint that was on top of a
10303 permanent breakpoint, manually advance the PC past it.
10304
bc9540e8
PA
103052015-02-23 Pedro Alves <palves@redhat.com>
10306
10307 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10308 modes.
10309 (x86_fill_gregset, x86_store_gregset): Use it when handling
10310 $orig_eax.
10311
2db9a427
PA
103122015-02-20 Pedro Alves <palves@redhat.com>
10313
10314 * thread-db.c: Include "nat/linux-procfs.h".
10315 (thread_db_init): Skip listing new threads if the kernel supports
10316 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10317
afa8d396
PA
103182015-02-20 Pedro Alves <palves@redhat.com>
10319
10320 * linux-low.c (status_pending_p_callback): Use ptid_match.
10321
c9587f88
AT
103222015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10323
10324 PR breakpoints/16812
10325 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10326 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10327 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10328
b05ec7a5
AT
103292015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10330
10331 PR breakpoints/15956
10332 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10333
d33501a5
MM
103342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10335
10336 * linux-low.c (linux_low_btrace_conf): Print size.
10337 * server.c (handle_btrace_conf_general_set): New.
10338 (hanle_general_set): Call handle_btrace_conf_general_set.
10339 (handle_query): Report Qbtrace-conf:bts:size as supported.
10340
f4abbc16
MM
103412015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10342
10343 * linux-low.c (linux_low_enable_btrace): Update parameters.
10344 (linux_low_btrace_conf): New.
10345 (linux_target_ops)<to_btrace_conf>: Initialize.
10346 * server.c (current_btrace_conf): New.
10347 (handle_btrace_enable): Rename to ...
10348 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10349 to target_enable_btrace. Update comment. Update users.
10350 (handle_qxfer_btrace_conf): New.
10351 (qxfer_packets): Add btrace-conf entry.
10352 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10353 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10354 (target_ops)<read_btrace_conf>: New.
10355 (target_enable_btrace): Update parameters.
10356 (target_read_btrace_conf): New.
10357
043c3577
MM
103582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10359
10360 * server.c (handle_btrace_general_set): Remove call to
10361 target_supports_btrace.
10362 (supported_btrace_packets): New.
10363 (handle_query): Call supported_btrace_packets.
10364 * target.h: include btrace-common.h.
10365 (btrace_target_info): Removed.
10366 (supports_btrace, target_supports_btrace): Update parameters.
10367
734b0e4b
MM
103682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10369
10370 * Makefile.in (SFILES): Add common/btrace-common.c.
10371 (OBS): Add common/btrace-common.o.
10372 (btrace-common.o): Add build rules.
10373 * linux-low: Include btrace-common.h.
10374 (linux_low_read_btrace): Use struct btrace_data. Call
10375 btrace_data_init and btrace_data_fini.
10376
d6c146e9
PA
103772015-02-06 Pedro Alves <palves@redhat.com>
10378
10379 * thread-db.c (find_new_threads_callback): Add debug output.
10380
20ba1ce6
PA
103812015-02-04 Pedro Alves <palves@redhat.com>
10382
10383 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10384 (resume_stopped_resumed_lwps): New function.
10385 (linux_wait_for_event_filtered): Use it.
10386
8cc73a39
SDJ
103872015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10388
10389 * Makefile.in (SFILES): Add linux-personality.c.
10390 (linux-personality.o): New rule.
10391 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10392 list of objects to be built.
10393 * linux-low.c: Include nat/linux-personality.h.
10394 (linux_create_inferior): Remove code to disable address space
10395 randomization (moved to ../nat/linux-personality.c). Create
10396 cleanup to disable address space randomization.
10397
fb23d554
SDJ
103982015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10399
10400 * Makefile.in (posix-strerror.o): New rule.
10401 (mingw-strerror.o): Likewise.
10402 * configure: Regenerated.
10403 * configure.ac: Source file ../common/common.host. Initialize new
10404 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10405
cdf43629
YQ
104062015-01-14 Yao Qi <yao@codesourcery.com>
10407
10408 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10409 (ppc-linux.o): New rule.
10410 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10411 * configure.ac: AC_CHECK_FUNCS(getauxval).
10412 * config.in: Re-generated.
10413 * configure: Re-generated.
10414 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10415 ppc64_64bit_inferior_p
10416
514c5338
YQ
104172015-01-14 Yao Qi <yao@codesourcery.com>
10418
10419 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10420 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10421 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10422 (PT_ORIG_R3, PT_TRAP): Likewise.
10423 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10424 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10425 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10426
3368c1e5
JB
104272015-01-10 Joel Brobecker <brobecker@adacore.com>
10428
10429 * i387-fp.c (i387_cache_to_xsave): In look over
10430 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10431 zmmh_low_space field by use of zmmh_high_space.
10432
582511be
PA
104332015-01-09 Pedro Alves <palves@redhat.com>
10434
10435 * linux-low.c (step_over_bkpt): Move higher up in the file.
10436 (handle_extended_wait): Don't store the stop_pc here.
10437 (get_stop_pc): Adjust comments and rename to ...
10438 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10439 stopped for a software breakpoint or hardware breakpoint.
10440 (thread_still_has_status_pending_p): New function.
10441 (status_pending_p_callback): Use
10442 thread_still_has_status_pending_p. If the event is no longer
10443 interesting, resume the LWP.
10444 (handle_tracepoints): Add assert.
10445 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10446 (wstatus_maybe_breakpoint): New function.
10447 (cancel_breakpoint): Delete function.
10448 (check_stopped_by_watchpoint): New function, factored out from
10449 linux_low_filter_event.
10450 (lp_status_maybe_breakpoint): Delete function.
10451 (linux_low_filter_event): Remove filter_ptid argument.
10452 Leave thread group exits pending here. Store the LWP's stop PC.
10453 Always leave events pending.
10454 (linux_wait_for_event_filtered): Pull all events out of the
10455 kernel, and leave them all pending.
10456 (count_events_callback, select_event_lwp_callback): Consider all
10457 events.
10458 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10459 (select_event_lwp): Only give preference to the stepping LWP in
10460 all-stop mode. Adjust comments.
10461 (ignore_event): New function.
10462 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10463 references to cancel_breakpoints. Adjust to renames. Also give
10464 equal priority to all LWPs that have had events in non-stop mode.
10465 If reporting a software breakpoint event, unadjust the LWP's PC.
10466 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10467 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10468 Adjust.
10469 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10470 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10471 (linux_stopped_by_watchpoint): Adjust.
10472 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10473 * linux-low.h (enum lwp_stop_reason): New.
10474 (struct lwp_info) <stop_pc>: Adjust comment.
10475 <stopped_by_watchpoint>: Delete field.
10476 <stop_reason>: New field.
10477 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10478 * mem-break.c (software_breakpoint_inserted_here)
10479 (hardware_breakpoint_inserted_here): New function.
10480 * mem-break.h (software_breakpoint_inserted_here)
10481 (hardware_breakpoint_inserted_here): Declare.
10482 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10483 (cancel_breakpoints): Delete.
10484 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10485 (upload_fast_traceframes): Remove references to
10486 cancel_breakpoints.
10487
a33e3959
PA
104882015-01-09 Pedro Alves <palves@redhat.com>
10489
10490 * thread-db.c (find_new_threads_callback): Ignore thread if the
10491 kernel thread ID is -1.
10492
8784d563
PA
104932015-01-09 Pedro Alves <palves@redhat.com>
10494
10495 * linux-low.c (linux_attach_fail_reason_string): Move to
10496 nat/linux-ptrace.c, and rename.
10497 (linux_attach_lwp): Update comment.
10498 (attach_proc_task_lwp_callback): New function.
10499 (linux_attach): Adjust to rename and use
10500 linux_proc_attach_tgid_threads.
10501 (linux_attach_fail_reason_string): Delete declaration.
10502
76f2b779
JB
105032015-01-01 Joel Brobecker <brobecker@adacore.com>
10504
10505 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
10506 * server.c (gdbserver_version): Likewise.
10507
fafcc06a
SDJ
105082014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
10509
10510 * remote-utils.c: Include ctype.h.
10511 (input_interrupt): Explicitly handle the case when the char
10512 received is the NUL byte. Improve the printing of non-ASCII
10513 characters.
10514
beed38b8
JB
105152014-12-16 Joel Brobecker <brobecker@adacore.com>
10516
10517 * linux-low.c (linux_low_filter_event): Update call to
10518 linux_enable_event_reporting following the addition of
10519 a new parameter to that function.
10520
bf330350
CU
105212014-12-16 Catalin Udma <catalin.udma@freescale.com>
10522
10523 PR server/17457
10524 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
10525 (AARCH64_FPCR_REGNO): Likewise.
10526 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
10527 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
10528 (aarch64_store_fpregset): Likewise.
10529
5227d625
JB
105302014-12-15 Joel Brobecker <brobecker@adacore.com>
10531
10532 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
10533 Remove FIXME comment about assumption about N.
10534
f93b65a0
JB
105352014-12-13 Joel Brobecker <brobecker@adacore.com>
10536
10537 * configure.ac: If large-file support is disabled in GDBserver,
10538 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10539 * configure: Regenerate.
10540
e5a9158d
AA
105412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10542
10543 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
10544 warning upon ENODATA from ptrace.
10545 * linux-s390-low.c (s390_store_tdb): New.
10546 (s390_regsets): Add regset for NT_S390_TDB.
10547
feea5f36
AA
105482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10549
10550 * linux-low.c (regsets_store_inferior_registers): Skip regsets
10551 without a fill_function.
10552 * linux-s390-low.c (s390_fill_last_break): Remove.
10553 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
10554 (s390_arch_setup): Use regset's size instead of fill_function for
10555 loop end condition.
10556
098dbe61
AA
105572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10558
10559 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
10560 the regset's store function when ptrace returned an error.
10561 * regcache.c (get_thread_regcache): Invalidate register cache
10562 before fetching inferior's registers.
10563
28eef672
AA
105642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10565
10566 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
10567 while-loop as for-loop.
10568 (regsets_store_inferior_registers): Likewise.
10569
bdca27a2
YQ
105702014-11-28 Yao Qi <yao@codesourcery.com>
10571
10572 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10573 * config.in, configure: Re-generate.
10574 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
10575 is defined.
10576
9c232dda
YQ
105772014-11-21 Yao Qi <yao@codesourcery.com>
10578
10579 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
10580 (AC_CHECK_HEADERS): Remove malloc.h.
10581 * configure: Re-generated.
10582 * config.in: Re-generated.
10583 * server.h: Don't include alloca.h and malloc.h.
10584 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
10585 Don't include malloc.h.
10586
43968415
JB
105872014-11-17 Joel Brobecker <brobecker@adacore.com>
10588
10589 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
10590 corresponding ERRNO check in same block.
10591
40e91bc7
PA
105922014-11-12 Pedro Alves <palves@redhat.com>
10593
10594 * server.c (cont_thread): Update comment.
10595 (start_inferior, attach_inferior): No longer clear cont_thread.
10596 (handle_v_cont): No longer set cont_thread.
10597 (captured_main): Clear cont_thread each time a GDB connects.
10598
c2c118cf
PA
105992014-11-12 Pedro Alves <palves@redhat.com>
10600
10601 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
10602 thread, and don't resume all threads if the Hc thread has exited.
10603
78708b7c
PA
106042014-11-12 Pedro Alves <palves@redhat.com>
10605
10606 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
10607 the process group instead of to a specific LWP.
10608
a2abc7de
PA
106092014-10-15 Pedro Alves <palves@redhat.com>
10610
10611 PR server/17487
10612 * win32-arm-low.c (arm_set_thread_context): Remove current_event
10613 parameter.
10614 (arm_set_thread_context): Delete.
10615 (the_low_target): Adjust.
10616 * win32-i386-low.c (debug_registers_changed)
10617 (debug_registers_used): Delete.
10618 (update_debug_registers_callback): New function.
10619 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
10620 needing to update their debug registers.
10621 (win32_get_current_dr): New function.
10622 (x86_dr_low_get_addr, x86_dr_low_get_control)
10623 (x86_dr_low_get_status): Fetch the debug register from the thread
10624 record's context.
10625 (i386_initial_stuff): Adjust.
10626 (i386_get_thread_context): Remove current_event parameter. Don't
10627 clear debug_registers_changed nor copy DR values to
10628 debug_reg_state.
10629 (i386_set_thread_context): Delete.
10630 (i386_prepare_to_resume): New function.
10631 (i386_thread_added): Mark the thread as needing to update irs
10632 debug registers.
10633 (the_low_target): Remove i386_set_thread_context and install
10634 i386_prepare_to_resume.
10635 * win32-low.c (win32_get_thread_context): Adjust.
10636 (win32_set_thread_context): Use SetThreadContext
10637 directly.
10638 (win32_prepare_to_resume): New function.
10639 (win32_require_context): New function, factored out from ...
10640 (thread_rec): ... this.
10641 (continue_one_thread): Call win32_prepare_to_resume on each thread
10642 we're about to continue.
10643 (win32_resume): Call win32_prepare_to_resume on the event thread.
10644 * win32-low.h (struct win32_thread_info)
10645 <debug_registers_changed>: New field.
10646 (struct win32_target_ops): Change prototype of set_thread_context,
10647 delete set_thread_context and add prepare_to_resume.
10648 (win32_require_context): New declaration.
10649
a442d071
GB
106502014-10-08 Gary Benson <gbenson@redhat.com>
10651
10652 * server.h: Do not include common-exceptions.h.
10653
6f1947e8
GB
106542014-10-08 Gary Benson <gbenson@redhat.com>
10655
10656 * server.h: Do not include cleanups.h.
10657
63b434a4
JH
106582014-09-30 James Hogan <james.hogan@imgtec.com>
10659
10660 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
10661 mips64-dsp-linux.c.
10662
c4d9ceb6
YQ
106632014-09-23 Yao Qi <yao@codesourcery.com>
10664
10665 * linux-low.c (lp_status_maybe_breakpoint): New function.
10666 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
10667 (count_events_callback): Likewise.
10668 (select_event_lwp_callback): Likewise.
10669 (cancel_breakpoints_callback): Likewise.
10670
89a5711c
DB
106712014-09-19 Don Breazeal <donb@codesourcery.com>
10672
10673 * linux-low.c (handle_extended_wait): Call
10674 linux_ptrace_get_extended_event.
10675 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
10676 linux_is_extended_waitstatus.
10677
bffc0964
JB
106782014-09-16 Joel Brobecker <brobecker@adacore.com>
10679
10680 * Makefile.in (CPPFLAGS): Define.
10681 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
10682 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
10683
0bfdf32f
GB
106842014-09-16 Gary Benson <gbenson@redhat.com>
10685
10686 * inferiors.h (current_inferior): Renamed as...
10687 (current_thread): New variable. All uses updated.
10688 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
10689 (maybe_move_out_of_jump_pad): Likewise.
10690 (cancel_breakpoint): Likewise.
10691 (linux_low_filter_event): Likewise.
10692 (wait_for_sigstop): Likewise.
10693 (linux_resume_one_lwp): Likewise.
10694 (need_step_over_p): Likewise.
10695 (start_step_over): Likewise.
10696 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
10697 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
10698 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
10699 and save_inferior as saved_thread.
10700 * regcache.c (get_thread_regcache): Renamed saved_inferior as
10701 saved_thread.
10702 (regcache_invalidate_thread): Likewise.
10703 * remote-utils.c (prepare_resume_reply): Likewise.
10704 * thread-db.c (thread_db_get_tls_address): Likewise.
10705 (disable_thread_event_reporting): Likewise.
10706 (remove_thread_event_breakpoints): Likewise.
10707 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
10708 as saved_thread.
10709 * target.h (set_desired_inferior): Renamed as...
10710 (set_desired_thread): New declaration. All uses updated.
10711 * server.c (myresume): Updated comment to reference thread instead
10712 of inferior.
10713 (handle_serial_event): Likewise.
10714 (handle_target_event): Likewise.
10715
361c8ade
GB
107162014-09-12 Tom Tromey <tromey@redhat.com>
10717 Gary Benson <gbenson@redhat.com>
10718
10719 * regcache.h: Include common-regcache.h.
10720 (regcache_read_pc): Don't declare.
10721 * regcache.c (get_thread_regcache_for_ptid): New function.
10722
bd9269f7
GB
107232014-09-11 Tom Tromey <tromey@redhat.com>
10724 Gary Benson <gbenson@redhat.com>
10725
10726 * symbol.c: New file.
10727 * Makefile.in (SFILES): Add symbol.c.
10728 (OBS): Add symbol.o.
10729
f8c1d06b
GB
107302014-09-11 Gary Benson <gbenson@redhat.com>
10731
10732 * target.c (target_stop_ptid, target_continue_ptid): New
10733 functions.
10734
721ec300
GB
107352014-09-11 Tom Tromey <tromey@redhat.com>
10736 Gary Benson <gbenson@redhat.com>
10737
10738 * target.h: Include target/target.h.
10739 * target.c (target_read_memory, target_read_uint32)
10740 (target_write_memory): New functions.
10741
c5e92cca
GB
107422014-09-11 Gary Benson <gbenson@redhat.com>
10743
10744 * server.h (debug_hw_points): Don't declare.
10745 * server.c (debug_hw_points): Don't define. Replace all uses
10746 with show_debug_regs.
10747 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
10748 all uses with show_debug_regs.
10749
2e4bb98a
EBM
107502014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10751
10752 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
10753 endianness into account.
10754 (ppc_supply_ptrace_register): Likewise.
10755
ac740bc7
JH
107562014-09-03 James Hogan <james.hogan@imgtec.com>
10757
10758 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
10759 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
10760
97ea6506
GB
107612014-09-03 Gary Benson <gbenson@redhat.com>
10762
10763 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
10764 ALL_DEBUG_ADDRESS_REGISTERS.
10765
df7e5265
GB
107662014-09-02 Gary Benson <gbenson@redhat.com>
10767
10768 * i386-low.h: Renamed as...
10769 * x86-low.h: New file. All type, function and variable name
10770 prefixes changed from "i386_" to "x86_". All references updated.
10771 * i386-low.c: Renamed as...
10772 * x86-low.c: New file. All type, function and variable name
10773 prefixes changed from "i386_" to "x86_". All references updated.
10774
ed859da7
GB
107752014-09-02 Gary Benson <gbenson@redhat.com>
10776
10777 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
10778 (x86_linux_new_thread): Likewise.
10779
860789c7
GB
107802014-08-29 Gary Benson <gbenson@redhat.com>
10781
10782 * server.h (setjmp.h): Do not include.
10783 (toplevel): Do not declare.
10784 (common-exceptions.h): Include.
10785 (cleanups.h): Likewise.
10786 * server.c (toplevel): Do not define.
10787 (exit_code): New static global.
10788 (detach_or_kill_for_exit_cleanup): New function.
10789 (main): New function. Original main renamed to...
10790 (captured_main): New function.
10791 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
10792
ff55e1b5
GB
107932014-08-29 Gary Benson <gbenson@redhat.com>
10794
10795 * Makefile.in (SFILES): Add common/common-exceptions.c.
10796 (OBS): Add common-exceptions.o.
10797 (common-exceptions.o): New rule.
10798 * utils.c (prepare_to_throw_exception): New function.
10799
e9bcb658
GB
108002014-08-29 Gary Benson <gbenson@redhat.com>
10801
10802 * config.in: Regenerate.
10803 * configure: Likewise.
10804
e3180625
GB
108052014-08-29 Gary Benson <gbenson@redhat.com>
10806
10807 * Makefile.in (SFILES): Add common/cleanups.c.
10808 (OBS): cleanups.o.
10809 (cleanups.o): New rule.
10810
e3d6ba5d
GB
108112014-08-29 Gary Benson <gbenson@redhat.com>
10812
10813 * utils.c (internal_vwarning): New function.
10814
7096e886
GB
108152014-08-28 Gary Benson <gbenson@redhat.com>
10816
10817 * utils.h (fatal): Remove declaration.
10818 * utils.c (fatal): Remove function.
10819
14ce3192
GB
108202014-08-28 Gary Benson <gbenson@redhat.com>
10821
10822 * tracepoint.c (gdb_agent_init): Replace fatal with
10823 perror_with_name.
10824 (initialize_tracepoint): Likewise.
10825
50278d59
GB
108262014-08-28 Gary Benson <gbenson@redhat.com>
10827
10828 * remote-utils.c (remote_prepare): Replace fatal with error.
10829
aa96c426
GB
108302014-08-28 Gary Benson <gbenson@redhat.com>
10831
10832 * linux-low.c (linux_async): Replace fatal with warning.
10833 Tidy up and return.
10834 (linux_start_non_stop): Return -1 if linux_async failed.
10835
f7160e97
GB
108362014-08-28 Gary Benson <gbenson@redhat.com>
10837
10838 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
10839 gdb_assert.
10840 (i386_dr_low_get_addr): Remove vague comment.
10841 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
10842 gdb_assert.
10843
38e08fca
GB
108442014-08-28 Gary Benson <gbenson@redhat.com>
10845
10846 * inferiors.c (get_thread_process): Replace check with gdb_assert.
10847 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
10848 internal_error.
10849 (linux_resume_one_lwp): Likewise.
10850 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
10851 gdb_assert.
10852 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
10853 with internal_error.
10854 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
10855 (init_register_cache): Replace fatal with gdb_assert_not_reached.
10856 (find_register_by_name): Replace fatal with internal_error.
10857 (find_regno): Likewise.
10858 * tdesc.c (init_target_desc): Replace check with gdb_assert.
10859 * thread-db.c (thread_db_create_event): Likewise.
10860 (thread_db_load_search): Likewise.
10861 (try_thread_db_load_1): Likewise.
10862 * tracepoint.c (get_jump_space_head): Replace fatal with
10863 internal_error.
10864 (claim_trampoline_space): Likewise.
10865 (have_fast_tracepoint_trampoline_buffer): Likewise.
10866 (cmd_qtstart): Likewise.
10867 (stop_tracing): Likewise.
10868 (fast_tracepoint_collecting): Likewise.
10869 (target_malloc): Likewise.
10870 (download_tracepoint): Likewise.
10871 (download_trace_state_variables): Replace check with gdb_assert.
10872 (upload_fast_traceframes): Replace fatal with internal_error.
10873
34abf635
GB
108742014-08-19 Tom Tromey <tromey@redhat.com>
10875 Gary Benson <gbenson@redhat.com>
10876
10877 * Makefile.in (SFILES): Add common/common-debug.c.
10878 (OBS): Add common-debug.o.
10879 (common-debug.o): New rule.
10880 * debug.h (debug_printf): Don't declare.
10881 * debug.c (debug_printf): Renamed and rewritten as...
10882 (debug_vprintf): New function.
10883
f6e94d78
GB
108842014-08-19 Gary Benson <gbenson@redhat.com>
10885
10886 * utils.h: Do not include print-utils.h.
10887
9239eeab
GB
108882014-08-19 Tom Tromey <tromey@redhat.com>
10889 Gary Benson <gbenson@redhat.com>
10890
10891 * server.h: Add static assertion.
10892 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
10893
ef87c8bb
GB
108942014-08-19 Tom Tromey <tromey@redhat.com>
10895 Gary Benson <gbenson@redhat.com>
10896
10897 * Makefile.in (SFILES): Add common/errors.c.
10898 (OBS): Add errors.o.
10899 (IPA_OBS): Add errors-ipa.o.
10900 (errors.o): New rule.
10901 (errors-ipa.o): Likewise.
10902 * utils.h (perror_with_name, error, warning): Don't declare.
10903 * utils.c (warning): Renamed and rewritten as...
10904 (vwarning): New function.
10905 (error): Renamed and rewritten as...
10906 (verror): New function.
10907 (internal_error): Renamed and rewritten as...
10908 (internal_verror): New function.
10909
bb974a24
GB
109102014-08-07 Gary Benson <gbenson@redhat.com>
10911
10912 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
10913 * configure: Regenerate.
10914 * config.in: Likewise.
10915 * server.h: Do not include errno.h.
10916 * event-loop.c: Likewise.
10917 * hostio-errno.c: Likewise.
10918 * linux-low.c: Likewise.
10919 * remote-utils.c: Likewise.
10920 * spu-low.c: Likewise.
10921 * utils.c: Likewise.
10922 * gdbreplay.c: Unconditionally include errno.h.
10923
6d3d12eb
GB
109242014-08-07 Gary Benson <gbenson@redhat.com>
10925
10926 * server.h: Do not include string.h.
10927 * event-loop.c: Likewise.
10928 * linux-low.c: Likewise.
10929 * regcache.c: Likewise.
10930 * remote-utils.c: Likewise.
10931 * spu-low.c: Likewise.
10932 * utils.c: Likewise.
10933
dccbb609
GB
109342014-08-07 Gary Benson <gbenson@redhat.com>
10935
10936 * server.h: Do not include gdb_assert.h.
10937
e76df0d0
GB
109382014-08-07 Gary Benson <gbenson@redhat.com>
10939
10940 * server.h: Do not include common-utils.h.
10941
4cb9c816
GB
109422014-08-07 Gary Benson <gbenson@redhat.com>
10943
10944 * server.h: Do not include ptid.h.
10945 * notif.h: Likewise.
10946
3995eeee
GB
109472014-08-07 Gary Benson <gbenson@redhat.com>
10948
10949 * server.h: Do not include gdb_locale.h.
10950
cb9f1a9b
GB
109512014-08-07 Gary Benson <gbenson@redhat.com>
10952
10953 * server.h: Do not include gdb/signals.h.
10954 * win32-low.c: Likewise.
10955
a5fceff8
GB
109562014-08-07 Gary Benson <gbenson@redhat.com>
10957
10958 * server.h: Do not include pathmax.h.
10959
b9391142
GB
109602014-08-07 Gary Benson <gbenson@redhat.com>
10961
10962 * server.h: Do not include libiberty.h.
10963 * linux-bfin-low.c: Likewise.
10964
0e443c87
GB
109652014-08-07 Gary Benson <gbenson@redhat.com>
10966
10967 * server.h: Do not include ansidecl.h.
10968
8ebb3f56
GB
109692014-08-07 Gary Benson <gbenson@redhat.com>
10970
10971 * linux-x86-low.c: Do not include stddef.h.
10972 * lynx-ppc-low.c: Likewise.
10973 * tracepoint.c: Likewise.
10974
8980bdf6
GB
109752014-08-07 Gary Benson <gbenson@redhat.com>
10976
10977 * server.h: Do not include stdarg.h.
10978 * nto-low.c: Likewise.
10979
d7096f71
GB
109802014-08-07 Gary Benson <gbenson@redhat.com>
10981
10982 * server.h: Do not include stdlib.h.
10983 * inferiors.c: Likewise.
10984 * linux-low.c: Likewise.
10985 * regcache.c: Likewise.
10986 * spu-low.c: Likewise.
10987 * tracepoint.c: Likewise.
10988 * utils.c: Likewise.
10989
d02f550d
GB
109902014-08-07 Gary Benson <gbenson@redhat.com>
10991
10992 * server.h: Do not include stdio.h.
10993 * linux-low.c: Likewise.
10994 * remote-utils.c: Likewise.
10995 * spu-low.c: Likewise.
10996 * utils.c: Likewise.
10997 * wincecompat.c: Likewise.
10998
87f6c4e3
GB
109992014-08-06 Gary Benson <gbenson@redhat.com>
11000
11001 * regcache.c (init_register_cache): Move conditionals inside if.
11002
7089dca4
GB
110032014-08-06 Gary Benson <gbenson@redhat.com>
11004
11005 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11006
462f517e
GB
110072014-07-31 Gary Benson <gbenson@redhat.com>
11008
11009 * ax.h: Do not include server.h.
11010 * gdbthread.h: Likewise.
11011 * lynx-low.h: Likewise.
11012 * notif.h: Likewise.
11013
976411d6
GB
110142014-07-30 Gary Benson <gbenson@redhat.com>
11015
11016 * server.h: Include common-defs.h.
11017 Do not include config.h or build-gnulib-gdbserver/config.h.
11018
d41f6d8e
GB
110192014-07-30 Gary Benson <gbenson@redhat.com>
11020
11021 * hostio-errno.c: Move server.h to top of includes list.
11022 * inferiors.c: Likewise.
11023 * linux-x86-low.c: Likewise.
11024 * notif.c: Include server.h.
11025
314c6a35
TT
110262014-07-24 Tom Tromey <tromey@redhat.com>
11027 Gary Benson <gbenson@redhat.com>
11028
11029 * server.h (CORE_ADDR): Now unsigned.
11030
69ff6be5
PA
110312014-07-16 Pedro Alves <palves@redhat.com>
11032
11033 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11034
ce9e3fe7
PA
110352014-07-15 Pedro Alves <palves@redhat.com>
11036
11037 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11038 copy.
11039
e76126e8
PA
110402014-07-11 Pedro Alves <palves@redhat.com>
11041
11042 * linux-low.c (kill_wait_lwp): New function, based on
11043 kill_one_lwp_callback, but use my_waitpid directly.
11044 (kill_one_lwp_callback, linux_kill): Use it.
11045
8e9db26e
PA
110462014-06-23 Pedro Alves <palves@redhat.com>
11047
11048 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11049 before setting DR0..DR3.
11050
698b3e08
GB
110512014-06-20 Gary Benson <gbenson@redhat.com>
11052
11053 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11054 * configure: Regenerated.
11055 * config.in: Likewise.
11056
125f8a3d
GB
110572014-06-20 Gary Benson <gbenson@redhat.com>
11058
11059 * Makefile.in (SFILES): Update locations for files moved
11060 from common to nat.
11061 (object file files): Reordered.
11062
42995dbd
GB
110632014-06-20 Gary Benson <gbenson@redhat.com>
11064
11065 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11066 (i386_dr_low_set_addr): Likewise.
11067 (i386_dr_low_get_addr): Likewise.
11068 (i386_dr_low_can_set_control): Likewise.
11069 (i386_dr_low_set_control): Likewise.
11070 (i386_dr_low_get_control): Likewise.
11071 (i386_dr_low_get_status): Likewise.
11072 (i386_get_debug_register_length): Likewise.
11073 * linux-x86-low.c (i386_dr_low_set_addr):
11074 Changed signature. Made static.
11075 (i386_dr_low_get_addr): Likewise.
11076 (i386_dr_low_set_control): Likewise.
11077 (i386_dr_low_get_control): Likewise.
11078 (i386_dr_low_get_status): Likewise.
11079 (i386_dr_low): New global variable.
11080 * win32-i386-low.c (i386_dr_low_set_addr):
11081 Changed signature. Made static.
11082 (i386_dr_low_get_addr): Likewise.
11083 (i386_dr_low_set_control): Likewise.
11084 (i386_dr_low_get_control): Likewise.
11085 (i386_dr_low_get_status): Likewise.
11086 (i386_dr_low): New global variable.
11087
e1d2394b
MS
110882014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11089
11090 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11091 * Makefile.in (AR, AR_FLAGS): Define.
11092 * configure: Regenerate.
11093
3a8ee006
GB
110942014-06-19 Gary Benson <gbenson@redhat.com>
11095
11096 * Makefile.in (i386-dregs.o): New rule.
11097 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11098 * i386-low.c (target.h): Remove include.
11099 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11100 (DR_CONTROL_SHIFT): Likewise.
11101 (DR_CONTROL_SIZE): Likewise.
11102 (DR_RW_EXECUTE): Likewise.
11103 (DR_RW_WRITE): Likewise.
11104 (DR_RW_READ): Likewise.
11105 (DR_RW_IORW): Likewise.
11106 (DR_LEN_1): Likewise.
11107 (DR_LEN_2): Likewise.
11108 (DR_LEN_4): Likewise.
11109 (DR_LEN_8): Likewise.
11110 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11111 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11112 (DR_ENABLE_SIZE): Likewise.
11113 (DR_LOCAL_SLOWDOWN): Likewise.
11114 (DR_GLOBAL_SLOWDOWN): Likewise.
11115 (DR_CONTROL_RESERVED): Likewise.
11116 (I386_DR_CONTROL_MASK): Likewise.
11117 (I386_DR_VACANT): Likewise.
11118 (I386_DR_LOCAL_ENABLE): Likewise.
11119 (I386_DR_GLOBAL_ENABLE): Likewise.
11120 (I386_DR_DISABLE): Likewise.
11121 (I386_DR_SET_RW_LEN): Likewise.
11122 (I386_DR_GET_RW_LEN): Likewise.
11123 (I386_DR_WATCH_HIT): Likewise.
11124 (i386_wp_op_t): Likewise.
11125 (i386_show_dr): Likewise.
11126 (i386_length_and_rw_bits): Likewise.
11127 (i386_insert_aligned_watchpoint): Likewise.
11128 (i386_remove_aligned_watchpoint): Likewise.
11129 (i386_handle_nonaligned_watchpoint): Likewise.
11130 i386_update_inferior_debug_regs(): Likewise.
11131 (i386_dr_insert_watchpoint): Likewise.
11132 (i386_dr_remove_watchpoint): Likewise.
11133 (i386_dr_region_ok_for_watchpoint): Likewise.
11134 (i386_dr_stopped_data_address): Likewise.
11135 (i386_dr_stopped_by_watchpoint): Likewise.
11136
8f26655c
GB
111372014-06-19 Gary Benson <gbenson@redhat.com>
11138
11139 * i386-low.c (i386_dr_show): Renamed to
11140 i386_show_dr and made static. All uses updated.
11141 (i386_dr_length_and_rw_bits): Renamed to
11142 i386_length_and_rw_bits and made static.
11143 All uses updated.
11144 (i386_dr_insert_aligned_watchpoint): Renamed to
11145 i386_insert_aligned_watchpoint and made static.
11146 All uses updated.
11147 (i386_dr_remove_aligned_watchpoint): Renamed to
11148 i386_remove_aligned_watchpoint and made static.
11149 All uses updated.
11150 (i386_dr_update_inferior_debug_regs): Renamed to
11151 i386_update_inferior_debug_regs and made static.
11152 All uses updated.
11153
b9228891
GB
111542014-06-18 Gary Benson <gbenson@redhat.com>
11155
5171def3
GB
11156 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11157 (i386_dr_low_can_set_control): Likewise.
11158 (i386_get_debug_register_length): Likewise.
11159 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11160 (i386_dr_low_can_set_control): Likewise.
11161 (i386_get_debug_register_length): Likewise.
11162
111632014-06-17 Gary Benson <gbenson@redhat.com>
11164
b9228891
GB
11165 * i386-low.h (i386-dregs.h): New include.
11166 (DR_FIRSTADDR): Now in i386-dregs.h.
11167 (DR_LASTADDR): Likewise.
11168 (DR_NADDR): Likewise.
11169 (DR_STATUS): Likewise.
11170 (DR_CONTROL): Likewise.
11171 (i386_debug_reg_state): Likewise.
11172 (i386_dr_insert_watchpoint): Likewise.
11173 (i386_dr_remove_watchpoint): Likewise.
11174 (i386_dr_region_ok_for_watchpoint): Likewise.
11175 (i386_dr_stopped_data_address): Likewise.
11176 (i386_dr_stopped_by_watchpoint): Likewise.
11177 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11178
4be83cc2
GB
111792014-06-18 Gary Benson <gbenson@redhat.com>
11180
11181 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11182 i386_dr_insert_watchpoint.
11183 (i386_low_remove_watchpoint): Renamed to
11184 i386_dr_remove_watchpoint.
11185 (i386_low_region_ok_for_watchpoint): Renamed to
11186 i386_dr_region_ok_for_watchpoint.
11187 (i386_low_stopped_data_address): Renamed to
11188 i386_dr_stopped_data_address.
11189 (i386_low_stopped_by_watchpoint): Renamed to
11190 i386_dr_stopped_by_watchpoint.
11191 * i386-low.c (i386_show_dr): Renamed to
11192 i386_dr_show and made nonstatic. All uses updated.
11193 (i386_length_and_rw_bits): Renamed to
11194 i386_dr_length_and_rw_bits and made nonstatic.
11195 All uses updated.
11196 (i386_insert_aligned_watchpoint): Renamed to
11197 i386_dr_insert_aligned_watchpoint and made nonstatic.
11198 All uses updated.
11199 (i386_remove_aligned_watchpoint): Renamed to
11200 i386_dr_remove_aligned_watchpoint and made nonstatic.
11201 All uses updated.
11202 (i386_update_inferior_debug_regs): Renamed to
11203 i386_dr_update_inferior_debug_regs and made nonstatic.
11204 All uses updated.
11205 (i386_low_insert_watchpoint): Renamed to
11206 i386_dr_insert_watchpoint. All uses updated.
11207 (i386_low_remove_watchpoint): Renamed to
11208 i386_dr_remove_watchpoint. All uses updated.
11209 (i386_low_region_ok_for_watchpoint): Renamed to
11210 i386_dr_region_ok_for_watchpoint. All uses updated.
11211 (i386_low_stopped_data_address): Renamed to
11212 i386_dr_stopped_data_address. All uses updated.
11213 (i386_low_stopped_by_watchpoint): Renamed to
11214 i386_dr_stopped_by_watchpoint. All uses updated.
11215
131aa0d4
GB
112162014-06-18 Gary Benson <gbenson@redhat.com>
11217
11218 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11219 (i386_dr_low_can_set_control): Likewise.
11220 (i386_insert_aligned_watchpoint): New check.
11221
d9305f7f
GB
112222014-06-18 Gary Benson <gbenson@redhat.com>
11223
11224 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11225 Renamed to state.
11226
e927c9fc
GB
112272014-06-18 Gary Benson <gbenson@redhat.com>
11228
11229 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11230 instead of fatal and error.
11231 (i386_handle_nonaligned_watchpoint): Likewise.
11232
1b6d4134
GB
112332014-06-18 Gary Benson <gbenson@redhat.com>
11234
11235 * i386-low.c (i386_get_debug_register_length): New macro.
11236 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11237 (i386_show_dr): Use debug_printf instead of fprintf. Use
11238 phex to format values.
11239
6e62758f
GB
112402014-06-18 Gary Benson <gbenson@redhat.com>
11241
11242 * i386-low.h: Comment changes.
11243 * i386-low.c: Likewise.
11244
fc6e2f03
GB
112452014-06-18 Gary Benson <gbenson@redhat.com>
11246
11247 * i386-low.c: Whitespace changes.
11248
f9d1eeed
TT
112492014-06-12 Tom Tromey <tromey@redhat.com>
11250
11251 * utils.c (freeargv): Remove.
11252
0b04e523
TT
112532014-06-12 Tom Tromey <tromey@redhat.com>
11254
11255 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11256 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11257 (parse_debug_format_options): Likewise.
11258 (gdbserver_usage): Likewise.
11259 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11260 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11261 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11262 against libiberty.
11263 ($(LIBGNU)): Depend on libiberty.
11264 (all-lib): Recurse into all subdirs.
11265 (install-only): Invoke "install" target in subdirs.
11266 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11267 targets.
11268 * configure: Rebuild.
11269 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11270 for vasprintf, vsnprintf, or gettimeofday.
11271 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11272 srv_tgtobj.
11273
270c9937
JB
112742014-06-05 Joel Brobecker <brobecker@adacore.com>
11275
11276 * development.sh: Delete.
11277 * Makefile.in (config.status): Adjust dependency on development.sh.
11278 * configure.ac: Adjust development.sh source call.
11279 * configure: Regenerate.
11280
0a261ed8
PA
112812014-06-02 Pedro Alves <palves@redhat.com>
11282
11283 * ax.c (gdb_free_agent_expr): New function.
11284 * ax.h (gdb_free_agent_expr): New declaration.
11285 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11286 list.
11287 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11288 static.
11289 (clear_breakpoint_conditions_and_commands): New function.
11290 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11291 (clear_breakpoint_conditions_and_commands): New declaration.
11292
e9dae05e
RR
112932014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11294
11295 * linux-aarch64-low.c (asm/ptrace.h): Include.
11296
5876f503
JK
112972014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11298
11299 Fix TLS access for -static -pthread.
11300 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11301 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11302 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11303
802e8e6d
PA
113042014-05-20 Pedro Alves <palves@redhat.com>
11305
11306 * linux-aarch64-low.c (aarch64_insert_point)
11307 (aarch64_remove_point): No longer check whether the type is
11308 supported here. Adjust to new interface.
11309 (the_low_target): Install aarch64_supports_z_point_type as
11310 supports_z_point_type method.
11311 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11312 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11313 instead of a Z packet char. Adjust.
11314 (arm_supports_z_point_type): New function.
11315 (arm_insert_point, arm_remove_point): Adjust to new interface.
11316 (the_low_target): Install arm_supports_z_point_type.
11317 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11318 (cris_insert_point, cris_remove_point): Adjust to new interface.
11319 Don't check whether the type is supported here.
11320 (the_low_target): Install cris_supports_z_point_type.
11321 * linux-low.c (linux_supports_z_point_type): New function.
11322 (linux_insert_point, linux_remove_point): Adjust to new interface.
11323 * linux-low.h (struct linux_target_ops) <insert_point,
11324 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11325 raw_breakpoint pointer parameter.
11326 <supports_z_point_type>: New method.
11327 * linux-mips-low.c (mips_supports_z_point_type): New function.
11328 (mips_insert_point, mips_remove_point): Adjust to new interface.
11329 Use mips_supports_z_point_type.
11330 (the_low_target): Install mips_supports_z_point_type.
11331 * linux-ppc-low.c (the_low_target): Install NULL as
11332 supports_z_point_type method.
11333 * linux-s390-low.c (the_low_target): Install NULL as
11334 supports_z_point_type method.
11335 * linux-sparc-low.c (the_low_target): Install NULL as
11336 supports_z_point_type method.
11337 * linux-x86-low.c (x86_supports_z_point_type): New function.
11338 (x86_insert_point): Adjust to new insert_point interface. Use
11339 insert_memory_breakpoint. Adjust to new
11340 i386_low_insert_watchpoint interface.
11341 (x86_remove_point): Adjust to remove_point interface. Use
11342 remove_memory_breakpoint. Adjust to new
11343 i386_low_remove_watchpoint interface.
11344 (the_low_target): Install x86_supports_z_point_type.
11345 * lynx-low.c (lynx_target_ops): Install NULL as
11346 supports_z_point_type callback.
11347 * nto-low.c (nto_supports_z_point_type): New.
11348 (nto_insert_point, nto_remove_point): Adjust to new interface.
11349 (nto_target_ops): Install nto_supports_z_point_type.
11350 * mem-break.c: Adjust intro comment.
11351 (struct raw_breakpoint) <raw_type, size>: New fields.
11352 <inserted>: Update comment.
11353 <shlib_disabled>: Delete field.
11354 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11355 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11356 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11357 (raw_bkpt_type_to_target_hw_bp_type): New function.
11358 (find_enabled_raw_code_breakpoint_at): New function.
11359 (find_raw_breakpoint_at): New type and size parameters. Use them.
11360 (insert_memory_breakpoint): New function, based off
11361 set_raw_breakpoint_at.
11362 (remove_memory_breakpoint): New function.
11363 (set_raw_breakpoint_at): Reimplement.
11364 (set_breakpoint): New, based on set_breakpoint_at.
11365 (set_breakpoint_at): Reimplement.
11366 (delete_raw_breakpoint): Go through the_target->remove_point
11367 instead of assuming memory breakpoints.
11368 (find_gdb_breakpoint_at): Delete.
11369 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11370 (find_gdb_breakpoint): New function.
11371 (set_gdb_breakpoint_at): Delete.
11372 (z_type_supported): New function.
11373 (set_gdb_breakpoint_1): New function, loosely based off
11374 set_gdb_breakpoint_at.
11375 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11376 (delete_gdb_breakpoint_at): Delete.
11377 (delete_gdb_breakpoint_1): New function, loosely based off
11378 delete_gdb_breakpoint_at.
11379 (delete_gdb_breakpoint): New function.
11380 (clear_gdb_breakpoint_conditions): Rename to ...
11381 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11382 breakpoint.
11383 (add_condition_to_breakpoint): Make static.
11384 (add_breakpoint_condition): Take a struct breakpoint pointer
11385 instead of an address. Adjust.
11386 (gdb_condition_true_at_breakpoint): Rename to ...
11387 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11388 z_type parameter.
11389 (gdb_condition_true_at_breakpoint): Reimplement.
11390 (add_breakpoint_commands): Take a struct breakpoint pointer
11391 instead of an address. Adjust.
11392 (gdb_no_commands_at_breakpoint): Rename to ...
11393 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11394 parameter. Return true if no breakpoint was found. Change debug
11395 output.
11396 (gdb_no_commands_at_breakpoint): Reimplement.
11397 (run_breakpoint_commands): Rename to ...
11398 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11399 and change return type to boolean.
11400 (run_breakpoint_commands): New function.
11401 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11402 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11403 breakpoint. Go through the_target->remove_point instead of
11404 assuming memory breakpoint.
11405 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11406 software and hardware breakpoints.
11407 (reinsert_raw_breakpoint): Go through the_target->insert_point
11408 instead of assuming memory breakpoint.
11409 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11410 software and hardware breakpoints.
11411 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11412 Check both software and hardware breakpoints.
11413 (validate_inserted_breakpoint): Assert the breakpoint is a
11414 software breakpoint. Set the inserted flag to -1 instead of
11415 setting shlib_disabled.
11416 (delete_disabled_breakpoints): Adjust.
11417 (validate_breakpoints): Only validate software breakpoints.
11418 Adjust to inserted flag change.
11419 (check_mem_read, check_mem_write): Skip breakpoint types other
11420 than software breakpoints. Adjust to inserted flag change.
11421 * mem-break.h (enum raw_bkpt_type): New enum.
11422 (raw_breakpoint, struct process_info): Forward declare.
11423 (Z_packet_to_target_hw_bp_type): Delete declaration.
11424 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11425 (set_gdb_breakpoint, delete_gdb_breakpoint)
11426 (clear_breakpoint_conditions): New declarations.
11427 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11428 (breakpoint_inserted_here): Update comment.
11429 (add_breakpoint_condition, add_breakpoint_commands): Replace
11430 address parameter with a breakpoint pointer parameter.
11431 (gdb_breakpoint_here): Update comment.
11432 (delete_gdb_breakpoint_at): Delete.
11433 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11434 * server.c (process_point_options): Take a struct breakpoint
11435 pointer instead of an address. Adjust.
11436 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11437 delete_gdb_breakpoint.
11438 * spu-low.c (spu_target_ops): Install NULL as
11439 supports_z_point_type method.
11440 * target.h: Include mem-break.h.
11441 (struct target_ops) <prepare_to_access_memory>: Update comment.
11442 <supports_z_point_type>: New field.
11443 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11444 instead of a char. Also take a raw breakpoint pointer.
11445 * win32-arm-low.c (the_low_target): Install NULL as
11446 supports_z_point_type.
11447 * win32-i386-low.c (i386_supports_z_point_type): New function.
11448 (i386_insert_point, i386_remove_point): Adjust to new interface.
11449 (the_low_target): Install i386_supports_z_point_type.
11450 * win32-low.c (win32_supports_z_point_type): New function.
11451 (win32_insert_point, win32_remove_point): Adjust to new interface.
11452 (win32_target_ops): Install win32_supports_z_point_type.
11453 * win32-low.h (struct win32_target_ops):
11454 <supports_z_point_type>: New method.
11455 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11456 instead of a char. Also take a raw breakpoint pointer.
11457
932539e3
PA
114582014-05-20 Pedro Alves <palves@redhat.com>
11459
11460 * mem-break.h: Include break-common.h.
11461 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11462 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11463 (Z_packet_to_target_hw_bp_type): New declaration.
11464 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11465 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11466 (Z_PACKET_ACCESS_WP): Delete macros.
11467 (Z_packet_to_hw_type): Delete function.
11468 * i386-low.h: Don't include break-common.h here.
11469 (Z_packet_to_hw_type): Delete declaration.
11470 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11471 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11472 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11473 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11474 * linux-aarch64-low.c: Don't include break-common.h here.
11475 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11476 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11477 (Z_packet_to_target_hw_bp_type): Delete function.
11478 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11479 function.
11480 (mips_insert_point, mips_remove_point): Use
11481 Z_packet_to_target_hw_bp_type.
11482
4ff0d3d8
PA
114832014-05-20 Pedro Alves <palves@redhat.com>
11484
11485 * linux-aarch64-low.c: Include break-common.h.
11486 (enum target_point_type): Delete.
11487 (Z_packet_to_point_type): Rename to ...
11488 (Z_packet_to_target_hw_bp_type): ... this, and return a
11489 target_hw_bp_type instead.
11490 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11491 instead of an enum target_point_type.
11492 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11493 breakpoint type.
11494 (aarch64_dr_state_insert_one_point)
11495 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11496 (aarch64_handle_aligned_watchpoint)
11497 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11498 Take an enum target_hw_bp_type instead of an enum
11499 target_point_type.
11500 (aarch64_supports_z_point_type): New function.
11501 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
11502 use Z_packet_to_target_hw_bp_type.
11503
786dc519
JB
115042014-05-20 Joel Brobecker <brobecker@adacore.com>
11505
11506 * configure.ac: Only use -Werror by default when DEVELOPMENT
11507 is true.
11508 * configure: Regenerate.
11509
9e0aa64f
JK
115102014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
11511
11512 Fix gdbserver qGetTLSAddr for x86_64 -m32.
11513 * linux-x86-low.c (X86_64_USER_REGS): New.
11514 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
11515
2b577b92
YQ
115162014-04-28 Yao Qi <yao@codesourcery.com>
11517
11518 * Makefile.in (i386-avx512.c): Fix the typo of generated file
11519 name.
11520
94611da2
PA
115212014-04-25 Pedro Alves <palves@redhat.com>
11522
11523 PR server/16255
11524 * linux-low.c (linux_attach_fail_reason_string): New function.
11525 (linux_attach_lwp): Delete.
11526 (linux_attach_lwp_1): Rename to ...
11527 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
11528 argument. Remove "initial" parameter. Return int instead of
11529 void. Don't error or warn here.
11530 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11531 failure to attach to the tgid. Call warning when failing to
11532 attach to an lwp.
11533 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
11534 argument. Remove "initial" parameter. Return int instead of
11535 void. Don't error or warn here.
11536 (linux_attach_fail_reason_string): New declaration.
11537 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
11538 interface change. Use linux_attach_fail_reason_string.
11539
01f9f808
MS
115402014-04-24 Michael Sturm <michael.sturm@mintel.com>
11541 Walfred Tedeschi <walfred.tedeschi@intel.com>
11542
11543 * Makefile.in: Added rules to handle new files
11544 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
11545 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
11546 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
11547 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
11548 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
11549 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
11550 x32-avx512-linux.o.
11551 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
11552 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
11553 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
11554 i386/x32-avx512.xml.
11555 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
11556 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
11557 i386/x32-avx512-linux.xml.
11558 * i387-fp.c (num_avx512_k_registers): New constant for number
11559 of K registers.
11560 (num_avx512_zmmh_low_registers): New constant for number of
11561 lower ZMM registers (0-15).
11562 (num_avx512_zmmh_high_registers): New constant for number of
11563 higher ZMM registers (16-31).
11564 (num_avx512_ymmh_registers): New contant for number of higher
11565 YMM registers (ymm16-31 added by avx521 on x86_64).
11566 (num_avx512_xmm_registers): New constant for number of higher
11567 XMM registers (xmm16-31 added by AVX512 on x86_64).
11568 (struct i387_xsave): Add space for AVX512 registers.
11569 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
11570 Add code to handle AVX512 registers.
11571 (i387_xsave_to_cache): Add code to handle AVX512 registers.
11572 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
11573 prototypei from generated file.
11574 (tdesc_amd64_avx512_linux): Likewise.
11575 (init_registers_x32_avx512_linux): Likewise.
11576 (tdesc_x32_avx512_linux): Likewise.
11577 (init_registers_i386_avx512_linux): Likewise.
11578 (tdesc_i386_avx512_linux): Likewise.
11579 (x86_64_regmap): Add AVX512 registers.
11580 (x86_linux_read_description): Add code to handle AVX512 XSTATE
11581 mask.
11582 (initialize_low_arch): Add code to initialize AVX512 registers.
11583
51aa91f9
PA
115842014-04-23 Pedro Alves <palves@redhat.com>
11585
11586 * mem-break.c (find_gdb_breakpoint_at): Make static.
11587 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
11588
a4165e94
PA
115892014-04-23 Pedro Alves <palves@redhat.com>
11590
11591 * i386-low.c: Don't include break-common.h here.
11592 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11593 prototype to take target_hw_bp_type as argument instead of a Z
11594 packet char.
11595 * i386-low.h: Include break-common.h here.
11596 (Z_packet_to_hw_type): Declare.
11597 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11598 prototypes.
11599 * linux-x86-low.c (x86_insert_point): Convert the packet number to
11600 a target_hw_bp_type before calling i386_low_insert_watchpoint.
11601 (x86_remove_point): Convert the packet number to a
11602 target_hw_bp_type before calling i386_low_remove_watchpoint.
11603 * win32-i386-low.c (i386_insert_point): Convert the packet number
11604 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
11605 (i386_remove_point): Convert the packet number to a
11606 target_hw_bp_type before calling i386_low_remove_watchpoint.
11607
b8acf843
PA
116082014-04-23 Pedro Alves <palves@redhat.com>
11609
11610 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
11611
d708bcd1
PA
116122014-04-10 Pedro Alves <palves@redhat.com>
11613
11614 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11615 Check if the condition or command is NULL before checking if the
11616 breakpoint is known. On success, return true.
11617 * mem-break.h (add_breakpoint_condition): Document return.
11618 (add_breakpoint_commands): Add describing comment.
11619 * server.c (skip_to_semicolon): New function.
11620 (process_point_options): Use it.
11621
2eec7d5b
PA
116222014-04-09 Pedro Alves <palves@redhat.com>
11623
11624 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
11625 to lwpid_of.
11626
fa96cb38
PA
116272014-02-27 Pedro Alves <palves@redhat.com>
11628
11629 PR 12702
11630 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
11631 macros.
11632 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
11633 output.
11634 (last_thread_of_process_p): Take a PID argument instead of a
11635 thread pointer.
11636 (linux_wait_for_lwp): Delete.
11637 (num_lwps, check_zombie_leaders, not_stopped_callback): New
11638 functions.
11639 (linux_low_filter_event): New function, party factored out from
11640 linux_wait_for_event.
11641 (linux_wait_for_event): Rename to ...
11642 (linux_wait_for_event_filtered): ... this. Add new filter ptid
11643 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
11644 sigsuspend. Check for zombie leaders.
11645 (linux_wait_for_event): Reimplement as wrapper around
11646 linux_wait_for_event_filtered.
11647 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
11648 a normal or signal exit is seen, it's the whole process exiting.
11649 (wait_for_sigstop): No longer a for_each_inferior callback.
11650 Rewrite on top of linux_wait_for_event_filtered.
11651 (stop_all_lwps): Call wait_for_sigstop directly.
11652 * server.c (resume, handle_target_event): Handle
11653 TARGET_WAITKIND_NO_RESUMED.
11654
d763de10
JB
116552014-02-26 Joel Brobecker <brobecker@adacore.com>
11656
11657 * win32-low.c (psapi_get_dll_name,
11658 * win32_CreateToolhelp32Snapshot): Delete.
11659 (win32_CreateToolhelp32Snapshot, win32_Module32First)
11660 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
11661 Delete.
11662 (handle_load_dll): Add function description.
11663 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
11664
850a0f76
JB
116652014-02-26 Joel Brobecker <brobecker@adacore.com>
11666
11667 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
11668 Add comment.
11669 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
11670 base address when calling win32_add_one_solib.
11671 (handle_load_dll): Delete local variable load_addr.
11672 Remove 0x1000 offset applied to DLL base address when calling
11673 win32_add_one_solib.
11674 (handle_unload_dll): Add comment.
11675
f25b3fc3
JB
116762014-02-26 Joel Brobecker <brobecker@adacore.com>
11677
11678 * win32-low.c (win32_add_all_dlls): Renames
11679 win32_ensure_ntdll_loaded. Rewrite function documentation.
11680 Adjust implementation to always load all DLLs.
11681 Add 0x1000 offset to DLL base address when calling
11682 win32_add_one_solib.
11683 (child_initialization_done): New static global.
11684 (do_initial_child_stuff): Set child_initialization_done to
11685 zero during child initialization, and 1 after. Replace call
11686 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
11687 Add comment.
11688 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
11689 (handle_unload_dll): Add function documentation.
11690 (get_child_debug_event): Ignore load and unload DLL events
11691 during child initialization.
11692
d86d4aaf
DE
116932014-02-20 Doug Evans <dje@google.com>
11694
3bc32da3 11695 Remove global all_lwps.
d86d4aaf
DE
11696 * inferiors.h (ptid_of): Move here from linux-low.h.
11697 (pid_of, lwpid_of): Ditto.
11698 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
11699 parameter is a struct thread_info * now.
11700 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
11701 directly. Pass &all_threads to find_inferior instead of &all_lwps.
11702 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
11703 directly.
11704 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
11705 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
11706 * linux-arm-low.c (update_registers_callback): Update, "entry"
11707 parameter is a struct thread_info * now.
11708 Fetch lwpid from current_inferior directly.
11709 (arm_insert_point): Pass &all_threads to find_inferior instead of
11710 &all_lwps.
11711 (arm_remove_point): Ditto.
11712 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
11713 (arm_prepare_to_resume): Fetch pid from thread.
11714 (arm_read_description): Fetch lwpid from current_inferior directly.
11715 * linux-low.c (all_lwps): Delete.
11716 (delete_lwp): Delete call to remove_inferior.
11717 (handle_extended_wait): Fetch lwpid from thread.
11718 (add_lwp): Don't set lwp->entry.id. Remove call to
11719 add_inferior_to_list.
11720 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
11721 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
11722 (kill_one_lwp_callback): Ditto.
11723 (linux_kill): Don't dereference NULL pointer.
11724 Fetch ptid,lwpid from thread.
11725 (get_detach_signal): Fetch ptid from thread.
11726 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
11727 Simplify call to regcache_invalidate_thread.
11728 (delete_lwp_callback): Update, "entry" parameter is a
11729 struct thread_info * now. Fetch pid from thread.
11730 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
11731 (status_pending_p_callback): Update, "entry" parameter is a
11732 struct thread_info * now. Fetch ptid from thread.
11733 (find_lwp_pid): Update, "entry" parameter is a
11734 struct thread_info * now.
11735 (linux_wait_for_lwp): Fetch pid from thread.
11736 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
11737 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
11738 (enqueue_one_deferred_signal): Fetch lwpid from thread.
11739 (dequeue_one_deferred_signal): Ditto.
11740 (cancel_breakpoint): Fetch ptid from current_inferior.
11741 (linux_wait_for_event): Pass &all_threads to find_inferior,
11742 not &all_lwps. Fetch ptid, lwpid from thread.
11743 (count_events_callback): Update, "entry" parameter is a
11744 struct thread_info * now.
11745 (select_singlestep_lwp_callback): Ditto.
11746 (select_event_lwp_callback): Ditto.
11747 (cancel_breakpoints_callback): Ditto.
11748 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
11749 not &all_lwps.
11750 (select_event_lwp): Ditto. Fetch ptid from event_thread.
11751 (unsuspend_one_lwp): Update, "entry" parameter is a
11752 struct thread_info * now.
11753 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
11754 not &all_lwps.
11755 (linux_stabilize_threads): Ditto. And for for_each_inferior.
11756 Fetch lwpid from thread, not lwp.
11757 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
11758 Pass &all_threads to find_inferior, not &all_lwps.
11759 (send_sigstop): Fetch lwpid from thread, not lwp.
11760 (send_sigstop_callback): Update, "entry" parameter is a
11761 struct thread_info * now.
11762 (suspend_and_send_sigstop_callback): Ditto.
11763 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
11764 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
11765 struct thread_info * now.
11766 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
11767 from thread, lwp.
11768 (lwp_running): Update, "entry" parameter is a
11769 struct thread_info * now.
11770 (stop_all_lwps): Fetch ptid from thread.
11771 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
11772 (linux_resume_one_lwp): Fetch lwpid from thread.
11773 (linux_set_resume_request): Update, "entry" parameter is a
11774 struct thread_info * now. Fetch pid, lwpid from thread.
11775 (resume_status_pending_p): Update, "entry" parameter is a
11776 struct thread_info * now.
11777 (need_step_over_p): Ditto. Fetch lwpid from thread.
11778 (start_step_over): Fetch lwpid from thread.
11779 (linux_resume_one_thread): Update, "entry" parameter is a
11780 struct thread_info * now. Fetch lwpid from thread.
11781 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
11782 (proceed_one_lwp): Update, "entry" parameter is a
11783 struct thread_info * now. Fetch lwpid from thread.
11784 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
11785 struct thread_info * now.
11786 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
11787 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
11788 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
11789 directly.
11790 (regsets_store_inferior_registers): Ditto.
11791 (fetch_register, store_register): Ditto.
11792 (linux_read_memory, linux_write_memory): Ditto.
11793 (linux_request_interrupt): Ditto.
11794 (linux_read_auxv): Ditto.
11795 (linux_xfer_siginfo): Ditto.
11796 (linux_qxfer_spu): Ditto.
11797 (linux_qxfer_libraries_svr4): Ditto.
11798 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
11799 moved to inferiors.h.
11800 (get_lwp): Delete.
11801 (get_thread_lwp): Update.
11802 (struct lwp_info): Delete member "entry". Simplify comment for
11803 member "thread".
11804 (all_lwps): Delete.
11805 * linux-mips-low.c (mips_read_description): Fetch lwpid from
11806 current_inferior directly.
11807 (update_watch_registers_callback): Update, "entry" parameter is a
11808 struct thread_info * now. Fetch pid from thread.
11809 (mips_linux_prepare_to_resume): Fetch ptid from thread.
11810 (mips_insert_point): Fetch lwpid from current_inferior.
11811 Pass &all_threads to find_inferior, not &all_lwps.
11812 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
11813 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
11814 directly.
11815 (mips_stopped_data_address): Ditto.
11816 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
11817 directly.
11818 * linux-tile-low.c (tile_arch_setup): Ditto.
11819 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
11820 (update_debug_registers_callback): Update, "entry" parameter is a
11821 struct thread_info * now. Fetch pid from thread.
11822 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
11823 Pass &all_threads to find_inferior, not &all_lwps.
11824 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
11825 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
11826 Pass &all_threads to find_inferior, not &all_lwps.
11827 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
11828 (i386_dr_low_get_status): Ditto.
11829 (x86_linux_prepare_to_resume): Fetch ptid from thread.
11830 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
11831 (x86_linux_read_description): Ditto.
11832 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
11833
3b8361aa
DE
118342014-02-20 Doug Evans <dje@google.com>
11835
11836 * inferiors.c (get_first_inferior): Fix buglet.
11837
f7667f0d
DE
118382014-02-19 Doug Evans <dje@google.com>
11839
11840 * gdbthread.h (add_thread): Change result type to struct thread_info *.
11841 * inferiors.c (add_thread): Change result type to struct thread_info *.
11842 All callers updated.
11843 (add_lwp): Call add_thread here instead of in callers.
11844 All callers updated.
11845 * linux-low.h (get_lwp_thread): Rewrite.
11846 (struct lwp_info): New member "thread".
11847
b3312d80
DE
118482014-02-19 Doug Evans <dje@google.com>
11849
11850 * linux-low.c (add_lwp): Change result to struct lwp_info *.
11851 All callers updated.
11852
ecc6f45c
DE
118532014-02-19 Doug Evans <dje@google.com>
11854
11855 * inferiors.c (add_thread): Fix whitespace.
11856
649ebbca
DE
118572014-02-19 Doug Evans <dje@google.com>
11858
11859 * dll.c (clear_dlls): Replace accessing list implemention details
11860 with API function.
11861 * gdbthread.h (get_first_thread): Declare.
11862 * inferiors.c (for_each_inferior_with_data): New function.
11863 (get_first_thread): New function.
11864 (find_thread_ptid): Simplify.
11865 (get_first_inferior): New function.
11866 (clear_list): Delete.
11867 (one_inferior_p): New function.
11868 (clear_inferior_list): New function.
11869 (clear_inferiors): Update.
11870 * inferiors.h (for_each_inferior_with_data): Declare.
11871 (clear_inferior_list): Declare.
11872 (one_inferior_p): Declare.
11873 (get_first_inferior): Declare.
11874 * linux-low.c (linux_wait_for_event): Replace accessing list
11875 implemention details with API function.
11876 * server.c (target_running): Ditto.
11877 (accumulate_file_name_length): New function.
11878 (emit_dll_description): New function.
11879 (handle_qxfer_libraries): Replace accessing list implemention
11880 details with API function.
11881 (handle_qxfer_threads_worker): New function.
11882 (handle_qxfer_threads_proper): Replace accessing list implemention
11883 details with API function.
11884 (handle_query): Ditto.
11885 (visit_actioned_threads_callback_ftype): New typedef.
11886 (visit_actioned_threads_data): New struct.
11887 (visit_actioned_threads): Rewrite to be find_inferior callback.
11888 (resume): Call find_inferior.
11889 (handle_status): Replace accessing list implemention
11890 details with API function.
11891 (process_serial_event): Replace accessing list implemention details
11892 with API function.
11893 * target.c (set_desired_inferior): Replace accessing list implemention
11894 details with API function.
11895 * tracepoint.c (same_process_p): New function.
11896 (gdb_agent_about_to_close): Replace accessing list implemention
11897 details with API function.
11898 * win32-low.c (child_delete_thread): Replace accessing list
11899 implemention details with API function.
11900 (match_dll_by_basename): New function.
11901 (dll_is_loaded_by_basename): New function.
11902 (win32_ensure_ntdll_loaded): Replace accessing list implemention
11903 details call to dll_is_loaded_by_basename.
11904
80894984
DE
119052014-02-19 Doug Evans <dje@google.com>
11906
11907 * dll.h (struct dll_info): Add comment.
11908 * gdbthread.h (struct thread_info): Add comment.
11909 (current_ptid): Simplify.
11910 * inferiors.c (add_process): Update.
11911 (remove_process): Update.
11912 * inferiors.h (struct process_info): Rename member "head" to "entry".
11913 * linux-low.c (delete_lwp): Update.
11914 (add_lwp): Update.
11915 (last_thread_of_process_p): Update.
11916 (kill_one_lwp_callback, linux_kill): Update.
11917 (status_pending_p_callback): Update.
11918 (wait_for_sigstop): Update. Simplify read of ptid.
11919 (start_step_over): Update.
11920 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
11921 (get_lwp_thread): Update.
11922 (struct lwp_info): Rename member "head" to "entry".
11923 * regcache.h (inferior_list_entry): Delete.
11924 * server.c (kill_inferior_callback): Update.
11925 (detach_or_kill_inferior_callback): Update.
11926 (print_started_pid): Update.
11927 (print_attached_pid): Update.
11928 (process_serial_event): Simplify read of ptid.
11929 * thread-db.c (thread_db_create_event): Update.
11930 (thread_db_get_tls_address): Update.
11931 * win32-low.c (current_inferior_ptid): Simplify.
11932
46917d26
TT
119332014-02-19 Tom Tromey <tromey@redhat.com>
11934
11935 * target.h (struct target_ops) <supports_btrace>: Add target_ops
11936 argument.
11937 (target_supports_btrace): Update.
11938
0759a81e
YQ
119392014-02-14 Yao Qi <yao@codesourcery.com>
11940
11941 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
11942 (rsp-low-ipa.o): New target.
11943
a7191e8b
TT
119442014-02-12 Tom Tromey <tromey@redhat.com>
11945
11946 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
11947 convert_ascii_to_int.
11948 * regcache.c (registers_to_string): Likewise.
11949 * remote-utils.c (decode_M_packet): Likewise.
11950 * server.c (process_serial_event): Likewise.
11951
ff0e980e
TT
119522014-02-12 Tom Tromey <tromey@redhat.com>
11953
11954 * server.c (handle_query, handle_v_run): Use hex2bin, not
11955 unhexify.
11956 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
11957
e9371aff
TT
119582014-02-12 Tom Tromey <tromey@redhat.com>
11959
11960 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
11961 convert_int_to_ascii.
11962 * regcache.c (registers_to_string, collect_register_as_string):
11963 Likewise.
11964 * remote-utils.c (look_up_one_symbol, relocate_instruction):
11965 Likewise.
11966 * server.c (process_serial_event): Likewise.
11967 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
11968 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
11969
971dc0b8
TT
119702014-02-12 Tom Tromey <tromey@redhat.com>
11971
11972 * remote-utils.c (look_up_one_symbol, monitor_output): Use
11973 bin2hex, not hexify.
11974 * tracepoint.c (cmd_qtstatus): Likewise.
11975
0a822afb
TT
119762014-02-12 Tom Tromey <tromey@redhat.com>
11977
11978 * remote-utils.c (monitor_output): Pass explicit length to
11979 hexify.
11980
9c3d6531
TT
119812014-02-12 Tom Tromey <tromey@redhat.com>
11982
11983 * tracepoint.c: Include rsp-low.h.
11984 * server.c: Include rsp-low.h.
11985 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
11986 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
11987 declare.
11988 * remote-utils.c: Include rsp-low.h.
11989 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
11990 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
11991 (convert_int_to_ascii, convert_ascii_to_int): Move to
11992 common/rsp-low.c.
11993 * regcache.c: Include rsp-low.h.
11994 * ax.c: Include rsp-low.h.
11995 * Makefile.in (SFILES): Add common/rsp-low.c.
11996 (OBS): Add rsp-low.o.
11997 (rsp-low.o): New target.
11998
01fd3ea5
TT
119992014-02-12 Tom Tromey <tromey@redhat.com>
12000
12001 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12002 Include print-utils.h.
12003 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12004 (plongest, thirty_two, phex_nz): Remove.
12005 * Makefile.in (SFILES): Add common/print-utils.c.
12006 (OBS): Add print-utils.o.
12007 (print-utils-ipa.o): New target.
12008 (print-utils.o): New target.
12009 (IPA_OBJS): Add print-utils-ipa.o.
12010
e99dc820
TT
120112014-02-06 Tom Tromey <tromey@redhat.com>
12012
12013 * Makefile.in (SFILES): Fix indentation.
12014
ee1e2d4f
DE
120152014-02-05 Doug Evans <dje@google.com>
12016
12017 * linux-low.c (linux_wait_for_event): Improve comment.
12018 (linux_wait_1): Keep current_inferior in sync with event_child.
12019
f5a02773
DE
120202014-01-22 Doug Evans <dje@google.com>
12021
12022 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12023
87ce2a04
DE
120242014-01-22 Doug Evans <dje@google.com>
12025
12026 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12027 * configure: Regenerate.
12028 * config.in: Regenerate.
12029 * Makefile.in (SFILES): Add debug.c.
12030 (OBS): Add debug.o.
12031 * debug.c: New file.
12032 * debug.h: New file.
12033 * linux-aarch64-low.c (*): Update all debugging printfs to use
12034 debug_printf instead of fprintf.
12035 * linux-arm-low.c (*): Ditto.
12036 * linux-cris-low.c (*): Ditto.
12037 * linux-crisv32-low.c (*): Ditto.
12038 * linux-m32r-low.c (*): Ditto.
12039 * linux-sparc-low.c (*): Ditto.
12040 * linux-x86.c (*): Ditto.
12041 * linux-low.c (*): Ditto.
12042 (linux_wait_1): Add calls to debug_enter, debug_exit.
12043 (linux_wait): Remove redundant debugging printf.
12044 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12045 (linux_resume, unstop_all_lwps): Ditto.
12046 * mem-break.c (*): Update all debugging printfs to use
12047 debug_printf instead of fprintf.
12048 * remote-utils.c (*): Ditto.
12049 * thread-db.c (*): Ditto.
12050 * server.c #include <ctype.h>, "gdb_vecs.h".
12051 (debug_threads): Moved to debug.c.
12052 (*): Update all debugging printfs to use debug_printf instead of
12053 fprintf.
12054 (start_inferior): Replace call to fflush with call to debug_flush.
12055 (monitor_show_help): Mention set debug-format.
12056 (parse_debug_format_options): New function.
12057 (handle_monitor_command): Handle "monitor set debug-format".
12058 (gdbserver_usage): Mention --debug-format.
12059 (main): Parse --debug-format.
12060 * server.h (debug_threads): Declaration moved to debug.h.
12061 #include "debug.h".
12062 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12063 trace_debug_1 that uses debug_printf.
12064 (tracepoint_look_up_symbols): Update all debugging printfs to use
12065 debug_printf instead of fprintf.
12066
e671835b
BS
120672014-01-20 Baruch Siach <baruch@tkos.co.il>
12068
12069 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12070 sys/ptrace.h.
12071
b5737fa9
PA
120722014-01-17 Pedro Alves <palves@redhat.com>
12073
ea38d2a9 12074 PR build/16445
c7faa97a
PA
12075 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12076 defined after including gdb_proc_service.h.
b5737fa9 12077
40ed484e
DE
120782014-01-16 Doug Evans <dje@google.com>
12079
12080 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12081 (match_dll): Use it.
12082
969c39fb
MM
120832014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12084
12085 * target.h (target_ops) <read_btrace>: Change parameters and
12086 return type to allow error reporting.
12087 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12088 trace reading errors on.
12089 * linux-low.c (linux_low_read_btrace): Pass trace reading
12090 errors on.
12091 (linux_low_disable_btrace): New.
12092
ab7f45ba
DE
120932014-01-15 Doug Evans <dje@google.com>
12094
12095 * inferiors.c (thread_id_to_gdb_id): Delete.
12096 * inferiors.h (thread_id_to_gdb_id): Delete.
12097
66af0f44
EZ
120982014-01-13 Eli Zaretskii <eliz@gnu.org>
12099
12100 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12101 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12102 versions.
12103
9939e131
PA
121042014-01-08 Pedro Alves <palves@redhat.com>
12105
12106 * server.c (handle_status): Don't discard previous queued stop
12107 replies or thread's pending status here.
12108 (main) <disconnection>: Do it here instead.
12109
b7ea362b
PA
121102014-01-08 Pedro Alves <palves@redhat.com>
12111
12112 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12113 * server.c (visit_actioned_threads, handle_pending_status): New
12114 function.
12115 (handle_v_cont): Factor out parts to ...
12116 (resume): ... this new function. If in all-stop, and a thread
12117 being resumed has a pending status, report it without actually
12118 resuming.
12119 (myresume): Adjust to use the new 'resume' function.
12120 (clear_pending_status_callback, set_pending_status_callback)
12121 (find_status_pending_thread_callback): New functions.
12122 (handle_status): Handle the case of multiple threads having
12123 interesting statuses to report. Report threads' real last signal
12124 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12125 with an interesting thread to report the status for, instead of
12126 always reporting the status of the first thread.
12127
28498c42
JB
121282014-01-01 Joel Brobecker <brobecker@adacore.com>
12129
12130 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12131 * gdbreplay.c (gdbreplay_version): Likewise.
12132
f45c82da
YZ
121332013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12134
12135 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12136 iov.iov_len with the real length in use.
12137
379a5e2d
JB
121382013-12-13 Joel Brobecker <brobecker@adacore.com>
12139
12140 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12141 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12142 for all targets that use win32-low.c.
12143 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12144 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12145
4210d83e
PA
121462013-12-13 Pedro Alves <palves@redhat.com>
12147
12148 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12149 if equal to TARGET_WAITKIND_LOADED.
12150 * win32-low.c (cached_status): New static global.
12151 (win32_wait): Add declaration.
12152 (do_initial_child_stuff): Flush all initial pending debug events
12153 up to the initial breakpoint.
12154 (win32_wait): If CACHED_STATUS was set, return that instead
12155 of doing a real wait. Remove the code resuming the execution
12156 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12157 during the initial phase. Also remove the code changing
12158 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12159 TARGET_WAITKIND_STOPPED.
12160
e7f0d979
YQ
121612013-12-11 Yao Qi <yao@codesourcery.com>
12162
12163 * notif.c (handle_notif_ack): Return 0 if no notification
12164 matches.
12165
ebcf782c
DE
121662013-11-20 Doug Evans <dje@google.com>
12167
12168 * linux-low.c (linux_set_resume_request): Fix comment.
12169
20ad9378
DE
121702013-11-20 Doug Evans <dje@google.com>
12171
12172 * linux-low.c (resume_status_pending_p): Tweak comment.
12173
a196ebeb
WT
121742013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12175
12176 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12177 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12178 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12179 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12180 (srv_amd64_regobj): Add amd64-mpx.o.
12181 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12182 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12183 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12184 * i387-fp.c (num_pl_bnd_register) Added constant.
12185 (num_pl_bnd_cfg_registers) Added constant.
12186 (struct i387_xsave) Added reserved area and MPX fields.
12187 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12188 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12189 function.
12190 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12191 (init_registers_amd64_mpx_linux): Declare new function.
12192 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12193 (x86_64_regmap): Add MPX registers.
12194 (x86_linux_read_description): Add MPX case.
12195 (initialize_low_arch): Initialize MPX targets.
12196
0080a2f6
TT
121972013-11-18 Tom Tromey <tromey@redhat.com>
12198
12199 * configure: Rebuild.
12200 * configure.ac: Don't check for stdlib.h.
12201 * gdbreplay.c: Unconditionally include stdlib.h.
12202
2978b111
TT
122032013-11-18 Tom Tromey <tromey@redhat.com>
12204
12205 * config.in: Rebuild.
12206 * configure: Rebuild.
12207 * configure.ac: Don't use AC_HEADER_DIRENT.
12208
a3d08894
TT
122092013-11-18 Tom Tromey <tromey@redhat.com>
12210
12211 * server.h: Don't check HAVE_STRING_H.
12212 * gdbreplay.c: Don't check HAVE_STRING_H.
12213 * configure: Rebuild.
12214
0a5dd17d
TT
122152013-11-18 Tom Tromey <tromey@redhat.com>
12216
12217 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12218 LIBGNU.
12219
1bd2f0ba
TT
122202013-11-08 Tom Tromey <tromey@redhat.com>
12221
12222 * configure, config.in: Rebuild.
12223 * configure.ac: Remove unused configury.
12224
3266f10b
TT
122252013-11-08 Tom Tromey <tromey@redhat.com>
12226
12227 * acinclude.m4: Include common.m4, codeset.m4.
12228 * configure, config.in: Rebuild.
12229 * configure.ac: Use GDB_AC_COMMON.
12230
6682d959
AA
122312013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12232
12233 * linux-s390-low.c (HWCAP_S390_TE): New define.
12234 (s390_arch_setup): Consider the TE field in the HWCAP for
12235 determining 'have_regset_tdb'.
12236
fd0a4d76
SDJ
122372013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12238
12239 PR gdb/16014
12240 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12241 call to sizeof.
12242
1a3d890b
PA
122432013-10-02 Pedro Alves <palves@redhat.com>
12244
12245 * server.c (process_serial_event): Don't output "GDBserver
12246 exiting" if GDB is connected through stdio.
12247 * target.c (mywait): Likewise, be silent if GDB is connected
12248 through stdio.
12249
97ad4581
JB
122502013-10-01 Joel Brobecker <brobecker@adacore.com>
12251
12252 * lynx-low.c (lynx_add_threads_after_attach): New function.
12253 (lynx_attach): Remove call to add_thread. Add call to
12254 lynx_add_threads_after_attach instead.
12255
5b4e221c
MF
122562013-09-28 Mike Frysinger <vapier@gentoo.org>
12257
12258 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12259 * config.in, configure: Regenerated.
12260
ee47b2f8
YQ
122612013-09-18 Yao Qi <yao@codesourcery.com>
12262
12263 PR server/15959
12264 * server.c (start_inferior): Clear 'resume_info'.
12265
d6707650 122662013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 12267
d6707650
JW
12268 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12269 for each register.
12270
9243dd0e 122712013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 12272
9243dd0e
JW
12273 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12274 linux-tile-low.o to srv_tgtobj.
12275
c623a6ef
WN
122762013-09-16 Will Newton <will.newton@linaro.org>
12277
12278 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12279 out regs.
12280
fb71d39e
PA
122812013-09-06 Pedro Alves <palves@redhat.com>
12282
12283 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12284 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12285 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12286 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12287 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12288 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12289
8e7e9910
PA
122902013-09-06 Pedro Alves <palves@redhat.com>
12291
12292 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12293 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12294
7c3a12ca
PA
122952013-09-06 Pedro Alves <palves@redhat.com>
12296
12297 * linux-amd64-ipa.c: Include tracepoint.h.
12298 * linux-i386-ipa.c: Include tracepoint.h.
12299
8eb3d7b6
RW
123002013-09-06 Ricard Wanderlof <ricardw@axis.com>
12301
12302 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12303 (ps_get_thread_area): New function.
12304
eddddb9d
RW
123052013-09-06 Ricard Wanderlof <ricardw@axis.com>
12306
12307 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12308 (initialize_low_arch): Call init_registers_crisv32 rather than
12309 init_register_crisv32.
12310
533b0600
PA
123112013-09-05 Pedro Alves <palves@redhat.com>
12312
12313 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12314 to ...
12315 * hostio.h: ... this new file.
12316 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12317 win32-low.c: Include hostio.h.
12318
0ce3d3b5
PA
123192013-09-05 Pedro Alves <palves@redhat.com>
12320
12321 * server.h (gdb_client_data, handler_func, callback_handler_func)
12322 (delete_file_handler, add_file_handler, append_callback_event)
12323 (delete_callback_event, start_event_loop, initialize_event_loop):
12324 Move to event-loop.h and include it.
12325 * event-loop.h: New file.
12326
799cdc37
PA
123272013-09-05 Pedro Alves <palves@redhat.com>
12328
12329 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12330 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12331 (loaded_dll, unloaded_dll): Move to ...
12332 * dll.h: ... this new file.
12333 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12334
6a6bbd9d
PA
123352013-09-05 Pedro Alves <palves@redhat.com>
12336
12337 * server.h (current_process, get_thread_process, all_processes)
12338 (add_inferior_to_list, for_each_inferior, current_inferior)
12339 (remove_inferior, add_process, remove_process, find_process_pid)
12340 (have_started_inferiors_p, have_attached_inferiors_p)
12341 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12342 (clear_inferiors, find_inferior, find_inferior_id)
12343 (inferior_target_data, set_inferior_target_data)
12344 (inferior_regcache_data, set_inferior_regcache_data): Move to
12345 inferiors.h, and include it.
12346 * inferiors.h: New file.
12347
f699aaba
PA
123482013-09-05 Pedro Alves <palves@redhat.com>
12349
12350 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12351 Move ...
72f4393d 12352 * ax.h: ... here.
f699aaba 12353
c144c7a0
PA
123542013-09-05 Pedro Alves <palves@redhat.com>
12355
12356 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12357 tracepoint.h.
12358 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12359 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12360 (handle_tracepoint_general_set, handle_tracepoint_query)
12361 (tracepoint_finished_step, tracepoint_was_hit)
12362 (release_while_stepping_state_list, current_traceframe)
12363 (in_readonly_region, traceframe_read_mem)
12364 (fetch_traceframe_registers, traceframe_read_sdata)
12365 (traceframe_read_info, struct fast_tpoint_collect_status)
12366 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12367 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12368 (supply_fast_tracepoint_registers)
12369 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12370 (ipa_tdesc, claim_trampoline_space)
12371 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12372 (agent_mem_read, agent_get_trace_state_variable_value)
12373 (agent_set_trace_state_variable_value, agent_tsv_read)
12374 (agent_mem_read_string, get_raw_reg_func_addr)
12375 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12376 * tracepoint.h: ... this new file.
12377
ff42e6ab
PA
123782013-09-05 Pedro Alves <palves@redhat.com>
12379
12380 * server.h (perror_with_name, error, fatal, warning, paddress)
12381 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12382 include it.
12383 * utils.h: New file.
12384
541af0f4
PA
123852013-09-05 Pedro Alves <palves@redhat.com>
12386
12387 * server.h (remote_debug, noack_mode, transport_is_reliable)
12388 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12389 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12390 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12391 (write_enn, initialize_async_io, enable_async_io)
12392 (disable_async_io, check_remote_input_interrupt_request)
12393 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12394 (dead_thread_notify, prepare_resume_reply)
12395 (decode_address_to_semicolon, decode_address, decode_m_packet)
12396 (decode_M_packet, decode_X_packet, decode_xfer_write)
12397 (decode_search_memory_packet, unhexify, hexify)
12398 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12399 (look_up_one_symbol, relocate_instruction)
12400 (monitor_output): Move to remote-utils.h, and include it.
12401 * remote-utils.h: New file.
12402
eebdf26b
PA
124032013-09-05 Pedro Alves <palves@redhat.com>
12404
12405 * server.h (_): Delete.
12406
3aafd2ff
PA
124072013-09-02 Pedro Alves <palves@redhat.com>
12408
12409 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12410 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12411 allocated.
12412 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12413
cee83bcb
PM
124142013-09-02 Pierre Muller <muller@sourceware.org>
12415
12416 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12417 or WriteProcessMemory complete successfully and handle
12418 ERROR_PARTIAL_COPY error.
12419
9a13b2fa
PA
124202013-09-02 Pedro Alves <palves@redhat.com>
12421
12422 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12423 error instead of EIO.
12424
602e3198
JK
124252013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12426
12427 PR server/15604
12428 * linux-low.c: Include filestuff.h.
12429 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12430 * lynx-low.c: Include filestuff.h.
12431 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12432 * server.c: Include filestuff.h.
12433 (main): Call notice_open_fds.
12434 * spu-low.c: Include filestuff.h.
12435 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12436
96d7229d
LM
124372013-08-22 Luis Machado <lgustavo@codesourcery.com>
12438
12439 * Makefile.in: Explain why ../target and ../nat are not
12440 listed as include file search paths.
12441 (linux-waitpid.o): New object file rule.
12442 * configure.srv (srv_native_linux_obj): New variable.
12443 Replace all occurrences of linux native object files with
12444 $srv_native_linux_obj.
12445 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12446 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12447 (linux_enable_event_reporting): Remove declaration.
12448 (my_waitpid): Moved to common/linux-waitpid.c.
12449 (linux_wait_for_event): Pass ptid when calling
12450 linux_enable_event_reporting.
12451 (linux_supports_tracefork_flag): Remove.
12452 (linux_enable_event_reporting): Likewise.
12453 (linux_tracefork_grandchild): Remove.
12454 (STACK_SIZE): Moved to common/linux-ptrace.c.
12455 (linux_tracefork_child): Remove.
12456 (linux_test_for_tracefork): Remove.
12457 (linux_look_up_symbols): Call linux_supports_traceclone.
12458 (initialize_low): Remove call to linux_test_for_tracefork.
12459 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12460 common/linux-ptrace.h.
12461 (PTRACE_TYPE_ARG4): Likewise.
12462 Include linux-ptrace.h.
12463
32940073
PA
124642013-08-21 Pedro Alves <palves@redhat.com>
12465
12466 * config.in: Renegerate.
12467
33b60d58 124682013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 12469
33b60d58
LM
12470 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12471 (SFILES): Remove $(srcdir)/common/target-common.c and
12472 add $(srcdir)/target/waitstatus.c.
12473 (OBS): Remove target-common.o and add waitstatus.o.
12474 (server_h): Remove $(srcdir)/../common/target-common.h and
12475 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12476 and $(srcdir)/../target/waitstatus.h.
12477 (target-common.o): Remove.
12478 (waitstatus.o): New target object file.
12479 * target.h: Do not include target-common.h and
12480 include target/resume.h, target/wait.h and
12481 target/waitstatus.h.
12482
b8e1b30e
LM
124832013-08-13 Luis Machado <lgustavo@codesourcery.com>
12484
12485 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12486 to PTRACE_TYPE_ARG3.
12487 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12488 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12489 PTRACE_TYPE_ARG4.
12490 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12491 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12492
7a60ad40
YQ
124932013-07-27 Jie Zhang <jie@codesourcery.com>
12494 Daniel Jacobowitz <dan@codesourcery.com>
12495 Yao Qi <yao@codesourcery.com>
12496
12497 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12498 (mips-linux-watch.o): New rule.
12499 (mips_linux_watch_h): New variable.
12500 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
12501 srv_tgtobj.
12502 * linux-mips-low.c: Include mips-linux-watch.h.
12503 (struct arch_process_info, struct arch_lwp_info): New.
12504 (update_watch_registers_callback): New function.
12505 (mips_linux_new_process, mips_linux_new_thread) New functions.
12506 (mips_linux_prepare_to_resume, mips_insert_point): New
12507 functions.
12508 (mips_remove_point, mips_stopped_by_watchpoint): New
12509 functions.
12510 (rsp_bp_type_to_target_hw_bp_type): New function.
12511 (mips_stopped_data_address): New function.
12512 (the_low_target): Add watchpoint support functions.
12513
de6f69ad
YQ
125142013-07-27 Yao Qi <yao@codesourcery.com>
12515
12516 * i386-low.c: Include break-common.h.
12517 (enum target_hw_bp_type): Remove.
12518
3360c0bf
LM
125192013-07-24 Luis Machado <lgustavo@codesourcery.com>
12520
12521 * Makefile.in (SFILES): /common/target-common.c.
12522 (OBS): Add target-common.o.
12523 (server_h): Add $(srcdir)/../common/target-common.h.
12524 (target-common.o): New target.
12525 * server.c (queue_stop_reply_callback): Free
12526 status string after use.
12527 * target.c (target_waitstatus_to_string): Remove.
12528 * target.h: Include target-common.h.
12529 (resume_kind): Likewise.
12530 (target_waitkind): Likewise.
12531 (target_waitstatus): Likewise.
12532 (TARGET_WNOHANG): Likewise.
12533
bd885420
YQ
125342013-07-04 Yao Qi <yao@codesourcery.com>
12535
12536 * Makefile.in (host_alias): Use @host_noncanonical@.
12537 (target_alias): Use @target_noncanonical@.
12538 * configure.ac: Use ACX_NONCANONICAL_TARGET and
12539 ACX_NONCANONICAL_HOST.
12540 * configure: Regenerated.
12541
12542 Revert:
12543 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12544
12545 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12546 * configure: Rebuild.
12547 * Makefile.in (version_host, version_target): Get from configure.
12548 (version.c): Use $(version_host) and $(version_target).
12549
17ef446e
PA
125502013-07-03 Pedro Alves <palves@redhat.com>
12551
12552 * Makefile.in (config.status): Depend on development.sh.
12553 * acinclude.m4: Include libmcheck.m4.
12554 * configure: Regenerate.
12555
7a9a7487
MG
125562013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12557
12558 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
12559 attribute inside the parentheses.
12560 (winapi_DebugSetProcessKillOnExit): Ditto.
12561 (winapi_DebugBreakProcess): Ditto.
12562 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 12563
49b64de6
MG
125642013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12565
12566 * notif.h (notif_event): Add a dummy member to avoid compiler
12567 errors.
12568
d5749ee7
PA
125692013-07-01 Pedro Alves <palves@redhat.com>
12570
12571 * hostio.c (HOSTIO_PATH_MAX): Define.
12572 (require_filename, handle_open, handle_unlink, handle_readlink):
12573 Use it.
12574
d8d2a3ee
PA
125752013-07-01 Pedro Alves <palves@redhat.com>
12576
12577 * server.h: Include "pathmax.h".
12578 * linux-low.c: Don't include sys/param.h.
12579 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
12580 MAXPATHLEN.
12581 * win32-low.c: Don't include sys/param.h.
12582 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
12583
bc7dea8d
PA
125842013-07-01 Pedro Alves <palves@redhat.com>
12585
12586 * event-loop.c: Don't check HAVE_UNISTD_H before including
12587 <unistd.h>.
12588 * gdbreplay.c: Likewise.
12589 * remote-utils.c: Likewise.
12590 * server.c: Likewise.
12591 * configure.ac: Don't check for unistd.h.
12592 * configure: Regenerate.
12593
d6c2da54
TT
125942013-06-28 Tom Tromey <tromey@redhat.com>
12595
12596 * Makefile.in (version.c): Use version.in, not
12597 common/version.in.
12598
257b6bec
MG
125992013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12600
12601 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12602 * configure: Rebuild.
12603 * Makefile.in (version_host, version_target): Get from configure.
12604 (version.c): Use $(version_host) and $(version_target).
12605
86ebe149
DK
126062013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12607
12608 Fix trace-status to output user name without trailing colon.
12609 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
12610
f30aa5af
DK
126112013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12612
12613 Fix trace-status to output proper start-time and stop-time.
12614 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
12615 output start time and stop time in hex as gdb expects.
12616
28a93511
YQ
126172013-06-26 Pedro Alves <pedro@codesourcery.com>
12618
12619 * tracepoint.c (build_traceframe_info_xml): Output trace state
12620 variables present in the trace buffer.
12621
01208463
TT
126222013-06-24 Tom Tromey <tromey@redhat.com>
12623
12624 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
12625 create-version.sh.
12626 (version.o): Remove.
12627 * gdbreplay.c: Include version.h.
12628 (version, host_name): Don't declare.
12629 * server.h: Include version.h.
12630 (version, host_name): Don't declare.
12631
760256f9
PA
126322013-06-12 Pedro Alves <palves@redhat.com>
12633
12634 * linux-x86-low.c (linux_is_elf64): Delete global.
12635 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
12636 with local linux_pid_exe_is_elf_64_file use.
12637
030031ee
PA
126382013-06-11 Pedro Alves <palves@redhat.com>
12639
12640 * linux-low.c (regset_disabled, disable_regset): New functions.
12641 (regsets_fetch_inferior_registers)
12642 (regsets_store_inferior_registers): Use them.
12643 (initialize_regsets_info); Don't allocate the disabled_regsets
12644 array here.
12645 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
12646 comment.
12647
5da6eb0a
PA
126482013-06-11 Pedro Alves <palves@redhat.com>
12649
12650 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
12651 xmalloc.
12652
7e5aaa09
PA
126532013-06-11 Pedro Alves <palves@redhat.com>
12654
12655 * linux-x86-low.c (initialize_low_arch): Call
12656 init_registers_x32_avx_linux.
12657
d878444c
JK
126582013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
12659
12660 Fix compatibility with Android Bionic.
12661 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
12662 it is not empty.
12663
3aee8918
PA
126642013-06-07 Pedro Alves <palves@redhat.com>
12665
5f2b57b5 12666 PR server/14823
3aee8918
PA
12667 * Makefile.in (OBS): Add tdesc.o.
12668 (IPA_OBJS): Add tdesc-ipa.o.
12669 (tdesc-ipa.o): New rule.
12670 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
12671 interface.
12672 * linux-low.c (new_inferior): Delete.
12673 (disabled_regsets, num_regsets): Delete.
12674 (linux_add_process): Adjust to set the new per-process
12675 new_inferior flag.
12676 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
12677 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
12678 was a stop. When calling arch_setup, switch the current inferior
12679 to the thread that got an event.
12680 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
12681 (regsets_fetch_inferior_registers)
12682 (regsets_store_inferior_registers): New regsets_info parameter.
12683 Adjust to use it.
12684 (linux_register_in_regsets): New regs_info parameter. Adjust to
12685 use it.
12686 (register_addr, fetch_register, store_register): New usrregs_info
12687 parameter. Adjust to use it.
12688 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
12689 parameter regs_info. Adjust to use it.
12690 (linux_fetch_registers): Get the current inferior's regs_info, and
12691 adjust to use it.
12692 (linux_store_registers): Ditto.
12693 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
12694 (initialize_low): Don't initialize the target_regsets here. Call
12695 initialize_low_arch.
12696 * linux-low.h (target_regsets): Delete declaration.
12697 (struct regsets_info): New.
12698 (struct usrregs_info): New.
12699 (struct regs_info): New.
12700 (struct process_info_private) <new_inferior>: New field.
12701 (struct linux_target_ops): Delete the num_regs, regmap, and
12702 regset_bitmap fields. New field regs_info.
12703 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
12704 * i387-fp.c (num_xmm_registers): Delete.
12705 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
12706 calls to new interface.
12707 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
12708 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
12709 Infer the number of xmm registers from the regcache's target
12710 description.
12711 * i387-fp.h (num_xmm_registers): Delete.
12712 * inferiors.c (add_thread): Don't install the thread's regcache
12713 here.
12714 * proc-service.c (gregset_info): Fetch the current inferior's
12715 regs_info. Adjust to use it.
12716 * regcache.c: Include tdesc.h.
12717 (register_bytes, reg_defs, num_registers)
12718 (gdbserver_expedite_regs): Delete.
12719 (get_thread_regcache): If the thread doesn't have a regcache yet,
12720 create one, instead of aborting gdbserver.
12721 (regcache_invalidate_one): Rename to ...
12722 (regcache_invalidate_thread): ... this.
12723 (regcache_invalidate_one): New.
12724 (regcache_invalidate): Only invalidate registers of the current
12725 process.
12726 (init_register_cache): Add target_desc parameter, and use it.
12727 (new_register_cache): Ditto. Assert the target description has a
12728 non zero registers_size.
12729 (regcache_cpy): Add assertions. Adjust.
12730 (realloc_register_cache, set_register_cache): Delete.
12731 (registers_to_string, registers_from_string): Adjust.
12732 (find_register_by_name, find_regno, find_register_by_number)
12733 (register_cache_size): Add target_desc parameter, and use it.
12734 (free_register_cache_thread, free_register_cache_thread_one)
12735 (regcache_release, register_cache_size): New.
12736 (register_size): Add target_desc parameter, and use it.
12737 (register_data, supply_register, supply_register_zeroed)
12738 (supply_regblock, supply_register_by_name, collect_register)
12739 (collect_register_as_string, collect_register_by_name): Adjust.
12740 * regcache.h (struct target_desc): Forward declare.
12741 (struct regcache) <tdesc>: New field.
12742 (init_register_cache, new_register_cache): Add target_desc
12743 parameter.
12744 (regcache_invalidate_thread): Declare.
12745 (regcache_invalidate_one): Delete declaration.
12746 (regcache_release): Declare.
12747 (find_register_by_number, register_cache_size, register_size)
12748 (find_regno): Add target_desc parameter.
12749 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
12750 declarations.
12751 * remote-utils.c: Include tdesc.h.
12752 (outreg, prepare_resume_reply): Adjust.
12753 * server.c: Include tdesc.h.
12754 (gdbserver_xmltarget): Delete declaration.
12755 (get_features_xml, process_serial_event): Adjust.
12756 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
12757 declare.
12758 (struct process_info) <tdesc>: New field.
12759 (ipa_tdesc): Declare.
12760 * tdesc.c: New file.
12761 * tdesc.h: New file.
12762 * tracepoint.c: Include tdesc.h.
12763 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
12764 (get_context_regcache): Adjust to pass ipa_tdesc down.
12765 (do_action_at_tracepoint): Adjust to get the register cache size
12766 from the context regcache's description.
12767 (traceframe_walk_blocks): Adjust to get the register cache size
12768 from the current trace frame's description.
12769 (traceframe_get_pc): Adjust to get current trace frame's
12770 description and pass it down.
12771 (gdb_collect): Adjust to get the register cache size from the
12772 IPA's description.
12773 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
12774 (gdbserver_xmltarget): Delete.
12775 (initialize_low_tracepoint): Set the ipa's target description.
12776 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
12777 (initialize_low_tracepoint): Set the ipa's target description.
12778 * linux-x86-low.c: Include tdesc.h.
12779 [__x86_64__] (is_64bit_tdesc): New.
12780 (ps_get_thread_area, x86_get_thread_area): Use it.
12781 (i386_cannot_store_register): Rename to ...
12782 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
12783 (i386_cannot_fetch_register): Rename to ...
12784 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
12785 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
12786 to new interface.
12787 (target_regsets): Rename to ...
12788 (x86_regsets): ... this.
12789 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
12790 interface.
12791 (x86_siginfo_fixup): Use is_64bit_tdesc.
12792 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
12793 (tdesc_x32_avx_linux, tdesc_x32_linux)
12794 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
12795 Declare.
12796 (x86_linux_update_xmltarget): Delete.
12797 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
12798 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
12799 (AMD64_LINUX_USER64_CS): New.
12800 (x86_linux_read_description): New, based on
12801 x86_linux_update_xmltarget.
12802 (same_process_callback): New.
12803 (x86_arch_setup_process_callback): New.
12804 (x86_linux_update_xmltarget): New.
12805 (x86_regsets_info): New.
12806 (amd64_linux_regs_info): New.
12807 (i386_linux_usrregs_info): New.
12808 (i386_linux_regs_info): New.
12809 (x86_linux_regs_info): New.
12810 (x86_arch_setup): Reimplement.
12811 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
12812 (x86_emit_ops): Ditto.
12813 (the_low_target): Adjust. Install x86_linux_regs_info,
12814 x86_cannot_fetch_register, and x86_cannot_store_register.
12815 (initialize_low_arch): New.
12816 * linux-ia64-low.c (tdesc_ia64): Declare.
12817 (ia64_fetch_register): Adjust.
12818 (ia64_usrregs_info, regs_info): New globals.
12819 (ia64_regs_info): New function.
12820 (the_low_target): Adjust.
12821 (initialize_low_arch): New function.
12822 * linux-sparc-low.c (tdesc_sparc64): Declare.
12823 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
12824 Adjust.
12825 (sparc_arch_setup): New function.
12826 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
12827 (the_low_target): Adjust.
12828 (initialize_low_arch): New function.
12829 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
12830 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
12831 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
12832 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
12833 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
12834 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
12835 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
12836 (tdesc_powerpc_isa205_vsx64l): Declare.
12837 (ppc_cannot_store_register, ppc_collect_ptrace_register)
12838 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
12839 (ppc_set_pc, ppc_get_hwcap): Adjust.
12840 (ppc_usrregs_info): Forward declare.
12841 (!__powerpc64__) ppc_regmap_adjusted: New global.
12842 (ppc_arch_setup): Adjust to the current process'es target
12843 description.
12844 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
12845 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
12846 (ppc_store_evrregset): Adjust.
12847 (target_regsets): Rename to ...
12848 (ppc_regsets): ... this, and make static.
12849 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
12850 (ppc_regs_info): New function.
12851 (the_low_target): Adjust.
12852 (initialize_low_arch): New function.
12853 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
12854 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
12855 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
12856 (tdesc_s390x_linux64v2): Declare.
12857 (s390_collect_ptrace_register, s390_supply_ptrace_register)
12858 (s390_fill_gregset, s390_store_last_break): Adjust.
12859 (target_regsets): Rename to ...
12860 (s390_regsets): ... this, and make static.
12861 (s390_get_pc, s390_set_pc): Adjust.
12862 (s390_get_hwcap): New target_desc parameter, and use it.
12863 [__s390x__] (have_hwcap_s390_high_gprs): New global.
12864 (s390_arch_setup): Adjust to set the current process'es target
12865 description. Don't adjust the regmap.
12866 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
12867 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
12868 (regs_info_3264): New globals.
12869 (s390_regs_info): New function.
12870 (the_low_target): Adjust.
12871 (initialize_low_arch): New function.
12872 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
12873 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
12874 [__mips64] (init_registers_mips_linux)
12875 (init_registers_mips_dsp_linux): Delete defines.
12876 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
12877 (have_dsp): New global.
12878 (mips_read_description): New, based on mips_arch_setup.
12879 (mips_arch_setup): Reimplement.
12880 (get_usrregs_info): New function.
12881 (mips_cannot_fetch_register, mips_cannot_store_register)
12882 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
12883 (mips_fill_fpregset, mips_store_fpregset): Adjust.
12884 (target_regsets): Rename to ...
12885 (mips_regsets): ... this, and make static.
12886 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
12887 (dsp_regs_info, regs_info): New globals.
12888 (mips_regs_info): New function.
12889 (the_low_target): Adjust.
12890 (initialize_low_arch): New function.
12891 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
12892 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
12893 Declare.
12894 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
12895 (arm_read_description): New, with bits factored from
12896 arm_arch_setup.
12897 (arm_arch_setup): Reimplement.
12898 (target_regsets): Rename to ...
12899 (arm_regsets): ... this, and make static.
12900 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
12901 (arm_regs_info): New function.
12902 (the_low_target): Adjust.
12903 (initialize_low_arch): New function.
12904 * linux-m68k-low.c (tdesc_m68k): Declare.
12905 (target_regsets): Rename to ...
12906 (m68k_regsets): ... this, and make static.
12907 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
12908 (m68k_regs_info): New function.
12909 (m68k_arch_setup): New function.
12910 (the_low_target): Adjust.
12911 (initialize_low_arch): New function.
12912 * linux-sh-low.c (tdesc_sharch): Declare.
12913 (target_regsets): Rename to ...
12914 (sh_regsets): ... this, and make static.
12915 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
12916 (sh_regs_info, sh_arch_setup): New functions.
12917 (the_low_target): Adjust.
12918 (initialize_low_arch): New function.
12919 * linux-bfin-low.c (tdesc_bfin): Declare.
12920 (bfin_arch_setup): New function.
12921 (bfin_usrregs_info, regs_info): New globals.
12922 (bfin_regs_info): New function.
12923 (the_low_target): Adjust.
12924 (initialize_low_arch): New function.
12925 * linux-cris-low.c (tdesc_cris): Declare.
12926 (cris_arch_setup): New function.
12927 (cris_usrregs_info, regs_info): New globals.
12928 (cris_regs_info): New function.
12929 (the_low_target): Adjust.
12930 (initialize_low_arch): New function.
12931 * linux-cris-low.c (tdesc_crisv32): Declare.
12932 (cris_arch_setup): New function.
12933 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
12934 (cris_regs_info): New function.
12935 (the_low_target): Adjust.
12936 (initialize_low_arch): New function.
12937 * linux-m32r-low.c (tdesc_m32r): Declare.
12938 (m32r_arch_setup): New function.
12939 (m32r_usrregs_info, regs_info): New globals.
12940 (m32r_regs_info): Adjust.
12941 (initialize_low_arch): New function.
12942 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
12943 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
12944 (tic6x_usrregs_info): Forward declare.
12945 (tic6x_read_description): New function, based on ...
12946 (tic6x_arch_setup): ... this. Reimplement.
12947 (target_regsets): Rename to ...
12948 (tic6x_regsets): ... this, and make static.
12949 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
12950 (tic6x_regs_info): New function.
12951 (the_low_target): Adjust.
12952 (initialize_low_arch): New function.
12953 * linux-xtensa-low.c (tdesc_xtensa): Declare.
12954 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
12955 (target_regsets): Rename to ...
12956 (xtensa_regsets): ... this, and make static.
12957 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
12958 globals.
12959 (xtensa_arch_setup, xtensa_regs_info): New functions.
12960 (the_low_target): Adjust.
12961 (initialize_low_arch): New function.
12962 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
12963 (nios2_arch_setup): Set the current process'es tdesc.
12964 (target_regsets): Rename to ...
12965 (nios2_regsets): ... this.
12966 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
12967 (nios2_regs_info): New function.
12968 (the_low_target): Adjust.
12969 (initialize_low_arch): New function.
a261b8f5
PA
12970 * linux-aarch64-low.c (tdesc_aarch64): Declare.
12971 (aarch64_arch_setup): Set the current process'es tdesc.
12972 (target_regsets): Rename to ...
12973 (aarch64_regsets): ... this.
12974 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
12975 (aarch64_regs_info): New function.
12976 (the_low_target): Adjust.
12977 (initialize_low_arch): New function.
3aee8918
PA
12978 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
12979 globals.
12980 (target_regsets): Rename to ...
12981 (tile_regsets): ... this.
12982 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
12983 (tile_regs_info): New function.
12984 (tile_arch_setup): Set the current process'es tdesc.
12985 (the_low_target): Adjust.
12986 (initialize_low_arch): New function.
12987 * spu-low.c (tdesc_spu): Declare.
12988 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
12989 * win32-arm-low.c (tdesc_arm): Declare.
12990 (arm_arch_setup): New function.
12991 (the_low_target): Install arm_arch_setup instead of
12992 init_registers_arm.
12993 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
12994 (init_windows_x86): Rename to ...
12995 (i386_arch_setup): ... this. Set `win32_tdesc'.
12996 (the_low_target): Adjust.
12997 * win32-low.c (win32_tdesc): New global.
12998 (child_add_thread): Don't create the thread cache here.
12999 (do_initial_child_stuff): Set the new process'es tdesc.
13000 * win32-low.h (struct target_desc): Forward declare.
13001 (win32_tdesc): Declare.
13002 * lynx-i386-low.c (tdesc_i386): Declare global.
13003 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13004 * lynx-low.c (lynx_tdesc): New global.
13005 (lynx_add_process): Set the new process'es tdesc.
13006 * lynx-low.h (struct target_desc): Forward declare.
13007 (lynx_tdesc): Declare global.
13008 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13009 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13010 * nto-low.c (nto_tdesc): New global.
13011 (do_attach): Set the new process'es tdesc.
13012 * nto-low.h (struct target_desc): Forward declare.
13013 (nto_tdesc): Declare.
13014 * nto-x86-low.c (tdesc_i386): Declare.
13015 (nto_x86_arch_setup): Set `nto_tdesc'.
13016
b1fbec62
GB
130172013-06-04 Gary Benson <gbenson@redhat.com>
13018
13019 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13020 to qSupported response when appropriate.
13021 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13022 with nonzero-length annex.
13023 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13024 arguments supplied in annex.
13025
d1ec4ce7
DE
130262013-05-31 Doug Evans <dje@google.com>
13027
ac44adcb 13028 PR server/15594
d1ec4ce7
DE
13029 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13030 64 bits in 64-cross-32 environment.
13031
9b25f2d3
PA
130322013-05-28 Pedro Alves <palves@redhat.com>
13033
13034 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13035 (aarch64-without-fpu.c): Delete rule.
13036 * configure.srv (aarch64*-*-linux*): Remove references to
13037 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13038 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13039 declaration.
13040
6740dc9c
PA
130412013-05-24 Pedro Alves <palves@redhat.com>
13042
13043 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13044 instead of strchr/decode_address. Error if the range isn't split
13045 with a ','. Don't assume there's be a ':' in the action.
13046
c2d6af84
PA
130472013-05-23 Yao Qi <yao@codesourcery.com>
13048 Pedro Alves <palves@redhat.com>
13049
13050 * linux-low.c (lwp_in_step_range): New function.
13051 (linux_wait_1): If the thread was range stepping and stopped
13052 outside the stepping range, report the stop to GDB. Otherwise,
13053 continue stepping. Add range stepping debug output.
13054 (linux_set_resume_request): Copy the step range from the resume
13055 request to the lwp.
13056 (linux_supports_range_stepping): New.
13057 (linux_target_ops) <supports_range_stepping>: Set to
13058 linux_supports_range_stepping.
13059 * linux-low.h (struct linux_target_ops)
13060 <supports_range_stepping>: New field.
13061 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13062 * linux-x86-low.c (x86_supports_range_stepping): New.
13063 (the_low_target) <supports_range_stepping>: Set to
13064 x86_supports_range_stepping.
13065 * server.c (handle_v_cont): Handle 'r' action.
13066 (handle_v_requests): Append ";r" if the target supports range
13067 stepping.
13068 * target.h (struct thread_resume) <step_range_start,
13069 step_range_end>: New fields.
13070 (struct target_ops) <supports_range_stepping>:
13071 New field.
13072 (target_supports_range_stepping): New macro.
13073
58794e1a
JB
130742013-05-17 Joel Brobecker <brobecker@adacore.com>
13075
13076 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13077 confusion in comment.
13078
d631c5a7
JB
130792013-05-17 Joel Brobecker <brobecker@adacore.com>
13080
13081 * lynx-low.c (struct process_info_private): New type.
13082 (lynx_add_process): New function.
13083 (lynx_create_inferior, lynx_attach): Replace calls to
13084 add_process by calls to lynx_add_process.
13085 (lynx_resume): If PTID is null, then try using
13086 current_process()->private->last_wait_event_ptid.
13087 Add comments.
13088 (lynx_clear_inferiors): Delete. The contents of that function
13089 has been inlined in lynx_mourn;
13090 (lynx_wait_1): Save the ptid in the process's private data.
13091 (lynx_mourn): Free the process' private data. Replace call
13092 to lynx_clear_inferiors by call to clear_inferiors.
13093
96f7a20f
YQ
130942013-05-17 Yao Qi <yao@codesourcery.com>
13095
13096 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13097 the right place.
13098
db0dfaa0
LM
130992013-05-16 Luis Machado <lgustavo@codesourcery.com>
13100
13101 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13102 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13103 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13104 PT_TEXT_END_ADDR guards. Update comments.
13105 (linux_target_op) <read_offsets>: Conditionally define to
13106 linux_read_offsets if the target is UCLIBC and if it defines
13107 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13108
68f5f838
SL
131092013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13110 Andrew Jenner <andrew@codesourcery.com>
13111
13112 * Makefile.in (SFILES): Add linux-nios2-low.c.
13113 (clean): Add action to delete nios2-linux.c.
13114 (nios2-linux.c): New rule.
13115 * configure.srv: Add nios2*-*-linux*.
13116 * linux-nios2-low.c: New.
13117
1ebff1fd
HAQ
131182013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13119
13120 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13121
f6150862
HZ
131222013-04-25 Hui Zhu <hui@codesourcery.com>
13123
13124 PR gdb/15186
f6150862
HZ
13125 * ax.c (ax_printf): Add fflush.
13126
614c279d
TT
131272013-04-22 Tom Tromey <tromey@redhat.com>
13128
13129 * Makefile.in (SFILES): Add filestuff.c.
13130 (OBS): Add filestuff.o.
13131 (filestuff.o): New target.
13132 * config.in, configure: Rebuild.
13133 * configure.ac: Check for fdwalk, pipe2.
13134
7d4e5717
PA
131352013-04-17 Pedro Alves <palves@redhat.com>
13136
13137 * configure.ac (USE_THREAD_DB): Delete variable.
13138 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13139 Don't AC_SUBST USE_THREAD_DB.
13140 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13141 * config.in, configure: Regenerate.
13142
d5c93e41
PA
131432013-04-16 Pedro Alves <palves@redhat.com>
13144
13145 * linux-low.h (struct lwp_info) <thread_known>: Move under
13146 the USE_THREAD_DB #ifdef.
13147
04f5fe89
PA
131482013-04-16 Pedro Alves <palves@redhat.com>
13149
13150 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13151 (linux-low.o): Delete rule.
13152 * linux-low.h: Always include "gdb_thread_db.h" instead of
13153 conditionally including thread_db.h.
13154 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13155 HAVE_THREAD_DB_H.
13156
480b27bf
JK
131572013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13158
13159 * Makefile.in (install-only): Fix make install regression.
13160
43662968
JK
131612013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13162
13163 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13164 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13165 installation.
13166 * gdbserver.1: Remove.
13167
3e74e146
PA
131682013-03-22 Pedro Alves <palves@redhat.com>
13169
13170 * linux-low.c (handle_extended_wait): Don't call
13171 linux_enable_event_reporting.
13172
a8347a2a
TT
131732013-03-15 Tony Theodore <tonyt@logyst.com>
13174
13175 PR build/9098:
13176 * Makefile.in (SHELL): Use @SHELL@.
13177
eeb56fa7
SDJ
131782013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13179
13180 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13181 compiler warning.
13182
4fa7e2ff
JB
131832013-03-13 Joel Brobecker <brobecker@adacore.com>
13184
13185 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13186 Remove extraneous NULL element.
13187
8ddb1965
YQ
131882013-03-13 Yao Qi <yao@codesourcery.com>
13189
13190 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13191 'V' block in trace frame.
13192
9accd112
MM
131932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13194
13195 * target.h (struct target_ops): Add btrace ops.
13196 (target_supports_btrace): New macro.
13197 (target_enable_btrace): New macro.
13198 (target_disable_btrace): New macro.
13199 (target_read_btrace): New macro.
13200 * gdbthread.h (struct thread_info): Add btrace field.
13201 * server.c: Include btrace-common.h.
13202 (handle_btrace_general_set): New function.
13203 (handle_btrace_enable): New function.
13204 (handle_btrace_disable): New function.
13205 (handle_general_set): Call handle_btrace_general_set.
13206 (handle_qxfer_btrace): New function.
13207 (struct qxfer qxfer_packets[]): Add btrace entry.
13208 * inferiors.c (remove_thread): Disable btrace.
13209 * linux-low: Include linux-btrace.h.
13210 (linux_low_enable_btrace): New function.
13211 (linux_low_read_btrace): New function.
13212 (linux_target_ops): Add btrace ops.
13213 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13214 Add srv_linux_btrace=yes.
13215 (x86_64-*-linux*): Add linux-btrace.o.
13216 Add srv_linux_btrace=yes.
13217 * configure.ac: Define HAVE_LINUX_BTRACE.
13218 * config.in: Regenerated.
13219 * configure: Regenerated.
13220
5cc22e4c
MM
132212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13222
13223 * server.c (handle_qxfer): Preserve error message if -3 is
13224 returned.
13225 (qxfer): Document the -3 return value.
13226
7c97f91e
MM
132272013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13228
13229 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13230 (linux_btrace_h): New variable.
13231 (linux-btrace.o): New rule.
13232
be9a119c 132332013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
13234 Hafiz Abid Qadeer <abidh@codesourcery.com>
13235
13236 * tracepoint.c (trace_buffer_size): New global.
13237 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13238 (init_trace_buffer): Change to one-argument function. Allocate
13239 trace buffer memory.
13240 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13241 handle QTBuffer:size packet.
13242 (cmd_bigqtbuffer_size): New function.
13243 (initialize_tracepoint): Call init_trace_buffer with
13244 DEFAULT_TRACE_BUFFER_SIZE.
13245 * server.c (handle_query): Add QTBuffer:size in the
13246 supported packets.
13247
e64f7499
YQ
132482013-03-07 Yao Qi <yao@codesourcery.com>
13249
13250 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13251 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13252 of -1.
13253 (cmd_qtsp): Adjust condition. Do post increment.
13254 Set cur_action and cur_step_action back to 0.
13255
f0ae6fc3
PA
132562013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13257
13258 PR server/15236
13259 * linux-low.c (linux_write_memory): Return early success if LEN is
13260 zero.
13261
b5b0b0af
CV
132622013-03-05 Corinna Vinschen <vinschen@redhat.de>
13263
334ad4a8 13264 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 13265
589bc927
TT
132662013-02-28 Tom Tromey <tromey@redhat.com>
13267
13268 * configure.ac: Invoke AC_SYS_LARGEFILE.
13269 * configure, config.in: Rebuild.
13270
dfe07582
CV
132712013-02-28 Corinna Vinschen <vinschen@redhat.com>
13272
13273 * win32-low.c: Throughout, fix format strings and casts of
13274 printf-like functions to avoid type related warnings on all
13275 platforms.
13276 (get_child_debug_event): Print dwDebugEventCode as hex since
13277 that's how it's usually documented.
13278
736cd585
YQ
132792013-02-28 Yao Qi <yao@codesourcery.com>
13280
13281 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13282 pulongest.
13283
e1f58301
JW
132842013-02-27 Jiong Wang <jiwang@tilera.com>
13285
13286 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13287 (reg-tilegx32.c): New rule.
13288 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13289 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13290 different register info initializer according to elf class.
13291 (init_registers_tilgx32): New function. The tilegx32 register info
13292 initializer.
13293 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13294 (tile_store_gregset): Likewise.
13295
d171ca78
YQ
132962013-02-27 Yao Qi <yao@codesourcery.com>
13297
13298 * server.c (process_point_options): Print debug message when
13299 debug_threads is true.
13300
282bbdf3
YQ
133012013-02-26 Yao Qi <yao@codesourcery.com>
13302
13303 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13304
aca22551
PA
133052013-02-19 Pedro Alves <palves@redhat.com>
13306 Kai Tietz <ktietz@redhat.com>
13307
13308 PR gdb/15161
13309
13310 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13311 instead of strtoul to extract address from packet.
13312 (process_serial_event) <'z'>: Likewise.
13313
4f3cee1c
YQ
133142013-02-18 Yao Qi <yao@codesourcery.com>
13315
13316 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13317
8e1d55a3
PA
133182013-02-14 Pedro Alves <palves@redhat.com>
13319
13320 Plug memory leak.
13321
13322 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13323 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13324
458820da
PA
133252013-02-14 Pedro Alves <palves@redhat.com>
13326
13327 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13328
baea0dae
PA
133292013-02-14 Pedro Alves <palves@redhat.com>
13330
13331 * tracepoint.c (save_string): Delete.
13332 (add_tracepoint_action): Use savestring instead of save_string.
13333
0b1afbb3
PA
133342013-02-12 Pedro Alves <palves@redhat.com>
13335
13336 * linux-xtensa-low.c: Ditto.
13337 * xtensa-xtregs.c: Ditto.
13338
8a4ac37e
PA
133392013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13340
13341 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13342 thread_db.
13343
148de6bb
MS
133442013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13345
13346 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13347 aarch64_num_wp_regs and aarch64_num_bp_regs to
13348 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13349
55fac6e0
MS
133502013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13351
13352 * linux-aarch64-low.c (ps_get_thread_area): Replace
13353 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13354
176eb98c
MS
133552013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13356 Marcus Shawcroft <marcus.shawcroft@arm.com>
13357 Nigel Stephens <nigel.stephens@arm.com>
13358 Yufeng Zhang <yufeng.zhang@arm.com>
13359
13360 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13361 (aarch64.c, aarch64-without-fpu.c): New targets.
13362 * configure.srv (aarch64*-*-linux*): New.
13363 * linux-aarch64-low.c: New file.
13364
56f7af9c
MS
133652013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13366
43aaf8b6 13367 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
13368 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13369 (dequeue_one_deferred_signal, linux_resume_one_thread)
13370 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13371 (linux_tracefork_grandchild, linux_test_for_tracefork)
13372 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13373 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13374 where the argument is 0.
13375
60f662b0
YQ
133762013-01-25 Yao Qi <yao@codesourcery.com>
13377
13378 * event-loop.c: Include "queue.h".
13379 (gdb_event_p): New typedef.
13380 (struct gdb_event) <next_event>: Remove.
13381 (event_queue): Change to QUEUE(gdb_event_p).
13382 (async_queue_event): Remove.
13383 (gdb_event_xfree): New.
13384 (initialize_event_loop): New.
13385 (process_event): Use API from QUEUE.
13386 (wait_for_event): Likewise.
13387 * server.c (main): Call initialize_event_loop.
13388 * server.h (initialize_event_loop): Declare.
13389
5ae4861a
YQ
133902013-01-18 Yao Qi <yao@codesourcery.com>
13391
13392 * ax.h (struct eval_agent_expr_context): New.
13393 (gdb_eval_agent_expr): Update declaration.
13394 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13395 TFRAME. Add new argument CTX.
13396 * server.h (struct eval_agent_expr_context): Declare.
13397 (agent_mem_read, agent_tsv_read): Update declaration.
13398 (agent_mem_read_string): Likewise.
13399 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13400 (add_traceframe_block): Add new argument TPOINT.
13401 Increase TPOINT->traceframe_usage.
13402 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13403 eval_tracepoint_agent_expr.
13404 (condition_true_at_tracepoint): Likewise.
13405 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13406 (agent_mem_read_string, agent_tsv_read): Likewise.
13407
85e00e85
YQ
134082013-01-16 Yao Qi <yao@codesourcery.com>
13409
13410 * linux-low.c (linux_resume_one_lwp): Don't check
13411 'lwp->bp_reinsert != 0'.
13412
4039cf45
JB
134132013-01-07 Joel Brobecker <brobecker@adacore.com>
13414 Pedro Alves <palves@redhat.com>
13415
13416 * lynx-low.c (ptrace_request_to_str): Define a temporary
13417 macro and use it to simplify this function's implementation.
13418
9044dee2
JB
134192013-01-07 Joel Brobecker <brobecker@adacore.com>
13420
13421 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13422 sets errno.
13423
e6352c8f
JB
134242013-01-07 Joel Brobecker <brobecker@adacore.com>
13425
13426 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13427
50681a27
JB
134282013-01-07 Joel Brobecker <brobecker@adacore.com>
13429
13430 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13431
3f6e77ef
JB
134322013-01-07 Joel Brobecker <brobecker@adacore.com>
13433
13434 * lynx-low.c (lynx_resume): Use the resume_info parameter
13435 to determine the ptid for the lynx_ptrace call, unless
13436 it is equal to minus_one_ptid, in which case we use the
13437 ptid of the current_inferior.
13438 (lynx_wait_1): After having received a thread create/exit
13439 event, resume the inferior's execution using the signaling
13440 thread's ptid, rather than the old ptid.
13441
7fda33ae
JB
134422013-01-07 Joel Brobecker <brobecker@adacore.com>
13443
13444 * lynx-low.c (lynx_resume): Delete variable ret.
13445
b9786c74
JB
134462013-01-01 Joel Brobecker <brobecker@adacore.com>
13447
13448 * gdbreplay.c (gdbreplay_version): Update copyright year.
13449 * server.c (gdbserver_version): Likewise.
13450
8b93d60f
JB
134512012-12-17 Joel Brobecker <brobecker@adacore.com>
13452
13453 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13454 new thread.
13455
037335a7
JB
134562012-12-17 Joel Brobecker <brobecker@adacore.com>
13457
13458 * lynx-low.c (ptrace_request_to_str): Add handling for
13459 PTRACE_GETTRACESIG.
13460
52d4cbd8
JB
134612012-12-17 Joel Brobecker <brobecker@adacore.com>
13462
13463 * lynx-low.c (lynx_attach): Delete variable new_process.
13464
ab8f6ca9
JB
134652012-12-17 Joel Brobecker <brobecker@adacore.com>
13466
13467 * lynx-low.c (lynx_create_inferior): Delete variable
13468 new_process.
13469
78cbc024
JB
134702012-12-17 Joel Brobecker <brobecker@adacore.com>
13471
13472 * lynx-low.c (ptrace_request_to_str): Do not handle
13473 PTRACE_GETTHREADLIST if this macro does not exist.
13474
14a00470
YQ
134752012-12-15 Yao Qi <yao@codesourcery.com>
13476
13477 * Makefile.in (OBS): Add notif.o.
13478 * notif.c, notif.h: New.
13479 * server.c: Include "notif.h".
13480 (struct vstop_notif) <next>: Remove.
13481 <base>: New field.
13482 (queue_stop_reply): Update.
13483 (push_event, send_next_stop_reply): Remove.
13484 (discard_queued_stop_replies): Update.
13485 (notif_stop): New variable.
13486 (handle_v_stopped): Remove.
13487 (handle_v_requests): Don't call handle_v_stopped. Call
13488 handle_ack_notif instead.
13489 (queue_stop_reply_callback): Call notif_event_enque instead
13490 of queue_stop_reply.
13491 (handle_status): Don't call send_next_stop_reply, call
13492 notif_write_event instead.
13493 (kill_inferior_callback): Likewise.
13494 (detach_or_kill_inferior_callback): Likewise.
13495 (main): Call initialize_notif.
13496 (process_serial_event): Call QUEUE_is_empty.
13497 (handle_target_event): Call notif_push instead of push event.
13498 * server.h (push_event): Remove declaration.
13499
61c125b9
TT
135002012-12-10 Tom Tromey <tromey@redhat.com>
13501
13502 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
13503 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
13504 macros.
13505 (.c.o): Rewrite.
13506 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
13507 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
13508 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
13509 (amd64-linux-ipa.o, ax.o): Rewrite.
13510 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
13511 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
13512 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
13513 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
13514 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
13515 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
13516 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
13517 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
13518 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
13519 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
13520 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
13521 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
13522 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
13523 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
13524 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
13525 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
13526 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
13527 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
13528 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
13529 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
13530 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
13531 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
13532 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
13533 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
13534 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
13535 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
13536 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
13537 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
13538 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
13539 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
13540 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
13541 (reg-tilegx.o): Remove.
13542 (all_object_files): New macro.
13543 Include .deps files.
13544 * aclocal.m4, configure: Rebuild.
13545 * acinclude.m4: Include depstand.m4, lead-dot.m4.
13546 * configure.ac: Invoke ZW_CREATE_DEPDIR,
13547 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
13548
e90e9ad9
TT
135492012-12-05 Tom Tromey <tromey@redhat.com>
13550
13551 PR gdb/14917:
13552 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
13553
02d403bf 135542012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
13555
13556 * configure.ac: Check for linux/perf_event.h.
13557 * config.in: Regenerated.
13558 * configure: Regenerated.
13559
0270a750
PA
135602012-11-26 Maxime Villard <rustyBSD@gmx.fr>
13561
13562 * hostio.c (handle_readlink): Decrease buffer size
13563 parameter passed to readlink by one byte.
13564
8c29b58e
YQ
135652012-11-26 Yao Qi <yao@codesourcery.com>
13566
13567 * configure.ac (build_warnings): Append '-Wempty-body'.
13568 * configure: Regenerated.
13569 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
13570 body.
13571
8bdce1ff
PM
135722012-11-15 Pierre Muller <muller@sourceware.org>
13573
13574 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
13575 * config.in: Regenerate.
13576 * configure: Regenerate.
13577 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
13578 Use "gdb_wait.h" header instead of <sys/wait.h> header.
13579 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13580 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
13581 header.
13582 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
13583 instead of <sys/wait.h> header.
13584 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13585
02d403bf 135862012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
13587
13588 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
13589 (various make rules): Remove -DGDBSERVER
13590
fbd5db48
YQ
135912012-11-09 Yao Qi <yao@codesourcery.com>
13592
13593 * spu-low.c (current_ptid): Move it to ..
13594 * gdbthread.h: ... here. New.
13595 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
13596 * server.c (myresume, process_serial_event): Likewise.
13597 * thread-db.c (thread_db_find_new_threads): Likewise.
13598 * tracepoint.c (run_inferior_command): Likewise.
13599
b3dc46ff
AB
136002012-10-01 Andrew Burgess <aburgess@broadcom.com>
13601
13602 * server.c (handle_search_memory_1): Include access length in
13603 warning message.
13604
07c04788
HPN
136052012-09-05 Michael Brandt <michael.brandt@axis.com>
13606
13607 * linux-crisv32-low.c: Fix compile errors.
13608
918d227b
YQ
136092012-09-04 Yao Qi <yao@codesourcery.com>
13610
13611 * tracepoint.c (cmd_qtsv): Adjust debug message.
13612 Don't check CUR_TPOINT.
13613
18c1b81a
YQ
136142012-08-28 Yao Qi <yao@codesourcery.com>
13615
13616 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
13617 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
13618 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
13619 Remove declarations of xmalloc, xreallloc, xstrdup and
13620 freeargv.
13621 * Makefile.in (libiberty_h): New.
13622 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
13623 (linux-bfin-low.o): Append dependency 'libiberty.h'.
13624
dc82f37b
YQ
136252012-08-23 Yao Qi <yao@codesourcery.com>
13626
13627 * server.h: Remove declaration of 'xsnprintf'.
13628
406b1477
KS
136292012-08-22 Keith Seitz <keiths@redhat.com>
13630
13631 * server.h: Include build-gnulib-gbserver/config.h.
13632 * gdbreplay.c: Likewise.
13633
e6712ff1
DE
136342012-08-08 Doug Evans <dje@google.com>
13635
13636 * Makefile.in (SFILES): Add gdb_vecs.c.
13637 (OBS): Add gdb_vecs.o.
13638 (gdb_vecs_h, host_defs_h): New variables.
13639 (thread-db.o): Add $(gdb_vecs_h) dependency.
13640 (gdb_vecs.o): New rule.
13641 * thread-db.c: #include "gdb_vecs.h".
13642 (thread_db_load_search): Use a vector to iterate over path elements.
13643 Handle text appearing after "$pdir".
13644
13645 * configure.ac: Add check for strstr.
13646 * config.in: Regenerate.
13647 * configure: Regenerate.
13648
7c3270ae
UW
136492012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
13650
13651 * hostio.c (handle_pread): If pread fails, fall back to attempting
13652 lseek/read.
13653 (handle_pwrite): Likewise for pwrite.
13654
b62e2b27
UW
136552012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
13656
13657 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
13658 between unsupported TYPE and unimplementable ADDR/LEN combination.
13659 (arm_insert_point): Act on new return value.
13660
78a99e91
PA
136612012-07-31 Pedro Alves <palves@redhat.com>
13662
13663 * server.c (process_point_options): Only skip tokens if we find
13664 one that is unrecognized. Don't treat 'X' specially while
13665 skipping unrecognized tokens.
13666
fcf303ab
UW
136672012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
13668
13669 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
13670 to 4-byte-align HW breakpoint addresses for Thumb.
13671
7255706c
YQ
136722012-07-27 Yao Qi <yao@codesourcery.com>
13673
13674 PR remote/14161.
13675
13676 * server.h: Declare gdb_agent_about_to_close.
13677 * target.c (kill_inferior): Include "agent.h".
13678 New. Send command 'kill'.
13679 * target.h (kill_inferior): Removed macro.
13680 * tracepoint.c (gdb_agent_about_to_close): New.
13681 (gdb_agent_helper_thread): Handle command 'close'.
13682 Wait endlessly until the inferior stops.
13683 Install gdb_agent_remove_socket to atexit hook.
13684 (agent_socket_name): New static variable.
13685 (gdb_agent_socket_init): Replace local variable 'name' with
13686 'agent_socket_name'.
13687 (gdb_agent_remove_socket): New.
13688
5a3f286f
YQ
136892012-07-27 Yao Qi <yao@codesourcery.com>
13690
13691 * server.c (process_point_options): Stop at 'X' when parsing.
13692
961bd387
ME
136932012-07-19 Michael Eager <eager@eagercon.com>
13694
a261b8f5 13695 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
13696 to hw_execute.
13697 * linux-x86-low.c (x86_insert_point, x86_remove_point):
13698 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
13699 hardware breakpoint.
13700
aa7c7447
JK
137012012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13702
13703 * gdbserver/linux-low.c (initialize_low): Call
13704 linux_ptrace_init_warnings.
13705
7f216e7c
DE
137062012-07-02 Doug Evans <dje@google.com>
13707
13708 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
13709 pointer to int.
13710
d3ce09f5
SS
137112012-07-02 Stan Shebs <stan@codesourcery.com>
13712
13713 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
13714 (ax.o): Add it to build rule.
13715 (ax-ipa.o): Ditto.
13716 (OBS): Add format.o.
13717 (IPA_OBS): Add format.o.
13718 * server.c (handle_query): Claim support for breakpoint commands.
13719 (process_point_options): Add command case.
13720 (process_serial_event): Leave running if there are printfs in
13721 effect.
13722 * mem-break.h (any_persistent_commands): Declare.
13723 (add_breakpoint_commands): Declare.
13724 (gdb_no_commands_at_breakpoint): Declare.
13725 (run_breakpoint_commands): Declare.
13726 * mem-break.c (struct point_command_list): New struct.
13727 (struct breakpoint): New field command_list.
13728 (any_persistent_commands): New function.
13729 (add_commands_to_breakpoint): New function.
13730 (add_breakpoint_commands): New function.
13731 (gdb_no_commands_at_breakpoint): New function.
13732 (run_breakpoint_commands): New function.
13733 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
13734 locally.
13735 * ax.c: Include format.h.
13736 (ax_printf): New function.
13737 (gdb_eval_agent_expr): Add printf opcode.
13738
2f8f6aed
YQ
137392012-06-13 Yao Qi <yao@codesourcery.com>
13740
13741 * server.c (start_inferior): Remove duplicated writes to fields
13742 'last_resume_kind' and 'last_status' of 'current_inferior'.
13743
0c9070b3
YQ
137442012-06-12 Yao Qi <yao@codesourcery.com>
13745 Pedro Alves <palves@redhat.com>
13746
13747 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
13748 comment.
13749 * server.c (handle_v_cont): Extend comment.
13750
c52daf70
YQ
137512012-06-11 Yao Qi <yao@codesourcery.com>
13752
13753 * linux-low.c (linux_attach): Add 'static'.
13754
d38bbb0a
YQ
137552012-06-06 Yao Qi <yao@codesourcery.com>
13756
13757 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
13758
89dc0afd
JK
137592012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
13760
13761 Fix gcc -flto compilation warning.
13762 * server.c (main): Make variable multi_mode and attach volatile.
13763
75f62ce7
TJB
137642012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13765
13766 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
13767 if the platform doesn't know about it.
13768
65f479b6
PA
137692012-05-30 Jeff Kenton <jkenton@tilera.com>
13770
13771 * Makefile.in (SFILES): Add linux-tile-low.c.
13772 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
13773 * configure.srv: Handle tilegx-*-linux*.
13774 * linux-tile-low.c: New file.
13775
0c5bf5a9
JK
137762012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13777
13778 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
13779
a493e3e2
PA
137802012-05-24 Pedro Alves <palves@redhat.com>
13781
13782 PR gdb/7205
13783
43aaf8b6 13784 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 13785
2ea28649
PA
137862012-05-24 Pedro Alves <palves@redhat.com>
13787
13788 PR gdb/7205
13789
13790 Replace target_signal with gdb_signal throughout.
13791
8d409d16
MR
137922012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
13793
13794 * linux-low.c (linux_store_registers): Avoid the copying sequence
13795 when no data has been retrieved by ptrace.
13796
23512c01
MGD
137972012-05-22 Will Deacon <will.deacon@arm.com>
13798
13799 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
13800 Include asm/ptrace.h.
13801 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
13802 already defined.
13803
4934b29e
MR
138042012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
13805
13806 * linux-low.c (linux_store_registers): Don't re-retrieve data
13807 with ptrace that has already been obtained from /proc. Always
13808 copy any data retrieved with ptrace to the buffer supplied.
13809
bde24c0a
PA
138102012-05-11 Yao Qi <yao@codesourcery.com>
13811 Pedro Alves <palves@redhat.com>
13812
13813 * linux-low.c (enum stopping_threads_kind): New.
13814 (stopping_threads): Change type to `enum stopping_threads_kind'.
13815 (handle_extended_wait): If stopping and suspending threads, leave
13816 the new_lwp suspended too.
13817 (linux_wait_for_event): Adjust.
13818 (stop_all_lwps): Set `stopping_threads' to
13819 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
13820 whether we're suspending threads or just stopping them. Assert no
13821 recursion happens.
13822
623b6bdf
YQ
138232012-04-29 Yao Qi <yao@codesourcery.com>
13824
13825 * server.h: Move some code to ...
13826 * gdbthread.h: ... here. New.
13827 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
13828 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
13829 (nto-low.o, win32-low.o): Likewise.
13830 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
13831 * regcache.c, remote-utils.c, server.c: Likewise.
13832 * target.c, tracepoint.c, win32-low.c: Likewise.
13833
f15f9948
TJB
138342012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13835
13836 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
13837 (PTRACE_ARG4_TYPE): Likewise.
13838 (PTRACE_XFER_TYPE): Likewise.
13839 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
13840 ptrace to PTRACE_ARG3_TYPE.
13841 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
13842 (PTRACE_ARG4_TYPE): Likewise.
13843 (PTRACE_XFER_TYPE): Likewise.
13844 (linux_detach_one_lwp): Cast fourth argument of
13845 ptrace to long then PTRACE_ARG4_TYPE.
13846 (regsets_fetch_inferior_registers): Cast third argument of
13847 ptrace to long then PTRACE_ARG3_TYPE.
13848 (regsets_store_inferior_registers): Likewise.
13849
38ea300a
PA
138502012-04-20 Pedro Alves <palves@redhat.com>
13851
13852 * configure: Regenerate.
13853
c971b7fa
PA
138542012-04-19 Pedro Alves <palves@redhat.com>
13855
43aaf8b6 13856 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 13857 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
13858 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
13859 (all, install-only, uninstall, clean-info, all-lib, clean): No
13860 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
13861 (maintainer-clean realclean distclean): Use subdir_do.
13862 (subdir_do): New.
13863 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 13864 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
13865 * acinclude.m4: Include acx_configure_dir.m4.
13866 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
13867 calls. Call AC_PROG_RANLIB. Configure gnulib using
13868 ACX_CONFIGURE_DIR.
13869 (GNULIB): New.
13870 (GNULIB_STDINT_H): Adjust.
13871 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
13872 * gdbreplay.c: Include build-gnulib/config.h.
13873 * server.h: Likewise.
13874 * aclocal.m4: Regenerate.
13875 * config.in: Regenerate.
13876 * configure: Regenerate.
c971b7fa 13877
809277f8
PA
138782012-04-19 Pedro Alves <palves@redhat.com>
13879
13880 * Makefile.in (LIBGNU, INCGNU): Adjust.
13881 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
13882 (all, install-only, uninstall, clean-info, all-lib, clean)
13883 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
13884 * configure.ac: Adjust AC_OUTPUT output.
13885 * aclocal.m4: Regenerate.
13886 * configure: Regenerate.
13887
fd9bb8b8
PA
138882012-04-19 Pedro Alves <palves@redhat.com>
13889
13890 * Makefile.in (generated_files): New.
13891 (server_h): Remove the explicit dependency on config.h, and depend
13892 on $generated_files.
13893
1c298c66
PA
138942012-04-19 Pedro Alves <palves@redhat.com>
13895
13896 * Makefile.in (INCGNU): Add -Ignulib.
13897
57c4b50b
PA
138982012-04-19 Pedro Alves <palves@redhat.com>
13899
13900 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
13901 (INCGNU): ... this, and spell out -I here.
13902 (GNULIB_LIB): Rename to ...
13903 (LIBGNU): ... this.
13904 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
13905
1030e047
PA
139062012-04-19 Pedro Alves <palves@redhat.com>
13907
13908 * config.in: Regenerate.
13909
447d4319
PA
139102012-04-19 Pedro Alves <palves@redhat.com>
13911
13912 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
13913 * server.h (memmem): Remove declaration.
13914 * config.in: Regenerate.
13915 * configure: Regenerate.
13916
aad9eab9
YQ
139172012-04-19 Yao Qi <yao@codesourcery.com>
13918
13919 * Makefile.in (SFILES): Add common/vec.c.
13920 (OBS): Add vec.o.
13921 (vec.o): New rule.
13922
3e10640f
YQ
139232012-04-19 Yao Qi <yao@codesourcery.com>
13924
13925 * remote-utils.c (prepare_resume_reply): Replace with macro
13926 target_core_of_thread.
13927 * server.c (handle_qxfer_threads_proper): Likewise.
13928 * target.h (traget_core_of_thread): New macro.
13929
71622373
PA
139302012-04-18 Pedro Alves <palves@redhat.com>
13931
13932 * aclocal.m4: Regenerate.
13933 * configure: Regenerate.
13934
80d26939
YQ
139352012-04-16 Yao Qi <yao@codesourcery.com>
13936
13937 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
13938 duplicated on address.
13939
42476b70
YQ
139402012-04-16 Yao Qi <yao@codesourcery.com>
13941
13942 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
13943 (struct tracepoint_action_ops) <send>: New field.
13944 (m_tracepoint_action_send, r_tracepoint_action_send): New.
13945 (agent_expr_send, x_tracepoint_action_send): New.
13946 (l_tracepoint_action_send): New.
13947 (cmd_qtdp): Download and install tracepoint
13948 according to `use_agent'.
13949 (run_inferior_command): Add one more parameter `len'.
13950 Update callers.
13951 (tracepoint_send_agent): New.
13952 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
13953
7bc83639
YQ
139542012-04-16 Yao Qi <yao@codesourcery.com>
13955
13956 * tracepoint.c (download_tracepoints): Moved to ...
13957 (cmd_qtstart): ... here.
13958
5f18041e
YQ
139592012-04-14 Yao Qi <yao@codesourcery.com>
13960
13961 * tracepoint.c: Include inttypes.h.
13962 (struct collect_memory_action): Use sized types.
13963 (struct tracepoint): Likewise.
13964 (cmd_qtdp, stop_tracing): Update print specifiers.
13965 (cmd_qtp, response_tracepoint): Likewise.
13966 (collect_data_at_tracepoint): Likewise.
13967 (collect_data_at_step): Likewise.
13968
55a8c076
YQ
139692012-04-14 Yao Qi <yao@codesourcery.com>
13970
13971 Import gnulib module inttypes.
13972 * aclocal.m4, config.in, configure: Regenerated.
13973
dc750257
YQ
139742012-04-14 Yao Qi <yao@codesourcery.com>
13975
13976 * Makefile.in (maintainer-clean, realclean, distclean): Remove
13977 Makefile and config.status at last.
13978
0ab5faf9
YQ
139792012-04-13 Yao Qi <yao@codesourcery.com>
13980
13981 * tracepoint.c: Include stdint.h unconditionally.
13982
18f5fd81
TJB
139832012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13984
13985 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
13986 on BFD_HAVE_SYS_PROCFS_TYPE.
13987 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
13988 * configure: Regenerate.
13989 * config.in: Likewise.
13990
4d47af5c
L
139912012-04-13 H.J. Lu <hongjiu.lu@intel.com>
13992
13993 * Makefile.in (clean): Also remove x32.c x32-linux.c
13994 x32-avx.c x32-avx-linux.c.
13995 (x32.o): New target.
13996 (x32.c): Likewise.
13997 (x32-linux.o): Likewise.
13998 (x32-linux.c): Likewise.
13999 (x32-avx.o): Likewise.
14000 (x32-avx.c): Likewise.
14001 (x32-avx-linux.o): Likewise.
14002 (x32-avx-linux.c): Likewise.
14003
14004 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14005 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14006 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14007 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14008 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14009 i386/x32-avx-linux.xml.
14010
14011 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14012 (init_registers_x32_avx_linux): Likwise.
14013 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14014 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14015
ecedbe58
PA
140162012-04-13 Pedro Alves <palves@redhat.com>
14017
14018 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14019 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14020 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14021 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14022 the sub-make.
14023
c92b5177
L
140242012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14025
14026 * linux-x86-low.c (compat_x32_clock_t): New.
14027 (compat_x32_siginfo_t): Likewise.
14028 (compat_x32_siginfo_from_siginfo): Likewise.
14029 (siginfo_from_compat_x32_siginfo): Likewise.
14030 (linux_is_elf64): Likewise.
14031 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14032 and siginfo_from_compat_x32_siginfo for x32.
14033 (x86_arch_setup): Set linux_is_elf64.
14034
214d508e
L
140352012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14036
14037 PR gdb/13969
14038 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14039 e_machine field.
14040 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14041 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14042 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14043 compatible with process.
14044
c9a1864a
YQ
140452012-04-12 Yao Qi <yao@codesourcery.com>
14046
14047 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14048 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14049 (install-only, install-info, clean): Handle sub dir gnulib.
14050 (all-lib, am--refresh): New targets.
14051 (memmem.o): Remove target.
14052 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14053 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14054 (AC_REPLACE_FUNCS): Remove memmem.
14055 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14056 (AC_OUTPUT): Generate Makefile in gnulib/.
14057 * aclocal.m4, config.in, configure: Regenerated.
14058
367ba2c2
MR
140592012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14060
14061 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14062
9d236627
PA
140632012-04-05 Pedro Alves <palves@redhat.com>
14064
14065 -Werror=strict-aliasing
14066
14067 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14068 pointer.
14069
111217b3
PA
140702012-04-04 Pedro Alves <palves@redhat.com>
14071
14072 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14073 (sparc_store_gregset_from_stack, sparc_store_gregset)
14074 (sparc_breakpoint_at): Fix formatting.
14075
8365dcf5
TJB
140762012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14077
14078 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14079 are available.
14080 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14081 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14082 * config.in: Regenerate.
14083 * configure: Likewise.
14084
689cc2ae
PA
140852012-03-29 Pedro Alves <palves@redhat.com>
14086
14087 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14088 Correct ptrace arguments.
14089
c14dfd32
PA
140902012-03-28 Pedro Alves <palves@redhat.com>
14091
14092 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14093 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14094 (IA64_FR1_REGNUM): New defines.
14095 (ia64_fetch_register): New.
14096 (the_low_target): Install it.
14097 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14098 field.
14099 * linux-low.c (linux_fetch_registers): Try the
14100 the_low_target.fetch_register hook first.
14101
14102 * linux-arm-low.c (the_low_target): Adjust.
14103 * linux-bfin-low.c (the_low_target): Adjust.
14104 * linux-cris-low.c (the_low_target): Adjust.
14105 * linux-crisv32-low.c (the_low_target): Adjust.
14106 * linux-m32r-low.c (the_low_target): Adjust.
14107 * linux-m68k-low.c (the_low_target): Adjust.
14108 * linux-mips-low.c (the_low_target): Adjust.
14109 * linux-ppc-low.c (the_low_target): Adjust.
14110 * linux-s390-low.c (the_low_target): Adjust.
14111 * linux-sh-low.c (the_low_target): Adjust.
14112 * linux-sparc-low.c (the_low_target): Adjust.
14113 * linux-tic6x-low.c (the_low_target): Adjust.
14114 * linux-x86-low.c (the_low_target): Adjust.
14115 * linux-xtensa-low.c (the_low_target): Adjust.
14116
63c88e13
PA
141172012-03-26 Pedro Alves <palves@redhat.com>
14118
14119 * server.c (handle_qxfer_libraries): Don't bail early if
14120 the_target->qxfer_libraries_svr4 is not NULL.
14121
fb723180
PA
141222012-03-26 Pedro Alves <palves@redhat.com>
14123
14124 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14125
0afae3cf
PA
141262012-03-23 Pedro Alves <palves@redhat.com>
14127
14128 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14129 "library-list-svr4" element's start tag when the the DSO list is
14130 empty.
14131
485f1ee4
PA
141322012-03-23 Pedro Alves <palves@redhat.com>
14133
14134 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14135 a variable whose type size is the same as the inferior's pointer
14136 size.
14137
a5362b9a
TS
141382012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14139
14140 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14141 struct siginfo.
14142 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14143 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14144 * linux-low.h: Include <signal.h>.
14145 (struct siginfo): Remove forward declaration.
14146 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14147 struct siginfo.
14148
d226c142
MF
141492012-03-21 Mike Frysinger <vapier@gentoo.org>
14150
14151 * .gitignore: Ignore more files.
14152
122f36ef
PA
141532012-03-19 Pedro Alves <palves@redhat.com>
14154 Jan Kratochvil <jan.kratochvil@redhat.com>
14155
14156 * server.c (cont_thread, general_thread): Add describing comments.
14157 (start_inferior): Clear `cont_thread'.
14158 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14159 of a process.
14160
fc3e5175
YQ
141612012-03-15 Yao Qi <yao@codesourcery.com>
14162
14163 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14164 handling to ...
14165 (cmd_qtdp): ... here.
14166
8d0d92cd
YQ
141672012-03-15 Yao Qi <yao@codesourcery.com>
14168
14169 * tracepoint.c (struct tracepoint_action_ops): New.
14170 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14171 (m_tracepoint_action_download): New.
14172 (r_tracepoint_action_download): New.
14173 (x_tracepoint_action_download): New.
14174 (l_tracepoint_action_download): New.
14175 (add_tracepoint_action): Install `action->ops' according type.
14176 (download_tracepoint_1): Move code `download' function pointer
14177 of various tracepoint_action_ops.
14178
87b0bb13
JK
141792012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14180
14181 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14182 linux_ptrace_attach_warnings.
14183
5f572dec
JK
141842012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14185
14186 * Makefile.in (linux-ptrace.o): New.
14187 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14188 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14189 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14190 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14191 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14192 of these targets.
14193 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14194
f4647387
YQ
141952012-03-08 Yao Qi <yao@codesourcery.com>
14196 Pedro Alves <palves@redhat.com>
14197
14198 Fix PR server/13392.
14199 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14200 offset of JMP insn.
14201 * tracepoint.c (remove_tracepoint): New.
14202 (cmd_qtdp): Call remove_tracepoint when failed to install.
14203
9b224c5e
PA
142042012-03-07 Pedro Alves <palves@redhat.com>
14205
14206 * linux-low.c (get_detach_signal): New.
14207 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14208 Pass on pending signals to PTRACE_DETACH. Check the result of the
14209 ptrace call.
14210 * server.c (program_signals, program_signals_p): New.
14211 (handle_general_set): Handle QProgramSignals.
14212 * server.h (program_signals, program_signals_p): Declare.
14213
e237a7e2
JK
142142012-03-05 Pedro Alves <palves@redhat.com>
14215 Jan Kratochvil <jan.kratochvil@redhat.com>
14216
14217 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14218 New comment why.
14219
5808517f
YQ
142202012-03-03 Yao Qi <yao@codesourcery.com>
14221
14222 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14223 agent_look_up_symbols.
14224
58b4daa5
YQ
142252012-03-03 Yao Qi <yao@codesourcery.com>
14226
14227 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14228 (linux-x86-low.o): Likewise.
14229 * server.h: Remove in_process_agent_loaded.
14230 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14231 common/agent.c.
14232 Update callers.
14233
8ffcbaaf
YQ
142342012-03-03 Yao Qi <yao@codesourcery.com>
14235
14236 * tracepoint.c (gdb_agent_capability): New global.
14237 (in_process_agent_loaded_ust): Renamed to
14238 `in_process_agent_supports_ust'.
14239 Update callers.
14240 (in_process_agent_supports_ust): Call agent_capability_check.
14241 (clear_installed_tracepoints): Assert that agent supports
14242 agent.
14243
d1feda86
YQ
142442012-03-03 Yao Qi <yao@codesourcery.com>
14245
14246 * linux-low.c (linux_supports_agent): New.
14247 (linux_target_ops): Initialize field `supports_agent' with
14248 linux_supports_agent.
14249 * target.h (struct target_ops) <supports_agent>: New.
14250 (target_supports_agent): New macro.
14251 * server.c (handle_general_set): Handle packet 'QAgent'.
14252 (handle_query): Send `QAgent+'.
14253 * Makefile.in (server.o): Depends on agent.h.
14254
2fa291ac
YQ
142552012-03-03 Yao Qi <yao@codesourcery.com>
14256
14257 * Makefile.in (OBS): Add agent.o.
14258 Add new rule for agent.o.
14259 Track dependence of tracepoint.c on agent.h.
14260 * tracepoint.c (run_inferior_command_1):
14261 (run_inferior_command): Call agent_run_command.
14262 (gdb_ust_connect_sync_socket): Deleted. Move it to
14263 common/agent.c.
14264 (resume_thread, stop_thread): Likewise.
14265 (gdb_ust_socket_init): Renamed to ...
14266 (gdb_agent_socket_init): ... New.
14267 (gdb_ust_thread): Renamed to ...
14268 (gdb_agent_helper_thread): ... New.
14269 (gdb_ust_init): Move some code to ...
14270 (gdb_agent_init): ... here. New.
14271 [HAVE_UST]: Call gdb_ust_init.
14272 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14273 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14274 * config.in, configure: Regenerated.
14275
05044653
PA
142762012-03-02 Pedro Alves <palves@redhat.com>
14277
14278 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14279 * linux-low.c (struct simple_pid_list): New.
14280 (stopped_pids): New a struct simple_pid_list pointer.
14281 (add_to_pid_list, pull_pid_from_list): New.
14282 (handle_extended_wait): Don't assume the first signal new children
14283 report is SIGSTOP. Adjust call to pull_pid_from_list.
14284 (linux_wait_for_lwp): Adjust.
14285
8d00225b
YQ
142862012-03-02 Yao Qi <yao@codesourcery.com>
14287
14288 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14289 debug log.
14290
19560ba5
YQ
142912012-03-02 Yao Qi <yao@codesourcery.com>
14292
14293 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14294 `stop_pc' and `tpoint'. Update caller.
14295
1faeff08
MR
142962012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14297
14298 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14299 * linux-low.c (use_linux_regsets): New macro.
14300 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14301 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14302 (linux_register_in_regsets): New function.
14303 (usr_fetch_inferior_registers): Skip registers covered by
14304 regsets.
14305 (usr_store_inferior_registers): Likewise.
14306 (usr_fetch_inferior_registers): New macro.
14307 (usr_store_inferior_registers): Likewise.
14308 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14309 (linux_store_registers): Likewise.
14310 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14311 prototype.
14312 (init_registers_mips64_dsp_linux): Likewise.
14313 (init_registers_mips_linux): New macro.
14314 (init_registers_mips_dsp_linux): Likewise.
14315 (mips_dsp_num_regs): Likewise.
14316 (DSP_BASE, DSP_CONTROL): New fallback macros.
14317 (mips_base_regs): New macro.
14318 (mips_regmap): Use it. Fix the size.
14319 (mips_dsp_regmap): New variable.
14320 (mips_dsp_regset_bitmap): Likewise.
14321 (mips_arch_setup): New function.
14322 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14323 than mips_regmap.
14324 (mips_cannot_store_register): Likewise.
14325 (the_low_target): Update .arch_setup, .num_regs and .regmap
14326 initializers. Add .regset_bitmap initializer.
14327 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14328 initializer.
14329 * linux-bfin-low.c (the_low_target): Likewise.
14330 * linux-cris-low.c (the_low_target): Likewise.
14331 * linux-crisv32-low.c (the_low_target): Likewise.
14332 * linux-ia64-low.c (the_low_target): Likewise.
14333 * linux-m32r-low.c (the_low_target): Likewise.
14334 * linux-m68k-low.c (the_low_target): Likewise.
14335 * linux-ppc-low.c (the_low_target): Likewise.
14336 * linux-s390-low.c (the_low_target): Likewise.
14337 * linux-sh-low.c (the_low_target): Likewise.
14338 * linux-sparc-low.c (the_low_target): Likewise.
14339 * linux-tic6x-low.c (the_low_target): Likewise.
14340 * linux-x86-low.c (the_low_target): Likewise.
14341 * linux-xtensa-low.c (the_low_target): Likewise.
14342 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14343 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14344 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14345 srv_xmlfiles.
14346 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14347 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14348
c03e6ccc
YQ
143492012-02-29 Yao Qi <yao@codesourcery.com>
14350 Pedro Alves <palves@redhat.com>
14351
14352 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14353 `step_over_finished' is true.
14354
644cebc9
PA
143552012-02-27 Pedro Alves <palves@redhat.com>
14356
14357 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14358 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14359
c14d7ab2
PA
143602012-02-27 Pedro Alves <palves@redhat.com>
14361
14362 PR server/9684
14363 * linux-low.c (pid_is_stopped): New.
14364 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14365
412c89dd
LM
143662012-02-25 Luis Machado <lgustavo@codesourcery.com>
14367
14368 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14369 of conditions.
14370
b745defe
MR
143712012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14372
14373 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14374
9f3a5c85
LM
143752012-02-24 Luis Machado <lgustavo@codesourcery>
14376
14377 * server.c (handle_query): Advertise support for target-side
14378 breakpoint condition evaluation.
14379 (process_point_options): New function.
14380 (process_serial_event): When inserting a breakpoint, check for
14381 a target-side condition that should be evaluated.
14382
14383 * mem-break.c: Include regcache.h and ax.h.
14384 (point_cond_list_t): New data structure.
14385 (breakpoint) <cond_list>: New field.
14386 (find_gdb_breakpoint_at): Make non-static.
14387 (delete_gdb_breakpoint_at): Clear any target-side
14388 conditions.
14389 (clear_gdb_breakpoint_conditions): New function.
14390 (add_condition_to_breakpoint): Likewise.
14391 (add_breakpoint_condition): Likewise.
14392 (gdb_condition_true_at_breakpoint): Likewise.
14393 (gdb_breakpoint_here): Return result directly instead
14394 of going through a local variable.
14395
14396 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14397 (clear_gdb_breakpoint_conditions): Likewise.
14398 (add_breakpoint_condition): Likewise.
14399 (gdb_condition_true_at_breakpoint): Likewise.
14400
14401 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14402 (need_step_over_p): Take target-side breakpoint condition into
14403 consideration.
14404
5e1dc496
LM
144052012-02-24 Luis Machado <lgustavo@codesourcery>
14406
14407 * server.h: Include tracepoint.h.
14408 (agent_mem_read, agent_get_trace_state_variable_value,
14409 agent_set_trace_state_variable_value,
14410 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14411 get_set_tsv_func_addr): New prototypes.
14412
14413 * ax.h: New include file.
14414 * ax.c: New source file.
14415
14416 * tracepoint.c: Include ax.h.
14417 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14418 agent_expr, eval_result_type): Move to ax.h.
14419 (parse_agent_expr): Rename to ...
14420 (gdb_parse_agent_expr): ... this, make it non-static and move
14421 to ax.h.
14422 (unparse_agent_expr) Rename to ...
14423 (gdb_unparse_agent_expr): ... this, make it non-static and move
14424 to ax.h.
14425 (eval_agent_expr): Rename to ...
14426 (eval_tracepoint_agent_expr): ... this.
14427 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14428 forward declarations.
14429 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14430 (agent_get_trace_state_variable_value): New function.
14431 (agent_set_trace_state_variable_value): New function.
14432 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14433 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14434 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14435 (condition_true_at_tracepoint): Likewise.
14436 (parse_agent_expr): Rename to ...
14437 (gdb_parse_agent_expr): ... this and move to ax.c.
14438 (unparse_agent_expr): Rename to ...
14439 (gdb_unparse_agent_expr): ... this and move to ax.c.
14440 (gdb_agent_op_name): Move to ax.c.
14441 (eval_agent_expr): Rename to ...
14442 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14443 and move to ax.c.
14444 (eval_tracepoint_agent_expr): New function.
14445 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 14446 non-static.
5e1dc496
LM
14447 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14448 ax.c.
14449 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14450 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14451 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14452 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14453 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14454 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14455 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14456 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14457 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14458 (compile_bytecodes): Remove forward declaration.
14459 (is_goto_target): Move to ax.c.
14460 (compile_bytecodes): Move to ax.c and call
14461 agent_get_trace_state_variable_value (...) and
14462 agent_set_trace_state_variable_value (...).
14463
14464 * Makefile.in: Update ax.c and IPA dependencies.
14465
277e4e52
PA
144662012-02-24 Pedro Alves <palves@redhat.com>
14467
14468 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14469 (cmd_bigqtbuffer_circular): ... this. Only handle
14470 'QTBuffer:circular:'.
14471 (handle_tracepoint_general_set): Adjust.
14472
bf4c19f7
YQ
144732012-02-16 Yao Qi <yao@codesourcery.com>
14474
14475 * inferiors.c: Move code to ...
14476 * dll.c: .... here. New.
14477 * server.h: Declare clear_dlls.
14478 * Makefile.in (SFILES): Add dll.c.
14479 (OBS): Add dll.o
14480 (dll.o): New rule.
14481
d73f2619
YQ
144822012-02-11 Yao Qi <yao@codesourcery.com>
14483
14484 * server.c: (handle_monitor_command): Add a new parameter
14485 `own_buf'.
14486 (handle_query): Update caller.
14487
f8255c2a
JB
144882012-02-09 Joel Brobecker <brobecker@adacore.com>
14489
14490 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14491 * configure, config.in: Regenerate.
14492 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14493 is not defined.
14494
da84f473
PA
144952012-02-02 Pedro Alves <palves@redhat.com>
14496
14497 Try SIGKILL first, then PTRACE_KILL.
14498 * linux-low.c (linux_kill_one_lwp): New.
14499 (linux_kill_one_lwp): Rename to ...
14500 (kill_one_lwp_callback): ... this. Use the new
14501 linux_kill_one_lwp.
14502
e886a173
PA
145032012-02-02 Pedro Alves <palves@redhat.com>
14504
14505 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
14506 inferior.
14507
be07f1a2
PA
145082012-01-27 Pedro Alves <palves@redhat.com>
14509
14510 * linux-low.c (linux_child_pid_to_exec_file): Delete.
14511 (elf_64_file_p): Make static.
14512 (linux_pid_exe_is_elf_64_file): New.
14513 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
14514 Delete declarations.
14515 (linux_pid_exe_is_elf_64_file): Declare.
14516 * linux-x86-low.c (x86_arch_setup): Use
14517 linux_pid_exe_is_elf_64_file.
14518
d8301ad1
JK
145192012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14520
14521 * linux-low.c (linux_wait_for_event_1): Rename to ...
14522 (linux_wait_for_event): ... here and merge it with former
14523 linux_wait_for_event - new variable wait_ptid, use it.
14524 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
14525
01b17894
PA
145262012-01-23 Pedro Alves <palves@redhat.com>
14527
14528 * server.c (main): Avoid yet another case of infinite loop while
14529 detaching/killing after a longjmp.
14530
e825046f
JK
145312012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14532
14533 Code cleanup.
14534 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
14535
b9e7b9c3
UW
145362012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
14537
14538 * hostio.c (handle_readlink): New function.
14539 (handle_vFile): Call it to handle "vFile:readlink" packets.
14540
901f9912
UW
145412012-01-20 Pedro Alves <palves@redhat.com>
14542 Ulrich Weigand <ulrich.weigand@linaro.org>
14543
14544 * server.c (handle_v_requests): Only support vAttach and vRun to
14545 start multiple processes when in extended protocol mode.
14546
fc1ab1a0
PA
145472012-01-17 Pedro Alves <palves@redhat.com>
14548
14549 * tracepoint.c (initialize_tracepoint): Use mmap instead of
14550 memalign plus mprotect to allocate the scratch buffer.
14551
7d5d4e98
PA
145522012-01-13 Pedro Alves <palves@redhat.com>
14553
14554 * server.c (attach_inferior): Clear `cont_thread'.
14555
f128d5e9
PA
145562012-01-13 Pedro Alves <palves@redhat.com>
14557
14558 * server.c (main): Avoid infinite loop while detaching/killing
14559 after a longjmp.
14560
06db92f0
DE
145612012-01-09 Doug Evans <dje@google.com>
14562
14563 * server.c (start_inferior): Set last_ptid in --wrapper case.
14564
32d92999
YQ
145652012-01-06 Yao Qi <yao@codesourcery.com>
14566
14567 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
14568 defined.
14569 [IN_PROCESS_AGENT] (debug_agent): New global variable.
14570
5e0a92a9
YQ
145712012-01-04 Yao Qi <yao@codesourcery.com>
14572
14573 * tracepoint.c (cmd_qtdp): Print debug message
14574 for static tracepoint.
14575
ae639e8c
YQ
145762012-01-04 Yao Qi <yao@codesourcery.com>
14577
14578 * tracepoint.c (trace_vdebug): Differentiate debug message
14579 between gdbserver and IPA.
14580
f72429c5
YQ
145812012-01-03 Yao Qi <yao@codesourcery.com>
14582
14583 * tracepoint.c (tracepoint_was_hit): Don't collect for
14584 static tracepoint.
14585
12c3e59c
JB
145862012-01-02 Joel Brobecker <brobecker@adacore.com>
14587
14588 * terminal.h: Reformat copyright header.
14589
67827812
JB
145902012-01-02 Joel Brobecker <brobecker@adacore.com>
14591
14592 * server.c (gdbserver_version): Update copyright year.
14593 * gdbreplay.c (gdbreplay_version): Likewise.
14594
3e52c33d
JK
145952011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
14596
14597 * linux-low.c (linux_create_inferior): Put empty if clause for write.
14598
14599 Revert:
14600 2011-12-18 Hui Zhu <teawater@gmail.com>
14601 * linux-low.c (linux_create_inferior): Save return value to ret.
14602
66f1260e
HZ
146032011-12-18 Hui Zhu <teawater@gmail.com>
14604
14605 * linux-low.c (linux_create_inferior): Save return value to ret.
14606
e77616d7
DE
146072011-12-16 Doug Evans <dje@google.com>
14608
e7b06c57
DE
14609 * linux-low.c (linux_create_inferior): If stdio connection,
14610 redirect stdin from /dev/null, stdout to stderr.
14611 * remote-utils.c (remote_is_stdio): New static global.
14612 (remote_connection_is_stdio): New function.
14613 (remote_prepare): Handle stdio connection.
14614 (remote_open): Ditto.
14615 (remote_close): Don't close stdin for stdio connections.
14616 (read_prim,write_prim): New functions. Replace all calls to
14617 read/write to these.
14618 * server.c (main): Watch for "-" argument. Move call to
14619 remote_prepare before start_inferior.
14620 * server.h (STDIO_CONNECTION_NAME): New macro.
14621 (remote_connection_is_stdio): Declare.
14622
e77616d7
DE
14623 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
14624 in debugging output.
14625
82067193
YQ
146262011-12-15 Yao Qi <yao@codesourcery.com>
14627
14628 * tracepoint.c: Include sys/syscall.h.
14629 (gdb_ust_thread): Remove preprocessor conditional.
14630
82bfbe7e
PA
146312011-12-14 Pedro Alves <pedro@codesourcery.com>
14632
14633 * linux-low.c (linux_detach_one_lwp): Call
14634 the_low_target.prepare_to_resume before detaching.
14635
712c6575
YQ
146362011-12-14 Yao Qi <yao@codesourcery.com>
14637
14638 * tracepoint.c (gdb_ust_thread): Don't ignore return value
14639 of write.
14640
d54d1edf
YQ
146412011-12-14 Yao Qi <yao@codesourcery.com>
14642
14643 * i386-low.c (i386_low_stopped_data_address): Initialize local
14644 variable `control'.
14645
6210a125
PA
146462011-12-13 Pedro Alves <pedro@codesourcery.com>
14647
14648 PR remote/13492
14649
14650 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
14651 DR_CONTROL unless necessary. Extend comments.
14652 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
14653 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
14654
2ece8244
YQ
146552011-12-13 Yao Qi <yao@codesourcery.com>
14656
14657 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
14658 macros.
14659 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
14660
784867a5
JK
146612011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
14662
14663 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
14664 Print new debug message for such case.
14665
6bf36717
JK
146662011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14667
14668 Fix overlapping memcpy.
14669 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
14670 the read_inferior_memory transfer.
14671 (delete_fast_tracepoint_jump): New variable buf. Use it for the
14672 write_inferior_memory transfer.
14673 (set_fast_tracepoint_jump): New variable buf. Use it for the
14674 read_inferior_memory and write_inferior_memory transfers.
14675 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
14676 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
14677 Use it for the write_inferior_memory transfer.
14678 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
14679 buffers.
14680
50275556
MR
146812011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14682
14683 * linux-low.c (fetch_register, store_register): Make code
14684 consistent, fix formatting.
14685
7325beb4
MR
146862011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14687
14688 * linux-low.c (usr_store_inferior_registers): Factor out code
14689 to handle individual registers into...
14690 (store_register): ... this new function.
14691
c642a434
UW
146922011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
14693
14694 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
14695 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
14696 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
14697 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
14698 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
14699 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
14700 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
14701 (srv_xmlfiles): Add new XML files.
14702
14703 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
14704 and <sys/uio.h>.
14705 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
14706 (init_registers_s390_linux32v1): Add prototype.
14707 (init_registers_s390_linux32v2): Likewise.
14708 (init_registers_s390_linux64v1): Likewise.
14709 (init_registers_s390_linux64v2): Likewise.
14710 (init_registers_s390x_linux64v1): Likewise.
14711 (init_registers_s390x_linux64v2): Likewise.
14712 (s390_num_regs): Increment to 52.
14713 (s390_regmap): Add orig_r2 register.
14714 (s390_num_regs_3264): Increment to 68.
14715 (s390_regmap_3264): Add orig_r2 register.
14716 (s390_collect_ptrace_register): Handle orig_r2 register.
14717 (s390_supply_ptrace_register): Likewise.
14718 (s390_fill_last_break): New function.
14719 (s390_store_last_break): Likewise.
14720 (s390_fill_system_call): New function.
14721 (s390_store_system_call): Likewise.
14722 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
14723 register sets.
14724 (s390_check_regset): New function.
14725 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
14726 NT_S390_SYSTEM_CALL regsets and use appropriate description.
14727 Update target_regsets for available register sets.
14728
2268b414
JK
147292011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
14730 Jan Kratochvil <jan.kratochvil@redhat.com>
14731
14732 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
14733 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
14734 New.
14735 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
14736 * linux-low.h (struct process_info_private): New member r_debug.
14737 * server.c (handle_qxfer_libraries): Call
14738 the_target->qxfer_libraries_svr4.
14739 (handle_qxfer_libraries_svr4): New function.
14740 (qxfer_packets): New entry "libraries-svr4".
14741 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
14742 * target.h (struct target_ops): New member qxfer_libraries_svr4.
14743 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
14744 PACKET_qXfer_libraries_svr4.
14745
d6db1fab
UW
147462011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
14747
14748 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
14749 PSW address/mask between 8-byte and 16-byte formats.
14750 (s390_supply_ptrace_register): Likewise.
14751 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
14752 basic addressing mode bit.
14753
242f5f1c
SS
147542011-11-24 Stan Shebs <stan@codesourcery.com>
14755
14756 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
14757
f196051f
SS
147582011-11-17 Stan Shebs <stan@codesourcery.com>
14759
14760 * tracepoint.c (struct tracepoint): New field traceframe_usage.
14761 (tracing_start_time): New global.
14762 (tracing_stop_time): New global.
14763 (tracing_user_name): New global.
14764 (tracing_notes): New global.
14765 (tracing_stop_note): New global.
14766 (cmd_qtstart): Set traceframe_usage, start_time.
14767 (stop_tracing): Set stop_time.
14768 (cmd_qtstatus): Report additional status.
14769 (cmd_qtp): New function.
14770 (handle_tracepoint_query): Call it.
14771 (cmd_qtnotes): New function.
14772 (handle_tracepoint_general_set): Call it.
14773 (get_timestamp): Rename from tsv_get_timestamp.
14774
405f8e94
SS
147752011-11-14 Stan Shebs <stan@codesourcery.com>
14776 Kwok Cheung Yeung <kcy@codesourcery.com>
14777
14778 * linux-x86-low.c (small_jump_insn): New.
14779 (i386_install_fast_tracepoint_jump_pad): Add arguments for
14780 trampoline and error message, build a trampoline and issue a small
14781 jump instruction to it.
14782 (x86_install_fast_tracepoint_jump_pad): Add arguments for
14783 trampoline and error message.
14784 (x86_get_min_fast_tracepoint_insn_len): New.
14785 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
14786 * linux-low.h (struct linux_target_ops): Add arguments to
14787 install_fast_tracepoint_jump_pad operation, add new operation.
14788 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
14789 arguments.
14790 (linux_get_min_fast_tracepoint_insn_len): New function.
14791 (linux_target_op): Add new operation.
14792 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
14793 (gdb_trampoline_buffer_end): Ditto.
14794 (gdb_trampoline_buffer_error): Ditto.
14795 (struct ipa_sym_addresses): Add fields for new IPA variables.
14796 (symbol_list): Add entries for new IPA variables.
14797 (struct tracepoint): Add fields to hold the address range of the
14798 trampoline used by the tracepoint.
14799 (trampoline_buffer_head): New static variable.
14800 (trampoline_buffer_tail): Ditto.
14801 (claim_trampoline_space): New function.
14802 (have_fast_tracepoint_trampoline_buffer): New function.
14803 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
14804 structure.
14805 (install_fast_tracepoint): Ditto, also add error buffer argument.
14806 (cmd_qtminftpilen): New function.
14807 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
14808 (fast_tracepoint_from_trampoline_address): New function.
14809 (fast_tracepoint_collecting): Handle trampoline as part of jump
14810 pad space.
14811 (set_trampoline_buffer_space): New function.
14812 (initialize_tracepoint): Initialize new IPA variables.
14813 * target.h (struct target_ops): Add arguments to
14814 install_fast_tracepoint_jump_pad operation, add new
14815 get_min_fast_tracepoint_insn_len operation.
14816 (target_get_min_fast_tracepoint_insn_len): New.
14817 (install_fast_tracepoint_jump_pad): Add arguments.
14818 * server.h (IPA_BUFSIZ): Define.
14819 * linux-i386-ipa.c: Include extra header files.
14820 (initialize_fast_tracepoint_trampoline_buffer): New function.
14821 (initialize_low_tracepoint): Call it.
14822 * server.h (set_trampoline_buffer_space): Declare.
14823 (claim_trampoline_space): Ditto.
14824 (have_fast_tracepoint_trampoline_buffer): Ditto.
14825
1e4d1764
YQ
148262011-11-14 Yao Qi <yao@codesourcery.com>
14827
14828 * server.c (handle_query): Handle InstallInTrace for qSupported.
14829 * tracepoint.c (add_tracepoint): Sort list.
14830 (install_tracepoint, download_tracepoint): New.
14831 (cmd_qtdp): Call them to install and download tracepoints.
14832 (sort_tracepoints): Removed.
14833 (cmd_qtstart): Update.
14834
5c73ff4e
YQ
148352011-11-14 Yao Qi <yao@codesourcery.com>
14836
14837 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
14838 * mem-break.h: Declare.
14839 * tracepoint.c (cmd_qtstart): Move some code to ...
14840 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
14841 New.
14842 (download_tracepoints): Move some code to ...
14843 (download_tracepoint_1): ... here. New.
14844
86a30030
YQ
148452011-11-08 Yao Qi <yao@codesourcery.com>
14846
14847 * remote-utils.c (relocate_instruction): A comment fix.
14848
8d26e50c
JB
148492011-11-07 Joel Brobecker <brobecker@adacore.com>
14850
14851 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
14852 (i386_dr_low_get_control, i386_dr_low_get_status): Use
14853 dr_status_mirror and dr_control_mirror from debug_reg_state.
14854 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
14855 (i386_initial_stuff): Remove use of deleted globals.
14856 (i386_get_thread_context, i386_set_thread_context,
14857 i386_thread_added): Use dr_status_mirror and dr_control_mirror
14858 from debug_reg_state.
14859
a59306a3
YQ
148602011-11-05 Yao Qi <yao@codesourcery.com>
14861
14862 * tracepoint.c (gdb_collect): Loop over tracepoints of same
14863 address as TPOINT's.
14864
3065dfb6
SS
148652011-11-02 Stan Shebs <stan@codesourcery.com>
14866
14867 * tracepoint.c (agent_mem_read_string): New function.
14868 (eval_agent_expr): Call it for tracenz.
14869 * server.c (handle_query): Report support for tracenz.
14870
fd0d8c7c
YQ
148712011-11-02 Yao Qi <yao@codesourcery.com>
14872
14873 * tracepoint.c (cmd_qtstart): Remove unused local variables.
14874
609086b1
YQ
148752011-11-02 Yao Qi <yao@codesourcery.com>
14876
14877 * target.h: Fix a typo in comment.
14878
b9fd1791
PA
148792011-10-31 Pedro Alves <pedro@codesourcery.com>
14880
14881 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
14882 clobber the breakpoints' shadows with fast tracepoint jumps.
14883 * mem-break.h (check_mem_write): Add `myaddr' parameter.
14884 * target.c (write_inferior_memory): Also pass MYADDR down to
14885 check_mem_write.
14886
03583c20
UW
148872011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
14888
14889 * configure.ac: Check support for personality routine.
14890 * configure: Regenerate.
14891 * config.in: Likewise.
14892 * linux-low.c: Include <sys/personality.h>.
14893 Define ADDR_NO_RANDOMIZE if necessary.
14894 (linux_create_inferior): Disable address space randomization when
14895 forking inferior, if requested.
14896 (linux_supports_disable_randomization): New function.
14897 (linux_target_ops): Install it.
14898 * server.h (disable_randomization): Declare.
14899 * server.c (disable_randomization): New global variable.
14900 (handle_general_set): Handle QDisableRandomization.
14901 (handle_query): Likewise for qSupported.
14902 (main): Support --disable-randomization and --no-disable-randomization
14903 command line arguments.
14904 * target.h (struct target_ops): Add supports_disable_randomization.
14905 (target_supports_disable_randomization): New macro.
14906
723b724b
MF
149072011-09-29 Mike Frysinger <vapier@gentoo.org>
14908
14909 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
14910 ifdef check.
14911 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
14912 [!PT_GETDSBT] (target_loadmap): New definition.
14913 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
14914 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
14915 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
14916 and PT_GETDSBT to LINUX_LOADMAP.
14917 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
14918 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
14919
55329a5c 149202011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
14921
14922 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
14923 (arm_linux_hwbp_cap): New static variable.
14924 (arm_linux_get_hwbp_cap): Replace by ...
14925 (arm_linux_init_hwbp_cap): ... this new function.
14926 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
14927 (arm_linux_get_hw_watchpoint_count): Likewise.
14928 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14929 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
14930 (arm_prepare_to_resume): Use perror_with_name instead of error.
14931
55329a5c 149322011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
14933
14934 * linux-arm-low.c: Include <signal.h>.
14935 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
14936 (struct arm_linux_hwbp_cap): New data type.
14937 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
14938 (struct arm_linux_hw_breakpoint): New data type.
14939 (MAX_BPTS, MAX_WPTS): Define.
14940 (struct arch_process_info, struct arch_lwp_info): New data types.
14941 (arm_linux_get_hwbp_cap): New function.
14942 (arm_linux_get_hw_breakpoint_count): Likewise.
14943 (arm_linux_get_hw_watchpoint_count): Likewise.
14944 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14945 (arm_hwbp_control_initialize): Likewise.
14946 (arm_hwbp_control_is_enabled): Likewise.
14947 (arm_hwbp_control_is_initialized): Likewise.
14948 (arm_hwbp_control_disable): Likewise.
14949 (arm_linux_hw_breakpoint_equal): Likewise.
14950 (arm_linux_hw_point_initialize): Likewise.
14951 (struct update_registers_data): New data structure.
14952 (update_registers_callback: New function.
14953 (arm_insert_point): Likewise.
14954 (arm_remove_point): Likewise.
14955 (arm_stopped_by_watchpoint): Likewise.
14956 (arm_stopped_data_address): Likewise.
14957 (arm_new_process): Likewise.
14958 (arm_new_thread): Likewise.
14959 (arm_prepare_to_resume): Likewise.
14960 (the_low_target): Register arm_insert_point, arm_remove_point,
14961 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
14962 arm_new_thread, and arm_prepare_to_resume.
14963
6b9801d4
SS
149642011-09-15 Stan Shebs <stan@codesourcery.com>
14965
14966 * server.h (struct emit_ops): Add compare-goto fields.
14967 * tracepoint.c (gdb_agent_op_sizes): New table.
14968 (emit_eq_goto): New function.
14969 (emit_ne_goto): New function.
14970 (emit_lt_goto): New function.
14971 (emit_le_goto): New function.
14972 (emit_gt_goto): New function.
14973 (emit_ge_goto): New function.
14974 (is_goto_target): New function.
14975 (compile_bytecodes): Recognize special cases of compare-goto
14976 combinations and call specialized emitters for them.
14977 * linux-x86-low.c (amd64_emit_eq_goto): New function.
14978 (amd64_emit_ne_goto): New function.
14979 (amd64_emit_lt_goto): New function.
14980 (amd64_emit_le_goto): New function.
14981 (amd64_emit_gt_goto): New function.
14982 (amd64_emit_ge_goto): New function.
14983 (amd64_emit_ops): Add the new functions.
14984 (i386_emit_eq_goto): New function.
14985 (i386_emit_ne_goto): New function.
14986 (i386_emit_lt_goto): New function.
14987 (i386_emit_le_goto): New function.
14988 (i386_emit_gt_goto): New function.
14989 (i386_emit_ge_goto): New function.
14990 (i386_emit_ops): Add the new functions.
14991
bf15cbda
SS
149922011-09-08 Stan Shebs <stan@codesourcery.com>
14993
14994 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
14995 (i386_emit_epilogue): Restore %ebx.
14996
943ca1dd
JZ
149972011-08-31 Jie Zhang <jzhang918@gmail.com>
14998
14999 * server.c (step_thread): Remove definition.
15000 (process_serial_event): Don't handle Hs.
15001 * server.h (step_thread): Remove declaration.
15002 * target.c (set_desired_inferior): Remove use of step_thread.
15003
e3deef73
LM
150042011-08-24 Luis Machado <lgustavo@codesourcery.com>
15005
15006 * linux-low.c: Include linux-procfs.h.
15007 (linux_attach_lwp_1): Update comments.
15008 (linux_attach): Scan for existing threads when attaching to a
15009 process that is the tgid.
15010 * Makefile.in: Update dependencies.
15011
13da1c97
LM
150122011-08-24 Luis Machado <lgustavo@codesourcery.com>
15013
15014 * configure.srv: Add linux-procfs.o dependencies.
15015
881127c9
YQ
150162011-08-14 Yao Qi <yao@codesourcery.com>
15017
15018 * target.h (struct target_ops): Fix indent.
15019 * win32-low.c (win32_target_ops): Fix comment.
15020
58dbd541
YQ
150212011-08-14 Andrew Jenner <andrew@codesourcery.com>
15022 Yao Qi <yao@codesourcery.com>
15023
15024 * Makefile.in (clean): Remove tic6x-*.c files.
15025 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15026 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15027 (tic6x-c64xp-linux.c): Likewise.
15028 * configure.srv: Add support for tic6x-*-uclinux.
15029 * linux-tic6x-low.c: New.
15030 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15031
78d85199
YQ
150322011-08-14 Andrew Stubbs <ams@codesourcery.com>
15033 Yao Qi <yao@codesourcery.com>
15034
15035 * target.h (struct target_ops): Add read_loadmap.
15036 * linux-low.c (struct target_loadseg): New type.
15037 (struct target_loadmap): New type.
15038 (linux_read_loadmap): New function.
15039 (linux_target_ops): Add linux_read_loadmap.
15040 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
15041 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15042 to NULL.
78d85199 15043
a959a88d
EZ
150442011-08-05 Eli Zaretskii <eliz@gnu.org>
15045
15046 * win32-low.c: Include <stdint.h>.
15047
1ced966e
PA
150482011-07-22 Pedro Alves <pedro@codesourcery.com>
15049
15050 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15051 to the inferior here.
15052 (i386_remove_aligned_watchpoint): Ditto.
15053 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15054 fit part of the watchpoint in the debug registers.
15055 (i386_update_inferior_debug_regs): New.
15056 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15057 registers, and only update the inferior on success.
15058 (i386_low_remove_watchpoint): Ditto.
15059
d26e3629
KY
150602011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15061
15062 * linux-low.c (compare_ints, unique, list_threads, show_process,
15063 linux_core_of_thread): Delete.
15064 (linux_target_ops): Change linux_core_of_thread to
15065 linux_common_core_of_thread.
15066 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15067 * utils.c (malloc_failure): Change type of argument.
15068 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15069 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15070 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15071 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15072 (IPA_OBJS): Add common-utils-ipa.o.
15073 (ptid_h, linux_osdata_h): New macros.
15074 (server_h): Add common/common-utils.h, common/xml-utils.h,
15075 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15076 common/ptid.h.
15077 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15078 ptid.o, buffer.o): New rules.
15079 (linux-low.o): Add common/linux-osdata.h as a dependency.
15080 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15081 * configure.ac: Add AC_HEADER_DIRENT check.
15082 * config.in: Regenerate.
15083 * configure: Regenerate.
15084 * remote-utils.c (xml_escape_text): Delete.
15085 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15086 buffer_xml_printf): Move to common/buffer.c.
15087 * server.c (main): Remove call to initialize_inferiors.
15088 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15089 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15090 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15091 internal_error, gdb_assert, gdb_assert_fail): Delete.
15092 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15093 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15094 common/buffer.h.
15095 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15096 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15097 initialize_inferiors): Delete.
15098
2275a1a7
PA
150992011-07-20 Pedro Alves <pedro@codesourcery.com>
15100
15101 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15102 symbol error.
15103
0a5b1e09
PA
151042011-05-31 Pedro Alves <pedro@codesourcery.com>
15105
15106 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15107 assertion.
15108 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15109
6938fd34
YQ
151102011-05-26 Yao Qi <yao@codesourcery.com>
15111
15112 * Makefile.in (thread-db.o): Track dependence to
15113 common/gdb_thread_db.h.
15114 * thread-db.c: include gdb_thread_db.h from right place.
15115
b481f9e0
TT
151162011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15117
15118 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15119 __FILE__ and __LINE__ to internal_error.
15120
98a5dd13
DE
151212011-05-13 Doug Evans <dje@google.com>
15122
15123 * thread-db.c (try_thread_db_load_from_sdir): New function.
15124 (try_thread_db_load_from_dir): New function.
15125 (thread_db_load_search): Handle $sdir, ignore $pdir.
15126 Remove trying of system directories if search of
15127 libthread-db-search-path fails, that is now done via $sdir.
15128
d248b706
KY
151292011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15130
15131 * server.c (handle_query): Add EnableDisableTracepoints to the list
15132 of supported features.
43aaf8b6 15133 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 15134 tracepoints.
43aaf8b6
PA
15135 (cmd_qtenable_disable): New.
15136 (cmd_qtstart): Install tracepoints even if disabled.
15137 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15138 receiving a QTEnable or QTDisable packet.
15139 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15140 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15141 tracepoints.
15142 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 15143
84e578fb
DE
151442011-05-10 Doug Evans <dje@google.com>
15145
15146 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15147
71f55dd8
DE
151482011-05-04 Doug Evans <dje@google.com>
15149
15150 * linux-low.c (linux_join): Skip process lookup.
15151 * spu-low.c (spu_join): Ditto.
15152 * server.c (join_inferiors_callback): Delete.
15153 (process_serial_event): For 'D' packet (detach) call join_inferior
15154 directly.
15155
4d393d60
JM
151562011-05-04 Joseph Myers <joseph@codesourcery.com>
15157
15158 * README: Don't mention xscale*-*-linux*.
15159 * configure.srv (xscale*-*-linux*): Don't handle target.
15160
b00ad6ff
NF
151612011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15162
15163 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15164 casting pointers.
15165 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15166 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15167 (i386_emit_void_call_2): Likewise.
15168
af96c192
YQ
151692011-04-26 Yao Qi <yao@codesourcery.com>
15170
43aaf8b6
PA
15171 * linux-low.c: Move common macros to linux-ptrace.h.
15172 Include linux-ptrace.h.
af96c192
YQ
15173 * Makefile.in (linux_ptrace_h): New.
15174 (linux-low.o): Depends on linux-ptrace.h.
15175
03f2bd59
JK
151762011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15177
15178 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15179 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15180 (remote_prepare): New function with most of the TCP code from ...
15181 (remote_open): ... here. Detect PORT here unconditionally. Move also
15182 setting transport_is_reliable.
15183 * server.c (run_once): New variable.
15184 (gdbserver_usage): Document it.
15185 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15186 the first run if RUN_ONCE.
15187 * server.h (run_once, remote_prepare): New declarations.
15188
7a9dd1b2
TT
151892011-04-19 Tom Tromey <tromey@redhat.com>
15190
15191 * win32-low.c (handle_load_dll): Remove duplicate "the".
15192
81239425
PM
151932011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15194
15195 Remove support for old Cygwin 1.5 versions.
15196 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15197 function to avoid warning.
15198 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15199 warning.
15200
9e0627f1
PM
152012011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15202
15203 * gdbserver/server.h (Macro _): Define it if not available.
15204
588eebee
MS
152052011-03-14 Michael Snyder <msnyder@vmware.com>
15206
348af9f7 15207 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 15208
43f70d4c
JB
152092011-03-10 Joel Brobecker <brobecker@adacore.com>
15210
15211 * Makefile.in (maintainer-clean realclean distclean): Remove
15212 "make ... subdir_do" command.
15213
348af9f7
MS
152142011-03-10 Michael Snyder <msnyder@vmware.com>
15215
15216 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15217
15218 * server.c (handle_v_run): Free alloced buffer on early return.
15219
e637a4f5
YQ
152202011-03-09 Yao Qi <yao@codesourcery.com>
15221
15222 Revert:
15223 2011-03-04 Yao Qi <yao@codesourcery.com>
15224
15225 * Makefile.in: Remove GNU make feature --directory.
15226
15227 2011-03-05 Yao Qi <yao@codesourcery.com>
15228
15229 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15230 (subdir_do): New make target. Copied from gdb/Makefile.
15231 (maintainer-clean, realclean, distclean, clean): Call corresponding
15232 make targets in common/Makefile.
15233
15234 2011-02-11 Yao Qi <yao@codesourcery.com>
15235
15236 * configure.ac: Call AC_PROG_RANLIB.
15237 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15238 * configure: Regenerate.
15239
e6edda56
JK
152402011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15241
15242 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15243
e5141119
JB
152442011-03-06 Yao Qi <yao@codesourcery.com>
15245
15246 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15247
64794aa4
JB
152482011-03-05 Yao Qi <yao@codesourcery.com>
15249
15250 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15251 (subdir_do): New make target. Copied from gdb/Makefile.
15252 (maintainer-clean, realclean, distclean, clean): Call corresponding
15253 make targets in common/Makefile.
15254
7a762829
YQ
152552011-03-04 Yao Qi <yao@codesourcery.com>
15256
15257 * Makefile.in: Remove GNU make feature --directory.
15258
348af9f7
MS
152592011-03-04 Michael Snyder <msnyder@vmware.com>
15260
15261 * server.c (queue_stop_reply): Call xmalloc not malloc.
15262
152632011-03-02 Michael Snyder <msnyder@vmware.com>
15264
15265 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15266
9f72fee2
MS
152672011-02-28 Michael Snyder <msnyder@vmware.com>
15268
588eebee
MS
15269 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15270 (cmd_qtframe): Ditto.
15271 (cmd_qtbuffer): Ditto.
15272 (cmd_bigqtbuffer): Ditto.
15273
9f72fee2
MS
15274 * utils.c (decimal2str): Initialize 'width' to nine, then
15275 don't mess with it.
15276
8040bd49
UW
152772011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15278
15279 * hostio.c (require_data): Free *data, not data.
15280
7e52cbd0
JK
152812011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15282
15283 * hostio.c (require_data): Use free, not xfree.
15284
9130f83e
MS
152852011-02-27 Michael Snyder <msnyder@vmware.com>
15286
4b812f4e
MS
15287 * server.c (handle_query): Discard unused value.
15288
9130f83e
MS
15289 * hostio.c (require_data): Free malloc memory before returning
15290 error.
15291
69d37113
MS
152922011-02-26 Michael Snyder <msnyder@vmware.com>
15293
15294 * linux-low.c (list_threads): Call closedir for dirent.
15295
35f5825a
MS
152962011-02-27 Michael Snyder <msnyder@vmware.com>
15297
2a589cef
MS
15298 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15299 a case statement falls through.
15300
0adea5f7
MS
15301 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15302
35f5825a
MS
15303 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15304 in comparison.
15305
238f1c74
MS
153062011-02-26 Michael Snyder <msnyder@vmware.com>
15307
15308 * utils.c (decimal2str): Eliminate dead code and dead param.
15309 (pulongest): Drop dead param from call to decimal2str.
15310 (plongest): Ditto.
15311
633ff500
JB
153122011-02-24 Joel Brobecker <brobecker@adacore.com>
15313
15314 Revert the following patch (not approved yet):
15315 2011-02-21 Hui Zhu <teawater@gmail.com>
15316 * tracepoint.c (tp_printf): New function.
15317 (eval_agent_expr): Handle gdb_agent_op_printf.
15318
f9c6ff72
HZ
153192011-02-21 Hui Zhu <teawater@gmail.com>
15320
15321 * tracepoint.c (tp_printf): New function.
15322 (eval_agent_expr): Handle gdb_agent_op_printf.
15323
94d5e490
TT
153242011-02-18 Tom Tromey <tromey@redhat.com>
15325
15326 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15327 (tracepoint.o): Likewise.
15328 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15329 (gdb_agent_op_names): Likewise.
15330
c7f96d2b
TT
153312011-02-18 Tom Tromey <tromey@redhat.com>
15332
15333 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15334 gdb_agent_op_rot>: New constants.
15335 (gdb_agent_op_names): Add pick and roll.
15336 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15337 cases.
15338
0feedb2c
JK
153392011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15340
15341 * aclocal.m4: Regenerated with aclocal-1.11.1.
15342
b3b9301e
PA
153432011-02-14 Pedro Alves <pedro@codesourcery.com>
15344
15345 * server.c (handle_qxfer_traceframe_info): New.
15346 (qxfer_packets): Register "traceframe-info".
15347 (handle_query): Report support for qXfer:traceframe-info:read+.
15348 * tracepoint.c (match_blocktype): New.
15349 (traceframe_find_block_type): Rename to ...
15350 (traceframe_walk_blocks): ... this. Add callback filter argument,
15351 and use it.
15352 (traceframe_find_block_type): New, reimplemented on top of
15353 traceframe_walk_blocks.
15354 (build_traceframe_info_xml): New.
15355 (traceframe_read_info): New.
15356 * server.h (traceframe_read_info): Declare.
15357
4f3e6fb7
YQ
153582011-02-11 Yao Qi <yao@codesourcery.com>
15359
15360 * configure.ac: Call AC_PROG_RANLIB.
15361 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15362 * configure: Regenerate.
15363
764880b7
PA
153642011-02-07 Pedro Alves <pedro@codesourcery.com>
15365
15366 * server.c (gdb_read_memory): Change return semantics to allow
15367 partial transfers.
15368 (handle_search_memory_1): Adjust.
15369 (process_serial_event) <'m' packet>: Handle partial transfers.
15370 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15371
1c79eb8a
PA
153722011-01-28 Pedro Alves <pedro@codesourcery.com>
15373
15374 * regcache.c (init_register_cache): Initialize
15375 regcache->register_status.
15376 (free_register_cache): Release regcache->register_status.
15377 (regcache_cpy): Copy register_status.
15378 (registers_to_string): Print 'x's for unavailable registers.
15379 (supply_register): Mark the register's status valid or
15380 unavailable, depending on whether a buffer was passed in or not.
15381 (supply_register_zeroed): New.
15382 (supply_regblock): Mark the registers' status valid or
15383 unavailable, depending on whether a buffer was passed in or not.
15384 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15385 (struct regcache): New `register_status' field.
15386 (supply_register_zeroed): Declare.
15387 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15388 supply_register_zeroed, rather than passing a NULL buffer to
15389 supply_register.
15390 * tracepoint.c (fetch_traceframe_registers): Update comment.
15391
85724a0e
PA
153922011-01-28 Pedro Alves <pedro@codesourcery.com>
15393
15394 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15395 buffer explicit.
15396
d08aafef
PA
153972011-01-25 Pedro Alves <pedro@codesourcery.com>
15398
15399 * server.h (decode_xfer_write): Change prototype.
15400 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15401 and don't extract the annex here.
15402 * server.c (decode_xfer_read): Remove `annex' parameter,
15403 and don't extract the annex here.
15404 (decode_xfer): New.
15405 (struct qxfer): New.
15406 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15407 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15408 (handle_qxfer_statictrace): New functions, abstracted out from
15409 handle_query, and made to use the struct qxfer interface.
15410 (handle_threads_qxfer_proper): Rename to ...
15411 (handle_qxfer_threads_proper): ... this.
15412 (handle_threads_qxfer): Rename to ...
15413 (handle_qxfer_threads): ... this. Adjust.
15414 (qxfer_packets): New array.
15415 (handle_qxfer): New function.
15416 (handle_query): Use handle_qxfer.
15417
493e2a69
MS
154182011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15419
15420 * gdbreplay.c: Shorten lines of >= 80 columns.
15421 * linux-low.c: Ditto.
15422 * linux-ppc-low.c: Ditto.
15423 * linux-s390-low.c: Ditto.
15424 * linux-sparc-low.c: Ditto.
15425 * linux-x86-low.c: Ditto.
15426 * linux-xtensa-low.c: Ditto.
15427 * mem-break.c: Ditto.
15428 * nto-low.c: Ditto.
15429 * regcache.h: Ditto.
15430 * remote-utils.c: Ditto.
15431 * server.c: Ditto.
15432 * server.h: Ditto.
15433 * thread-db.c: Ditto.
15434 * tracepoint.c: Ditto.
15435 * utils.c: Ditto.
15436 * win32-low.h: Ditto.
15437
44944448
JB
154382011-01-05 Joel Brobecker <brobecker@adacore.com>
15439
15440 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15441 update.
15442
71ce852c
JB
154432011-01-01 Joel Brobecker <brobecker@adacore.com>
15444
15445 * server.c (gdbserver_version): Update copyright year in version
15446 output.
15447 * gdbreplay.c (gdbreplay_version): Ditto.
15448
eb826dc6
MF
154492010-12-29 Jie Zhang <jie.zhang@analog.com>
15450
15451 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15452 * linux-bfin-low.c: New file.
15453 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15454 PT_DATA_ADDR for BFIN targets.
15455 * Makefile.in (SFILES): Add linux-bfin-low.c.
15456 (clean): Remove reg-bfin.c.
15457 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15458 * README: Mention supported Blackfin targets.
15459
39ab222a
MF
154602010-12-23 Mike Frysinger <vapier@gentoo.org>
15461
15462 * .gitignore: New file.
15463
a1f2ce7d
MF
154642010-11-16 Mike Frysinger <vapier@gentoo.org>
15465
15466 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15467
f474844c
JZ
154682010-10-22 Jie Zhang <jie@codesourcery.com>
15469
15470 * Makefile.in: Add FLAGS_TO_PASS variable.
15471 (install): Remove dependency of install-only and recursively
15472 invoke make for install-only.
15473
f1048712
DE
154742010-10-04 Doug Evans <dje@google.com>
15475
15476 * Makefile.in (uninstall): Use $(DESTDIR).
15477
b53a1623
PA
154782010-09-24 Pedro Alves <pedro@codesourcery.com>
15479
e6ee044d
PA
15480 PR gdb/11842
15481
b53a1623
PA
15482 * linux-x86-low.c (compat_siginfo_from_siginfo)
15483 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15484 si_code is < 0. Check for si_code == SI_TIMER before checking for
15485 si_code < 0.
15486
fa1bd1e4
JB
154872010-09-13 Joel Brobecker <brobecker@adacore.com>
15488
15489 * lynx-i386-low.c: New file.
15490 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15491
47fac8f8
JB
154922010-09-13 Joel Brobecker <brobecker@adacore.com>
15493
15494 * lynx-low.c (ptrace_request_to_str): Remove handling for
15495 request values that have been removed in LynxOS 5.x.
15496
1adfc54d
JB
154972010-09-13 Joel Brobecker <brobecker@adacore.com>
15498
15499 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15500 <ptrace.h>
15501
c2a66c29
NS
155022010-09-09 Nathan Sidwell <nathan@codesourcery.com>
15503
15504 * configure.ac: Add --enable-inprocess-agent option.
15505 * configure: Rebuilt.
15506
32fcada3
YQ
155072010-09-06 Yao Qi <yao@codesourcery.com>
15508
15509 * linux-low.c (linux_kill): Remove unused variable.
15510 (linux_stabilize_threads): Likewise.
15511 * server.c (start_inferior): Likewise.
15512 (queue_stop_reply_callback): Likewise.
15513 * tracepoint.c (do_action_at_tracepoint): Likewise.
15514
0cccb683
YQ
155152010-09-06 Yao Qi <yao@codesourcery.com>
15516
15517 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
15518 on return.
15519
423ec54c
JK
155202010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15521
15522 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
15523
12ac6819
PA
155242010-09-06 Pedro Alves <pedro@codesourcery.com>
15525
15526 * Makefile.in (install-only): Replace $IPA_DEPFILES with
15527 "$(IPA_DEPFILES)".
15528
8ed54b31
JB
155292010-09-01 Joel Brobecker <brobecker@adacore.com>
15530
15531 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
15532 gdbserver/lynx-ppc-low.c: New files.
15533 * Makefile.in (lynx_low_h): New variable.
15534 (lynx-low.o, lynx-ppc-low.o): New rules.
15535 * configure.ac: On LynxOS, link with -lnetinet.
15536 * configure.srv: Add handling of powerpc-*-lynxos* targets.
15537 * configure: regenerate.
15538
bb0116a4
JB
155392010-09-01 Joel Brobecker <brobecker@adacore.com>
15540
15541 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
15542 * configure.ac: Add check for vasprintf and vsnprintf.
15543 * configure, config.in: Regenerate.
15544 * server.h (vasprintf, vsnprintf): Add conditional declarations.
15545
a778ab81 155462010-09-01 Joel Brobecker <brobecker@adacore.com>
15547
15548 * gdbreplay.c: Move include of alloca.h up, next to include of
15549 malloc.h.
15550 * server.h: Add include of malloc.h.
15551 * mem-break.c: Remove include of malloc.h.
15552 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
15553
8b034a19 155542010-09-01 Joel Brobecker <brobecker@adacore.com>
15555
15556 * Makefile.in (memmem.o): Build with -Wno-error.
15557
155582010-09-01 Joel Brobecker <brobecker@adacore.com>
15559
15560 * utils.c (xsnprintf): Make non-static.
15561 * server.h: Add xsnprintf declaration.
15562 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
15563 replace calls to snprintf by calls to xsnprintf throughout.
15564
155652010-09-01 Joel Brobecker <brobecker@adacore.com>
15566
15567 * configure.ac: Add configure check for alloca.
15568 * configure, config.in: Regenerate.
15569 * server.h: Include alloca.h if it exists.
15570 * gdbreplay.c: Include alloca.h if it exists.
15571
1a981360
PA
155722010-08-28 Pedro Alves <pedro@codesourcery.com>
15573
15574 * linux-low.c (__SIGRTMIN): Define if not already defined.
15575 (linux_create_inferior): Check for __ANDROID__ rather than
15576 __SIGRTMIN.
15577 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
15578 are already deferred.
15579 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
15580 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
15581 stopped and already has a pending signal to report.
15582 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
15583 a pending signal to report or is moving out of a jump pad.
15584 (linux_init_signals): Check for __ANDROID__ rather than
15585 __SIGRTMIN.
15586
b4d51a55
PA
155872010-08-28 Pedro Alves <pedro@codesourcery.com>
15588
15589 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
15590 debug_threads check. Avoid a linear search when not doing debug
15591 output.
15592
ec48365d
PA
155932010-08-27 Pedro Alves <pedro@codesourcery.com>
15594
15595 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
15596 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
15597 (struct file_handler) <fd>: Change type to gdb_fildes_t.
15598 (process_event): Change local fd's type to gdb_fildes_t.
15599 (create_file_handler): Adjust prototype.
15600 (delete_file_handler): Adjust prototype.
15601 (handle_file_event): Adjust prototype. Use pfildes.
15602 (create_file_event): Adjsut prototype.
15603 * remote-utils.c (remote_desc, listen_desc): Change type to
15604 gdb_fildes_t.
15605 * server.h: New gdb_fildes_t typedef.
15606 [USE_WIN32API]: Include winsock2.h.
15607 (delete_file_handler, add_file_handler): Adjust prototypes.
15608 (pfildes): Declare.
15609 * utils.c (pfildes): New.
15610
854d88f0
PA
156112010-08-27 Pedro Alves <pedro@codesourcery.com>
15612
15613 * configure.ac (build_warnings): Add -Wno-char-subscripts.
15614 * configure: Regenerate.
15615
0146f85b
PA
156162010-08-27 Pedro Alves <pedro@codesourcery.com>
15617
15618 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
15619 (linux_done_accessing_memory): ... this.
15620 (linux_target_ops): Adjust.
15621 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
15622 * nto-low.c (nto_target_ops): Adjust comment.
15623 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
15624 * spu-low.c (spu_target_ops): Adjust comment.
15625 * target.h (target_ops): Rename unprepare_to_access_memory field
15626 to done_accessing_memory.
15627 (unprepare_to_access_memory): Rename to ...
15628 (done_accessing_memory): ... this.
15629
90d74c30
PA
156302010-08-26 Pedro Alves <pedro@codesourcery.com>
15631
15632 * linux-low.c (linux_prepare_to_access_memory): New.
15633 (linux_unprepare_to_access_memory): New.
15634 (linux_target_ops): Install them.
15635 * server.c (read_memory): Rename to ...
15636 (gdb_read_memory): ... this. Use
15637 prepare_to_access_memory/prepare_to_access_memory.
15638 (write_memory): Rename to ...
15639 (gdb_write_memory): ... this. Use
15640 prepare_to_access_memory/prepare_to_access_memory.
15641 (handle_search_memory_1): Adjust.
15642 (process_serial_event): Adjust.
15643 * target.h (struct target_ops): New fields
15644 prepare_to_access_memory and unprepare_to_access_memory.
15645 (prepare_to_access_memory, unprepare_to_access_memory): New.
15646 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
15647 prepare_to_access_memory/prepare_to_access_memory.
15648 * nto-low.c (nto_target_ops): Adjust.
15649 * spu-low.c (spu_target_ops): Adjust.
15650 * win32-low.c (win32_target_ops): Adjust.
15651
fd467969
PA
156522010-08-26 Pedro Alves <pedro@codesourcery.com>
15653
15654 * Makefile.in (WARN_CFLAGS): Get it from configure.
15655 (WERROR_CFLAGS): New.
15656 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
15657 * configure.ac: Introduce --enable-werror, which adds -Werror to
15658 the compiler command line. Enabled by default. Disable with
15659 --disable-werror. Add -Wdeclaration-after-statement
15660 Wpointer-arith and -Wformat-nonliteral to warning flags.
15661 * configure: Regenerate.
15662
331e2f5f
PA
156632010-08-26 Pedro Alves <pedro@codesourcery.com>
15664
15665 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
15666
e581f2b4
PA
156672010-08-26 Pedro Alves <pedro@codesourcery.com>
15668
15669 * gdbreplay.c (remote_error): New.
15670 (gdbchar): New.
15671 (expect): Use gdbchar. Check for error reading from GDB.
15672 Clarify sync error output.
15673 (play): Check for errors writing to GDB.
15674 * linux-low.c (sigchld_handler): Really ignore `write' errors.
15675 * remote-utils.c (getpkt): Check for errors writing to the remote
15676 descriptor.
15677
3c11dd79
PA
156782010-08-25 Pedro Alves <pedro@codesourcery.com>
15679
15680 * linux-low.c (linux_wait_1): Move non-debugging code out of
15681 `debug_threads' control.
15682
d20a8ad9
PA
156832010-08-25 Pedro Alves <pedro@codesourcery.com>
15684
15685 * linux-low.c (linux_wait_1): Don't set last_status here.
15686 * server.c (push_event, queue_stop_reply_callback): Assert we're
15687 not pushing a TARGET_WAITKIND_IGNORE event.
15688 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
15689 (myresume, handle_target_event): Set the thread's last_resume_kind
15690 and last_status from the target returned status.
15691
964e4306
PA
156922010-08-25 Pedro Alves <pedro@codesourcery.com>
15693
15694 PR threads/10729
15695
15696 * linux-x86-low.c (update_debug_registers_callback): New.
15697 (i386_dr_low_set_addr): Use it.
15698 (i386_dr_low_get_addr): New.
15699 (i386_dr_low_set_control): Use update_debug_registers_callback.
15700 (i386_dr_low_get_control): New.
15701 (i386_dr_low_get_status): Adjust.
15702 * linux-low.c (linux_stop_lwp): New.
15703 * linux-low.h (linux_stop_lwp): Declare.
15704
15705 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
15706 argument instead of a i386_debug_reg_state.
15707 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
15708 a i386_debug_reg_state.
15709 (i386_insert_aligned_watchpoint): Adjust.
15710 (i386_remove_aligned_watchpoint): Adjust.
15711 (i386_low_stopped_data_address): Read the debug registers from the
15712 inferior instead of from the mirrors.
15713 * i386-low.h (struct i386_debug_reg_state): Extend comment.
15714 (i386_dr_low_get_addr): Declare.
15715 (i386_dr_low_get_control): Declare.
15716 (i386_dr_low_get_status): Change prototype.
15717
15718 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
15719 (i386_dr_low_get_addr): New.
15720 (i386_dr_low_get_control): New.
15721 (i386_dr_low_get_status): Adjust prototype. Return
15722 dr_status_mirror.
15723 (i386_initial_stuff): Clear dr_status_mirror and
15724 dr_control_mirror.
15725 (i386_get_thread_context): Adjust.
15726 (i386_set_thread_context): Adjust.
15727 (i386_thread_added): Adjust.
15728
5f21a75b
PA
157292010-08-24 Pedro Alves <pedro@codesourcery.com>
15730
15731 * linux-low.h (linux_thread_area): Delete declaration.
15732
3e4c1235
TS
157332010-08-11 Thomas Schwinge <thomas@codesourcery.com>
15734
15735 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
15736 after its termination.
15737
1971b033
PA
157382010-08-09 Pedro Alves <pedro@codesourcery.com>
15739
15740 * linux-low.c (gdb_wants_lwp_stopped): Delete.
15741 (gdb_wants_all_stopped): Delete.
15742 (linux_wait_1): Don't call them.
15743 * server.c (handle_v_cont): Tag all threads as want-stopped.
15744 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
15745 stopped as "client-wants-stopped".
15746
310444ac
PA
157472010-07-31 Pedro Alves <pedro@codesourcery.com>
15748
15749 * Makefile.in (signals_h): New.
15750 (server_h): Depend on it.
15751 (server.o): Don't depend on $(signals_def).
15752 (signals.o): Depend on $(signals_def).
15753
a19cae16
JK
157542010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
15755
15756 * Makefile.in (signals_def): New.
15757 (server_h): Append include/gdb/signals.h and signals_def.
15758 (server.o): Append signals_def.
15759
30d50328
JK
157602010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15761
15762 * server.c (handle_target_event): Use target_signal_to_host for
15763 resume_info.sig initialization.
15764 * target.h (struct thread_resume) <sig>: New comment.
15765
5c3216e2
OS
157662010-07-20 Ozkan Sezer <sezeroz@gmail.com>
15767
c6f46ca0
OS
15768 * server.c (handle_query): strcpy() the returned string from paddress()
15769 instead of sprintf().
5c3216e2
OS
15770 * utils.c (paddress): Return phex_nz().
15771
6bd31874
JB
157722010-07-07 Joel Brobecker <brobecker@adacore.com>
15773
15774 * server.c (handle_v_cont): Call mourn_inferior if process
15775 just exited.
15776 (myresume): Likewise.
15777
0fb4aa4b
PA
157782010-07-01 Pedro Alves <pedro@codesourcery.com>
15779
15780 Static tracepoints, and integration with UST.
15781
15782 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
15783 * mem-break.c (uninsert_all_breakpoints)
15784 (reinsert_all_breakpoints): New.
15785 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
15786 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
15787 (gdb_agent_ust_loaded, helper_thread_id)
15788 (gdb_agent_helper_thread_id): New macros.
15789 (struct ipa_sym_addresses): Add addr_ust_loaded,
15790 addr_helper_thread_id, addr_cmd_buf.
15791 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
15792 (in_process_agent_loaded_ust): New.
15793 (write_e_ust_not_loaded): New.
15794 (maybe_write_ipa_ust_not_loaded): New.
15795 (struct collect_static_trace_data_action): New.
15796 (enum tracepoint_type) <static_tracepoint>: New.
15797 (struct tracepoint) <handle>: Mention static tracepoints.
15798 (struct static_tracepoint_ctx): New.
15799 (CMD_BUF_SIZE): New.
15800 (add_tracepoint_action): Handle static tracepoint actions.
15801 (unprobe_marker_at): New.
15802 (clear_installed_tracepoints): Handle static tracepoints.
15803 (cmd_qtdp): Handle static tracepoints.
15804 (probe_marker_at): New.
15805 (cmd_qtstart): Handle static tracepoints.
15806 (response_tracepoint): Handle static tracepoints.
15807 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
15808 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
15809 (get_context_regcache): Handle static tracepoints.
15810 (do_action_at_tracepoint): Handle static tracepoint actions.
15811 (traceframe_find_block_type): Handle static trace data blocks.
15812 (traceframe_read_sdata): New.
15813 (download_tracepoints): Download static tracepoint actions.
15814 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
15815 (GDB_PROBE_NAME): New.
15816 (ust_ops): New.
15817 (GET_UST_SYM): New.
15818 (USTF): New.
15819 (dlsym_ust): New.
15820 (ust_marker_to_static_tracepoint): New.
15821 (gdb_probe): New.
15822 (collect_ust_data_at_tracepoint): New.
15823 (gdb_ust_probe): New.
15824 (UNIX_PATH_MAX, SOCK_DIR): New.
15825 (gdb_ust_connect_sync_socket): New.
15826 (resume_thread, stop_thread): New.
15827 (run_inferior_command): New.
15828 (init_named_socket): New.
15829 (gdb_ust_socket_init): New.
15830 (cstr_to_hexstr): New.
15831 (next_st): New.
15832 (first_marker, next_marker): New.
15833 (response_ust_marker): New.
15834 (cmd_qtfstm, cmd_qtsstm): New.
15835 (unprobe_marker_at, probe_marker_at): New.
15836 (cmd_qtstmat, gdb_ust_thread): New.
15837 (gdb_ust_init): New.
15838 (initialize_tracepoint_ftlib): Call gdb_ust_init.
15839 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
15840 (ST_REGENTRY): New.
15841 (x86_64_st_collect_regmap): New.
15842 (X86_64_NUM_ST_COLLECT_GREGS): New.
15843 (AMD64_RIP_REGNUM): New.
15844 (supply_static_tracepoint_registers): New.
15845 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
15846 (ST_REGENTRY): New.
15847 (i386_st_collect_regmap): New.
15848 (i386_NUM_ST_COLLECT_GREGS): New.
15849 (supply_static_tracepoint_registers): New.
15850 * server.c (handle_query): Handle qXfer:statictrace:read.
15851 <qSupported>: Report support for StaticTracepoints, and
15852 qXfer:statictrace:read features.
15853 * server.h (traceframe_read_sdata)
15854 (supply_static_tracepoint_registers): Declare.
15855 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
15856 (unpack_varlen_hex): Include in IPA build.
15857 * Makefile.in (ustlibs, ustinc): New.
15858 (IPA_OBJS): Add remote-utils-ipa.o.
15859 ($(IPA_LIB)): Link -ldl and -lpthread.
15860 (UST_CFLAGS): New.
15861 (IPAGENT_CFLAGS): Add UST_CFLAGS.
15862 * config.in, configure: Regenerate.
15863
9e4344e5
PA
158642010-06-20 Ian Lance Taylor <iant@google.com>
15865 Pedro Alves <pedro@codesourcery.com>
15866
15867 * linux-x86-low.c (always_true): Delete.
15868 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
15869 trying to fool the compiler with always_true.
15870
c6beb2cb
PA
158712010-06-20 Pedro Alves <pedro@codesourcery.com>
15872
15873 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
15874 conditions in gdbserver.
15875
d2ed6730
UW
158762010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
15877
15878 * spu-low.c (spu_read_memory): Wrap around local store limit.
15879 (spu_write_memory): Likewise.
15880
4e29fb54
PA
158812010-06-15 Pedro Alves <pedro@codesourcery.com>
15882
15883 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
15884 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
15885 LONGEST uses.
15886 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
15887 uses.
15888 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
15889 uses with LONGEST uses.
15890
6a271cae
PA
158912010-06-14 Stan Shebs <stan@codesourcery.com>
15892 Pedro Alves <pedro@codesourcery.com>
15893
15894 Bytecode compiler.
15895
15896 * linux-x86-low.c: Include limits.h.
15897 (add_insns): New.
15898 (always_true): New.
15899 (EMIT_ASM): New.
15900 (EMIT_ASM32): New.
15901 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
15902 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
15903 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
15904 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
15905 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
15906 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
15907 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
15908 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
15909 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
15910 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
15911 (amd64_emit_void_call_2): New.
15912 (amd64_emit_ops): New.
15913 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
15914 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
15915 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
15916 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
15917 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
15918 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
15919 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
15920 (i386_emit_call, i386_emit_reg, i386_emit_pop)
15921 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
15922 (i386_emit_stack_adjust, i386_emit_int_call_1)
15923 (i386_emit_void_call_2): New.
15924 (i386_emit_ops): New.
15925 (x86_emit_ops): New.
15926 (the_low_target): Install x86_emit_ops.
15927 * server.h (struct emit_ops): New.
15928 (get_raw_reg_func_addr): Declare.
15929 (current_insn_ptr, emit_error): Declare.
15930 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
15931 (set_trace_state_variable_value): New defines.
15932 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
15933 addr_get_trace_state_variable_value and
15934 addr_set_trace_state_variable_value.
15935 (symbol_list): New fields for get_raw_reg,
15936 get_trace_state_variable_value and set_trace_state_variable_value.
15937 (condfn): New typedef.
15938 (struct tracepoint): New field `compiled_cond'.
15939 (do_action_at_tracepoint): Clear compiled_cond.
15940 (get_trace_state_variable_value, set_trace_state_variable_value):
15941 Export in the IPA.
15942 (condition_true_at_tracepoint): If there's a compiled condition,
15943 run that.
15944 (current_insn_ptr, emit_error): New globals.
15945 (struct bytecode_address): New.
15946 (get_raw_reg_func_addr): New.
15947 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
15948 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
15949 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
15950 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
15951 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
15952 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
15953 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
15954 (compile_tracepoint_condition, compile_bytecodes): New.
15955 * target.h (emit_ops): Forward declare.
15956 (struct target_ops): New field emit_ops.
15957 (target_emit_ops): New.
15958 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
15959 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
15960 * linux-low.c (linux_emit_ops): New.
15961 (linux_target_ops): Install it.
15962 * linux-low.h (struct linux_target_ops): New field emit_ops.
15963
92b72907
UW
159642010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
15965
15966 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
15967 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
15968
fa593d66
PA
159692010-06-01 Pedro Alves <pedro@codesourcery.com>
15970 Stan Shebs <stan@codesourcery.com>
15971
15972 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
15973 (all): Depend on $(extra_libraries).
15974 (install-only): Install the IPA.
15975 (IPA_OBJS, IPA_LIB): New.
15976 (clean): Remove the IPA lib.
15977 (IPAGENT_CFLAGS): New.
15978 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
15979 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
15980 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
15981 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
15982 * configure.ac: Check for atomic builtins support in the compiler.
15983 (IPA_DEPFILES, extra_libraries): Define.
15984 * configure.srv (ipa_obj): Add description.
15985 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
15986 (i[34567]86-*-linux*): Set ipa_obj.
15987 (x86_64-*-linux*): Set ipa_obj.
15988 * linux-low.c (stabilizing_threads): New.
15989 (supports_fast_tracepoints): New.
15990 (linux_detach): Stabilize threads before detaching.
15991 (handle_tracepoints): Handle internal tracing breakpoints. Assert
15992 the lwp is either not stabilizing, or is moving out of a jump pad.
15993 (linux_fast_tracepoint_collecting): New.
15994 (maybe_move_out_of_jump_pad): New.
15995 (enqueue_one_deferred_signal): New.
15996 (dequeue_one_deferred_signal): New.
15997 (linux_wait_for_event_1): If moving out of a jump pad, defer
15998 pending signals to later.
15999 (linux_stabilize_threads): New.
16000 (linux_wait_1): Check if threads need moving out of jump pads, and
16001 do it if so.
16002 (stuck_in_jump_pad_callback): New.
16003 (move_out_of_jump_pad_callback): New.
16004 (lwp_running): New.
16005 (linux_resume_one_lwp): Handle moving out of jump pads.
16006 (linux_set_resume_request): Dequeue deferred signals.
16007 (need_step_over_p): Also step over fast tracepoint jumps.
16008 (start_step_over): Also uninsert fast tracepoint jumps.
16009 (finish_step_over): Also reinsert fast tracepoint jumps.
16010 (linux_install_fast_tracepoint_jump): New.
16011 (linux_target_ops): Install linux_stabilize_threads and
16012 linux_install_fast_tracepoint_jump_pad.
16013 * linux-low.h (linux_target_ops) <get_thread_area,
16014 install_fast_tracepoint_jump_pad>: New fields.
16015 (struct lwp_info) <collecting_fast_tracepoint,
16016 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16017 (linux_get_thread_area): Declare.
16018 * linux-x86-low.c (jump_insn): New.
16019 (x86_get_thread_area): New.
16020 (append_insns): New.
16021 (push_opcode): New.
16022 (amd64_install_fast_tracepoint_jump_pad): New.
16023 (i386_install_fast_tracepoint_jump_pad): New.
16024 (x86_install_fast_tracepoint_jump_pad): New.
16025 (the_low_target): Install x86_get_thread_area and
16026 x86_install_fast_tracepoint_jump_pad.
16027 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16028 (struct fast_tracepoint_jump): New.
16029 (fast_tracepoint_jump_insn): New.
16030 (fast_tracepoint_jump_shadow): New.
16031 (find_fast_tracepoint_jump_at): New.
16032 (fast_tracepoint_jump_here): New.
16033 (delete_fast_tracepoint_jump): New.
16034 (set_fast_tracepoint_jump): New.
16035 (uninsert_fast_tracepoint_jumps_at): New.
16036 (reinsert_fast_tracepoint_jumps_at): New.
16037 (set_breakpoint_at): Use write_inferior_memory.
16038 (uninsert_raw_breakpoint): Use write_inferior_memory.
16039 (check_mem_read): Mask out fast tracepoint jumps.
16040 (check_mem_write): Mask out fast tracepoint jumps.
16041 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16042 (set_fast_tracepoint_jump): Declare.
16043 (delete_fast_tracepoint_jump)
16044 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16045 (reinsert_fast_tracepoint_jumps_at): Declare.
16046 * regcache.c: Don't compile many functions when building the
16047 in-process agent library.
16048 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16049 the register buffer in the heap.
16050 (free_register_cache): If the register buffer isn't owned by the
16051 regcache, don't free it.
16052 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16053 pre-existing register caches.
16054 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16055 type.
16056 (convert_ascii_to_int): : Constify `from' parameter type.
16057 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16058 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16059 the needed buffer in-place.
16060 (relocate_instruction): New.
16061 * server.c (handle_query) <qSymbols>: If the target supports
16062 tracepoints, give it a chance of looking up symbols. Report
16063 support for fast tracepoints.
16064 (handle_status): Stabilize threads.
16065 (process_serial_event): Adjust.
16066 * server.h (struct fast_tracepoint_jump): Forward declare.
16067 (struct process_info) <fast_tracepoint_jumps>: New field.
16068 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16069 (decode_X_packet, decode_M_packet): Adjust.
16070 (relocate_instruction): Declare.
16071 (in_process_agent_loaded): Declare.
16072 (tracepoint_look_up_symbols): Declare.
16073 (struct fast_tpoint_collect_status): Declare.
16074 (fast_tracepoint_collecting): Declare.
16075 (force_unlock_trace_buffer): Declare.
16076 (handle_tracepoint_bkpts): Declare.
16077 (initialize_low_tracepoint)
16078 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16079 * target.h (struct target_ops) <stabilize_threads,
16080 install_fast_tracepoint_jump_pad>: New fields.
16081 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16082 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16083 [HAVE_STDINT_H]: Include stdint.h.
16084 (trace_debug_1): Rename to ...
16085 (trace_vdebug): ... this.
16086 (trace_debug): Rename to ...
16087 (trace_debug_1): ... this. Add `level' parameter.
16088 (trace_debug): New.
16089 (ATTR_USED, ATTR_NOINLINE): New.
16090 (IP_AGENT_EXPORT): New.
16091 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16092 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16093 (about_to_request_buffer_space, trace_buffer_is_full)
16094 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16095 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16096 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16097 (traceframe_write_count, traceframes_created)
16098 (trace_state_variables)
16099 New renaming defines.
16100 (struct ipa_sym_addresses): New.
16101 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16102 (symbol_list): New.
16103 (ipa_sym_addrs): New.
16104 (all_tracepoint_symbols_looked_up): New.
16105 (in_process_agent_loaded): New.
16106 (write_e_ipa_not_loaded): New.
16107 (maybe_write_ipa_not_loaded): New.
16108 (tracepoint_look_up_symbols): New.
16109 (debug_threads) [IN_PROCESS_AGENT]: New.
16110 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16111 (UNKNOWN_SIDE_EFFECTS): New.
16112 (stop_tracing): New.
16113 (flush_trace_buffer): New.
16114 (stop_tracing_bkpt): New.
16115 (flush_trace_buffer_bkpt): New.
16116 (read_inferior_integer): New.
16117 (read_inferior_uinteger): New.
16118 (read_inferior_data_pointer): New.
16119 (write_inferior_data_pointer): New.
16120 (write_inferior_integer): New.
16121 (write_inferior_uinteger): New.
16122 (struct collect_static_trace_data_action): Delete.
16123 (enum tracepoint_type): New.
16124 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
16125 <actions_str, step_actions, step_actions_str>: Only include in
16126 GDBserver.
fa593d66
PA
16127 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16128 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16129 (tracepoints): Use IP_AGENT_EXPORT.
16130 (last_tracepoint): Don't include in the IPA.
16131 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16132 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16133 (alloced_trace_state_variables): New.
16134 (trace_state_variables): Use IP_AGENT_EXPORT.
16135 (traceframe_t): Delete unused variable.
16136 (circular_trace_buffer): Don't include in the IPA.
16137 (trace_buffer_start): Delete.
16138 (struct trace_buffer_control): New.
16139 (trace_buffer_free): Delete.
16140 (struct ipa_trace_buffer_control): New.
16141 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16142 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16143 New.
16144 (trace_buffer_ctrl): New.
16145 (TRACE_BUFFER_CTRL_CURR): New.
16146 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16147 Reimplement as macros.
16148 (trace_buffer_wrap): Delete.
16149 (traceframe_write_count, traceframe_read_count)
16150 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16151 (struct tracepoint_hit_ctx) <type>: New field.
16152 (struct fast_tracepoint_ctx): New.
16153 (memory_barrier): New.
16154 (cmpxchg): New.
16155 (record_tracepoint_error): Update atomically in the IPA.
16156 (clear_inferior_trace_buffer): New.
16157 (about_to_request_buffer_space): New.
16158 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16159 updating the same buffer.
16160 (add_tracepoint): Default the tracepoint's type to trap
16161 tracepoint, and orig_size to -1.
16162 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16163 internal variables.
16164 (create_trace_state_variable): New parameter `gdb'. Handle it.
16165 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16166 (cmd_qtdp): Handle fast tracepoints.
16167 (cmd_qtdv): Adjust.
16168 (max_jump_pad_size): New.
16169 (gdb_jump_pad_head): New.
16170 (get_jump_space_head): New.
16171 (claim_jump_space): New.
16172 (sort_tracepoints): New.
16173 (MAX_JUMP_SIZE): New.
16174 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16175 IPA.
16176 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16177 support. Upload fast traceframes, and delete internal IPA
16178 breakpoints.
16179 (stop_tracing_handler): New.
16180 (flush_trace_buffer_handler): New.
16181 (cmd_qtstop): Upload fast tracepoints.
16182 (response_tracepoint): Handle fast tracepoints.
16183 (tracepoint_finished_step): Upload fast traceframes. Set the
16184 tracepoint hit context's tracepoint type.
16185 (handle_tracepoint_bkpts): New.
16186 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16187 type. Add comment about fast tracepoints.
16188 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16189 non-existing action_str field.
16190 (get_context_regcache): Handle fast tracepoints.
16191 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16192 to the regcache.
16193 (fast_tracepoint_from_jump_pad_address): New.
16194 (fast_tracepoint_from_ipa_tpoint_address): New.
16195 (collecting_t): New.
16196 (force_unlock_trace_buffer): New.
16197 (fast_tracepoint_collecting): New.
16198 (collecting): New.
16199 (gdb_collect): New.
16200 (write_inferior_data_ptr): New.
16201 (target_tp_heap): New.
16202 (target_malloc): New.
16203 (download_agent_expr): New.
16204 (UALIGN): New.
16205 (download_tracepoints): New.
16206 (download_trace_state_variables): New.
16207 (upload_fast_traceframes): New.
16208 (IPA_FIRST_TRACEFRAME): New.
16209 (IPA_NEXT_TRACEFRAME_1): New.
16210 (IPA_NEXT_TRACEFRAME): New.
16211 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16212 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16213 (gdb_jump_pad_buffer_end): New.
16214 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16215 (initialize_tracepoint): Adjust.
16216 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16217 buffer. Initialize the low module.
16218 * utils.c (PREFIX, TOOLNAME): New.
16219 (malloc_failure): Use PREFIX.
16220 (error): In the IPA, an error causes an exit.
16221 (fatal, warning): Use PREFIX.
16222 (internal_error): Use TOOLNAME.
16223 (NUMCELLS): Increase to 10.
16224 * configure, config.in: Regenerate.
16225
d149dd1d
PA
162262010-06-01 Pedro Alves <pedro@codesourcery.com>
16227
16228 * server.c (handle_query) <qSupported>: Do two passes over the
16229 qSupported string to avoid nesting strtok.
16230
f6528abd
JK
162312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16232
16233 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16234 (CDEPS): New.
16235 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16236 -Wl,--dynamic-list.
16237 * configure: Regenerate.
16238 * proc-service.list: New.
16239
ca2a87a0
JK
162402010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16241
16242 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16243 New comment.
16244
363a6e9f
OS
162452010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16246
16247 * gdbreplay.c (remote_open): Check error return from socket() call by
16248 its equality to -1 not by it being negative.
16249 * remote-utils.c (remote_open): Likewise.
16250
d23b6cb1
PA
162512010-05-23 Pedro Alves <pedro@codesourcery.com>
16252
16253 * config.h: Regenerate.
16254
28d3cf85
MK
162552010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16256
16257 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16258 doesn't provide PTRACE_GET_THREAD_AREA.
16259
fea36a59
MK
162602010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16261
16262 * linux-m68k-low.c: Include <asm/ptrace.h>
16263 (ps_get_thread_area): Implement.
16264
24b066ba
DE
162652010-05-03 Doug Evans <dje@google.com>
16266
16267 * event-loop.c (struct callback_event): New struct.
16268 (callback_list): New global.
16269 (append_callback_event, delete_callback_event): New functions.
16270 (process_callback): New function.
16271 (start_event_loop): Call it.
16272 * remote-utils.c (NOT_SCHEDULED): Define.
16273 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16274 moved out of readchar.
16275 (readchar): Rewrite. Call reschedule before returning.
16276 (reset_readchar): New function.
16277 (remote_close): Call it.
16278 (process_remaining, reschedule): New functions.
16279 * server.h (callback_handler_func): New typedef.
16280 (append_callback_event, delete_callback_event): Declare.
16281
9836d6ea
PA
162822010-05-03 Pedro Alves <pedro@codesourcery.com>
16283
16284 * proc-service.c (ps_pglobal_lookup): Use
16285 thread_db_look_up_one_symbol.
16286 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16287 parameter. Use it instead of all_symbols_looked_up.
16288 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16289 field.
16290 (all_symbols_looked_up): Don't declare.
16291 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16292 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16293 field.
16294 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16295 Set all_symbols_looked_up here.
16296 (thread_db_look_up_one_symbol): New.
16297 (thread_db_get_tls_address): Adjust.
16298 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16299 thread_db object on the heap, and tentatively set it in the
16300 process structure.
16301 (thread_db_init): Don't set all_symbols_looked_up here.
16302 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16303
7984d532
PA
163042010-05-03 Pedro Alves <pedro@codesourcery.com>
16305
16306 * linux-low.c (linux_kill, linux_detach): Adjust.
16307 (status_pending_p_callback): Remove redundant statement. Check
16308 for !TARGET_WAITIKIND_IGNORE, instead of
16309 TARGET_WAITKIND_STOPPED.
16310 (handle_tracepoints): Make sure LWP is locked. Adjust.
16311 (linux_wait_for_event_1): Adjust.
16312 (linux_cancel_breakpoints): New.
16313 (unsuspend_one_lwp): New.
16314 (unsuspend_all_lwps): New.
16315 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16316 (send_sigstop_callback): Change return type to int, add new
16317 `except' parameter and handle it.
16318 (suspend_and_send_sigstop_callback): New.
16319 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16320 pass them down. If SUSPEND, also increment the lwp's suspend
16321 count.
16322 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16323 (need_step_over_p): Don't consider suspended LWPs.
16324 (start_step_over): Adjust.
16325 (proceed_one_lwp): Change return type to int, add new `except'
16326 parameter and handle it.
16327 (unsuspend_and_proceed_one_lwp): New.
16328 (proceed_all_lwps): Use find_inferior instead of
16329 for_each_inferior.
16330 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16331 also decrement the suspend count of LWPs. Pass `except' down,
16332 instead of hacking its suspend count.
16333 (linux_pause_all): Add `freeze' parameter. Adjust.
16334 (linux_unpause_all): New.
16335 (linux_target_ops): Install linux_unpause_all.
16336 * server.c (handle_status): Adjust.
16337 * target.h (struct target_ops): New fields `unpause_all' and
16338 `cancel_breakpoints'. Add new parameter to `pause_all'.
16339 (pause_all): Add new `freeze' parameter.
16340 (unpause_all): New.
16341 (cancel_breakpoints): New.
16342 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16343 cancel breakpoints.
16344 (cmd_qtstart): Pause threads.
16345 (stop_tracing): Pause threads, and cancel breakpoints.
16346 * win32-low.c (win32_target_ops): Adjust.
16347
e471f25b
PA
163482010-05-03 Pedro Alves <pedro@codesourcery.com>
16349
16350 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16351 the inferior right away from here...
16352 (linux_wait_1): ... to here, and adjust to check the thread's
16353 last_resume_kind instead of the lwp's step or stop_expected flags.
16354
1915ef4f
PA
163552010-05-02 Pedro Alves <pedro@codesourcery.com>
16356
16357 * README: Use consistent `GDB' and `GDBserver' spellings.
16358
f9e39928
PA
163592010-05-02 Pedro Alves <pedro@codesourcery.com>
16360
16361 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16362 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16363 (linux_detach_one_lwp): Assume the lwp is stopped.
16364 (any_thread_of): Delete.
16365 (linux_detach): Stop all lwps here. Don't blindly delete all
16366 breakpoints.
16367 (delete_lwp_callback): New.
16368 (linux_mourn): Delete all lwps of the process that is gone.
16369 (linux_wait_1): Don't delete the last lwp of the process here.
16370 * mem-break.h (mark_breakpoints_out): Declare.
16371 * mem-break.c (mark_breakpoints_out): New.
16372 (free_all_breakpoints): Use it.
16373 * server.c (handle_target_event): If the process is gone, mark
16374 breakpoints out.
16375 * thread-db.c (struct thread_db) <create_bp>: New field.
16376 (thread_db_enable_reporting): Fix prototype. Store a thread event
16377 breakpoint reference in the thread_db struct.
16378 (thread_db_load_search): Clear the thread_db object.
16379 (try_thread_db_load_1): Ditto.
16380 (switch_to_process): New.
16381 (disable_thread_event_reporting): Use it.
16382 (remove_thread_event_breakpoints): New.
16383 (thread_db_detach, thread_db_mourn): Use it.
16384
1e7fc18c
PA
163852010-05-01 Pedro Alves <pedro@codesourcery.com>
16386
16387 * linux-low.c (linux_enable_event_reporting): New.
16388 (linux_wait_for_event_1, handle_extended_wait): Use it.
16389
02fc4de7
PA
163902010-04-30 Pedro Alves <pedro@codesourcery.com>
16391
16392 * linux-low.c (linux_kill_one_lwp, linux_kill)
16393 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16394 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16395 SIGSTOP even if the LWP is stopped.
16396 (send_sigstop_callback): New.
16397 (stop_all_lwps): Use send_sigstop_callback instead.
16398 (linux_resume_one_thread): Adjust.
16399 (proceed_one_lwp): Still proceed an LWP that the client has
16400 requested to stop, if we haven't reported it as stopped yet. Make
16401 sure that LWPs the client want stopped, have a pending SIGSTOP.
16402
bc3b5632
DE
164032010-04-26 Doug Evans <dje@google.com>
16404
ae1ada35
DE
16405 * server.c (handle_general_set): Make static.
16406
bc3b5632
DE
16407 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16408 Print received char after testing for error/eof instead of before.
16409 (input_interrupt): Tweak comment.
16410
65730243
DE
164112010-04-23 Doug Evans <dje@google.com>
16412
16413 * server.c (start_inferior): Print inferior argv if --debug.
16414
a8ae7dc0
AR
164152010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16416
16417 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16418 * nto-x86-low.c: Include server.h
16419
1c07cc19
PM
164202010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16421
16422 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16423 be consistent with other sources of this directory.
16424 (init_registers_amd64): Correct name of source file of this function
16425 in the comment.
16426
e0a61e09
PM
164272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16428
16429 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16430 64-bit executables.
16431
54709339
PM
164322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16433
16434 * win32-i386-low.c: Add 64-bit support.
16435 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16436 (init_registers_amd64): Declare.
16437 (mappings): Add 64-bit version of array.
16438 (init_windows_x86): New function.
16439 (the_low_target): Change init_arch field to init_windows_x86.
16440
e8f0053d
PM
164412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16442
16443 * win32-low.c: Adapt to support also 64-bit architecture.
16444 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16445 (get_image_name): Use SIZE_T type for local variable `done'.
16446 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16447 (toolhelp_get_dll_name): Idem.
16448 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16449 Use uintptr_t typecast to avoid warning.
16450 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16451 (handle_exception): Use phex_nz to avoid warning.
16452 (win32_wait): Remove unused local variable `process'.
16453
c481e77e
PM
164542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16455
16456 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16457 `amd64-avx.o'.
16458
12ea4b69
PM
164592010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16460
16461 * configure.ac: Use `ws2_32' library for srv_mingw.
16462 * configure: Regenerate.
16463 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16464 * remote-utils.c: Likewise.
16465
f6d1620c
L
164662010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16467
16468 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16469 if __x86_64__ is defined.
16470
8e642873
PM
164712010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16472
16473 * configure: Regenerate.
16474
711e434b
PM
164752010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16476
16477 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16478 * target.h (target_ops): New get_tib_address field.
16479 * win32-low.h (win32_thread_info): Add thread_local_base field.
16480 * win32-low.c (child_add_thread): Add tlb argument.
16481 Set thread_local_base field to TLB.
16482 (get_child_debug_event): Adapt to child_add_thread change.
16483 (win32_get_tib_address): New function.
16484 (win32_target_ops): Set get_tib_address field to
16485 win32_get_tib_address.
16486 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16487
505106cd
PA
164882010-04-12 Pedro Alves <pedro@codesourcery.com>
16489
505106cd
PA
16490 * linux-low.c (linux_mourn): Also remove the process.
16491 * server.c (handle_target_event): Don't remove the process here.
16492 * nto-low.c (nto_mourn): New.
16493 (nto_target_ops): Install it.
16494 * spu-low.c (spu_mourn): New.
16495 (spu_target_ops): Install it.
16496 * win32-low.c (win32_mourn): New.
16497 (win32_target_ops): Install it.
16498
e8470a06
PA
164992010-04-12 Pedro Alves <pedro@codesourcery.com>
16500
16501 * server.h (buffer_xml_printf): Remove redundant `;'.
16502
45ba0d02
PA
165032010-04-12 Pedro Alves <pedro@codesourcery.com>
16504
16505 * regcache.c (set_register_cache): Invalidate regcaches before
16506 changing the register cache layout.
16507 (regcache_invalidate_one): Allow a NULL regcache.
16508 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
16509 regcaches before changing the register cache layout or the target
16510 regsets.
16511
59e04013
L
165122010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16513
16514 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
16515 variable warning on Linux/x86-64.
16516
8336d594
PA
165172010-04-11 Pedro Alves <pedro@codesourcery.com>
16518
16519 GDBserver disconnected tracing support.
16520
16521 * linux-low.c (linux_remove_process): Delete.
16522 (add_lwp): Don't set last_resume_kind here.
16523 (linux_kill): Use `mourn'.
16524 (linux_detach): Use `thread_db_detach', and `mourn'.
16525 (linux_mourn): New.
16526 (linux_attach_lwp_1): Adjust comment.
16527 (linux_attach): last_resume_kind moved the thread_info; adjust.
16528 (status_pending_p_callback): Adjust.
16529 (linux_wait_for_event_1): Adjust.
16530 (count_events_callback, select_singlestep_lwp_callback)
16531 (select_event_lwp_callback, cancel_breakpoints_callback)
16532 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
16533 (proceed_one_lwp): Adjust.
16534 (linux_async): Add debug output.
16535 (linux_thread_stopped): New.
16536 (linux_pause_all): New.
16537 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
16538 linux_pause_all.
16539 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
16540 (thread_db_free): Delete declaration.
16541 (thread_db_detach, thread_db_mourn): Declare.
16542 * thread-db.c (thread_db_init): Use thread_db_mourn.
16543 (thread_db_free): Delete, split in two.
16544 (disable_thread_event_reporting): New.
16545 (thread_db_detach): New.
16546 (thread_db_mourn): New.
16547
16548 * server.h (struct thread_info) <last_resume_kind>: New field.
16549 <attached>: Add comment.
16550 <gdb_detached>: New field.
16551 (handler_func): Change return type to int.
16552 (handle_serial_event, handle_target_event): Ditto.
16553 (gdb_connected): Declare.
16554 (tracing): Delete.
16555 (disconnected_tracing): Declare.
16556 (stop_tracing): Declare.
16557
16558 * server.c (handle_query) <qSupported>: Report support for
16559 disconnected tracing.
16560 (queue_stop_reply_callback): Account for running threads.
16561 (gdb_wants_thread_stopped): New.
16562 (gdb_wants_all_threads_stopped): New.
16563 (gdb_reattached_process): New.
16564 (handle_status): Clear the `gdb_detached' flag of all processes.
16565 In all-stop, stop all threads.
16566 (main): Be sure to leave tfind mode. Handle disconnected tracing.
16567 (process_serial_event): If the remote connection breaks, or if an
16568 exit was forced with "monitor exit", force an event loop exit.
16569 Handle disconnected tracing on detach.
16570 (handle_serial_event): Adjust.
16571 (handle_target_event): If GDB isn't connected, forward events back
16572 to the inferior, unless the last process exited, in which case,
16573 exit gdbserver. Adjust interface.
16574
16575 * remote-utils.c (remote_open): Don't block in accept. Instead
16576 register an event loop source on the listen socket file
16577 descriptor. Refactor bits into ...
16578 (listen_desc): ... this new global.
16579 (gdb_connected): ... this new function.
16580 (enable_async_notification): ... this new function.
16581 (handle_accept_event): ... this new function.
16582 (remote_close): Clear remote_desc.
16583
16584 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
16585
16586 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
16587 New fields.
16588 (mourn_inferior): Define.
16589 (target_process_qsupported): Avoid the dangling else problem.
16590 (thread_stopped): Define.
16591 (pause_all): Define.
16592 (target_waitstatus_to_string): Declare.
16593 * target.c (target_waitstatus_to_string): New.
16594
16595 * tracepoint.c (tracing): Make extern.
16596 (disconnected_tracing): New.
16597 (stop_tracing): Make extern. Handle tracing stops due to GDB
16598 disconnecting.
16599 (cmd_qtdisconnected): New.
16600 (cmd_qtstatus): Report disconnected tracing status in trace reply.
16601 (handle_tracepoint_general_set): Handle QTDisconnected.
16602
16603 * event-loop.c (event_handler_func): Change return type to int.
16604 (process_event): Bail out if the event handler wants the event
16605 loop to stop.
16606 (handle_file_event): Ditto.
16607 (start_event_loop): Bail out if the event handler wants the event
16608 loop to stop.
16609
16610 * nto-low.c (nto_target_ops): Adjust.
16611 * spu-low.c (spu_wait): Don't remove the process here.
16612 (spu_target_ops): Adjust.
16613 * win32-low.c (win32_wait): Don't remove the process here.
16614 (win32_target_ops): Adjust.
16615
5d267c4c
PA
166162010-04-11 Pedro Alves <pedro@codesourcery.com>
16617
16618 * regcache.c (realloc_register_cache): Invalidate inferior's
16619 regcache before recreating it.
16620
623ccd72
PA
166212010-04-09 Pedro Alves <pedro@codesourcery.com>
16622
16623 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
16624
219f2f23
PA
166252010-04-09 Stan Shebs <stan@codesourcery.com>
16626 Pedro Alves <pedro@codesourcery.com>
16627
16628 * server.h (LONGEST): New.
16629 (struct thread_info) <while_stepping>: New field.
16630 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
16631 Declare.
16632 (initialize_tracepoint, handle_tracepoint_general_set)
16633 (handle_tracepoint_query, tracepoint_finished_step)
16634 (tracepoint_was_hit, release_while_stepping_state_list):
16635 (current_traceframe): Declare.
16636 * server.c (handle_general_set): Handle tracepoint packets.
16637 (read_memory): New.
16638 (write_memory): New.
16639 (handle_search_memory_1): Use read_memory.
16640 (handle_query): Report support for conditional tracepoints, trace
16641 state variables, and tracepoint sources. Handle tracepoint
16642 queries.
16643 (main): Initialize the tracepoints module.
16644 (process_serial_event): Handle traceframe reads/writes.
16645
16646 * linux-low.c (handle_tracepoints): New.
16647 (linux_wait_1): Call it.
16648 (linux_resume_one_lwp): Handle while-stepping.
16649 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
16650 (linux_target_ops): Install them.
16651 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
16652 New field.
16653 * linux-x86-low.c (x86_supports_tracepoints): New.
16654 (the_low_target). Install it.
16655
16656 * mem-break.h (delete_breakpoint): Declare.
16657 * mem-break.c (delete_breakpoint): Make external.
16658
16659 * target.h (struct target_ops): Add `supports_tracepoints',
16660 `read_pc', and `write_pc' fields.
16661 (target_supports_tracepoints): Define.
16662 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
16663 (phex_nz): New.
16664
16665 * regcache.h (struct regcache) <registers_owned>: New field.
16666 (init_register_cache, regcache_cpy): Declare.
16667 (regcache_read_pc, regcache_write_pc): Declare.
16668 (register_cache_size): Declare.
16669 (supply_regblock): Declare.
16670 * regcache.c (init_register_cache): New.
16671 (new_register_cache): Use it.
16672 (regcache_cpy): New.
16673 (register_cache_size): New.
16674 (supply_regblock): New.
16675 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 16676
219f2f23
PA
16677 * tracepoint.c: New.
16678
16679 * Makefile.in (OBS): Add tracepoint.o.
16680 (tracepoint.o): New rule.
16681
3a13a53b
L
166822010-04-08 H.J. Lu <hongjiu.lu@intel.com>
16683
16684 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
16685 (i386-mmx.o): New.
16686 (i386-mmx.c): Likewise.
16687 (i386-mmx-linux.o): Likewise.
16688 (i386-mmx-linux.c): Likewise.
16689
16690 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
16691 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
16692 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
16693 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
16694
16695 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
16696 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
16697 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
16698
1570b33e
L
166992010-04-07 H.J. Lu <hongjiu.lu@intel.com>
16700
16701 * Makefile.in (clean): Updated.
16702 (i386-avx.o): New.
16703 (i386-avx.c): Likewise.
16704 (i386-avx-linux.o): Likewise.
16705 (i386-avx-linux.c): Likewise.
16706 (amd64-avx.o): Likewise.
16707 (amd64-avx.c): Likewise.
16708 (amd64-avx-linux.o): Likewise.
16709 (amd64-avx-linux.c): Likewise.
16710
16711 * configure.srv (srv_i386_regobj): Add i386-avx.o.
16712 (srv_i386_linux_regobj): Add i386-avx-linux.o.
16713 (srv_amd64_regobj): Add amd64-avx.o.
16714 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
16715 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
16716 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
16717 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
16718 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
16719 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
16720 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
16721
16722 * i387-fp.c: Include "i386-xstate.h".
16723 (i387_xsave): New.
16724 (i387_cache_to_xsave): Likewise.
16725 (i387_xsave_to_cache): Likewise.
16726 (x86_xcr0): Likewise.
16727
16728 * i387-fp.h (i387_cache_to_xsave): Likewise.
16729 (i387_xsave_to_cache): Likewise.
16730 (x86_xcr0): Likewise.
16731
16732 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
16733 * linux-crisv32-low.c (target_regsets): Likewise.
16734 * linux-m68k-low.c (target_regsets): Likewise.
16735 * linux-mips-low.c (target_regsets): Likewise.
16736 * linux-ppc-low.c (target_regsets): Likewise.
16737 * linux-s390-low.c (target_regsets): Likewise.
16738 * linux-sh-low.c (target_regsets): Likewise.
16739 * linux-sparc-low.c (target_regsets): Likewise.
16740 * linux-xtensa-low.c (target_regsets): Likewise.
16741
16742 * linux-low.c: Include <sys/uio.h>.
16743 (regsets_fetch_inferior_registers): Support nt_type.
16744 (regsets_store_inferior_registers): Likewise.
16745 (linux_process_qsupported): New.
16746 (linux_target_ops): Add linux_process_qsupported.
16747
16748 * linux-low.h (regset_info): Add nt_type.
16749 (linux_target_ops): Add process_qsupported.
16750
16751 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
16752 and <sys/uio.h>.
16753 (init_registers_i386_avx_linux): New.
16754 (init_registers_amd64_avx_linux): Likewise.
16755 (xmltarget_i386_linux_no_xml): Likewise.
16756 (xmltarget_amd64_linux_no_xml): Likewise.
16757 (PTRACE_GETREGSET): Likewise.
16758 (PTRACE_SETREGSET): Likewise.
16759 (x86_fill_xstateregset): Likewise.
16760 (x86_store_xstateregset): Likewise.
16761 (use_xml): Likewise.
16762 (x86_linux_update_xmltarget): Likewise.
16763 (x86_linux_process_qsupported): Likewise.
16764 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
16765 (x86_arch_setup): Don't call init_registers_amd64_linux nor
16766 init_registers_i386_linux here. Call
16767 x86_linux_update_xmltarget.
16768 (the_low_target): Add x86_linux_process_qsupported.
16769
16770 * server.c (handle_query): Call target_process_qsupported.
16771
16772 * target.h (target_ops): Add process_qsupported.
16773 (target_process_qsupported): New.
16774
fc7238bb
PA
167752010-04-03 Pedro Alves <pedro@codesourcery.com>
16776
16777 * inferiors.c (add_thread): Set last_status kind to
16778 TARGET_WAITKIND_IGNORE.
16779 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
16780 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
16781 (linux_wait_1): Move `thread' local definition to block that uses
16782 it. Don't NULL initialize `event_child'.
16783 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
16784 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
16785 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
16786
bdabb078
PA
167872010-04-01 Pedro Alves <pedro@codesourcery.com>
16788
16789 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
16790 an extended waitstatus, or by a watchpoint.
16791 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
16792 thread was stepping or has been stopped by a watchpoint.
16793
d3bbe7a0
PA
167942010-04-01 Pedro Alves <pedro@codesourcery.com>
16795
16796 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
16797 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
16798 of another, then delete the previous, and validate all
16799 breakpoints.
16800 (validate_inserted_breakpoint): New.
16801 (delete_disabled_breakpoints): New.
16802 (validate_breakpoints): New.
16803 (check_mem_read): Validate breakpoints before trusting their
16804 shadow. Delete disabled breakpoints.
16805 (check_mem_write): Validate breakpoints before trusting they
16806 should be inserted. Delete disabled breakpoints.
16807 * mem-break.h (validate_breakpoints):
16808 * server.c (handle_query): Validate breakpoints when we see a
16809 qSymbol query.
16810
8b07ae33
PA
168112010-04-01 Pedro Alves <pedro@codesourcery.com>
16812
16813 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
16814 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
16815 if we could tell there's a GDB breakpoint at stop_pc.
16816 (need_step_over_p): Don't do a step over if we find a GDB
16817 breakpoint at the resume PC.
16818
16819 * mem-break.c (struct raw_breakpoint): New.
16820 (enum bkpt_type): New type `gdb_breakpoint'.
16821 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
16822 fields. New field `raw'.
16823 (find_raw_breakpoint_at): New.
16824 (set_raw_breakpoint_at): Handle refcounting. Create a raw
16825 breakpoint instead.
16826 (set_breakpoint_at): Adjust.
16827 (delete_raw_breakpoint): New.
16828 (release_breakpoint): New.
16829 (delete_breakpoint): Rename to...
16830 (delete_breakpoint_1): ... this. Add proc parameter. Use
16831 release_breakpoint. Return ENOENT.
16832 (delete_breakpoint): Reimplement.
16833 (find_breakpoint_at): Delete.
16834 (find_gdb_breakpoint_at): New.
16835 (delete_breakpoint_at): Delete.
16836 (set_gdb_breakpoint_at): New.
16837 (delete_gdb_breakpoint_at): New.
16838 (gdb_breakpoint_here): New.
16839 (set_reinsert_breakpoint): Use release_breakpoint.
16840 (uninsert_breakpoint): Rename to ...
16841 (uninsert_raw_breakpoint): ... this.
16842 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
16843 (reinsert_raw_breakpoint): Change parameter type to
16844 raw_breakpoint.
16845 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
16846 instead.
16847 (check_breakpoints): Adjust. Use release_breakpoint.
16848 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
16849 (breakpoint_inserted_here): Ditto.
16850 (check_mem_read): Adjust to iterate over raw breakpoints instead.
16851 Don't trust the breakpoint's shadow if it is not inserted.
16852 (check_mem_write): Adjust to iterate over raw breakpoints instead.
16853 (delete_all_breakpoints): Adjust.
16854 (free_all_breakpoints): Mark all breakpoints as uninserted, and
16855 use delete_breakpoint_1.
16856
16857 * mem-break.h (breakpoints_supported): Delete declaration.
16858 (set_gdb_breakpoint_at): Declare.
16859 (gdb_breakpoint_here): Declare.
16860 (delete_breakpoint_at): Delete.
16861 (delete_gdb_breakpoint_at): Declare.
16862
16863 * server.h (struct raw_breakpoint): Forward declare.
16864 (struct process_info): New field `raw_breakpoints'.
16865
16866 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
16867 breakpoints.
16868
6bf5e0ba
PA
168692010-03-24 Pedro Alves <pedro@codesourcery.com>
16870
16871 * linux-low.c (status_pending_p_callback): Fix comment.
16872 (linux_wait_for_event_1): Move most of the internal breakpoint
16873 handling from here...
16874 (linux_wait_1): ... to here.
16875 (count_events_callback): New.
16876 (select_singlestep_lwp_callback): New.
16877 (select_event_lwp_callback): New.
16878 (cancel_breakpoints_callback): New.
16879 (select_event_lwp): New.
16880 (linux_wait_1): Simplify internal breakpoint handling. Give equal
16881 priority to all LWPs that have had events that should be reported
16882 to the client. Cancel breakpoints when about to reporting the
16883 event to the client, not while stopping lwps. No longer cancel
16884 finished single-steps here.
16885 (cancel_finished_single_step): Delete.
16886 (cancel_finished_single_steps): Delete.
16887
414a389f
PA
168882010-03-24 Pedro Alves <pedro@codesourcery.com>
16889
16890 * mem-break.c (enum bkpt_type): New.
16891 (struct breakpoint): New field `type'.
16892 (set_breakpoint_at): Change return type to struct breakpoint
16893 pointer. Set type to `other_breakpoint' by default.
16894 (delete_breakpoint): Rewrite, supporting more than one breakpoint
16895 in the breakpoint list.
16896 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
16897 (reinsert_breakpoint): Rename to ...
16898 (reinsert_raw_breakpoint): ... this.
16899 (reinsert_breakpoints_at): Adjust.
16900 * mem-break.h (struct breakpoint): Declare.
16901 (set_breakpoint_at): Change return type to struct breakpoint
16902 pointer.
16903
2280c721
PA
169042010-03-24 Pedro Alves <pedro@codesourcery.com>
16905
16906 * server.c (handle_query): Assign, not compare.
16907
d50171e4
PA
169082010-03-24 Pedro Alves <pedro@codesourcery.com>
16909
16910 Teach linux gdbserver to step-over-breakpoints.
16911
16912 * linux-low.c (can_hardware_single_step): New.
16913 (supports_breakpoints): New.
16914 (handle_extended_wait): If stopping threads, read the stop pc of
16915 the new cloned LWP.
16916 (get_pc): New.
16917 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
16918 low target doesn't support retrieving the PC.
16919 (add_lwp): Set last_resume_kind to resume_continue.
16920 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
16921 (linux_attach): Don't clear stop_expected. Set the lwp's
16922 last_resume_kind to resume_stop.
16923 (linux_detach_one_lwp): Don't check for removed breakpoints.
16924 (check_removed_breakpoint): Delete.
16925 (status_pending_p): Rename to ...
16926 (status_pending_p_callback): ... this. Don't check for removed
16927 breakpoints. Don't consider threads that are stopped from GDB's
16928 perspective.
16929 (linux_wait_for_lwp): Always read the stop_pc here.
16930 (cancel_breakpoint): New.
16931 (step_over_bkpt): New global.
16932 (linux_wait_for_event_1): Implement stepping over breakpoints.
16933 (gdb_wants_lwp_stopped): New.
16934 (gdb_wants_all_stopped): New.
16935 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
16936 single-step traps here. Store the thread's last reported target
16937 wait status.
16938 (send_sigstop): Don't clear stop_expected. Always set it,
16939 instead.
16940 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
16941 (cancel_finished_single_step): New.
16942 (cancel_finished_single_steps): New.
16943 (wait_for_sigstop): Don't cancel finished single-step traps here.
16944 (linux_resume_one_lwp): Don't check for removed breakpoints.
16945 Don't set `step' on non-hardware step archs.
16946 (linux_set_resume_request): Ignore resume_stop requests if already
16947 stopping or stopped. Set the lwp's last_resume_kind.
16948 (resume_status_pending_p): Don't check for removed breakpoints.
16949 (need_step_over_p): New.
16950 (start_step_over): New.
16951 (finish_step_over): New.
16952 (linux_resume_one_thread): Always queue a sigstop for resume_stop
16953 requests. Clear the thread's last reported target waitstatus.
16954 Don't use the `suspended' flag. Don't consider pending breakpoints.
16955 (linux_resume): Start a step-over if necessary.
16956 (proceed_one_lwp): New.
16957 (proceed_all_lwps): New.
16958 (unstop_all_lwps): New.
16959 * linux-low.h (struct lwp_info): Rewrite comment for the
16960 `suspended' flag. Add the `stop_pc' field. Delete the
16961 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
16962 Add `'last_resume_kind' and `need_step_over' fields.
16963 * inferiors.c (struct thread_info): Delete, moved elsewhere.
16964 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
16965 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
16966 (set_raw_breakpoint_at): New.
16967 (set_breakpoint_at): Rewrite to use it.
16968 (reinsert_breakpoint_handler): Delete.
16969 (set_reinsert_breakpoint): New.
16970 (reinsert_breakpoint_by_bp): Delete.
16971 (delete_reinsert_breakpoints): New.
16972 (uninsert_breakpoint): Rewrite.
16973 (uninsert_breakpoints_at): New.
16974 (reinsert_breakpoint): Rewrite.
16975 (reinsert_breakpoints_at): New.
16976 (check_breakpoints): Rewrite.
16977 (breakpoint_here): New.
16978 (breakpoint_inserted_here): New.
16979 (check_mem_read): Adjust.
16980 * mem-break.h (breakpoints_supported, breakpoint_here)
16981 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
16982 (reinsert_breakpoint_by_bp): Delete declaration.
16983 (delete_reinsert_breakpoints): Declare.
16984 (reinsert_breakpoint): Delete declaration.
16985 (reinsert_breakpoints_at): Declare.
16986 (uninsert_breakpoint): Delete declaration.
16987 (uninsert_breakpoints_at): Declare.
16988 (check_breakpoints): Adjust prototype.
16989 * server.h: Adjust include order.
16990 (struct thread_info): Declare here. Add a `last_status' field.
16991
30ba68cb
MS
169922010-03-23 Michael Snyder <msnyder@vmware.com>
16993
16994 * server.c (crc32): New function.
16995 (handle_query): Add handling for 'qCRC:' request.
16996
b9a881c2
PA
169972010-03-23 Pedro Alves <pedro@codesourcery.com>
16998
16999 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17000 lwp had been stopped by a watchpoint.
17001
e92d13d5
PA
170022010-03-16 Pedro Alves <pedro@codesourcery.com>
17003
17004 * server.h (internal_error): Declare.
17005 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17006 * utils.c (internal_error): New function.
17007
64daa791
AS
170082010-03-15 Andreas Schwab <schwab@redhat.com>
17009
17010 * configure.srv: Fix typo setting srv_regobj.
17011
f52cd8cd
PA
170122010-03-15 Pedro Alves <pedro@codesourcery.com>
17013
17014 * linux-low.c (fetch_register): Avoid passing a non string literal
17015 format to `error'.
17016 (usr_store_inferior_registers): Ditto.
17017
93ae6fdc
PA
170182010-03-14 Pedro Alves <pedro@codesourcery.com>
17019
17020 * linux-low.c (linux_write_memory): Bail out early if peeking
17021 memory failed.
17022
c3adc08c
PA
170232010-03-14 Pedro Alves <pedro@codesourcery.com>
17024
17025 * linux-low.h (struct lwp_info): New fields
17026 `stopped_by_watchpoint' and `stopped_data_address'.
17027 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17028 here, and cache them in the lwp object.
17029 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17030 directly.
17031 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17032 field.
17033 (linux_stopped_by_watchpoint): Rewrite.
17034 (linux_stopped_data_address): Rewrite.
17035
bce522a2
PA
170362010-03-06 Simo Melenius <simo.melenius@iki.fi>
17037
17038 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17039 switching the current inferior, not before.
17040
90884b2b
L
170412010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17042
17043 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17044 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17045 i386-linux.c and amd64-linux.c.
17046 (reg-i386.o): Removed.
17047 (reg-i386.c): Likewise.
17048 (reg-i386-linux.o): Likewise.
17049 (reg-i386-linux.c): Likewise.
17050 (reg-x86-64.o): Likewise.
17051 (reg-x86-64.c): Likewise.
17052 (reg-x86-64-linux.o): Likewise.
17053 (reg-x86-64-linux.c): Likewise.
17054 (i386.o): New.
17055 (i386.c): Likewise.
17056 (i386-linux.o): Likewise.
17057 (i386-linux.c): Likewise.
17058 (amd64.o): Likewise.
17059 (amd64.c): Likewise.
17060 (amd64-linux.o): Likewise.
17061 (amd64-linux.c): Likewise.
17062
17063 * configure.srv (srv_i386_regobj): New.
17064 (srv_i386_linux_regobj): Likewise.
17065 (srv_amd64_regobj): Likewise.
17066 (srv_amd64_linux_regobj): Likewise.
17067 (srv_i386_32bit_xmlfiles): Likewise.
17068 (srv_i386_64bit_xmlfiles): Likewise.
17069 (srv_i386_xmlfiles): Likewise.
17070 (srv_amd64_xmlfiles): Likewise.
17071 (srv_i386_linux_xmlfiles): Likewise.
17072 (srv_amd64_linux_xmlfiles): Likewise.
17073 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17074 srv_xmlfiles to $srv_i386_xmlfiles.
17075 (i[34567]86-*-mingw32ce*): Likewise.
17076 (i[34567]86-*-mingw*): Likewise.
17077 (i[34567]86-*-nto*): Likewise.
17078 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17079 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17080 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17081 (x86_64-*-linux*): Likewise.
17082
17083 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17084 (init_registers_amd64_linux): New.
17085 (x86_arch_setup): Replace init_registers_x86_64_linux with
17086 init_registers_amd64_linux.
17087
193f13e6
MK
170882010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17089
17090 * configure.ac: Check for libdl. If it is not available link against
17091 static libthread_db.
17092 * configure: Regenerate.
17093
85d721b8
PA
170942010-02-22 Pedro Alves <pedro@codesourcery.com>
17095
17096 PR9605
17097
17098 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17099 handing a read watchpoint.
17100 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17101
6076632b
DE
171022010-02-12 Doug Evans <dje@google.com>
17103
17104 * linux-low.c (linux_supports_tracefork_flag): Document.
17105 (linux_look_up_symbols): Add comment.
17106
3327ccf7
L
171072010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17108
17109 * regcache.c (supply_register): Clear regcache if buf is NULL.
17110
0718675c 171112010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 17112 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
17113
17114 * inferiors.c (find_inferior): Add function documentation.
17115 (unloaded_dll): Handle the case where the unloaded dll has not
17116 been previously registered in the dll list.
17117
177321bd
DJ
171182010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17119
17120 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17121 (thumb2_breakpoint): New.
17122 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17123
2b009048
DJ
171242010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17125
17126 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17127 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17128 breakpoints.
17129
3be029c7
PA
171302010-01-21 Pedro Alves <pedro@codesourcery.com>
17131
17132 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17133
18f5de3b
JK
171342010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17135
17136 * linux-s390-low.c (s390_collect_ptrace_register)
17137 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17138
3743bb4f
DE
171392010-01-21 Doug Evans <dje@google.com>
17140
14ce3065
DE
17141 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17142 (PTRACE_ARG4_TYPE): New macro.
17143 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17144 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17145 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17146 (usr_store_inferior_registers): Ditto.
17147 (linux_read_memory, linux_write_memory): Ditto.
17148 (linux_test_for_tracefork): Ditto.
17149
3743bb4f
DE
17150 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17151 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17152
8b315be5
PA
171532010-01-21 Pedro Alves <pedro@codesourcery.com>
17154
17155 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17156 target.
17157
85492558
PA
171582010-01-21 Pedro Alves <pedro@codesourcery.com>
17159
17160 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17161 prototype to take a regcache. Adjust.
17162
442ea881
PA
171632010-01-20 Pedro Alves <pedro@codesourcery.com>
17164
17165 * regcache.h (struct thread_info): Forward declare.
17166 (struct regcache): New.
17167 (new_register_cache): Adjust prototype.
17168 (get_thread_regcache): Declare.
17169 (free_register_cache): Adjust prototype.
17170 (registers_to_string, registers_from_string): Ditto.
17171 (supply_register, supply_register_by_name, collect_register)
17172 (collect_register_as_string, collect_register_by_name): Ditto.
17173 * regcache.c (struct inferior_regcache_data): Delete.
17174 (get_regcache): Rename to ...
17175 (get_thread_regcache): ... this. Adjust. Switch inferior before
17176 fetching registers.
17177 (regcache_invalidate_one): Adjust.
17178 (regcache_invalidate): Fix prototype.
17179 (new_register_cache): Return the new register cache.
17180 (free_register_cache): Change prototype.
17181 (realloc_register_cache): Adjust.
17182 (registers_to_string): Change prototype to take a regcache. Adjust.
17183 (registers_from_string): Ditto.
17184 (register_data): Ditto.
17185 (supply_register): Ditto.
17186 (supply_register_by_name): Ditto.
17187 (collect_register): Ditto.
17188 (collect_register_as_string): Ditto.
17189 (collect_register_by_name): Ditto.
17190 * server.c (process_serial_event): Adjust.
17191 * linux-low.h (regset_fill_func, regset_store_func): Change
17192 prototype.
17193 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17194 Change prototype.
17195 * linux-low.c (get_stop_pc): Adjust.
17196 (check_removed_breakpoint): Adjust.
17197 (linux_wait_for_event): Adjust.
17198 (linux_resume_one_lwp): Adjust.
17199 (fetch_register): Add regcache parameter. Adjust.
17200 (usr_store_inferior_registers): Ditto.
17201 (regsets_fetch_inferior_registers): Ditto.
17202 (regsets_store_inferior_registers): Ditto.
17203 (linux_fetch_registers, linux_store_registers): Ditto.
17204 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17205 regcache. Adjust.
43aaf8b6
PA
17206 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17207 Ditto.
442ea881
PA
17208 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17209 prototype to take a regcache.
17210 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17211 * remote-utils.c (convert_ascii_to_int, outreg)
17212 (prepare_resume_reply): Change prototype to take a regcache.
17213 Adjust.
17214 * target.h (struct target_ops) <fetch_registers, store_registers>:
17215 Change prototype to take a regcache.
17216 (fetch_inferior_registers, store_inferior_registers): Change
17217 prototype to take a regcache. Adjust.
17218 * proc-service.c (ps_lgetregs): Adjust.
17219 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17220 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17221 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17222 take a regcache. Adjust.
17223 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17224 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17225 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17226 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17227 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17228 (cris_cannot_fetch_register):
17229 (cris_breakpoint_at): Change prototype to take a regcache.
17230 Adjust.
17231 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17232 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17233 to take a regcache. Adjust.
17234 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17235 Adjust.
17236 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17237 take a regcache. Adjust.
17238 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17239 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17240 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17241 * linux-mips-low.c (mips_get_pc):
17242 (mips_set_pc): Change prototype to take a regcache. Adjust.
17243 (mips_reinsert_addr): Adjust.
17244 (mips_collect_register): Change prototype to take a regcache.
17245 Adjust.
17246 (mips_supply_register):
17247 (mips_collect_register_32bit, mips_supply_register_32bit)
17248 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17249 (mips_store_fpregset): Ditto.
43aaf8b6
PA
17250 * linux-ppc-low.c (ppc_supply_ptrace_register)
17251 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
17252 (parse_spufs_run): Adjust.
17253 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17254 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17255 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17256 take a regcache. Adjust.
17257 * linux-s390-low.c (s390_collect_ptrace_register)
17258 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17259 (s390_set_pc): Change prototype to take a regcache. Adjust.
17260 (s390_arch_setup): Adjust.
17261 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17262 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17263 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17264 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17265 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17266 regcache. Adjust.
17267 (sparc_breakpoint_at): Adjust.
17268 * linux-xtensa-low.c (xtensa_fill_gregset):
17269 (xtensa_store_gregset):
17270 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17271 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17272 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17273 prototype to take a regcache. Adjust.
17274 * win32-arm-low.c (arm_fetch_inferior_register)
17275 (arm_store_inferior_register): Change prototype to take a
17276 regcache. Adjust.
17277 * win32-i386-low.c (i386_fetch_inferior_register)
17278 (i386_store_inferior_register): Change prototype to take a
17279 regcache. Adjust.
17280 * win32-low.c (child_fetch_inferior_registers)
17281 (child_store_inferior_registers): Change prototype to take a
17282 regcache. Adjust.
17283 (win32_wait): Adjust.
17284 (win32_fetch_inferior_registers): Change prototype to take a
17285 regcache. Adjust.
17286 (win32_store_inferior_registers): Adjust.
17287 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17288 store_inferior_register>: Change prototype to take a regcache.
17289
60c3d7b0
DE
172902010-01-20 Doug Evans <dje@google.com>
17291
17292 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17293 #ifdef.
17294 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 17295 (W_STOPCODE): Provide definition if missing.
60c3d7b0 17296
dc146f7c
VP
172972010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17298
17299 * linux-low.c (linux_core_of_thread): New.
17300 (compare_ints, show_process, list_threads): New.
17301 (linux_qxfer_osdata): Report threads and cores.
17302 (linux_target_op): Register linux_core_of_thread.
17303 * remote-utils.c (prepare_resume_reply): Report the core.
17304 (buffer_xml_printf): Support %d specifier.
17305 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17306 New.
17307 (handle_query): Handle qXfer:threads. Announce availability
17308 thereof.
17309 * target.h (struct target_ops): New field core_of_thread.
17310
7803799a
UW
173112010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17312
17313 * Makefile.in (clean): Remove new generated files.
17314 (reg-s390.o, reg-s390.c): Remove rules.
17315 (reg-s390x.o, reg-s390x.c): Likewise.
17316 (s390-linux32.o, s390-linux32.c): Add rules.
17317 (s390-linux64.o, s390-linux64.c): Likewise.
17318 (s390x-linux64.o, s390x-linux64.c): Likewise.
17319 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17320 * linux-s390-low.c: Include <elf.h>.
17321 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17322 (init_registers_s390): Remove prototype.
17323 (init_registers_s390x): Likewise.
17324 (init_registers_s390_linux32): Add prototype.
17325 (init_registers_s390_linux64): Likewise.
17326 (init_registers_s390x_linux64): Likewise.
17327 (s390_num_regs_3264): New define.
17328 (s390_regmap_3264): New global variable.
17329 (s390_cannot_fetch_register): Remove obsolete check.
17330 (s390_cannot_store_register): Likewise.
17331 (s390_collect_ptrace_register): Handle upper/lower register halves.
17332 (s390_supply_ptrace_register): Likewise.
17333 (s390_fill_gregset): Update to register number changes.
17334 (s390_get_hwcap): New routine.
17335 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17336 Install appropriate regmap and register set.
17337
6e7ffa39
JB
173382010-01-01 Joel Brobecker <brobecker@adacore.com>
17339
17340 * server.c (gdbserver_version): Update copyright year to 2010.
17341 * gdbreplay.c (gdbreplay_version): Likewise.
17342
957f3f49
DE
173432009-12-28 Doug Evans <dje@google.com>
17344
17345 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17346 elf/external.h. Include <elf.h> instead but only if necessary.
17347
ca5c370d
PA
173482009-12-28 Pedro Alves <pedro@codesourcery.com>
17349
17350 * linux-low.c (linux_remove_process): Remove `detaching'
17351 parameter. Don't release/detach from thread_db here.
17352 (linux_kill): Release/detach from thread_db here, ...
17353 (linux_detach): ... and here, before actually detaching.
17354 (linux_wait_1): ... and here, when a process exits.
17355 * thread-db.c (any_thread_of): New.
17356 (thread_db_free): Switch the current inferior to a thread of the
17357 passed in process.
17358
4ee62156
DE
173592009-12-21 Doug Evans <dje@google.com>
17360
d90e6a88
DE
17361 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17362
c5f62d5f
DE
17363 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17364 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17365 warning ifndef __NR_tkill. Move setting of errno there too.
17366 Delete unnecessary resetting of errno after syscall.
17367 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17368
10e86dd7
DE
17369 * configure.ac: Check for dladdr.
17370 * config.in: Regenerate.
17371 * configure: Regenerate.
17372 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17373 (try_thread_db_load): Update.
17374
4ee62156
DE
17375 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17376
00f515da
DE
173772009-12-18 Doug Evans <dje@google.com>
17378
e9464885
DE
17379 * event-loop.c: Include unistd.h if it exists.
17380
07d4f67e
DE
17381 * linux-low.c (my_waitpid): Move definition away from being in
17382 between linux_tracefork_child/linux_test_for_tracefork.
17383
00f515da
DE
17384 * gdb_proc_service.h (psaddr_t): Fix type.
17385 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17386 signature to match glibc.
17387
1de1badb
DE
173882009-12-16 Doug Evans <dje@google.com>
17389
17390 * linux-low.c (linux_read_memory): Fix argument to read.
17391
aeeb81d1
PA
173922009-11-26 Pedro Alves <pedro@codesourcery.com>
17393
17394 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17395 events, don't leave current_inferior pointing at null.
17396
10357975
PA
173972009-11-26 Pedro Alves <pedro@codesourcery.com>
17398
17399 * win32-low.c (LOG): Delete.
17400 (OUTMSG): Output to stderr.
17401 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17402 on compile time LOG macro.
17403 (win32_wait): Fix debug output.
17404
cf6e3471
PA
174052009-11-26 Pedro Alves <pedro@codesourcery.com>
17406
17407 * win32-low.c (win32_add_one_solib): If the dll name is
17408 "ntdll.dll", prepend the system directory to the dll path.
17409
0c85e18e
MK
174102009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17411
17412 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17413
9ac544ce 174142009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 17415 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
17416
17417 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17418 * configure.ac: Check for __mcoldfire__ and set
17419 gdb_cv_m68k_is_coldfire.
17420 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17421 reg-cf.o and reg-m68k.o.
17422 * configure: Regenerated.
17423
fd7dd3e6
PA
174242009-11-16 Pedro Alves <pedro@codesourcery.com>
17425
17426 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17427 Pass it to thread_db_free.
17428 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17429 proper `detaching' argument to linux_remove_process.
17430 * linux-low.h (thread_db_free): Add `detaching' parameter.
17431 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17432 to thread_db_free.
17433 (thread_db_free): Add `detaching' parameter. Only
17434 call td_ta_clear_event if detaching from process.
17435
75aa492e
MK
174362009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17437
17438 * thread-db.c (thread_db_free): Fix typo.
17439
21e1bee4
PP
174402009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17441
17442 PR gdb/10838
17443 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17444
8838b45e
NS
174452009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17446
17447 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17448 with an i686 compiler.
17449 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17450 needed.
17451 * configure: Rebuilt.
17452
8a35fb51
SL
174532009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17454
17455 PR gdb/10783
17456
17457 * server.c (handle_search_memory_1): Correct read_addr initialization
17458 in loop for searching subsequent chunks.
17459
96f15937
PP
174602009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17461
17462 * configure.ac: New --with-libthread-db option.
17463 * thread-db.c: Allow direct dependence on libthread_db.
17464 (thread_db_free): Adjust.
17465 * config.in: Regenerate.
17466 * configure: Likewise.
889bf7c5 17467
5f7d1694
PP
174682009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17469
17470 PR gdb/10757
17471 * thread-db.c (attach_thread): New function.
17472 (maybe_attach_thread): Return success/failure.
17473 (find_new_threads_callback): Adjust.
889bf7c5
PA
17474 (thread_db_find_new_threads): Loop until no new threads.
17475
88e3b899
PA
174762009-10-13 Pedro Alves <pedro@codesourcery.com>
17477
17478 * proc-service.c (ps_lgetregs): Formatting.
17479
cdbfd419
PP
174802009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17481
17482 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17483 * configure.ac: Adjust.
17484 * linux-low.h (struct process_info_private): Move members to struct
17485 thread_db.
17486 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17487 * linux-low.c (linux_remove_process): Adjust.
17488 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17489 * server.c (handle_query): Move code ...
17490 (handle_monitor_command): ... here. New function.
17491 * target.h (struct target_ops): New member.
17492 * thread-db.c (struct thread_db): New.
17493 (libthread_db_search_path): New variable.
17494 (thread_db_create_event, thread_db_enable_reporting)
17495 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17496 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17497 (try_thread_db_load_1, dladdr_to_soname): New functions.
17498 (try_thread_db_load, thread_db_load_search): New functions.
17499 (thread_db_init): Search for libthread_db.
17500 (thread_db_free): New function.
17501 (thread_db_handle_monitor_command): Likewise.
17502 * config.in: Regenerate.
17503 * configure: Regenerate.
889bf7c5 17504
4168d2d6
UW
175052009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17506
17507 * spu-low.c (spu_kill): Wait for inferior to terminate.
17508 Call clear_inferiors.
17509 (spu_detach): Call clear_inferiors.
17510
81ecdfbb
RW
175112009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17512
17513 * aclocal.m4: Regenerate.
17514 * config.in: Likewise.
17515 * configure: Likewise.
17516
0b9ff2c0
UW
175172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17518
17519 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
17520 (parse_spufs_run): New function.
17521 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
17522 (ppc_breakpoint_at): Handle SPU breakpoints.
17523
efcbbd14
UW
175242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17525
17526 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
17527 (SPUFS_MAGIC): Define.
17528 (spu_enumerate_spu_ids): New function.
17529 (linux_qxfer_spu): New function.
17530 (linux_target_ops): Install linux_qxfer_spu.
17531
f4d9bade
UW
175322009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17533
17534 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
17535 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
17536 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
17537 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
17538 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
17539 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
17540 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
17541 (init_registers_powerpc_cell32l): Add prototype.
17542 (init_registers_powerpc_cell64l): Likewise.
17543 (ppc_arch_setup): Detect Cell/B.E. architecture.
17544
96e946ca
RW
175452009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17546
17547 * Makefile.in (datarootdir): New variable.
17548
58d6951d
DJ
175492009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17550
17551 * linux-low.c (linux_write_memory): Update debugging output.
17552 * Makefile.in (clean): Add new descriptions.
17553 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
17554 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
17555 * configure.srv: Add new files for arm*-*-linux*.
17556 * linux-arm-low.c: Add new declarations.
17557 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
17558 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
17559 (HWCAP_VFPv3D16): New.
17560 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
17561 instead of __IWMMXT__.
17562 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
17563 (arm_arch_setup): New.
17564 (target_regsets): Remove #ifdef. Add VFP regset.
17565 (the_low_target): Use arm_arch_setup.
17566
12b42a12
DJ
175672009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17568
17569 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
17570 the main thread again.
17571
ac8c974e
AR
175722009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
17573
17574 Adding Neutrino gdbserver.
17575 * configure: Regenerated.
17576 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
17577 * configure.srv (i[34567]86-*-nto*): New target.
17578 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
17579 * remote-utils.c [__QNX__]: Include sys/iomgr.h
17580 (nto_comctrl) [__QNX__]: New function.
17581 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
17582
4424e0c3 175832009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
17584
17585 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
17586 srv_tgtobj.
17587
912cf4ba
PA
175882009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
17589 Pedro Alves <pedro@codesourcery.com>
17590
17591 * win32-i386-low.c (i386_get_thread_context): Handle systems that
17592 don't support CONTEXT_EXTENDED_REGISTERS.
17593 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
17594 (the_low_target): Install them.
17595 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
17596 failing with ERROR_PIPE_NOT_CONNECTED.
17597
aa5ca48f
DE
175982009-06-30 Doug Evans <dje@google.com>
17599 Pierre Muller <muller@ics.u-strasbg.fr>
17600
17601 Add h/w watchpoint support to x86-linux, win32-i386.
17602 * Makefile.in (SFILES): Add i386-low.c
17603 (i386_low_h): Define.
17604 (i386-low.o): Add dependencies.
17605 (linux-x86-low.o): Add i386-low.h dependency.
17606 (win32-i386-low.o): Ditto.
17607 * i386-low.c: New file.
17608 * i386-low.h: New file.
17609 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
17610 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
17611 * linux-low.c (linux_add_process): Initialize arch_private.
17612 (linux_remove_process): Free arch_private.
17613 (add_lwp): Initialize arch_private.
17614 (delete_lwp): Free arch_private.
17615 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
17616 provided.
17617 * linux-low.h (process_info_private): New member arch_private.
17618 (lwp_info): New member arch_private.
17619 (linux_target_ops): New members new_process, new_thread,
17620 prepare_to_resume.
17621 (ptid_of): New macro.
17622 * linux-x86-low.c: Include stddef.h, i386-low.h.
17623 (arch_process_info): New struct.
17624 (arch_lwp_info): New struct.
17625 (x86_linux_dr_get, x86_linux_dr_set): New functions.
17626 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17627 (i386_dr_low_get_status): New function.
17628 (x86_insert_point, x86_remove_point): New functions.
17629 (x86_stopped_by_watchpoint): New function.
17630 (x86_stopped_data_address): New function.
17631 (x86_linux_new_process, x86_linux_new_thread): New functions.
17632 (x86_linux_prepare_to_resume): New function.
17633 (the_low_target): Add entries for insert_point, remove_point,
17634 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
17635 prepare_to_resume.
17636 * server.c (debug_hw_points): New global.
17637 (monitor_show_help): Document set debug-hw-points.
17638 (handle_query): Process "set debug-hw-points".
17639 * server.h (debug_hw_points): Declare.
17640 (paddress): Declare.
17641 * utils.c (NUMCELLS, CELLSIZE): New macros.
17642 (get_sell, xsnprintf, paddress): New functions.
17643 * win32-arm-low.c (the_low_target): Add entries for insert_point,
17644 remove_point, stopped_by_watchpoint, stopped_data_address.
17645 * win32-i386-low.c: Include i386-low.h.
17646 (debug_reg_state): Replaces dr.
17647 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17648 (i386_dr_low_get_status): New function.
17649 (i386_insert_point, i386_remove_point): New functions.
17650 (i386_stopped_by_watchpoint): New function.
17651 (i386_stopped_data_address): New function.
17652 (i386_initial_stuff): Update.
17653 (get_thread_context,set_thread_context,i386_thread_added): Update.
17654 (the_low_target): Add entries for insert_point,
17655 remove_point, stopped_by_watchpoint, stopped_data_address.
17656 * win32-low.c (win32_insert_watchpoint): New function.
17657 (win32_remove_watchpoint): New function.
17658 (win32_stopped_by_watchpoint): New function.
17659 (win32_stopped_data_address): New function.
17660 (win32_target_ops): Add entries for insert_watchpoint,
17661 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
17662 * win32-low.h (win32_target_ops): New members insert_point,
17663 remove_point, stopped_by_watchpoint, stopped_data_address.
17664
d993e290
PA
176652009-06-25 Pedro Alves <pedro@codesourcery.com>
17666
17667 * server.c (process_serial_event): Re-return unsupported, not
17668 error, if the type isn't recognized. Re-allow supporting only
17669 insert or remove packets. Also call require_running for
17670 breakpoints. Add missing break statement to default case. Tidy.
17671 * target.h (struct target_ops): Rename insert_watchpoint to
17672 insert_point, and remove_watchpoint to remove_point.
17673
17674 * linux-low.h (struct linux_target_ops): Likewise.
17675 * linux-low.c (linux_insert_watchpoint): Rename to ...
17676 (linux_insert_point): ... this. Adjust.
17677 (linux_remove_watchpoint): Rename to ...
17678 (linux_remove_point): ... this. Adjust.
17679 (linux_target_ops): Adjust.
17680 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
17681 (cris_insert_point): ... this.
17682 (cris_remove_watchpoint): Rename to ...
17683 (cris_remove_point): ... this.
17684 (the_low_target): Adjust.
17685
0f54c268
PM
176862009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
17687
17688 * server.c (handle_v_kill): Pass signal_pid to
17689 kill_inferior if multi_process is zero.
17690
c6314022
AR
176912009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
17692
17693 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
17694 * target.h (target_ops): Comment for *_watchpoint to make it clear
17695 the functions can get types '0' and '1'.
17696
4463ce24
AR
176972009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
17698
17699 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
17700 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
17701 * regcache.c (get_regcache): Likewise.
17702 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
17703 * win32-low.c (child_fetch_inferior_registers): Remove check for
17704 regno 0.
17705
cf8fd78b
PA
177062009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
17707 Pedro Alves <pedro@codesourcery.com>
17708
17709 * target.h (struct target_ops) <supports_multi_process>: New
17710 callback.
17711 (target_supports_multi_process): New.
17712 * server.c (handle_query): Even if GDB reports support, only
17713 enable multi-process if the target also supports it. Report
17714 multi-process support only if the target backend supports it.
17715 * linux-low.c (linux_supports_multi_process): New function.
17716 (linux_target_ops): Install it as target_supports_multi_process
17717 callback.
17718
47c0c975
DE
177192009-05-24 Doug Evans <dje@google.com>
17720
e09875d4
DE
17721 Global renaming of find_thread_pid to find_thread_ptid.
17722 * server.h (find_thread_ptid): Renamed from find_thread_pid.
17723 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
17724 All callers updated.
17725
e27d73f6
DE
17726 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
17727 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
17728 directly.
17729
47c0c975
DE
17730 * linux-low.c (get_stop_pc): Print pc if debug_threads.
17731 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
17732 (linux_resume_one_lwp): Ditto.
17733
2acc282a
DE
177342009-05-23 Doug Evans <dje@google.com>
17735
17736 * linux-low.c (linux_resume_one_lwp): Change type of first arg
17737 from struct inferior_list_entry * to struct lwp_info *.
17738 All callers updated.
17739
9f1036c1
DE
177402009-05-13 Doug Evans <dje@google.com>
17741
17742 * linux-x86-low.c: Don't include assert.h.
17743 (x86_siginfo_fixup): Use fatal, not assert.
17744 (x86_arch_setup): Fix comment.
17745
d0722149
DE
177462009-05-12 Doug Evans <dje@google.com>
17747
17748 Biarch support for i386/amd64 gdbserver.
17749 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
17750 Add linux-x86-low.c.
17751 (linux-i386-low.o, linux-x86-64-low.o): Delete.
17752 (linux-x86-low.o): Add.
17753 * linux-x86-64-low.c: Delete.
17754 * linux-i386-low.c: Delete.
17755 * linux-x86-low.c: New file.
17756 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
17757 linux-x86-low.o.
17758 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
17759 linux-x86-low.o.
17760 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
17761 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
17762 (linux_child_pid_to_exec_file): New function.
17763 (elf_64_header_p, elf_64_file_p): New functions.
17764 (siginfo_fixup): New function.
17765 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
17766 give target a chance to convert layout.
17767 * linux-low.h (linux_target_ops): New member siginfo_fixup.
17768 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
17769
fdeb2a12
DE
177702009-05-07 Doug Evans <dje@google.com>
17771
17772 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
17773 (regsets_store_inferior_registers): Ditto.
17774
a6dbe5df
PA
177752009-05-06 Pedro Alves <pedro@codesourcery.com>
17776
17777 PR server/10048
17778
17779 * linux-low.c (must_set_ptrace_flags): Delete.
17780 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
17781 of the global.
17782 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
17783 `lwp->must_set_ptrace_flags' instead.
ba42693b 17784 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
17785 (linux_wait_1): ... not here.
17786
5091eb23
DE
177872009-04-30 Doug Evans <dje@google.com>
17788
9f767825
DE
17789 * inferiors.c (started_inferior_callback): New function.
17790 (attached_inferior_callback): New function.
17791 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
17792 * server.c (print_started_pid, print_attached_pid): New functions.
17793 (detach_or_kill_for_exit): New function.
17794 (main): Call it instead of for_each_inferior (kill_inferior_callback).
17795 * server.h (have_started_inferiors_p): Declare.
17796 (have_attached_inferiors_p): Declare.
17797
5091eb23
DE
17798 * inferiors.c (remove_process): Fix memory leak, free process.
17799 * linux-low.c (linux_remove_process): New function.
17800 (linux_kill): Call it instead of remove_process.
17801 (linux_detach, linux_wait_1): Ditto.
17802
155c8968
PA
178032009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
17804
17805 * configure.srv: Add x86 Windows CE target.
17806
7fe519cb
UW
178072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17808
17809 * inferiors.c (get_thread_process): Make global.
17810 * server.h (get_thread_process): Add prototype.
17811 * thread-db.c (find_one_thread): Use get_thread_process
17812 instead of current_process.
17813 (thread_db_get_tls_address): Do not crash if called when
17814 thread layer is not yet initialized.
17815
5472f405
UW
178162009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17817
17818 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
17819 * spu-low.c (current_tid): Rename to ...
17820 (current_ptid): ... this.
17821 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
17822 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
17823 ptid_get_lwp (current_ptid) instead of current_tid.
17824 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
17825 instead of current_tid. Use find_process_pid to verify pid
17826 argument is valid. Pass proper argument to remove_process.
17827 (spu_thread_alive): Compare current_ptid instead of current_tid.
17828 (spu_resume): Likewise.
17829
55ac2b99
PA
178302009-04-02 Pedro Alves <pedro@codesourcery.com>
17831
17832 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
17833 variable.
17834
95954743
PA
178352009-04-01 Pedro Alves <pedro@codesourcery.com>
17836
17837 Implement the multiprocess extensions, and add linux multiprocess
17838 support.
17839
17840 * server.h (ULONGEST): Declare.
17841 (struct ptid, ptid_t): New.
17842 (minus_one_ptid, null_ptid): Declare.
17843 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17844 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
17845 (struct inferior_list_entry): Change `id' type from unsigned from
17846 to ptid_t.
17847 (struct sym_cache, struct breakpoint, struct
17848 process_info_private): Forward declare.
17849 (struct process_info): Declare.
17850 (current_process): Declare.
17851 (all_processes): Declare.
17852 (initialize_inferiors): Declare.
17853 (add_thread): Adjust to use ptid_t.
17854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
17855 (add_process, remove_process, find_thread_pid): Declare.
17856 (find_inferior_id): Adjust to use ptid_t.
17857 (cont_thread, general_thread, step_thread): Change type to ptid_t.
17858 (multi_process): Declare.
17859 (push_event): Adjust to use ptid_t.
17860 (read_ptid, write_ptid): Declare.
17861 (prepare_resume_reply): Adjust to use ptid_t.
17862 (clear_symbol_cache): Declare.
17863 * inferiors.c (all_processes): New.
17864 (null_ptid, minus_one_ptid): New.
17865 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17866 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
17867 (add_thread): Change unsigned long to ptid. Remove gdb_id
17868 parameter. Adjust.
17869 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
17870 (gdb_id_to_thread): Rename to ...
17871 (find_thread_pid): ... this. Change unsigned long to ptid.
17872 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
17873 (loaded_dll, pull_pid_from_list): Adjust.
17874 (add_process, remove_process, find_process_pid)
17875 (get_thread_process, current_process, initialize_inferiors): New.
17876 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
17877 (struct target_waitstatus) <related_pid>: Ditto.
17878 (struct target_ops) <kill, detach>: Add `pid' argument. Change
17879 return type to int.
17880 (struct target_ops) <join>: Add `pid' argument.
17881 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
17882 (struct target_ops) <wait>: Add `ptid' field. Change return type
17883 to ptid.
17884 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
17885 (mywait): Add `ptid' argument. Change return type to ptid_t.
17886 (target_pid_to_str): Declare.
17887 * target.c (set_desired_inferior): Adjust to use ptids.
17888 (mywait): Add new `ptid' argument. Adjust.
17889 (target_pid_to_str): New.
17890 * mem-break.h (free_all_breakpoints): Declare.
17891 * mem-break.c (breakpoints): Delelete.
17892 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
17893 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
17894 to use per-process breakpoint list.
17895 (free_all_breakpoints): New.
17896 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
17897 (symbol_cache, all_symbols_looked_up): Delete.
17898 (hexchars): New.
17899 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
17900 read_ptid): New.
17901 (prepare_resume_reply): Change ptid argument's type from unsigned
17902 long to ptid_t. Adjust. Implement W;process and X;process.
17903 (free_sym_cache, clear_symbol_cache): New.
17904 (look_up_one_symbol): Adjust to per-process symbol cache. *
17905 * server.c (cont_thread, general_thread, step_thread): Change type
17906 to ptid_t.
17907 (attached): Delete.
17908 (multi_process): New.
17909 (last_ptid): Change type to ptid_t.
17910 (struct vstop_notif) <ptid>: Change type to ptid_t.
17911 (queue_stop_reply, push_event): Change `ptid' argument's type to
17912 ptid_t.
17913 (discard_queued_stop_replies): Add `pid' argument.
17914 (start_inferior): Adjust to use ptids. Adjust to mywait interface
17915 changes. Don't reference the `attached' global.
17916 (attach_inferior): Adjust to mywait interface changes.
17917 (handle_query): Adjust to use ptids. Parse GDB's qSupported
17918 features. Handle and report "multiprocess+". Handle
17919 "qAttached:PID".
17920 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
17921 changes.
17922 (handle_v_kill): New.
17923 (handle_v_stopped): Adjust to use target_pid_to_str.
17924 (handle_v_requests): Allow multiple attaches and runs when
17925 multiprocess extensions are in effect. Handle "vKill".
17926 (myresume): Adjust to use ptids.
17927 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
17928 (handle_status): Adjust to discard_queued_stop_replies interface
17929 change.
17930 (first_thread_of, kill_inferior_callback)
17931 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
17932 (main): Call initialize_inferiors. Adjust to use ptids, killing
17933 and detaching from all inferiors. Handle multiprocess packet
17934 variants.
17935 * linux-low.h: Include gdb_proc_service.h.
17936 (struct process_info_private): New.
17937 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
17938 <lwpid_of>: Use ptid_get_lwp.
17939 (get_lwp_thread): Adjust.
17940 (struct lwp_info): Add `dead' member.
17941 (find_lwp_pid): Declare.
17942 * linux-low.c (thread_db_active): Delete.
17943 (new_inferior): Adjust comment.
17944 (inferior_pid): Delete.
17945 (linux_add_process): New.
17946 (handle_extended_wait): Adjust.
17947 (add_lwp): Change unsigned long to ptid.
17948 (linux_create_inferior): Add process to processes table. Adjust
17949 to use ptids. Don't set new_inferior here.
17950 (linux_attach_lwp): Rename to ...
17951 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
17952 it. Adjust to use ptids.
17953 (linux_attach_lwp): New.
17954 (linux_attach): Add process to processes table. Don't set
17955 new_inferior here.
17956 (struct counter): New.
17957 (second_thread_of_pid_p, last_thread_of_process_p): New.
17958 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
17959 multiple processes.
17960 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
17961 processes. Remove process from process table.
17962 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
17963 to multiple processes.
17964 (any_thread_of): New.
17965 (linux_detach): Add `pid' argument, and handle it. Remove process
17966 from processes table.
17967 (linux_join): Add `pid' argument. Handle it.
17968 (linux_thread_alive): Change unsighed long argument to ptid_t.
17969 Consider dead lwps as not being alive.
17970 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
17971 threads we're not interested in.
17972 (same_lwp, find_lwp_pid): New.
17973 (linux_wait_for_lwp): Change `pid' argument's type from int to
17974 ptid_t. Adjust.
17975 (linux_wait_for_event): Rename to ...
17976 (linux_wait_for_event_1): ... this. Change `pid' argument's type
17977 from int to ptid_t. Adjust.
17978 (linux_wait_for_event): New.
17979 (linux_wait_1): Add `ptid' argument. Change return type to
17980 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
17981 that exit from the process table.
17982 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
17983 Adjust.
17984 (mark_lwp_dead): New.
17985 (wait_for_sigstop): Adjust to use ptids. If a process exits while
17986 stopping all threads, mark its main lwp as dead.
17987 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
17988 ptids.
17989 (fetch_register, usr_store_inferior_registers)
17990 (regsets_fetch_inferior_registers)
17991 (regsets_store_inferior_registers, linux_read_memory)
17992 (linux_write_memory): Inline `inferior_pid'.
17993 (linux_look_up_symbols): Adjust to use per-process
17994 `thread_db_active'.
17995 (linux_request_interrupt): Adjust to use ptids.
17996 (linux_read_auxv): Inline `inferior_pid'.
17997 (initialize_low): Don't reference thread_db_active.
17998 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
17999 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18000 (ps_getpid): Return the pid of the current inferior.
18001 * thread-db.c (proc_handle, thread_agent): Delete.
18002 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18003 per-process data.
18004 (find_one_thread): Change argument type to ptid_t. Adjust to
18005 per-process data.
18006 (maybe_attach_thread): Adjust to per-process data and ptids.
18007 (thread_db_find_new_threads): Ditto.
18008 (thread_db_init): Ditto.
18009 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18010 processes table. Adjust to use ptids.
18011 (spu_kill, spu_detach): Adjust interface. Remove process from
18012 processes table.
18013 (spu_join, spu_thread_alive): Adjust interface.
18014 (spu_wait): Adjust interface. Remove process from processes
18015 table. Adjust to use ptids.
18016 * win32-low.c (current_inferior_tid): Delete.
18017 (current_inferior_ptid): New.
18018 (debug_event_ptid): New.
18019 (thread_rec): Take a ptid. Adjust.
18020 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18021 (child_delete_thread): Ditto.
18022 (do_initial_child_stuff): Add `attached' argument. Add process to
18023 processes table.
18024 (child_fetch_inferior_registers, child_store_inferior_registers):
18025 Adjust.
18026 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18027 (win32_attach): Pass 1 to do_initial_child_stuff.
18028 (win32_kill): Adjust interface. Remove process from processes
18029 table.
18030 (win32_detach): Ditto.
18031 (win32_join): Adjust interface.
18032 (win32_thread_alive): Take a ptid.
18033 (win32_resume): Adjust to use ptids.
18034 (get_child_debug_event): Ditto.
18035 (win32_wait): Adjust interface. Remove exiting process from
18036 processes table.
18037
bd99dc85
PA
180382009-04-01 Pedro Alves <pedro@codesourcery.com>
18039
18040 Non-stop mode support.
18041
18042 * server.h (non_stop): Declare.
18043 (gdb_client_data, handler_func): Declare.
18044 (delete_file_handler, add_file_handler, start_event_loop):
18045 Declare.
18046 (handle_serial_event, handle_target_event, push_event)
18047 (putpkt_notif): Declare.
18048 * target.h (enum resume_kind): New.
18049 (struct thread_resume): Replace `step' field by `kind' field.
18050 (TARGET_WNOHANG): Define.
18051 (struct target_ops) <wait>: Add `options' argument.
18052 <supports_non_stop, async, start_non_stop>: New fields.
18053 (target_supports_non_stop, target_async): New.
18054 (start_non_stop): Declare.
18055 (mywait): Add `options' argument.
18056 * target.c (mywait): Add `options' argument. Print child exit
18057 notifications here.
18058 (start_non_stop): New.
18059 * server.c (non_stop, own_buf, mem_buf): New globals.
18060 (struct vstop_notif): New.
18061 (notif_queue): New global.
18062 (queue_stop_reply, push_event, discard_queued_stop_replies)
18063 (send_next_stop_reply): New.
18064 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18065 interface changes.
18066 (attach_inferior): In non-stop mode, don't wait for the target
18067 here.
18068 (handle_general_set): Handle QNonStop.
18069 (handle_query): When handling qC, return the current general
18070 thread, instead of the first thread of the list.
18071 (handle_query): If the backend supports non-stop mode, include
18072 QNonStop+ in the qSupported query response.
18073 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18074 and non-stop mode.
18075 (handle_v_attach, handle_v_run): Handle non-stop mode.
18076 (handle_v_stopped): New.
18077 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18078 (myresume): Adjust to use resume_kind. Handle non-stop.
18079 (queue_stop_reply_callback): New.
18080 (handle_status): Handle non-stop mode.
18081 (main): Clear non_stop flag on reconnection. Use the event-loop.
18082 Refactor serial protocol handling from here ...
18083 (process_serial_event): ... to this new function. When GDB
18084 selects any thread, select one here. In non-stop mode, wait until
18085 GDB acks all pending events before exiting.
18086 (handle_serial_event, handle_target_event): New.
18087 * remote-utils.c (remote_open): Install remote_desc in the event
18088 loop.
18089 (remote_close): Remove remote_desc from the event loop.
18090 (putpkt_binary): Rename to...
18091 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18092 (putpkt_binary): New as wrapper around putpkt_binary_1.
18093 (putpkt_notif): New.
18094 (prepare_resume_reply): In non-stop mode, don't change the
18095 general_thread.
18096 * event-loop.c: New.
18097 * Makefile.in (OBJ): Add event-loop.o.
18098 (event-loop.o): New rule.
18099
18100 * linux-low.h (pid_of): Moved here.
18101 (lwpid_of): New.
18102 (get_lwp_thread): Use lwpid_of.
18103 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18104 * linux-low.c (pid_of): Delete.
18105 (inferior_pid): Use lwpid_of.
18106 (linux_event_pipe): New.
18107 (target_is_async_p): New.
18108 (delete_lwp): New.
18109 (handle_extended_wait): Use lwpid_of.
18110 (add_lwp): Don't set lwpid field.
18111 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18112 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18113 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18114 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18115 first. Adjust to linux_wait_for_event interface changes. Use
18116 lwpid_of.
18117 (linux_detach): Don't delete the main lwp here.
18118 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18119 (status_pending_p): Don't consider explicitly suspended lwps.
18120 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18121 pointer. Add OPTIONS argument. Change return type to int. Use
18122 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18123 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18124 pointer. Add status pointer argument. Return a pid instead of a
18125 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18126 changes. In non-stop mode, don't switch to a random thread.
18127 (linux_wait): Rename to...
18128 (linux_wait_1): ... this. Add target_options argument, and handle
18129 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18130 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18131 clean exit and signal exit code. Don't stop all threads in
18132 non-stop mode. In all-stop mode, only stop all threads when
18133 reporting a stop to GDB. Handle explicit thread stop requests.
18134 (async_file_flush, async_file_mark): New.
18135 (linux_wait): New.
18136 (send_sigstop): Use lwpid_of.
18137 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18138 interface changes. In non-stop mode, don't switch to a random
18139 thread.
18140 (linux_resume_one_lwp): Use lwpid_of.
18141 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18142 (linux_resume_one_thread): ... this. Handle resume_stop. In
18143 non-stop mode, don't look for pending flag in all threads.
18144 (resume_status_pending_p): Don't consider explicitly suspended
18145 threads.
18146 (my_waitpid): Reimplement. Emulate __WALL.
18147 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18148 Use lwpid_of.
18149 (sigchld_handler, linux_supports_non_stop, linux_async)
18150 (linux_start_non_stop): New.
18151 (linux_target_ops): Register linux_supports_non_stop, linux_async
18152 and linux_start_non_stop.
18153 (initialize_low): Install SIGCHLD handler.
18154 * thread-db.c (thread_db_create_event, find_one_thread)
18155 (thread_db_get_tls_address): Use lwpid_of.
18156 * win32-low.c (win32_detach): Adjust to use resume_kind.
18157 (win32_wait): Add `options' argument.
18158 * spu-low.c (spu_resume): Adjust to use resume_kind.
18159 (spu_wait): Add `options' argument.
18160
5b1c542e
PA
181612009-04-01 Pedro Alves <pedro@codesourcery.com>
18162
18163 Decouple target code from remote protocol.
18164
18165 * target.h (enum target_waitkind): New.
18166 (struct target_waitstatus): New.
18167 (struct target_ops) <wait>: Return an unsigned long. Take a
18168 target_waitstatus pointer instead of a char pointer.
18169 (mywait): Likewise.
18170 * target.c (mywait): Change prototype to return an unsigned long.
18171 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18172 * server.h (thread_from_wait, old_thread_from_wait): Delete
18173 declarations.
18174 (prepare_resume_reply): Change prototype to take a
18175 target_waitstatus.
18176 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18177 (last_status, last_ptid): New.
18178 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18179 pid instead of a signal.
18180 (attach_inferior): Remove "status" and "signal" parameters.
18181 Adjust.
18182 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18183 not as an address.
18184 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18185 (handle_v_requests, myresume): Remove "status" and "signal"
18186 parameters. Adjust.
18187 (handle_status): New.
18188 (main): Delete local `status'. Adjust.
18189 * remote-utils.c: Include target.h.
18190 (prepare_resume_reply): Change prototype to take a
18191 target_waitstatus. Adjust.
18192
18193 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18194 interface.
18195 * spu-low.c (spu_wait): Adjust.
18196 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18197 Delete.
18198 (win32_wait): Adjust.
18199
2bd7c093
PA
182002009-04-01 Pedro Alves <pedro@codesourcery.com>
18201
18202 * target.h (struct thread_resume): Delete leave_stopped member.
18203 (struct target_ops): Add a `n' argument to the `resume' callback.
18204 * server.c (start_inferior): Adjust.
18205 (handle_v_cont, myresume): Adjust.
18206 * linux-low.c (check_removed_breakpoint): Adjust to resume
18207 interface change, and to removed leave_stopped field.
18208 (resume_ptr): Delete.
18209 (struct thread_resume_array): New.
18210 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18211 resume interface change.
18212 (linux_continue_one_thread, linux_queue_one_thread)
18213 (resume_status_pending_p): Check if the resume field is NULL
18214 instead of checking the leave_stopped member.
18215 (linux_resume): Adjust to the target resume interface change.
18216 * spu-low.c (spu_resume): Adjust to the target resume interface
18217 change.
18218 * win32-low.c (win32_detach, win32_resume): Ditto.
18219
c35fafde
PA
182202009-04-01 Pedro Alves <pedro@codesourcery.com>
18221
18222 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18223 flag.
18224 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18225 pending.
18226 (linux_continue_one_thread): Only preserve the stepping flag if
18227 there's a pending breakpoint.
18228
0a59d50b
PA
182292009-03-31 Pedro Alves <pedro@codesourcery.com>
18230
18231 * server.c (main): After the inferior having exited, call
18232 remote_close before exiting gdbserver.
18233
f04c6d38
TJB
182342009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18235
18236 Fix size of FPSCR in Power 7 processors.
18237 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18238 (PPC_FEATURE_HAS_DFP): New #define.
18239 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18240 size of the FPSCR.
18241
78e5cee6
PA
182422009-03-23 Pedro Alves <pedro@codesourcery.com>
18243
18244 * server.c (handle_query) Whitespace and formatting.
18245
1b3f6016
PA
182462009-03-22 Pedro Alves <pedro@codesourcery.com>
18247
18248 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18249 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18250 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18251 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18252 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18253 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18254 Makefile.in, configure.ac: Fix whitespace throughout.
18255 * configure: Regenerate.
18256
a07b2135
PA
182572009-03-22 Pedro Alves <pedro@codesourcery.com>
18258
18259 * inferiors.c (find_inferior): Make it safe for the callback
18260 function to delete the currently iterated inferior.
18261
67cc2626
PA
182622009-03-22 Pedro Alves <pedro@codesourcery.com>
18263
18264 * Makefile.in (linuw_low_h): Move higher.
18265 (thread-db.o): Depend on $(linux_low_h).
18266
54a0b537
PA
182672009-03-17 Pedro Alves <pedro@codesourcery.com>
18268
18269 Rename "process" to "lwp" throughout.
18270
18271 * linux-low.c (all_processes): Rename to...
18272 (all_lwps): ... this.
18273 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18274 (add_process): Rename to ...
18275 (add_lwp): ... this. Adjust.
18276 (linux_create_inferior): Adjust.
18277 (linux_attach_lwp): Adjust.
18278 (linux_attach): Adjust.
18279 (linux_kill_one_process): Rename to ...
18280 (linux_kill_one_lwp): ... this. Adjust.
18281 (linux_kill): Adjust.
18282 (linux_detach_one_process): Rename to ...
18283 (linux_detach_one_lwp): ... this. Adjust.
18284 (linux_detach): Adjust.
18285 (check_removed_breakpoint): Adjust.
18286 (status_pending_p): Adjust.
18287 (linux_wait_for_process): Rename to ...
18288 (linux_wait_for_lwp): ... this. Adjust.
18289 (linux_wait_for_event): Adjust.
18290 (send_sigstop): Adjust.
18291 (wait_for_sigstop): Adjust.
18292 (stop_all_processes): Rename to ...
18293 (stop_all_lwps): ... this.
18294 (linux_resume_one_process): Rename to ...
18295 (linux_resume_one_lwp): ... this. Adjust.
18296 (linux_set_resume_request, linux_continue_one_thread)
18297 (linux_queue_one_thread, resume_status_pending_p)
18298 (usr_store_inferior_registers, regsets_store_inferior_registers)
18299 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18300 Adjust.
18301 * linux-low.h (get_process): Rename to ...
18302 (get_lwp): ... this. Adjust.
18303 (get_thread_process): Rename to ...
18304 (get_thread_lwp): ... this. Adjust.
18305 (get_process_thread): Rename to ...
18306 (get_lwp_thread): ... this. Adjust.
18307 (struct process_info): Rename to ...
18308 (struct lwp_info): ... this.
18309 (all_processes): Rename to ...
18310 (all_lwps): ... this.
18311 * proc-service.c (ps_lgetregs): Adjust.
18312 * thread-db.c (thread_db_create_event, find_one_thread)
18313 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18314
0b16c5cf
PA
183152009-03-14 Pedro Alves <pedro@codesourcery.com>
18316
18317 * server.c (handle_query): Handle "qAttached".
18318
32de4b9d
NS
183192009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18320
18321 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18322 GPLv3, update license URL.
18323
2aecd87f
DE
183242009-03-01 Doug Evans <dje@google.com>
18325
93efd302 18326 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
18327 (server_h): Add gdb_signals.h.
18328 (signals.o): Update.
18329 * server.h (target_signal_from_host,target_signal_to_host_p)
18330 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18331
86b1f9c5
PM
183322009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18333
18334 * remote-utils.c (getpkt): Also generate remote-debug
18335 information if noack_mode is set.
18336
4aa995e1
PA
183372009-02-06 Pedro Alves <pedro@codesourcery.com>
18338
18339 * server.c (handle_query): Report qXfer:siginfo:read and
18340 qXfer:siginfo:write as supported and handle them.
18341 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18342 * linux-low.c (linux_xfer_siginfo): New.
18343 (linux_target_ops): Set it.
18344
62709adf
PA
183452009-01-26 Pedro Alves <pedro@codesourcery.com>
18346
18347 * server.c (gdbserver_usage): Mention --remote-debug.
18348 (main): Accept '--remote-debug' switch.
18349
aef93bd7
DE
183502009-01-18 Doug Evans <dje@google.com>
18351
18352 * regcache.c (new_register_cache): No need to check result of xcalloc.
18353 * server.c (handle_search_memory): Back out calls to xmalloc,
18354 result is checked and error is returned to user upon failure.
18355 (handle_query): Ditto. Add more checks for result of malloc.
18356 (handle_v_cont): Check result of malloc, report error back to
18357 user upon failure.
18358 (handle_v_run): Ditto. Call freeargv.
18359 * server.h (freeargv): Declare.
18360 * utils.c (freeargv): New fn.
18361
54363045
DE
183622009-01-15 Doug Evans <dje@google.com>
18363
f626972c
DE
18364 * gdbreplay.c (perror_with_name): Make arg const char *.
18365 * server.h (target_signal_to_name): Make return type const char *.
0842e787 18366 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 18367 * utils.c (perror_with_name): Make arg const char *.
54363045 18368
18aae699
PA
183692009-01-14 Pedro Alves <pedro@codesourcery.com>
18370
18371 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18372 when handling a EXIT_PROCESS_DEBUG_EVENT.
18373
ff703abe
JB
183742009-01-06 Joel Brobecker <brobecker@adacore.com>
18375
18376 * gdbreplay.c (gdbreplay_version): Update copyright year.
18377 * server.c (gdbserver_version): Likewise.
18378
f21cc1a2 183792009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
18380
18381 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 18382 (handle_extended_wait): Improve comment.
0e21c1ec 18383
bca929d3
DE
183842008-12-13 Doug Evans <dje@google.com>
18385
18386 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18387 * server.h (ATTR_MALLOC): New macro.
18388 (xmalloc,xcalloc,xstrdup): Declare.
18389 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18390 * inferiors.c: Ditto.
18391 * linux-low.c: Ditto.
18392 * mem-break.c: Ditto.
18393 * regcache.c: Ditto.
18394 * remote-utils.c: Ditto.
18395 * server.c: Ditto.
18396 * target.c: Ditto.
18397 * win32-low.c: Ditto.
18398
97438e3f
DE
183992008-12-12 Doug Evans <dje@google.com>
18400
896c7fbb
DE
18401 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18402 in debugging printf.
18403
97438e3f
DE
18404 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18405
e3b886f8
DE
184062008-12-09 Doug Evans <dje@google.com>
18407
18408 * linux-low.h (struct process_info): Delete member tid, unused.
18409 * thread-db.c (find_one_thread): Update.
18410 (maybe_attach_thread): Update.
18411
07e059b5
VP
184122008-12-02 Pedro Alves <pedro@codesourcery.com>
18413
889bf7c5
PA
18414 * target.h (struct target_ops): Add qxfer_osdata member.
18415 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18416 and dirent.h.
18417 (linux_qxfer_osdata): New functions.
18418 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18419 callback.
18420 * server.c (handle_query): Handle "qXfer:osdata:read:".
18421 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18422 (buffer_xml_printf): New functions.
18423 * server.h (struct buffer): New.
18424 (buffer_grow_str, buffer_grow_str0): New macros.
18425 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18426 (buffer_xml_printf): Declare.
07e059b5 18427
4cab47ab
DE
184282008-11-24 Doug Evans <dje@google.com>
18429
18430 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18431
f142445f
DJ
184322008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18433
18434 * server.c (handle_v_run): Always use the supplied argument list.
18435
d0107bb6 184362008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 18437
d0107bb6
BW
18438 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18439 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 18440
2c4ad781
TJB
184412008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18442
18443 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18444 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18445 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18446 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18447 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18448 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18449 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18450 XML target descriptions.
18451 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18452 when inferior is running on an ISA 2.05 or later processor. Add
18453 special case to return offset for full 64-bit slot of FPSCR when
18454 in 32-bits.
18455
dfb64f85
DJ
184562008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18457
18458 * Makefile.in (SFILES, clean): Added sparc64 files.
18459 (reg-sparc64.o, reg-sparc64.c): New.
18460 * configure.srv (sparc*-*-linux*): New configuration.
18461 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18462 syscall arguments for SPARC.
18463 (regsets_store_inferior_registers): Likewise.
18464 * linux-sparc-low.c: New file.
18465
66b6e1dd
DE
184662008-10-21 Doug Evans <dje@google.com>
18467
18468 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18469 (READLINE_DIR,READLINE_DEP): Delete.
18470 (INTERNAL_CFLAGS): Update.
18471 (LINTFLAGS): Update.
18472
9b710a42
PA
184732008-10-10 Pedro Alves <pedro@codesourcery.com>
18474
18475 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18476 whole argv from the last run, not just argv[0].
18477
5822d809
PA
184782008-09-08 Pedro Alves <pedro@codesourcery.com>
18479
18480 * regcache.c (new_register_cache): Return NULL if the register
18481 cache size isn't known yet.
18482 (free_register_cache): Avoid dereferencing a NULL regcache.
18483
74aac56f
DJ
184842008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18485
18486 * configure.srv: Merge MIPS and MIPS64.
18487
400b20f5
MR
184882008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18489
18490 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18491
677c5bb1
LM
184922008-08-18 Luis Machado <luisgpm@br.ibm.com>
18493
18494 * Makefile.in: Add required vsx dependencies.
18495
18496 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18497 Declare init_registers_powerpc_vsx32l.
18498 Declare init_registers_powerpc_vsx64l.
18499 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18500 (ppc_arch_setup): Check for VSX in hwcap.
18501 (ppc_fill_vsxregset): New function.
18502 (ppc_store_vsxregset): New function.
18503 Add new VSX entry in regset_info target_regsets.
18504
18505 * configure.srv: Add new VSX dependencies.
18506
a6f3e723
SL
185072008-08-12 Pedro Alves <pedro@codesourcery.com>
18508
18509 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
18510 (remote_open): Set or clear transport_is_reliable.
18511 (putpkt_binary): Don't expect acks in noack mode.
18512 (getpkt): Don't send ack/nac in noack mode.
18513 * server.c (handle_general_set): Handle QStartNoAckMode.
18514 (handle_query): If connected by tcp pass QStartNoAckMode+ in
18515 qSupported.
18516 (main): Reset noack_mode on every connection.
18517 * server.h (noack_mode): Declare.
18518
a417dc56
RW
185192008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18520
18521 * Makefile.in (GDBREPLAY_OBS): New variable.
18522 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18523
3221518c
UW
185242008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
18525 Daniel Jacobowitz <dan@codesourcery.com>
18526
18527 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
18528 (usr_store_inferior_registers): Likewise.
18529 (regsets_store_inferior_registers): Likewise.
18530
ec56be1b
PA
185312008-07-31 Rolf Jansen <rj@surtec.com>
18532 Pedro Alves <pedro@codesourcery.com>
18533
18534 * configure.ac: Check for memmem declaration.
18535 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18536 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
18537 (disable_packet_qfThreadInfo): Unconditionally compile.
18538 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
18539 * configure, config.in: Regenerate.
18540
2fe5e3ff
DE
185412008-07-28 Doug Kwan <dougkwan@google.com>
18542
18543 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
18544 (linux_write_memory): Remove declaration of errno.
18545
836acd6d
UW
185462008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
18547
18548 * linux-low.c (handle_extended_wait): Do not use "status"
18549 variable uninitialized.
18550
aeba519e
PA
185512008-07-07 Pedro Alves <pedro@codesourcery.com>
18552
18553 * server.c (handle_v_attach): Inhibit reporting dll changes.
18554
db42f210
PA
185552008-06-27 Pedro Alves <pedro@codesourcery.com>
18556
18557 * remote-utils.c (prepare_resume_reply): If requested, don't
18558 output "thread:TID" in the T stop reply.
18559
18560 * server.c (disable_packet_vCont, disable_packet_Tthread)
18561 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
18562 (handle_query): If requested, disable support for qC, qfThreadInfo
18563 and qsThreadInfo.
18564 (handle_v_requests): If requested, disable support for vCont.
18565 (gdbserver_show_disableable): New.
18566 (main): Handle --disable-packet and --disable-packet=LIST.
18567
18568 * server.h (disable_packet_vCont, disable_packet_Tthread)
18569 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
18570
8e4c5421
CD
185712008-06-20 Carlos O'Donell <carlos@codesourcery.com>
18572
18573 * server.c (gdbserver_usage): Mention --version.
18574
6e23a804
DJ
185752008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
18576
18577 * Makefile.in (gdbreplay.o): New rule.
18578
90aa6a40
JM
185792008-06-06 Joseph Myers <joseph@codesourcery.com>
18580
18581 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
18582 message, not gdbserver.
18583
c16158bc 185842008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
18585 Nathan Sidwell <nathan@codesourcery.com>
18586 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
18587
18588 * acinclude.m4: Include ../../config/acx.m4.
18589 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
18590 * configure, config.in: Regenerate.
18591 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
18592 * server.c (gdbserver_version): Print PKGVERSION.
18593 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
18594 (main): Adjust gdbserver_usage calls.
18595 * gdbreplay.c (version, host_name): Add declarations.
18596 (gdbreplay_version, gdbreplay_usage): New.
18597 (main): Accept --version and --help options.
18598
aeb75bf5
DJ
185992008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
18600
18601 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
18602 (arm_breakpoint_at): Handle Thumb.
18603 (the_low_target): Add comment.
18604
76b233dd
UW
186052008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
18606
18607 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
18608
08388c79
DE
186092008-05-09 Doug Evans <dje@google.com>
18610
a3c83fae
DE
18611 * server.h (decode_search_memory_packet): Declare.
18612 * remote-utils.c (decode_search_memory_packet): New fn.
18613 * server.c (handle_search_memory_1): New fn.
08388c79
DE
18614 (handle_search_memory): New fn.
18615 (handle_query): Process qSearch:memory packets.
18616
bb9c3d36
UW
186172008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
18618
18619 * regcache.c (registers_length): Remove.
18620 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
18621 full register packet.
18622 * regcache.h (registers_length): Remove prototype.
18623 * server.h (PBUFSIZ): Define to 16384.
18624
7284e1be
UW
186252008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
18626
18627 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
18628 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
18629 powerpc-64l.o, and powerpc-altivec64l.o.
18630 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
18631 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
18632 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
18633 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
18634 rs6000/power-linux.xml, and rs6000/power64-linux.xml
18635 to srv_xmlfiles.
18636
18637 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
18638 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
18639 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
18640 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
18641 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
18642 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
18643 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
18644 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
18645 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
18646 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
18647 (clean): Update.
18648
18649 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
18650 (init_registers_powerpc_32l): ... this new prototype.
18651 (init_registers_powerpc_32): Remove, replace by ...
18652 (init_registers_powerpc_altivec32l): ... this new prototype.
18653 (init_registers_powerpc_e500): Remove, replace by ...
18654 (init_registers_powerpc_e500l): ... this new prototype.
18655 (init_registers_ppc64): Remove, replace by ...
18656 (init_registers_powerpc_64l): ... this new prototype.
18657 (init_registers_powerpc_64): Remove, replace by ...
18658 (init_registers_powerpc_altivec64l): ... this new prototype.
18659 (ppc_num_regs): Set to 73.
18660 (PT_ORIG_R3, PT_TRAP): Define if necessary.
18661 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
18662 (ppc_cannot_store_register): Handle orig_r3 and trap.
18663 (ppc_arch_setup): Update init_registers_... calls.
18664 (ppc_fill_gregset): Handle orig_r3 and trap.
18665
18666 * inferiors.c (clear_inferiors): Reset current_inferior.
18667
fdc59709
PB
186682008-04-23 Paolo Bonzini <bonzini@gnu.org>
18669
889bf7c5
PA
18670 * acinclude.m4: Add override.m4.
18671 * configure: Regenerate.
fdc59709 18672
c9b2f845
UW
186732008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18674
18675 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
18676 initial call to init_register_ppc64.
18677
550512b8
UW
186782008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18679
43aaf8b6
PA
18680 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
18681 single powerpc*-*-linux* case.
550512b8
UW
18682 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
18683
b6430ec3
UW
186842008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
18685
18686 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 18687 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
18688 from reg_xmlfiles.
18689 * linux-ppc-low.c: Include <elf.h>.
18690 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
18691 (ppc_hwcap): New global variable.
18692 (ppc_regmap): Remove __SPE__ #ifdef sections.
18693 (ppc_regmap_e500): New global variable.
18694 (ppc_cannot_store_register): Update __SPE__ special case.
18695 (ppc_get_hwcap): New function.
18696 (ppc_arch_setup): Use it to determine whether inferior supports
18697 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
18698 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
18699 Do not access registers if target does not support AltiVec.
18700 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
18701 Do not access registers if target does not support SPE.
18702 (target_regsets): Unconditionally include AltiVec and SPE regsets.
18703
52fa2412
UW
187042008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
18705
18706 * linux-low.c (disabled_regsets, num_regsets): New.
18707 (use_regsets_p): Delete.
18708 (linux_wait_for_process): Clear disabled_regsets.
18709 (regsets_fetch_inferior_registers): Check and set it.
18710 (regsets_store_inferior_registers): Likewise.
18711 (linux_fetch_registers, linux_store_registers): Do not use
18712 use_regsets_p.
18713 (initialize_low): Allocate disabled_regsets.
18714
e28b3332
DJ
187152008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
18716
18717 * Makefile.in (LIBOBJS): New.
18718 (OBS): Use LIBOBJS.
18719 (memmem.o): New rule.
18720 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
18721 * configure: Regenerated.
18722
4536995d
UW
187232008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
18724
18725 * server.c (handle_query): Never return "unsupported" for
18726 qXfer:features:read queries.
18727
221c031f
UW
187282008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
18729
18730 * server.c (get_features_xml): Fix inverted condition.
18731 (handle_query): Always support qXfer:feature:read.
18732
ccd213ac
DJ
187332008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
18734
18735 * server.c (wrapper_argv): New.
18736 (start_inferior): Handle wrapper_argv. If set, expect an extra
18737 trap.
18738 (gdbserver_usage): Document --wrapper.
18739 (main): Parse --wrapper.
18740
6fe305f7
UW
187412008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18742
18743 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
18744 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
18745 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
18746 (ppc_set_pc): Likewise.
18747 (ppc_arch_setup): New function.
18748 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
18749 of collect_register.
889bf7c5 18750 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 18751
5b0a002e
UW
187522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18753
18754 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
18755 instead of linux-ppc64-low.o.
18756 * linux-ppc64-low.c: Remove file.
18757 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
18758 (linux-ppc64-low.o): Remove rule.
18759
18760 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
18761 (init_registers_powerpc_64): Likewise.
18762 (ppc_regmap): Conditionally define depending on __powerpc64__.
18763 (ppc_cannot_store_register): Do not special-case "fpscr" when
18764 compiled on __powerpc64__.
18765 (ppc_collect_ptrace_register): New function.
18766 (ppc_supply_ptrace_register): New function.
18767 (ppc_breakpoint): Change type to "unsigned int".
18768 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
18769 (the_low_target): Conditionally provide initializers for the
889bf7c5 18770 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
18771 collect_ptrace_register and supply_ptrace_register members.
18772
9b4b61c8
UW
187732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18774
18775 * regcache.h (gdbserver_xmltarget): Add extern declaration.
18776 * server.c (gdbserver_xmltarget): Define.
18777 (get_features_xml): Use it to replace "target.xml" and arch_string.
18778
18779 * configure.srv: Remove srv_xmltarget. Add XML files that were
18780 mentioned there to srv_xmlfiles instead. Remove conditional tests
18781 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
18782 srv_xmlfiles and srv_regobj to include all possible choices.
18783 * configure.ac (srv_xmltarget): Remove.
18784 (srv_xmlfiles): Do not add "target.xml".
18785 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
18786 checks for supplementary target information.
18787 * configure: Regenerate.
18788 * Makefile.in (XML_TARGET): Remove.
18789 (target.xml): Remove rule.
18790 (clean): Do not clean up target.xml.
18791 (.PRECIOUS): Do not mention target.xml.
18792
18793 * target.h (struct target_ops): Remove arch_string member.
18794 * linux-low.c (linux_arch_string): Remove.
18795 (linux_target_ops): Remove arch_string initializer.
18796 * linux-low.h (struct linux_target_ops): Remove arch_string member.
18797 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
18798 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
18799 * spu-low.c (spu_arch_string): Remove.
18800 (spu_target_ops): Remove arch_string initializer.
18801 * win32-low.c (win32_arch_string): Remove.
18802 (win32_target_ops): Remove arch_string initializer.
18803 * win32-low.h (struct win32_target_ops): Remove arch_string member.
18804 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
18805 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
18806
ee1a7ae4
UW
188072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18808
18809 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
18810 by collect_ptrace_register and supply_ptrace_register hooks.
18811 * linux-low.c (fetch_register): Use supply_ptrace_register callback
18812 instead of checking for the_low_target.left_pad_xfer.
18813 (usr_store_inferior_registers): Use collect_ptrace_register callback
18814 instead of checking for the_low_target.left_pad_xfer.
18815
18816 * linux-s390-low.c (s390_collect_ptrace_register): New function.
18817 (s390_supply_ptrace_register): Likewise.
18818 (s390_fill_gregset): Call s390_collect_ptrace_register.
18819 (the_low_target): Update.
18820
18821 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
18822 (ppc_supply_ptrace_register): Likewise.
18823 (the_low_target): Update.
18824
18825 * linux-i386-low.c (the_low_target): Update.
18826 * linux-x86-64-low.c (the_low_target): Update.
18827
d61ddec4
UW
188282008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18829
18830 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
18831 reg-s390.o and reg-s390x.o.
18832
18833 * linux-low.c (new_inferior): New global variable.
18834 (linux_create_inferior, linux_attach): Set it.
18835 (linux_wait_for_process): Call the_low_target.arch_setup after the
18836 target has stopped for the first time.
18837 (initialize_low): Do not call the_low_target.arch_setup.
18838
18839 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
18840 (s390_set_pc): Likewise.
18841 (s390_arch_setup): New function.
18842 (the_low_target): Use s390_arch_setup as arch_setup routine.
18843
18844 * regcache.c (realloc_register_cache): New function.
18845 (set_register_cache): Call it for each existing regcache.
18846
d05b4ac3
UW
188472008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18848
18849 * server.h (init_registers): Remove prototype.
18850
18851 * linux-low.h (struct linux_target_ops): Add arch_setup field.
18852 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
18853 instead of init_registers ().
18854 * linux-arm-low.c (init_registers_arm): Add prototype.
18855 (init_registers_arm_with_iwmmxt): Likewise.
18856 (the_low_target): Add initializer for arch_setup field.
18857 * linux-cris-low.c (init_registers_cris): Add prototype.
18858 (the_low_target): Add initializer for arch_setup field.
18859 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
18860 (the_low_target): Add initializer for arch_setup field.
18861 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
18862 (the_low_target): Add initializer for arch_setup field.
18863 * linux-ia64-low.c (init_registers_ia64): Add prototype.
18864 (the_low_target): Add initializer for arch_setup field.
18865 * linux-m32r-low.c (init_registers_m32r): Add prototype.
18866 (the_low_target): Add initializer for arch_setup field.
18867 * linux-m68k-low.c (init_registers_m68k): Add prototype.
18868 (the_low_target): Add initializer for arch_setup field.
18869 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
18870 (init_registers_mips64_linux): Likewise.
18871 (the_low_target): Add initializer for arch_setup field.
18872 * linux-ppc-low.c (init_registers_ppc): Add prototype.
18873 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
18874 (the_low_target): Add initializer for arch_setup field.
18875 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
18876 (init_registers_powerpc_64): Likewise.
18877 (the_low_target): Add initializer for arch_setup field.
18878 * linux-s390-low.c (init_registers_s390): Add prototype.
18879 (init_registers_s390x): Likewise.
18880 (the_low_target): Add initializer for arch_setup field.
18881 * linux-sh-low.c (init_registers_sh): Add prototype.
18882 (the_low_target): Add initializer for arch_setup field.
18883 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
18884 (the_low_target): Add initializer for arch_setup field.
18885 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
18886 (the_low_target): Add initializer for arch_setup field.
18887
18888 * win32-low.h (struct win32_target_ops): Add arch_setup field.
18889 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
18890 instead of init_registers ().
18891 * win32-arm-low.c (init_registers_arm): Add prototype.
18892 (the_low_target): Add initializer for arch_setup field.
18893 * win32-i386-low.c (init_registers_i386): Add prototype.
18894 (the_low_target): Add initializer for arch_setup field.
18895
18896 * spu-low.c (init_registers_spu): Add prototype.
18897 (initialize_low): Call initialie_registers_spu () instead of
18898 initialize_registers ().
18899
fd96d250
PA
189002008-02-19 Pedro Alves <pedro@codesourcery.com>
18901
18902 * server.c (handle_v_requests): When handling the vRun and vAttach
18903 packets, if already debugging a process, don't kill it. Return an
18904 error instead.
18905
d41b6bb4
DJ
189062008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
18907
18908 * server.c (handle_query): Correct length check.
18909
5ac588cf
PA
189102008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
18911
18912 * win32-low.c (do_initial_child_stuff): Add process handle
18913 parameter. Set current_process_handle and current_process_id from the
18914 parameters. Clear globals.
18915 (win32_create_inferior): Don't set current_process_handle and
18916 current_process_id here. Instead pass them on the call to
18917 do_initial_child_stuff.
18918 (win32_attach): Likewise.
18919 (win32_clear_inferiors): New.
18920 (win32_kill): Don't close the current process handle or the
18921 current thread handle here. Instead call win32_clear_inferiors.
18922 (win32_detach): Don't open a new handle to the process. Call
18923 win32_clear_inferiors.
18924 (win32_join): Don't rely on current_process_handle; open a new
18925 handle using the process id.
18926 (win32_wait): Call win32_clear_inferiors when the inferior process
18927 has exited.
18928
ecd7ecbc
DJ
189292008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
18930
18931 * server.c (monitor_show_help): Add "exit".
18932
1525d545
MG
189332008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
18934
ecd7ecbc 18935 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
18936 (clean): Add reg-xtensa.c.
18937 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
18938 * configure.srv (xtensa*-*-linux*) New target.
18939 * linux-xtensa-low.c: New.
18940 * xtensa-xtregs.c: New.
1525d545 18941
59a016f0
PA
189422008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
18943
18944 * hostio.c: Don't include errno.h.
18945 (errno_to_fileio_errno): Move to hostio-errno.
18946 * hostio.c: (hostio_error): Remove the error parameter. Defer the
18947 error number outputting to the target->hostio_last_error callback.
18948 (hostio_packet_error): Use FILEIO_EINVAL directly.
18949 (handle_open, handle_pread, hostio_error, handle_unlink): Update
18950 calls to hostio_error.
18951 * hostio-errno.c: New.
18952 * server.h (hostio_last_error_from_errno): Declare.
18953 * target.h (target_ops): Add hostio_last_error member.
18954 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
18955 as hostio_last_error handler.
889bf7c5 18956 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
18957 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
18958 (wince_hostio_last_error): New functions.
18959 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
18960 as hostio_last_error handler.
18961 (win32_target_ops) [!_WIN32_WCE]: Register
18962 hostio_last_error_from_errno as hostio_last_error handler.
18963 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
18964 (hostio-errno.o): New rule.
18965 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
18966 * configure.srv (srv_hostio_err_objs): New variable. Default to
18967 hostio-errno.o.
18968 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
18969 * configure: Regenerate.
18970
2d717e4f
DJ
189712008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18972
18973 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
18974 (linux_kill, linux_detach): Clean up the process list.
18975 * remote-utils.c (remote_open): Improve port number parsing.
18976 (putpkt_binary, input_interrupt): Only send interrupts if the target
18977 is running.
18978 * server.c (extended_protocol): Make static.
18979 (attached): Define earlier.
18980 (exit_requested, response_needed, program_argv): New variables.
18981 (target_running): New.
18982 (start_inferior): Clear attached here.
18983 (attach_inferior): Set attached here.
18984 (require_running): Define.
18985 (handle_query): Use require_running and target_running. Implement
18986 "monitor exit".
18987 (handle_v_attach, handle_v_run): New.
18988 (handle_v_requests): Use require_running. Handle vAttach and vRun.
18989 (gdbserver_usage): Update.
18990 (main): Redo argument parsing. Handle --debug and --multi. Handle
18991 --attach along with other options or after the port. Save
18992 program_argv. Support no initial program. Resynchronize
18993 communication with GDB after an error. Handle "monitor exit".
18994 Use require_running and target_running. Always allow the extended
18995 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
18996 restart in extended mode.
18997 * README: Refer to the GDB manual. Update --attach usage.
18998
7407e2de
AS
189992007-12-20 Andreas Schwab <schwab@suse.de>
19000
19001 * linux-low.c (STACK_SIZE): Define.
19002 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19003 (linux_test_for_tracefork): Likewise.
19004
b65d95c5
DJ
190052007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19006
19007 * linux-low.c (linux_wait_for_event): Update messages. Do not
19008 reinsert auto-delete breakpoints.
19009 * mem-break.c (struct breakpoint): Change return type of handler to
19010 int.
19011 (set_breakpoint_at): Update handler type.
19012 (reinsert_breakpoint_handler): Return 1 instead of calling
19013 delete_breakpoint.
19014 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19015 setting a new one.
19016 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19017 * mem-break.h (set_breakpoint_at): Update handler type.
19018 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19019 * win32-low.c (auto_delete_breakpoint): New.
19020 (get_child_debug_event): Use it.
19021
4e799345
DJ
190222007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19023
19024 * configure.ac: Check for pread and pwrite.
19025 * hostio.c (handle_pread): Fall back to lseek and read.
19026 (handle_pwrite): Fall back to lseek and write.
19027 * config.in, configure: Regenerated.
19028
27524b67
DJ
190292007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19030
19031 * server.c (myresume): Add own_buf argument.
19032 (main): Update calls.
19033
a20d5e98
DJ
190342007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19035
19036 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19037 * remote-utils.c (remote_open): Do not call disable_async_io.
19038 (block_async_io): Delete.
19039 (unblock_async_io): Make static.
19040 (initialize_async_io): New.
19041 * server.c (handle_v_cont): Handle async I/O here.
19042 (myresume): Likewise. Move other common resume tasks here...
19043 (main): ... from here. Call initialize_async_io. Disable async
19044 I/O before the main loop.
19045 * server.h (initialize_async_io): Declare.
19046 (block_async_io, unblock_async_io): Delete prototypes.
19047 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19048
b79d787e
DJ
190492007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19050
19051 * remote-utils.c (readchar): Allow binary data in received messages.
19052
d97903b2
PA
190532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19054
19055 * win32-low.c (attaching): New global.
19056 (win32_create_inferior): Clear the `attaching' global.
19057 (win32_attach): Set the `attaching' global.
19058 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19059 attaching. Only set a breakpoint at the entry point if not
19060 attaching.
19061
311de423
PA
190622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19063
19064 * server.c (main): Don't report dll events on the initial
19065 connection on attaches.
19066
6c2d16d2
PA
190672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19068
19069 * server.c (main): Relax numerical bases supported for the pid of
19070 the --attach command line argument.
19071
5ca906e6
PA
190722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19073
19074 * win32-low.c (win32_attach): Call OpenProcess before
19075 DebugActiveProcess, not after. Add last error output to error
19076 call.
19077
9c6c8194
PA
190782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19079
19080 * win32-low.c (win32_get_thread_context)
19081 (win32_set_thread_context): New functions.
19082 (thread_rec): Use win32_get_thread_context.
19083 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19084 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19085 field.
19086
4d5d1aaa
PA
190872007-12-03 Leo Zayas
19088 Pedro Alves <pedro_alves@portugalmail.pt>
19089
19090 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19091 global variables.
19092 (child_add_thread): Minor cleanup.
19093 (child_continue): Resume artificially suspended threads before
19094 calling ContinueDebugEvent.
19095 (suspend_one_thread): New.
19096 (fake_breakpoint_event): New.
19097 (get_child_debug_event): Change return type to int. Check here if
19098 gdb sent an interrupt request. If a soft interrupt was requested,
19099 fake a breakpoint event. Return 0 if there is no event to handle,
19100 and 1 otherwise.
19101 (win32_wait): Don't check here if gdb sent an interrupt request.
19102 Ensure there is a valid event to handle.
19103 (win32_request_interrupt): Add soft interruption method as last
19104 resort.
19105
c436e841
PA
191062007-12-03 Leo Zayas
19107 Pedro Alves <pedro_alves@portugalmail.pt>
19108
19109 * win32-low.h (win32_thread_info): Add descriptions to the
19110 structure members. Replace `suspend_count' counter by a
19111 `suspended' flag.
19112 * win32-low.c (thread_rec): Update condition of when to get the
19113 context from the inferior. Rely on ContextFlags being set if it
19114 has already been retrieved. Only suspend the inferior thread if
19115 we haven't already. Warn if that fails.
19116 (continue_one_thread): s/suspend_count/suspended/. Only call
19117 ResumeThread once. Warn if that fails.
19118
e7b5fa67
PA
191192007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19120
19121 * win32-low.c (win32_wait): Don't read from the inferior when it
19122 has already exited.
19123
a385171d
PA
191242007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19125
19126 * Makefile.in (win32_low_h): New variable.
19127 (win32-low.o): Add dependency on $(win32_low_h).
19128 (win32-arm-low.o, win32-i386-low.o): New rules.
19129
f80c84b3
DJ
191302007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19131
19132 * hostio.c: Correct copyright year.
19133
a6b151f1
DJ
191342007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19135
19136 * Makefile.in (OBS): Add hostio.o.
19137 (hostio.o): New rule.
19138 * server.h (handle_vFile): Declare.
19139 * hostio.c: New file.
19140 * server.c (handle_v_requests): Take packet_len and new_packet_len
19141 for binary packets. Call handle_vFile.
19142 (main): Update call to handle_v_requests.
19143
f9387fc3
DJ
191442007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19145
19146 * linux-low.c: Include <sched.h>.
19147
51c2684e
DJ
191482007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19149
19150 * linux-low.c (linux_tracefork_grandchild): New.
19151 (linux_tracefork_child): Use clone.
19152 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19153
75f83163
JB
191542007-10-31 Joel Brobecker <brobecker@adacore.com>
19155
19156 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19157
da5898ce
DJ
191582007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19159
19160 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19161
24a09b5f
DJ
191622007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19163
19164 * inferiors.c (change_inferior_id): Delete.
19165 (add_pid_to_list, pull_pid_from_list): New.
19166 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19167 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19168 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19169 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19170 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19171 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19172 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19173 (using_threads): Always set to 1.
19174 (handle_extended_wait): New.
19175 (add_process): Do not set TID.
19176 (linux_create_inferior): Set must_set_ptrace_flags.
19177 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19178 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19179 (linux_thread_alive): Rename TID argument to LWPID.
19180 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19181 (linux_wait_for_event): Do not use TID or check using_threads. Update
19182 call to dead_thread_notify. Call handle_extended_wait.
19183 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19184 (send_sigstop): Delete sigstop_sent.
19185 (wait_for_sigstop): Avoid TID.
19186 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19187 (linux_test_for_tracefork): New.
19188 (linux_lookup_signals): Use thread_db_active and
19189 linux_supports_tracefork_flag.
19190 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19191 * linux-low.h (get_process_thread): Avoid TID.
19192 (struct process_ifo): Move thread_known and tid to the end. Remove
19193 sigstop_sent.
19194 (linux_attach_lwp, thread_db_init): Update prototypes.
19195 * server.h (change_inferior_id): Delete prototype.
19196 (add_pid_to_list, pull_pid_from_list): New prototypes.
19197 * thread-db.c (thread_db_use_events): New.
19198 (find_first_thread): Rename to...
19199 (find_one_thread): ...this. Update callers and messages. Do not
19200 call fatal. Check thread_db_use_events. Do not call
19201 change_inferior_id or new_thread_notify.
19202 (maybe_attach_thread): Update. Do not call new_thread_notify.
19203 (thread_db_init): Set thread_db_use_events. Check use_events.
19204 * utils.c (fatal, warning): Correct message prefix.
19205
30ed0a8f
DJ
192062007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19207
19208 * Makefile.in (clean): Remove new files.
19209 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19210 (powerpc-64.o, powerpc-64.c): New rules.
19211 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19212 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19213 with SPE.
19214 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19215 SPE targets.
19216 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19217 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19218 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19219 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19220 (target_regsets): Add AltiVec and SPE register sets.
19221 * configure.ac: Check for AltiVec and SPE.
19222 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19223 (ppc_fill_vrregset, ppc_store_vrregset): New.
19224 (target_regsets): Add AltiVec register set.
19225 * configure: Regenerated.
19226
fd462a61
DJ
192272007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19228
19229 * linux-low.c (O_LARGEFILE): Define.
19230 (linux_read_memory): Use /proc/PID/mem.
19231 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19232 * configure, config.in: Regenerated.
19233
69f223ed
DJ
192342007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19235
19236 * linux-low.c (linux_wait_for_event): Do not pass signals while
19237 single-stepping.
19238
aec18585
PA
192392007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19240
19241 * win32-low.c (create_process): New.
19242 (win32_create_inferior): Use create_process instead of
19243 CreateProcess. If create_process failed retry appending an ".exe"
19244 suffix. Store the GetLastError result immediatelly after
19245 create_process calls and use it on the call to error.
19246
34d86ddd
PA
192472007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19248
19249 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19250
5a0e3bd0
JB
192512007-08-23 Joel Brobecker <brobecker@adacore.com>
19252
19253 * configure.ac: Switch license to GPLv3.
19254
f88c79e6
MS
192552007-08-01 Michael Snyder <msnyder@access-company.com>
19256
19257 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19258
6b3d9b83
PA
192592007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19260
19261 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19262 typedef.
19263 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19264 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19265 CloseToolhelp32Snapshot.
19266 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19267 CloseToolhelp32Snapshot.
19268
c588c53c
MS
192692007-07-27 Michael Snyder <michael.snyder@access-company.com>
19270
19271 * server.c (main): Check for inferior exit before main loop.
19272
aa0403d9
PA
192732007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19274
19275 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19276 instead of on tmp_desc.
19277
255e7678
DJ
192782007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19279 Daniel Jacobowitz <dan@codesourcery.com>
19280
19281 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19282 (add_thread): Minor cleanups.
19283 (clear_inferiors): Move lower in the file. Clear the DLL
19284 list.
19285 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19286 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19287 (xml_escape_text): New.
19288 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19289 for qSupported.
19290 (handle_v_cont): Report errors.
19291 (gdbserver_version): Update.
19292 (main): Correct size of own_buf. Do not report initial DLL events.
19293 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19294 (unloaded_dll, xml_escape_text): New.
19295 * win32-low.c (enum target_waitkind): Update comments.
19296 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19297 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19298 (win32_EnumProcessModules, win32_GetModuleInformation)
19299 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19300 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19301 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19302 (win32_Module32First, win32_Module32Next, load_toolhelp)
19303 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19304 (get_child_debug_event): Handle DLL events.
19305 (win32_wait): Likewise.
19306
0d37add9
DJ
193072007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19308
19309 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19310 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19311
45e2715e
PA
193122007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19313
19314 * win32-low.c (handle_output_debug_string): Ignore event if not
19315 waiting.
19316
c5674cf1
PA
193172007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19318
19319 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19320
2bbe3cc1
DJ
193212007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19322
19323 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19324
ae13219e
DJ
193252007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19326
19327 * inferiors.c (change_inferior_id): Add comment.
19328 * linux-low.c (check_removed_breakpoint): Add an early
19329 prototype. Improve debug output.
19330 (linux_attach): Doc update.
19331 (linux_detach_one_process, linux_detach): Clean up before releasing
19332 each process.
19333 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19334 * linux-low.h (struct process_info): Doc improvement.
19335 * mem-break.c (delete_all_breakpoints): New.
19336 * mem-break.h (delete_all_breakpoints): New prototype.
19337 * thread-db.c (find_first_thread): New.
19338 (thread_db_create_event): Call it instead of
19339 thread_db_find_new_threads. Clean up unused variables.
19340 (maybe_attach_thread): Remove first thread handling.
19341 (thread_db_find_new_threads): Use find_first_thread.
19342 (thread_db_get_tls_address): Likewise.
19343
4105de34
DJ
193442007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19345
19346 * thread-db.c (thread_db_find_new_threads): Add prototype.
19347 (thread_db_create_event): Check for the main thread before adding
19348 a new thread.
19349 (maybe_attach_thread): Only enable event reporting if TID == 0.
19350 (thread_db_get_tls_address): Check for new threads.
19351
2b876972
DJ
193522007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19353
19354 * linux-low.c (linux_create_inferior): Try execv before execvp.
19355 * spu-low.c (spu_create_inferior): Likewise.
19356
7a245884
DJ
193572007-06-13 Mike Frysinger <vapier@gentoo.org>
19358
19359 * linux-low.c (linux_create_inferior): Change execv to execvp.
19360 * spu-low.c (spu_create_inferior): Likewies.
19361
117ce543
DJ
193622007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19363
19364 * Makefile.in (clean): Clean new files instead of deleted ones.
19365 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19366 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19367 rules.
19368 * configure.srv: Specify XML files and new regformats for MIPS and
19369 MIPS64 GNU/Linux.
19370 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19371 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19372 an entry for the restart register.
19373 (mips_cannot_fetch_register, mips_cannot_store_register)
19374 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19375 register names to match the XML descriptions.
19376 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19377 restart register instead of $0.
19378
0e7f50da
UW
193792007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19380 Markus Deuling <deuling@de.ibm.com>
19381
19382 * remote-utils.c (decode_xfer_write): New function.
19383 * server.h (decode_xfer_write): Add prototype.
19384 * server.c (handle_query): Add PACKET_LEN argument. Support
19385 qXfer:spu:read and qXfer:spu:write packets.
19386 (main): Pass packet_len to handle_query.
19387 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19388 * target.h (target_ops): Add qxfer_spu.
19389
374c1d38
UW
193902007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19391
19392 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19393 accessing non-seekable spufs files.
19394
bb63802a
UW
193952007-05-16 Markus Deuling <deuling@de.ibm.com>
19396
889bf7c5 19397 * server.c (handle_query): Add reply for qC packet.
bb63802a 19398
7390519e
PA
193992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19400 Leo Zayas <lerele@champenstudios@com>
19401
19402 * server.h (check_remote_input_interrupt_request): New function.
19403 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19404 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19405 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19406 (check_remote_input_interrupt_request): New function.
19407 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 19408 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
19409 winapi_GenerateConsoleCtrlEvent): New typedefs.
19410 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19411 to 250 ms.
19412 (win32_wait): Check for remote interrupt request
19413 with check_remote_input_interrupt_request.
19414 (win32_request_interrupt): New function.
19415 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19416
34b34921
PA
194172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19418
19419 * win32-low.c (debug_registers_changed,
19420 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19421 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19422 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19423 (thread_rec): Get context using the low target.
19424 (child_add_thread): Call thread_added on the low target,
19425 which does the same thing.
19426 (regptr): Delete.
19427 (do_initial_child_stuff): Remove debug registers references.
19428 Set context using the low target. Resume threads after
19429 setting the contexts.
19430 (child_continue): Remove dead variable. Remove debug
19431 registers references.
19432 (child_fetch_inferior_registers): Go through the low target.
19433 (do_child_store_inferior_registers): Remove.
19434 (child_store_inferior_registers): Go through the low target.
19435 (win32_resume): Remove debug registers references.
19436 Set context using the low target.
19437 (handle_exception): Change return type to void. Don't record
19438 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19439 first chance exception.
889bf7c5 19440 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
19441 goto loop. Always return after waiting for debug event.
19442 (win32_wait): Convert to switch statement. Handle spurious
19443 events.
19444
19445 * win32-i386-low.c (debug_registers_changed,
19446 debug_registers_used): New.
19447 (initial_stuff): Rename to ...
19448 (i386_initial_stuff): ... this. Clear debug registers
19449 state variables.
19450 (store_debug_registers): Delete.
19451 (i386_get_thread_context): New.
19452 (load_debug_registers): Delete.
19453 (i386_set_thread_context): New.
19454 (i386_thread_added): New.
19455 (single_step): Rename to ...
19456 (i386_single_step): ... this.
19457 (do_fetch_inferior_registers): Rename to ...
19458 (i386_fetch_inferior_register): ... this.
19459 (i386_store_inferior_register): New.
19460 (the_low_target): Adapt to new interface.
19461
19462 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19463 (arm_get_thread_context): New.
19464 (arm_set_thread_context): New.
19465 (regptr): New.
19466 (do_fetch_inferior_registers): Rename to ...
19467 (arm_fetch_inferior_register): ... this.
19468 (arm_store_inferior_register): New.
19469 (arm_wince_breakpoint): Reimplement as unsigned long.
19470 (arm_wince_breakpoint_len): Define.
19471 (the_low_target): Adapt to new interface.
19472
19473 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19474 load_debug_registers. Add get_thread_context, set_thread_context,
19475 thread_added and store_inferior_register. Rename
19476 fetch_inferior_registers to fetch_inferior_register.
19477 (regptr): Remove declaration.
19478
dd6953e1
PA
194792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19480
19481 * linux-low.c (linux_detach): Change return type to int. Return 0.
19482 * spu-low.c (spu_detach): Likewise.
19483
444d6139
PA
194842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19485
19486 * target.h (target_ops): Change return type of detach to int.
19487 Add join.
19488 (join_inferior): New.
19489 * server.c (main): Don't skip detach support on mingw32.
19490 If the inferior doesn't support detaching return error.
19491 Call join_inferior instead of using waitpid.
19492 * linux-low.c (linux_join): New.
19493 (linux_target_op): Add linux_join.
19494 * spu-low.c (spu_join): New.
19495 (spu_target_ops): Add spu_join.
19496 * win32-low.c (win32_detach): Adapt to new interface.
19497 Reopen current_process_handle before detaching. Issue a child
19498 resume before detaching.
19499 (win32_join): New.
19500 (win32_target_op): Add win32_join.
19501
1d5315fe
PA
195022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19503
19504 * win32-low.c (win32-attach): Fix return value.
19505 * target.h (target_ops): Describe ATTACH return values.
19506
bf914831
PA
195072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19508
19509 * win32-low.c (GETPROCADDRESS): Define.
19510 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
19511 (winapi_DebugSetProcessKillOnExit): Likewise.
19512 (win32_create_inferior): Force usage of ansi CreateProcessA.
19513 (win32_attach): Use GETPROCADDRESS.
19514 (win32_detach): Likewise.
19515
f72f3e60
PA
195162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19517
19518 * win32-low.c (win32_wait): Don't use WSTOPSIG.
19519
ed50f18f
PA
195202007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
19521
19522 * win32-low.c: Commit leftover changes from 2007-03-29.
19523
0c2ead7e
DJ
195242007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19525
19526 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
19527 fields short instead of int. Add explicit padding.
19528 (i387_cache_to_fsave): Remove unnecessary casts.
19529 (i387_fsave_to_cache): Doc fix.
19530 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
19531
73725ff3
DJ
195322007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19533
19534 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
19535 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
19536
d99f33d8
PA
195372007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19538
19539 * configure.srv (arm*-*-mingw32ce*): Move near the other
19540 arm targets.
19541
68070c10
PA
195422007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19543
2482afc6 19544 * configure.ac: Add errno checking.
68070c10
PA
19545 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
19546 sys/file.h and malloc.h.
19547 (AC_CHECK_DECLS): Add perror.
19548 (srv_mingwce): Handle.
2482afc6 19549 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
19550 win32-i386-low.o to srv_tgtobj.
19551 (i[34567]86-*-mingw*): Likewise.
19552 (arm*-*-mingw32ce*): Add case.
19553 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19554 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
19555 [__MINGW32CE__] (strerror): New function.
19556 [__MINGW32CE__] (errno): Define to GetLastError.
19557 [__MINGW32CE__] (COUNTOF): New macro.
19558 (remote_open): Remove extra close call.
19559 * mem-break.c (delete_breakpoint_at): New function.
19560 * mem-break.h (delete_breakpoint_at): Declare.
19561 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19562 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
19563 [USE_WIN32API] (read, write): Add char* casts.
19564 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
19565 * server.h: Include wincecompat.h on Windows CE.
19566 [HAVE_ERRNO_H]: Check.
19567 (perror): Declare if not declared.
19568 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
19569 (perror_with_name): Remove errno declaration.
19570 * wincecompat.h: New.
19571 * wincecompat.c: New.
19572 * win32-low.h: New.
19573 * win32-arm-low.c: New.
19574 * win32-i386-low.c: New.
19575 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
19576 (OUTMSG2): Make it safe.
19577 (_T): New macro.
19578 (COUNTOF): New macro.
19579 (NUM_REGS): Get it from the low target.
19580 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
19581 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
19582 (thread_rec): Let low target handle debug registers.
19583 (child_add_thread): Likewise.
19584 (child_init_thread_list): Likewise.
19585 (continue_one_thread): Likewise.
19586 (regptr): New.
19587 (do_child_fetch_inferior_registers): Move to ...
19588 * win32-i386-low.c: ... here, and rename to ...
19589 (do_fetch_inferior_registers): ... this.
889bf7c5 19590 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
19591 Go through the low target.
19592 (do_child_store_inferior_registers): Use regptr.
19593 (strwinerror): New function.
19594 (win32_create_inferior): Handle Windows CE.
19595 Use strwinerror instead of strerror on Windows error
19596 codes. Add program to the error output.
19597 Don't close the main thread handle on Windows CE.
19598 (win32_attach): Use coredll.dll on Windows CE.
19599 (win32_kill): Close current process and current
19600 thread handles.
19601 (win32_detach): Use coredll.dll on Windows CE.
19602 (win32_resume): Let low target handle debug registers, and
19603 step request.
19604 (handle_exception): Add/Remove initial breakpoint. Avoid
19605 non-existant WSTOPSIG on Windows CE.
19606 (win32_read_inferior_memory): Cast to remove warning.
19607 (win32_arch_string): Go through the low target.
19608 (initialize_low): Call set_breakpoint_data with the low
19609 target's breakpoint.
19610 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
19611 FOP_REGNUM, mappings): Move to ...
19612 * win32-i386-low.c: ... here.
19613 * win32-low.c (win32_thread_info): Move to ...
19614 * win32-low.h: ... here.
19615 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
19616 win32-arm-low.c and wincecompat.c.
19617 (all:): Add $EXEEXT.
19618 (install-only:): Likewise.
19619 (gdbserver:): Likewise.
19620 (gdbreplay:): Likewise.
19621 * config.in: Regenerate.
19622 * configure: Regenerate.
19623
41093d81
PA
196242007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19625
19626 * win32-low.c: Rename typedef thread_info to
19627 win32_thread_info throughout.
19628
544afa54
PA
196292007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19630
19631 * win32-i386-low.c: Rename to ...
19632 * win32-low.c: ... this.
19633 * configure.srv: Replace win32-i386-low.o with win32-low.o.
19634 * Makefile.in: Likewise.
19635
bce7165d
PA
196362007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
19637
19638 * remote-utils.c (monitor_output): Constify msg parameter.
19639 * server.h (monitor_output): Likewise.
19640 * win32-i386-low.c (handle_output_debug_string): New.
19641 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
19642 handle_output_debug_string.
19643 (get_child_debug_event): Likewise.
19644
506c7aa0
DJ
196452007-03-27 Mat Hostetter <mat@lcs.mit.edu>
19646
19647 * server.c (main): Correct strtoul check.
19648
42c81e2a
DJ
196492007-03-27 Jon Ringle <jon@ringle.org>
19650
19651 * linux-low.c: Check __ARCH_HAS_MMU__ also.
19652
9453113a
DJ
196532007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
19654
19655 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
19656
64a69107
DJ
196572007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
19658
19659 * terminal.h: Check HAVE_SGTTY_H.
19660
196612007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
19662
19663 * remote-utils.c (remote_open): Print out the assigned port number.
19664
c74d0ad8
DJ
196652007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
19666
19667 * remote-utils.c (monitor_output): New function.
19668 * server.c (debug_threads): Define here.
19669 (monitor_show_help): New function.
19670 (handle_query): Handle qRcmd.
19671 (main): Do not handle 'd' packet.
19672 * server.h (debug_threads, remote_debug, monitor_output): Declare.
19673 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
19674 of debug_threads.
19675
de7c3b4a
PA
196762007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19677
19678 * Makefile.in (EXEEXT): New.
19679 (clean): Use $(EXEEXT).
19680
ef57601b
PA
196812007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19682
19683 * target.h (target_ops): Rename send_signal to request_interrupt,
19684 and remove enum target_signal parameter.
19685 * linux-low.c (linux_request_interrupt): Rename from
19686 linux_send_signal, and always send SIGINT.
19687 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
19688 and always send SIGINT.
19689 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
19690 of send_signal.
19691 (input_interrupt): Likewise.
19692
820f2bda
PA
196932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19694
19695 * server.c (get_features_xml): Check if target implemented
19696 arch_string.
19697 * win32-i386-low.c (win32_arch_string): New.
19698 (win32_target_ops): Add win32_arch_string as arch_string member.
19699
ab39bf24
UW
197002007-02-22 Markus Deuling <deuling@de.ibm.com>
19701
19702 * spu-low.c (spu_arch_string): New.
19703 (spu_target_ops): Add spu_arch_string.
19704
61ff6e04
DJ
197052007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
19706
19707 * remote-utils.c: Remove HAVE_TERMINAL_H check.
19708 * configure.ac: Do not check for terminal.h.
19709 * configure, config.in: Regenerated.
19710
fb1e4ffc
DJ
197112007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19712
19713 * Makefile.in (OBS): Add $(XML_BUILTIN).
19714 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
19715 (clean): Update.
19716 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
19717 (arm-with-iwmmxt.c): New.
19718 * config.in, configure: Regenerate.
19719 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
19720 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
19721 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
19722 (arm*-*-linux*): Add iWMMXt and regset support.
19723 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
19724 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
19725 (arm_store_wmmxregset, target_regsets): New.
19726 * server.c (get_features_xml): Take annex argument. Check builtin
19727 XML documents.
19728 (handle_query): Handle multiple annexes.
19729
0f48aa01
DJ
197302007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19731
19732 * remote-utils.c [USE_WIN32API] (read, write): Define.
19733 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
19734 write.
19735
23181151
DJ
197362007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
19737
19738 * linux-i386-low.c (the_low_target): Set arch_string.
19739 * linux-x86-64-low.c (the_low_target): Likewise.
19740 * linux-low.c (linux_arch_string): New.
19741 (linux_target_ops): Add it.
19742 * linux-low.h (struct linux_target_ops): Add arch_string.
19743 * server.c (write_qxfer_response): Use const void * for DATA.
19744 (get_features_xml): New.
19745 (handle_query): Handle qXfer:features:read. Report it for qSupported.
19746 * target.h (struct target_ops): Add arch_string method.
19747
9d606399
DJ
197482007-01-03 Denis Pilat <denis.pilat@st.com>
19749 Daniel Jacobowitz <dan@codesourcery.com>
19750
19751 * linux-low.c (linux_kill): Handle being called with no threads.
19752 * win32-i386-low.c (win32_kill): Likewise.
19753 (get_child_debug_event): Clear current_process_handle.
19754
197552006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
19756 Daniel Jacobowitz <dan@codesourcery.com>
19757
19758 * remote-utils.c (remote_open): Check the type of specified
19759 serial port devices before opening them.
19760 * server.c (main): Kill the inferior if an error occurs during
19761 the first remote_open.
19762
a5e13d24
DJ
197632006-12-05 Markus Deuling <deuling@de.ibm.com>
19764
19765 * README: Update supported targets.
19766
186947f7
DJ
197672006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
19768
19769 * Makefile.in (clean): Remove reg-mips64.c.
19770 (reg-mips64.c, reg-mips64.o): New rules.
19771 * configure.srv: Handle mips64. Include regset support for mips.
19772 * linux-mips-low.c (union mips_register): New.
19773 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
19774 (mips_breakpoint, mips_breakpoint_at): Use int.
19775 (mips_collect_register, mips_supply_register)
19776 (mips_collect_register_32bit, mips_supply_register_32bit)
19777 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
19778 (mips_store_fpregset, target_regsets): New.
19779 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
19780
a13e2c95
UW
197812006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
19782
19783 * configure.srv: Add target "spu*-*-*".
19784 * Makefile.in (clean): Remove reg-spu.c.
19785 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
19786 * spu-low.c: New file.
19787
cb7283db
DJ
197882006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19789
19790 * configure.ac: Correct td_thr_tls_get_addr test.
19791 * configure: Regenerated.
19792
89be2091
DJ
197932006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19794
19795 * linux-low.c (linux_wait_for_event): Reformat. Use the
19796 pass_signals array.
19797 * remote-utils.c (decode_address_to_semicolon): New.
19798 * server.c (pass_signals, handle_general_set): New.
19799 (handle_query): Mention QPassSignals for qSupported.
19800 (main): Call handle_general_set.
19801 * server.h (pass_signals, decode_address_to_semicolon): New.
19802
000ef4f0
DJ
198032006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
19804
19805 * server.c (handle_query): Correct error handling for read_auxv.
19806
b7149293
UW
198072005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
19808
19809 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
19810 and srv_linux_thread_db to yes.
19811 * linux-s390-low.c (s390_fill_gregset): New function.
19812 (target_regsets): Define data structure.
19813
dae5f5cf
DJ
198142006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
19815
19816 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
19817 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
19818 * config.in, configure: Regenerated.
19819 * inferiors.c (gdb_id_to_thread): New function.
19820 (gdb_id_to_thread_id): Use it.
19821 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
19822 * linux-low.h (struct process_info): Add th member.
19823 (thread_db_get_tls_address): New prototype.
19824 * remote-utils.c (decode_address): Make non-static.
19825 * server.c (handle_query): Handle qGetTLSAddr.
19826 * server.h (gdb_id_to_thread, decode_address): New prototypes.
19827 * target.h (struct target_ops): Add get_tls_address.
19828 * thread-db.c (maybe_attach_thread): Save the thread handle.
19829 (thread_db_get_tls_address): New.
19830
32ca6d61
DJ
198312006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
19832
19833 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
19834 (linux_resume_one_process): Take a siginfo_t *. Update all
19835 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
19836 (struct pending_signals): Add a siginfo_t.
19837 (linux_wait_for_process): Always set last_status.
19838 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
19839 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
19840 * linux-low.h (struct process_info): Add last_status.
19841
5ffff7c1
DJ
198422006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
19843
19844 * remote-utils.c (try_rle): New function.
19845 (putpkt_binary): Use it.
19846
8695c747
DJ
198472006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
19848
19849 * Makefile.in (clean): Clean reg-x86-64-linux.c.
19850 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
19851 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
19852 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
19853 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
19854 point registers.
19855
290fadea
RS
198562006-08-08 Richard Sandiford <richard@codesourcery.com>
19857
19858 * server.c (terminal_fd): New variable.
19859 (old_foreground_pgrp): Likewise.
19860 (restore_old_foreground_pgrp): New function.
19861 (start_inferior): Record the terminal file descriptor in terminal_fd
19862 and its original foreground group in old_foreground_pgrp. Register
19863 restore_old_foreground_pgrp with atexit().
19864
9f2e1e63
DJ
198652006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
19866
19867 * server.c (handle_query): Correct qPart to qXfer.
19868
b80864fb
DJ
198692006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
19870
19871 * configure.ac: Check for more headers which are missing on
19872 Windows. Automatically supply -lwsock32 and USE_WIN32API.
19873 * configure.srv: Add Cygwin and mingw32.
19874 * remote-utils.c: Don't include headers unconditionally which
19875 are missing on mingw32. Include <winsock.h> for mingw32.
19876 (remote_open): Adjust for mingw32 support. Flush
19877 standard error after writing to it.
19878 (remote_close, putpkt_binary, input_interrupt, block_async_io)
19879 (unblock_async_io, enable_async_io, disable_async_io)
19880 (readchar, getpkt): Update for Winsock support.
19881 (prepare_resume_reply): Expect a protocol signal number.
19882 * server.c: Disable <sys/wait.h> on mingw32.
19883 (start_inferior): Adjust for mingw32 support. Flush
19884 standard error after writing to it.
19885 (attach_inferior): Likewise. Use protocol signal
19886 numbers.
19887 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
19888 and names.
19889 * win32-i386-low.c: New file.
19890 * Makefile.in (XM_CLIBS): Set.
19891 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
19892 (win32-i386-low.o): New dependency rule.
19893 * linux-low.c (linux_wait): Use target signal numbers.
19894 * target.h (struct target_ops): Doc fix.
19895 * server.h (target_signal_to_name): New prototype.
19896 * gdbreplay.c: Don't include headers unconditionally which
19897 are missing on mingw32. Include <winsock.h> for mingw32.
19898 (remote_close, remote_open): Adjust for Winsock support.
19899 * configure, config.in: Regenerated.
19900
0876f84a
DJ
199012006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19902
19903 * server.c (decode_xfer_read, write_qxfer_response): New.
19904 (handle_query): Take a packet length argument. Handle
19905 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
19906 the qSupported response.
19907 (main): Update call to handle_query.
19908
01f9e8fa
DJ
199092006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
19910
19911 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
19912 (putpkt_binary): Renamed from putpkt and adjusted for binary
19913 data.
19914 (putpkt): New wrapper for putpkt_binary.
19915 (readchar): Don't mask off the high bit.
19916 (decode_X_packet): New function.
19917 * server.c (main): Call putpkt_binary if a handler sets the packet
19918 length. Save the length of the incoming packet. Handle 'X'.
19919 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
19920
be2a5f71
DJ
199212006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
19922
19923 * server.c (handle_query): Handle qSupported.
19924
ea025f5f
DJ
199252006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19926
19927 * remote-utils.c (all_symbols_looked_up): New variable.
19928 (look_up_one_symbol): Check it.
19929 * server.h (look_up_one_symbol): New declaration.
19930 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
19931
9308fc88
DJ
199322006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19933
19934 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 19935 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
19936 (PTRACE_GET_THREAD_AREA): Define.
19937 (ps_get_thread_area): New function.
19938
52fb6437
NS
199392006-05-09 Nathan Sidwell <nathan@codesourcery.com>
19940
19941 * configure.srv (m68k*-*-uclinux*): New target.
19942 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
19943 (linux_resume_one_process): Remove extraneous cast.
19944 (linux_read_offsets): New.
19945 (linux_target_op): Add linux_read_offsets on mmuless systems.
19946 * server.c (handle_query): Add qOffsets logic.
19947 * target.h (struct target_ops): Add read_offsets.
19948
21b0f40c
DJ
199492006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19950
19951 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
19952 (PTRACE_GET_THREAD_AREA): Define.
19953 (ps_get_thread_area): New function.
19954 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
19955 (linux-x86-64-low.o): Update.
19956
0050a760
DJ
199572006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19958
19959 * configure.ac: Remove checks for prfpregset_t.
19960 * gdb_proc_service.h: New file.
19961 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
19962 new "gdb_proc_service.h".
19963 * proc-service.c: Likewise.
19964 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
19965 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
19966 * Makefile.in (gdb_proc_service_h): Updated.
19967 * configure, config.in: Regenerated.
19968
b92a518e
DJ
199692006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19970
19971 * remote-utils.c (prepare_resume_reply): Move declaration
19972 of gdb_id_from_wait to the top of the block.
19973
545587ee
DJ
199742006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
19975
19976 * linux-low.c (regsets_store_inferior_registers): Read the regset
19977 from the target before filling it.
19978
9db87ebd
DJ
199792006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19980
19981 * server.c (attach_inferior): Return SIGTRAP for a successful
19982 attach.
19983
dd24457d
DJ
199842006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
19985
19986 * Makefile.in (OBS): Add version.o.
19987 (STAGESTUFF): Delete.
19988 (version.o): Add dependencies.
19989 (version.c): Replace rule.
19990 (clean): Remove version.c.
19991 * server.c (gdbserver_version): New.
19992 (gdbserver_usage): Use printf.
19993 (main): Handle --version and --help.
19994 * server.h (version, host_name): Add declarations.
19995
6f0f660e
EZ
199962005-12-23 Eli Zaretskii <eliz@gnu.org>
19997
889bf7c5
PA
19998 * linux-arm-low.c:
19999 * linux-arm-low.c:
20000 * inferiors.c:
20001 * i387-fp.h:
20002 * i387-fp.c:
20003 * gdbreplay.c:
20004 * regcache.c:
20005 * proc-service.c:
20006 * mem-break.h:
20007 * mem-break.c:
20008 * linux-x86-64-low.c:
20009 * linux-sh-low.c:
20010 * linux-s390-low.c:
20011 * linux-ppc64-low.c:
20012 * linux-ppc-low.c:
20013 * linux-mips-low.c:
20014 * linux-m68k-low.c:
20015 * linux-m32r-low.c:
20016 * linux-low.h:
20017 * linux-low.c:
20018 * linux-ia64-low.c:
20019 * linux-i386-low.c:
20020 * linux-crisv32-low.c:
20021 * thread-db.c:
20022 * terminal.h:
20023 * target.h:
20024 * target.c:
20025 * server.h:
20026 * server.c:
20027 * remote-utils.c:
20028 * regcache.h:
20029 * utils.c:
20030 * Makefile.in:
20031 * configure.ac:
6f0f660e
EZ
20032 * gdbserver.1: Add (C) after Copyright. Update the FSF
20033 address.
20034
9d1fb177
DJ
200352005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20036
20037 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20038 (arm_breakpoint_at): Recognize both breakpoints.
20039 (the_low_target): Use the correct breakpoint instruction.
20040
011a70c2
DJ
200412005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20042
20043 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20044 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20045 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20046 (the_low_target): Update.
20047
7fb85e41
AS
200482005-10-25 Andreas Schwab <schwab@suse.de>
20049
20050 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20051
20052 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20053 (ia64_num_regs): Reduce to 462.
20054
3db0444b
DJ
200552005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20056
20057 * acinclude.m4: Correct quoting.
20058 * aclocal.m4: Regenerated.
20059
20060 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20061 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20062 (thread_db_init): Call thread_db_err_str.
20063 * configure.ac: Check for TD_VERSION.
20064 * config.in, configure: Regenerated.
20065
bee0189a
DJ
200662005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20067
20068 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20069
e9d25b98
DJ
200702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20071
20072 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20073 is not available. Define HAVE_PTRACE_GETREGS if it is.
20074 * config.in, configure: Regenerated.
20075 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20076 * linux-i386-low.c, linux-m68k-low.c: Update to use
20077 HAVE_PTRACE_GETREGS.
20078 * linux-low.c (regsets_fetch_inferior_registers)
20079 (regsets_store_inferior_registers): Only return 0 if we processed
20080 GENERAL_REGS.
20081 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20082 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20083
a06660f7
DJ
200842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20085
20086 * inferiors.c (struct thread_info): Add gdb_id.
20087 (add_thread): Add gdb_id argument.
20088 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20089 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20090 calls to add_thread.
20091 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20092 * server.c (handle_query): Use thread_to_gdb_id.
20093 (handle_v_cont, main): Use gdb_id_to_thread_id.
20094 * server.h (add_thread): Update prototype.
20095 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20096 prototypes.
20097
5a1f5858
DJ
200982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20099
20100 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20101 left-padded registers.
20102 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20103 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20104
e122f1f5
SE
201052005-07-01 Steve Ellcey <sje@cup.hp.com>
20106
20107 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20108 * configure: Regenerate.
20109 * config.in: Regenerate.
20110 * server.h (NEED_DECLARATION_STRERROR):
20111 Replace with !HAVE_DECL_STRERROR.
20112
d592fa2f
DJ
201132005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20114
20115 * linux-low.c (linux_wait, linux_send_signal): Don't test
20116 an unsigned long variable for > 0 if it could be MAX_ULONG.
20117 * server.c (myresume): Likewise.
20118 * target.c (set_desired_inferior): Likewise.
20119
ccbd4912
MK
201202005-06-13 Mark Kettenis <kettenis@gnu.org>
20121
20122 * configure.ac: Simplify and improve check for socklen_t.
20123 * configure, config.in: Regenerate.
20124
f450004a
DJ
201252005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20126
20127 * acconfig.h: Remove.
20128 * configure.ac: Add a test for socklen_t. Use three-argument
20129 AC_DEFINE throughout.
20130 * config.in: Regenerated using autoheader 2.59.
20131 * configure: Regenerated.
20132
20133 * gdbreplay.c (socklen_t): Provide a default.
20134 (remote_open): Use socklen_t.
20135 * remote-utils.c (socklen_t): Provide a default.
20136 (remote_open): Use socklen_t.
20137 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20138 unsigned char.
20139
20140 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20141 char for buffers.
20142 * linux-low.c (linux_read_memory, linux_write_memory)
20143 (linux_read_auxv): Likewise.
20144 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20145 (check_mem_write): Likewise.
20146 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20147 Likewise.
20148 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20149 (registers_from_string, register_data): Likewise.
20150 * server.c (handle_query, main): Likewise.
20151 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20152 (decode_M_packet): Likewise.
20153 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20154 * target.h (struct target_ops): Update read_memory, write_memory,
20155 and read_auxv.
20156 (read_inferior_memory, write_inferior_memory): Update.
20157 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20158 to unsigned char *.
20159 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20160 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20161 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20162 linux-s390-low.c, linux-sh-low.c: Update for changes in
20163 read_inferior_memory and the_low_target->breakpoint.
20164
eee84df1
DJ
201652005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20166
20167 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20168 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20169 * configure.srv: Add powerpc64-*-linux*.
20170 * linux-ppc64-low.c: New file.
20171
45b134e5
OF
201722005-05-23 Orjan Friberg <orjanf@axis.com>
20173
20174 * linux-cris-low.c: New file with support for CRIS.
20175 * linux-crisv32-low.c: Ditto for CRISv32.
20176 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20177 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 20178 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
20179 reg-crisv32.o, and reg-crisv32.c to make rules.
20180 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20181 recognized targets.
20182
48d93c75
UW
201832005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20184
20185 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20186 of sizeof (PTRACE_XFER_TYPE).
20187 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20188
e013ee27
OF
201892005-05-12 Orjan Friberg <orjanf@axis.com>
20190
889bf7c5 20191 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
20192 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20193 pointers for hardware watchpoint support.
20194 * linux-low.h (struct linux_target_ops): Ditto.
20195 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20196 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20197 to linux_target_ops.
20198 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20199 reply packet.
20200 * server.c (main): Recognize 'Z' and 'z' packets.
20201
b0ded00b
UW
202022005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20203
20204 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20205 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20206 (the_low_target): Add new members.
20207
8643e2ad
DJ
202082005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20209
20210 * proc-service.c (ps_lgetregs): Search all_processes instead of
20211 all_threads.
20212
fc620387
DJ
202132005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20214
20215 * server.c (start_inferior): Change return type to int.
20216 (attach_inferior): Change sigptr to int *.
20217 (handle_v_cont, handle_v_requests): Change signal to int *.
20218 (main): Change signal to int.
20219
202202005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
20221
20222 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20223 * configure.srv: Add m32r*-*-linux*.
20224 * linux-m32r-low.c: New file.
20225
e0e76420
DJ
202262005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20227
20228 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20229
a1928bad
DJ
202302005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20231
20232 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20233 Take unsigned long arguments for PIDs.
20234 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20235 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20236 (wait_for_sigstop, linux_resume_one_process)
20237 (regsets_fetch_inferior_registers, linux_send_signal)
20238 (linux_read_auxv): Likewise. Update the types of variables holding
20239 PIDs. Update format string specifiers.
20240 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20241 * remote-utils.c (prepare_resume_reply): Likewise.
20242 * server.c (cont_thread, general_thread, step_thread)
20243 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20244 unsigned long.
20245 (handle_query): Update format specifiers.
20246 (handle_v_cont, main): Use strtoul for thread IDs.
20247 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20248 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20249 (general_thread, step_thread, thread_from_wait)
20250 (old_thread_from_wait): Update.
20251 * target.h (struct thread_resume): Use unsigned long for THREAD.
20252 (struct target_ops): Use unsigned long for arguments to attach and
20253 thread_alive.
20254
dcdb98d2
DJ
202552005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20256
20257 * acinclude.m4: Include bfd/bfd.m4 directly.
20258 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20259 <agriffis@toolchain.org>.
20260 * aclocal.m4, configure: Regenerated.
20261
bec39cab
AC
202622005-01-07 Andrew Cagney <cagney@gnu.org>
20263
20264 * configure.ac: Rename configure.in, require autoconf 2.59.
20265 * configure: Re-generate.
20266
434c4c77
DJ
202672004-12-08 Daniel Jacobowitz <dan@debian.org>
20268
20269 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20270 LIBS when finished.
20271 * aclocal.m4: Regenerated.
20272 * configure: Regenerated.
20273
db1d3e1b
AS
202742004-11-21 Andreas Schwab <schwab@suse.de>
20275
20276 * linux-m68k-low.c (m68k_num_gregs): Define.
20277 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20278 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20279 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20280 (m68k_breakpoint_at): New. Add to the_low_target.
20281
20282 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20283 srv_linux_thread_db to yes.
20284
43360365
JB
202852004-10-20 Joel Brobecker <brobecker@gnat.com>
20286
20287 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20288 (ARCH_SET_FS): Likewise.
20289 (ARCH_GET_FS): Likewise.
20290 (ARCH_GET_GS): Likewise.
20291
fd500816
DJ
202922004-10-16 Daniel Jacobowitz <dan@debian.org>
20293
20294 * linux-i386-low.c (ps_get_thread_area): New.
20295 * linux-x86-64-low.c (ps_get_thread_area): New.
20296 * linux-low.c: Include <sys/syscall.h>.
20297 (linux_kill_one_process): Don't kill the first thread here.
20298 (linux_kill): Kill the first thread here.
20299 (kill_lwp): New function.
20300 (send_sigstop, linux_send_signal): Use it.
20301 * proc-service.c: Clean up #ifdefs.
20302 (fpregset_info): Delete.
20303 (ps_lgetregs): Update and enable implementation.
20304 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20305 implementations.
20306 * remote-utils.c (struct sym_cache, symbol_cache): New.
20307 (input_interrupt): Print a clearer message.
20308 (async_io_enabled): New variable.
20309 (enable_async_io, disable_async_io): Use it. Update comments.
20310 (look_up_one_symbol): Use the symbol cache.
20311 * thread-db.c (thread_db_look_up_symbols): New function.
20312 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20313
f6de3c42
DJ
203142004-10-16 Daniel Jacobowitz <dan@debian.org>
20315
20316 * configure.in: Test for -rdynamic.
20317 * configure: Regenerated.
20318 * Makefile (INTERNAL_LDFLAGS): New.
20319 (gdbserver, gdbreplay): Use it.
20320
2c0fc042
AC
203212004-09-02 Andrew Cagney <cagney@gnu.org>
20322
20323 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20324
075b3282
DJ
203252004-03-23 Daniel Jacobowitz <drow@mvista.com>
20326
20327 * linux-low.c (linux_wait): Clear all_processes list also.
20328
fa6a77dc
DJ
203292004-03-12 Daniel Jacobowitz <drow@mvista.com>
20330
20331 * linux-low.c: Include <errno.h>. Remove extern declaration of
20332 errno.
20333
6d782a97
DJ
203342004-03-12 Daniel Jacobowitz <drow@mvista.com>
20335
20336 * gdbreplay.c, server.h, utils.c: Update copyright years.
20337
3a7fb99b
DJ
203382004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20339
20340 * server.c (main): Print child status or termination signal from
20341 variable 'signal', not 'sig'.
20342
c3e735a6
DJ
203432004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20344
20345 * linux-low.c (linux_read_memory): Change return type to
20346 int. Check for and return error from ptrace().
20347 * target.c (read_inferior_memory): Change return type to int. Pass
20348 back return status from the_target->read_memory().
20349 * target.h (struct target_ops): Adapt *read_memory() prototype.
20350 Update comment.
20351 (read_inferior_memory): Adapt prototype.
20352 * server.c (main): Return an error packet if
20353 read_inferior_memory() returns an error.
20354
a59d1c82
DJ
203552004-03-04 Daniel Jacobowitz <drow@mvista.com>
20356
20357 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20358 Unify with other clean targets.
20359
dc3f8883
DJ
203602004-02-29 Daniel Jacobowitz <drow@mvista.com>
20361
20362 * server.c (handle_v_cont): Call set_desired_inferior.
20363
89a208da
DJ
203642004-02-29 Daniel Jacobowitz <drow@mvista.com>
20365
20366 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20367
62ea82f5
DJ
203682004-02-29 Daniel Jacobowitz <drow@mvista.com>
20369
20370 * linux-low.c (linux_wait): Unblock async I/O.
20371 (linux_resume): Block and enable async I/O.
20372 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20373 * server.h (block_async_io, unblock_async_io): Add prototypes.
20374
6910d122
DJ
203752004-02-29 Daniel Jacobowitz <drow@mvista.com>
20376
20377 * remote-utils.c (remote_open): Print a status notice after
20378 opening a TCP port.
20379 * server.c (attach_inferior): Print a status notice after
20380 attaching.
20381
203822004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
20383
20384 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20385
c89dc5d4
DJ
203862004-02-26 Daniel Jacobowitz <drow@mvista.com>
20387
20388 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20389 error packet.
20390 * server.c, target.h: Update copyright years.
20391
4b8dad4a
RM
203922004-02-25 Roland McGrath <roland@redhat.com>
20393
20394 * target.h (struct target_ops): New member `read_auxv'.
20395 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20396 * linux-low.c (linux_read_auxv): New function.
20397 (linux_target_ops): Initialize `read_auxv' member to that.
20398
d7446758
JB
203992004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20400
20401 Committed by Jim Blandy <jimb@redhat.com>.
20402
20403 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 20404 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
20405 instead of GPR_SIZE to distiguish s390 and s390x targets.
20406
5544ad89
DJ
204072004-01-31 Daniel Jacobowitz <drow@mvista.com>
20408
20409 * linux-low.c: Update copyright year.
20410 (check_removed_breakpoint): Clear pending_is_breakpoint.
20411 (linux_set_resume_request, linux_queue_one_thread)
20412 (resume_status_pending_p): New functions.
20413 (linux_continue_one_thread): Use process->resume.
20414 (linux_resume): Only resume threads if there are no pending events.
20415 * linux-low.h (struct process_info): Add resume request
20416 pointer.
20417
2a68b70e
DJ
204182004-01-30 Daniel Jacobowitz <drow@mvista.com>
20419
20420 * regcache.c (new_register_cache): Clear the allocated register
20421 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20422
64386c31
DJ
204232003-10-13 Daniel Jacobowitz <drow@mvista.com>
20424
20425 * linux-low.c (linux_resume): Take a struct thread_resume *
20426 argument.
20427 (linux_wait): Update call.
20428 (resume_ptr): New static variable.
20429 (linux_continue_one_thread): Renamed from
20430 linux_continue_one_process. Use resume_ptr.
20431 (linux_resume): Use linux_continue_one_thread.
20432 * server.c (handle_v_cont, handle_v_requests): New functions.
20433 (myresume): New function.
20434 (main): Handle 'v' case.
20435 * target.h (struct thread_resume): New type.
20436 (struct target_ops): Change argument of "resume" to struct
20437 thread_resume *.
20438 (myresume): Delete macro.
20439
c938e9b0
L
204402003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20441
20442 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20443 (uninstall): Support DESTDIR.
20444
7f313d07
BC
20445Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20446
20447 * configure.srv: Add xscale*linux copy of arm*linux entry.
20448
3b2fc2ea
DJ
204492003-07-24 Daniel Jacobowitz <drow@mvista.com>
20450
20451 * linux-arm-low.c (arm_reinsert_addr): New function.
20452 (the_low_target): Add arm_reinsert_addr.
20453
1c0a559e
MK
204542003-07-08 Mark Kettenis <kettenis@gnu.org>
20455
20456 * mem-break.c: Remove whitespace at end of file.
20457
43d5792c
DJ
204582003-06-28 Daniel Jacobowitz <drow@mvista.com>
20459
20460 * configure.in: Check whether we need to prototype strerror.
20461 * server.h: Optionally prototype strerror.
20462 * gdbreplay.c (perror_with_name): Use strerror.
20463 * linux-low.c (linux_attach_lwp): Use strerror.
20464 * utils.c (perror_with_name): Use strerror.
20465 * config.in, configure: Regenerated.
20466
c8a86edf
DJ
204672003-06-28 Daniel Jacobowitz <drow@mvista.com>
20468
20469 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20470 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20471
73d37363
DJ
204722003-06-20 Daniel Jacobowitz <drow@mvista.com>
20473
20474 * Makefile.in (SFILES): Update.
20475 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20476 low-sun3.c: Remove files.
20477
6ad8ae5c
DJ
204782003-06-17 Daniel Jacobowitz <drow@mvista.com>
20479
20480 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20481 (linux_detach_one_process, linux_detach): New functions.
20482 (linux_target_ops): Add linux_detach.
20483 * server.c (main): Handle 'D' packet.
20484 * target.h (struct target_ops): Add "detach" member.
20485 (detach_inferior): Define.
20486
1581182a
MK
204872003-06-13 Mark Kettenis <kettenis@gnu.org>
20488
20489 From Kelley Cook <kelleycook@wideopenwest.com>:
20490 * configure.srv: Accept i[34567]86 variants.
20491
e5379b03
DJ
204922003-06-05 Daniel Jacobowitz <drow@mvista.com>
20493
20494 * linux-low.c (linux_wait_for_event): Correct comment typos.
20495 (linux_resume_one_process): Call check_removed_breakpoint.
20496 (linux_send_signal): New function.
20497 (linux_target_ops): Add linux_send_signal.
20498 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20499 of kill.
20500 * target.h (struct target_ops): Add send_signal.
20501
2ff29de4
JB
205022003-05-29 Jim Blandy <jimb@redhat.com>
20503
20504 * linux-low.c (usr_store_inferior_registers): Transfer buf in
20505 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
20506 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
20507 away part of the register's value.
20508
254787d4
DJ
205092003-03-26 Daniel Jacobowitz <drow@mvista.com>
20510
20511 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
20512 (linux_wait_for_event, linux_init_signals): Likewise.
20513
94e10508
DJ
205142003-03-17 Daniel Jacobowitz <drow@mvista.com>
20515
20516 * configure.in: Check for stdlib.h.
20517 * configure: Regenerated.
20518 * config.in: Regenerated.
20519
4c0711e0
DJ
205202003-01-04 Andreas Schwab <schwab@suse.de>
20521
20522 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
20523
ef66e766
AC
205242003-01-02 Andrew Cagney <ac131313@redhat.com>
20525
20526 * Makefile.in: Remove obsolete code.
20527
a1358604
DJ
205282002-11-20 Daniel Jacobowitz <drow@mvista.com>
20529
20530 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
20531 defined(PT_FPR0_HI).
20532
23ce3b1c
DJ
205332002-11-17 Stuart Hughes <seh@zee2.com>
20534
20535 * linux-arm-low.c (arm_num_regs): Increase.
20536 (arm_regmap): Include status register.
20537
205382002-11-17 Daniel Jacobowitz <drow@mvista.com>
20539
20540 * linux-low.c (register_addr): Remove incorrect -1 check.
20541
a9fa9f7d
DJ
205422002-08-29 Daniel Jacobowitz <drow@mvista.com>
20543
20544 * linux-low.c (linux_create_inferior): Call setpgid. Return
20545 the new PID.
20546 (unstopped_p, linux_signal_pid): Remove.
20547 (linux_target_ops): Remove linux_signal_pid.
20548 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
20549 global instead of target method.
20550 * target.h (struct target_ops): Remove signal_pid. Update comment
20551 for create_inferior.
20552 * server.c (signal_pid): New variable.
20553 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 20554 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
20555 (attach_inferior): Set signal_pid.
20556
17574093
DJ
205572002-08-23 Daniel Jacobowitz <drow@mvista.com>
20558
20559 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
20560
205612002-08-20 Jim Blandy <jimb@redhat.com>
20562
20563 * Makefile.in (LDFLAGS): Allow the configure script to establish a
20564 default for this.
20565
205662002-08-01 Andrew Cagney <cagney@redhat.com>
20567
20568 * Makefile.in: Make chill references obsolete.
20569
205702002-07-24 Kevin Buettner <kevinb@redhat.com>
20571
20572 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
20573 * configure: Regenerate.
20574 * config.in: Regenerate.
20575
205762002-07-09 David O'Brien <obrien@FreeBSD.org>
20577
20578 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
20579 (perror_with_name, remote_close, remote_open, expect, play): Static.
20580
205812002-07-04 Michal Ludvig <mludvig@suse.cz>
20582
4b8dad4a 20583 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
20584 byte offsets instead of an array of indexes.
20585 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
20586
205872002-06-13 Daniel Jacobowitz <drow@mvista.com>
20588
20589 * regcache.c: Add comment.
20590
205912002-06-11 Daniel Jacobowitz <drow@mvista.com>
20592
20593 * thread-db.c: New file.
20594 * proc-service.c: New file.
20595 * acinclude.m4: New file.
20596 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
20597 proc-service.o, and thread-db.o.
20598 (linux-low.o): Add USE_THREAD_DB.
20599 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
20600 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
20601 * aclocal.m4: Regenerated.
20602 * config.in: Regenerated.
20603 * configure: Regenerated.
20604 * configure.in: Check for proc_service.h, sys/procfs.h,
20605 thread_db.h, and linux/elf.h headrs.
20606 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
20607 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
20608 Check for -lthread_db and thread support.
20609 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
20610 PowerPC, and SuperH.
20611 * i387-fp.c: Constify arguments.
20612 * i387-fp.h: Likewise.
20613 * inferiors.c: (struct thread_info): Renamed from
20614 `struct inferior_info'. Remove PID member. Use generic inferior
20615 list header. All uses updated.
20616 (inferiors, signal_pid): Removed.
20617 (all_threads): New variable.
20618 (get_thread): Define.
20619 (add_inferior_to_list): New function.
20620 (for_each_inferior): New function.
20621 (change_inferior_id): New function.
20622 (add_inferior): Removed.
20623 (remove_inferior): New function.
20624 (add_thread): New function.
20625 (free_one_thread): New function.
20626 (remove_thread): New function.
20627 (clear_inferiors): Use for_each_inferior and free_one_thread.
20628 (find_inferior): New function.
20629 (find_inferior_id): New function.
20630 (inferior_target_data): Update argument type.
20631 (set_inferior_target_data): Likewise.
20632 (inferior_regcache_data): Likewise.
20633 (set_inferior_regcache_data): Likewise.
20634 * linux-low.c (linux_bp_reinsert): Remove.
20635 (all_processes, stopping_threads, using_thrads)
20636 (struct pending_signals, debug_threads, pid_of): New.
20637 (inferior_pid): Replace with macro.
20638 (struct inferior_linux_data): Remove.
20639 (get_stop_pc, add_process): New functions.
20640 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
20641 Use add_process and add_thread.
20642 (linux_attach_lwp): New function, based on old linux_attach. Use
20643 add_process and add_thread. Set stop_expected for new threads.
20644 (linux_attach): New function.
20645 (linux_kill_one_process): New function.
20646 (linux_kill): Kill all LWPs.
20647 (linux_thread_alive): Use find_inferior_id.
20648 (check_removed_breakpoints, status_pending_p): New functions.
20649 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
20650 Update. Use WNOHANG. Wait for cloned processes also. Update process
20651 struct for the found process.
20652 (linux_wait_for_event): New function.
20653 (linux_wait): Use it. Support LWPs.
20654 (send_sigstop, wait_for_sigstop, stop_all_processes)
20655 (linux_resume_one_process, linux_continue_one_process): New functions.
20656 (linux_resume): Support LWPs.
20657 (REGISTER_RAW_SIZE): Remove.
20658 (fetch_register): Use register_size instead. Call supply_register.
20659 (usr_store_inferior_registers): Likewise. Call collect_register.
20660 Fix recursive case.
20661 (regsets_fetch_inferior_registers): Improve error message.
20662 (regsets_store_inferior_registers): Add debugging.
20663 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
20664 (unstopped_p, linux_signal_pid): New functions.
20665 (linux_target_ops): Add linux_signal_pid.
20666 (linux_init_signals): New function.
20667 (initialize_low): Call it. Initialize using_threads.
20668 * regcache.c (inferior_regcache_data): Add valid
20669 flag.
20670 (get_regcache): Fetch registers lazily. Add fetch argument
20671 and update all callers.
20672 (regcache_invalidate_one, regcache_invalidate): New
20673 functions.
20674 (new_register_cache): Renamed from create_register_cache.
20675 Return the new regcache.
20676 (free_register_cache): Change argument to a void *.
20677 (registers_to_string, registers_from_string): Call get_regcache
20678 with fetch flag set.
20679 (register_data): Make static. Pass fetch flag to get_regcache.
20680 (supply_register): Call get_regcache with fetch flag clear.
20681 (collect_register): Call get_regcache with fetch flag set.
20682 (collect_register_as_string): New function.
20683 * regcache.h: Update.
20684 * remote-utils.c (putpkt): Flush after debug output and use
20685 stderr.
20686 Handle input interrupts while waiting for an ACK.
20687 (input_interrupt): Use signal_pid method.
20688 (getpkt): Flush after debug output and use stderr.
20689 (outreg): Use collect_register_as_string.
20690 (new_thread_notify, dead_thread_notify): New functions.
20691 (prepare_resume_reply): Check using_threads. Set thread_from_wait
20692 and general_thread.
20693 (look_up_one_symbol): Flush after debug output.
20694 * server.c (step_thread, server_waiting): New variables.
20695 (start_inferior): Don't use signal_pid. Update call to mywait.
20696 (attach_inferior): Update call to mywait.
20697 (handle_query): Handle qfThreadInfo and qsThreadInfo.
20698 (main): Don't fetch/store registers explicitly. Use
20699 set_desired_inferior. Support proposed ``Hs'' packet. Update
20700 calls to mywait.
20701 * server.h: Update.
20702 (struct inferior_list, struct_inferior_list_entry): New.
20703 * target.c (set_desired_inferior): New.
20704 (write_inferior_memory): Constify.
20705 (mywait): New function.
20706 * target.h: Update.
20707 (struct target_ops): New signal_pid method.
20708 (mywait): Removed macro, added prototype.
20709
20710 * linux-low.h (regset_func): Removed.
20711 (regset_fill_func, regset_store_func): New.
20712 (enum regset_type): New.
20713 (struct regset_info): Add type field. Use new operation types.
20714 (struct linux_target_ops): stop_pc renamed to get_pc.
20715 Add decr_pc_after_break and breakpoint_at.
20716 (get_process, get_thread_proess, get_process_thread)
20717 (strut process_info, all_processes, linux_attach_lwp)
20718 (thread_db_init): New.
20719
20720 * linux-arm-low.c (arm_get_pc, arm_set_pc,
20721 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
20722 (the_low_target): Add new members.
20723 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
20724 (i386_store_fpxregset): Constify.
20725 (target_regsets): Add new kind identifier.
20726 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
20727 (i386_set_pc): Add debugging.
20728 (i386_breakpoint_at): New function.
20729 (the_low_target): Add new members.
20730 * linux-mips-low.c (mips_get_pc, mips_set_pc)
20731 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
20732 (mips_breakpoint_at): New.
20733 (the_low_target): Add new members.
20734 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
20735 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
20736 (the_low_target): Add new members.
20737 * linux-sh-low.c (sh_get_pc, sh_set_pc)
20738 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
20739 (the_low_target): Add new members.
20740 * linux-x86-64-low.c (target_regsets): Add new kind
20741 identifier.
20742
207432002-05-15 Daniel Jacobowitz <drow@mvista.com>
20744
20745 From Martin Pool <mbp@samba.org>:
20746 * server.c (gdbserver_usage): New function.
20747 (main): Call it.
20748
207492002-05-14 Daniel Jacobowitz <drow@mvista.com>
20750
20751 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
20752 stop_at -> stop_pc.
20753
207542002-05-04 Andrew Cagney <ac131313@redhat.com>
20755
20756 * Makefile.in: Remove obsolete code.
20757
207582002-04-24 Michal Ludvig <mludvig@suse.cz>
20759
20760 * linux-low.c (regsets_fetch_inferior_registers),
20761 (regsets_store_inferior_registers): Removed cast to int from
20762 ptrace() calls.
20763 * regcache.h: Added declaration of struct inferior_info.
20764
207652002-04-20 Daniel Jacobowitz <drow@mvista.com>
20766
20767 * inferiors.c (struct inferior_info): Add regcache_data.
20768 (add_inferior): Call create_register_cache.
20769 (clear_inferiors): Call free_register_cache.
20770 (inferior_regcache_data, set_inferior_regcache_data): New functions.
20771 * regcache.c (struct inferior_regcache_data): New.
20772 (registers): Remove.
20773 (get_regcache): New function.
20774 (create_register_cache, free_register_cache): New functions.
20775 (set_register_cache): Don't initialize the register cache here.
20776 (registers_to_string, registers_from_string, register_data): Call
20777 get_regcache.
20778 * regcache.h: Add prototypes.
20779 * server.h: Likewise.
20780
207812002-04-20 Daniel Jacobowitz <drow@mvista.com>
20782
20783 * mem-break.c: New file.
20784 * mem-break.h: New file.
20785 * Makefile.in: Add mem-break.o rule; update server.h
20786 dependencies.
20787 * inferiors.c (struct inferior_info): Add target_data
20788 member.
20789 (clear_inferiors): Free target_data member if set.
20790 (inferior_target_data, set_inferior_target_data): New functions.
20791 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
20792 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
20793 * linux-low.c (linux_bp_reinsert): New variable.
20794 (struct inferior_linux_data): New.
20795 (linux_create_inferior): Use set_inferior_target_data.
20796 (linux_attach): Likewise. Call add_inferior.
20797 (linux_wait_for_one_inferior): New function.
20798 (linux_wait): Call it.
20799 (linux_write_memory): Add const.
20800 (initialize_low): Call set_breakpoint_data.
20801 * linux-low.h (struct linux_target_ops): Add breakpoint
20802 handling members.
20803 * server.c (attach_inferior): Remove extra add_inferior
20804 call.
20805 * server.h: Include mem-break.h. Update inferior.c
20806 prototypes.
20807 * target.c (read_inferior_memory)
20808 (write_inferior_memory): New functions.
20809 * target.h (read_inferior_memory)
20810 (write_inferior_memory): Change macros to prototypes.
20811 (struct target_ops): Update comments. Add const to write_memory
20812 definition.
20813
208142002-04-11 Daniel Jacobowitz <drow@mvista.com>
20815
20816 * linux-low.c (usr_store_inferior_registers): Support
20817 registers which are allowed to fail to store.
20818 * linux-low.h (linux_target_ops): Likewise.
20819 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
20820 (ppc_cannot_store_register): FPSCR may not be storable.
20821
208222002-04-09 Daniel Jacobowitz <drow@mvista.com>
20823
20824 * server.h: Include <string.h> if HAVE_STRING_H.
20825 * ChangeLog: Correct paths in last ChangeLog entry.
20826
208272002-04-09 Daniel Jacobowitz <drow@mvista.com>
20828
20829 * linux-low.h: Remove obsolete prototypes.
20830 (struct linux_target_ops): New.
20831 (extern the_low_target): New.
20832 * linux-low.c (num_regs, regmap): Remove declarations.
20833 (register_addr): Use the_low_target explicitly.
20834 (fetch_register): Likewise.
20835 (usr_fetch_inferior_registers): Likewise.
20836 (usr_store_inferior_registers): Likewise.
20837 * linux-arm-low.c (num_regs): Remove.
20838 (arm_num_regs): Define.
20839 (arm_regmap): Renamed from regmap, made static.
20840 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
20841 made static.
20842 (arm_cannot_store_register): Renamed from cannot_store_register,
20843 made static.
20844 (the_low_target): New.
20845 * linux-i386-low.c (num_regs): Remove.
20846 (i386_num_regs): Define.
20847 (i386_regmap): Renamed from regmap, made static.
20848 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
20849 made static.
20850 (i386_cannot_store_register): Renamed from cannot_store_register,
20851 made static.
20852 (the_low_target): New.
20853 * linux-ia64-low.c (num_regs): Remove.
20854 (ia64_num_regs): Define.
20855 (ia64_regmap): Renamed from regmap, made static.
20856 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
20857 made static.
20858 (ia64_cannot_store_register): Renamed from cannot_store_register,
20859 made static.
20860 (the_low_target): New.
20861 * linux-m68k-low.c (num_regs): Remove.
20862 (m68k_num_regs): Define.
20863 (m68k_regmap): Renamed from regmap, made static.
20864 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
20865 made static.
20866 (m68k_cannot_store_register): Renamed from cannot_store_register,
20867 made static.
20868 (the_low_target): New.
20869 * linux-mips-low.c (num_regs): Remove.
20870 (mips_num_regs): Define.
20871 (mips_regmap): Renamed from regmap, made static.
20872 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
20873 made static.
20874 (mips_cannot_store_register): Renamed from cannot_store_register,
20875 made static.
20876 (the_low_target): New.
20877 * linux-ppc-low.c (num_regs): Remove.
20878 (ppc_num_regs): Define.
20879 (ppc_regmap): Renamed from regmap, made static.
20880 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
20881 made static.
20882 (ppc_cannot_store_register): Renamed from cannot_store_register,
20883 made static.
20884 (the_low_target): New.
20885 * linux-s390-low.c (num_regs): Remove.
20886 (s390_num_regs): Define.
20887 (s390_regmap): Renamed from regmap, made static.
20888 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
20889 made static.
20890 (s390_cannot_store_register): Renamed from cannot_store_register,
20891 made static.
20892 (the_low_target): New.
20893 * linux-sh-low.c (num_regs): Remove.
20894 (sh_num_regs): Define.
20895 (sh_regmap): Renamed from regmap, made static.
20896 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
20897 made static.
20898 (sh_cannot_store_register): Renamed from cannot_store_register,
20899 made static.
20900 (the_low_target): New.
20901 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
20902 (the_low_target): New.
20903
209042002-04-09 Daniel Jacobowitz <drow@mvista.com>
20905
20906 * Makefile.in: Add stamp-h target.
20907 * configure.in: Create stamp-h.
20908 * configure: Regenerated.
20909
209102002-04-09 Daniel Jacobowitz <drow@mvista.com>
20911
20912 * inferiors.c: New file.
20913 * target.c: New file.
20914 * target.h: New file.
20915 * Makefile.in: Add target.o and inferiors.o. Update
20916 dependencies.
20917 * linux-low.c (inferior_pid): New static variable,
20918 moved from server.c.
20919 (linux_create_inferior): Renamed from create_inferior.
20920 Call add_inferior. Return 0 on success instead of a PID.
20921 (linux_attach): Renamed from myattach.
20922 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
20923 (linux_thread_alive): Renamed from mythread_alive.
20924 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
20925 child dies.
20926 (linux_resume): Renamed from myresume. Add missing ``return 0''.
20927 (regsets_store_inferior_registers): Correct error message.
20928 Add missing ``return 0''.
20929 (linux_fetch_registers): Renamed from fetch_inferior_registers.
20930 (linux_store_registers): Renamed from store_inferior_registers.
20931 (linux_read_memory): Renamed from read_inferior_memory.
20932 (linux_write_memory): Renamed from write_inferior_memory.
20933 (linux_target_ops): New structure.
20934 (initialize_low): Call set_target_ops ().
20935 * remote-utils.c (unhexify): New function.
20936 (hexify): New function.
20937 (input_interrupt): Send signals to ``signal_pid''.
20938 * server.c (inferior_pid): Remove.
20939 (start_inferior): Update create_inferior call.
20940 (attach_inferior): Call add_inferior.
20941 (handle_query): New function.
20942 (main): Call handle_query for `q' packets.
20943 * server.h: Include "target.h". Remove obsolete prototypes.
20944 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
20945
209462002-04-09 Daniel Jacobowitz <drow@mvista.com>
20947
20948 * Makefile.in: Add WARN_CFLAGS. Update configury
20949 dependencies.
20950 * configure.in: Check for <string.h>
20951 * configure: Regenerate.
20952 * config.in: Regenerate.
20953 * gdbreplay.c: Include needed system headers.
20954 (remote_open): Remove strchr prototype.
20955 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
20956 * regcache.c (supply_register): Change buf argument to const void *.
20957 (supply_register_by_name): Likewise.
20958 (collect_register): Change buf argument to void *.
20959 (collect_register_by_name): Likewise.
20960 * regcache.h: Add missing prototypes.
20961 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
20962 * server.c (handle_query): New function.
20963 (attached): New static variable, moved out of main.
20964 (main): Quiet longjmp clobber warnings.
20965 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
20966 * utils.c (error): Remove NORETURN.
20967 (fatal): Likewise.
This page took 2.860714 seconds and 4 git commands to generate.