gdbserver/linux-low: turn watchpoint ops into methods
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
... / ...
CommitLineData
12020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
4 target ops into methods of linux_process_target.
5
6 * linux-low.h (struct linux_target_ops): Remove the ops.
7 (class linux_process_target) <check_stopped_by_watchpoint>
8 <low_stopped_by_watchpoint>
9 <low_stopped_data_address>: Declare.
10 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
11 (linux_process_target::check_stopped_by_watchpoint): ...this.
12 (linux_process_target::low_stopped_by_watchpoint): Define.
13 (linux_process_target::low_stopped_data_address): Define.
14 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
15 <low_stopped_data_address>: Declare.
16 (x86_stopped_by_watchpoint): Turn into...
17 (x86_target::low_stopped_by_watchpoint): ...this.
18 (x86_stopped_data_address): Turn into...
19 (x86_target::low_stopped_data_address): ...this.
20 (the_low_target): Remove the op fields.
21 * linux-aarch64-low.cc (class aarch64_target)
22 <low_stopped_by_watchpoint>
23 <low_stopped_data_address>: Declare.
24 (aarch64_stopped_by_watchpoint): Turn into...
25 (aarch64_target::low_stopped_by_watchpoint): ...this.
26 (aarch64_stopped_data_address): Turn into...
27 (aarch64_target::low_stopped_data_address): ...this.
28 (the_low_target): Remove the op fields.
29 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
30 <low_stopped_data_address>: Declare.
31 (arm_stopped_by_watchpoint): Turn into...
32 (arm_target::low_stopped_by_watchpoint): ...this.
33 (arm_stopped_data_address): Turn into...
34 (arm_target::low_stopped_data_address): ...this.
35 (the_low_target): Remove the op fields.
36 * linux-crisv32-low.cc (class crisv32_target)
37 <low_stopped_by_watchpoint>
38 <low_stopped_data_address>: Declare.
39 (cris_stopped_by_watchpoint): Turn into...
40 (crisv32_target::low_stopped_by_watchpoint): ...this.
41 (cris_stopped_data_address): Turn into...
42 (crisv32_target::low_stopped_data_address): ...this.
43 (the_low_target): Remove the op fields.
44 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
45 <low_stopped_data_address>: Declare.
46 (mips_stopped_by_watchpoint): Turn into...
47 (mips_target::low_stopped_by_watchpoint): ...this.
48 (mips_stopped_data_address): Turn into...
49 (mips_target::low_stopped_data_address): ...this.
50 (the_low_target): Remove the op fields.
51 * linux-bfin-low.cc (the_low_target): Remove the op fields.
52 * linux-m32r-low.cc (the_low_target): Ditto.
53 * linux-m68k-low.cc (the_low_target): Ditto.
54 * linux-ppc-low.cc (the_low_target): Ditto.
55 * linux-s390-low.cc (the_low_target): Ditto.
56 * linux-sh-low.cc (the_low_target): Ditto.
57 * linux-sparc-low.cc (the_low_target): Ditto.
58 * linux-tic6x-low.cc (the_low_target): Ditto.
59 * linux-tile-low.cc (the_low_target): Ditto.
60 * linux-xtensa-low.cc (the_low_target): Ditto.
61
622020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
63
64 Turn the 'insert_point' and 'remove_point' linux target ops into
65 methods of linux_process_target.
66
67 * linux-low.h (struct linux_target_ops): Remove the ops.
68 (class linux_process_target) <low_insert_point>
69 <low_remove_point>: Declare.
70 * linux-low.cc (linux_process_target::low_insert_point)
71 (linux_process_target::low_remove_point): Define.
72 (linux_process_target::insert_point)
73 (linux_process_target::remove_point): Update for calls to
74 low_insert_point and low_remove_point.
75 * linux-x86-low.cc (class x86_target) <low_insert_point>
76 <low_remove_point>: Declare.
77 (x86_insert_point): Turn into...
78 (x86_target::low_insert_point): ...this.
79 (x86_remove_point): Turn into...
80 (x86_target::low_remove_point): ...this.
81 (the_low_target): Remove the op fields.
82 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
83 <low_remove_point>: Declare.
84 (aarch64_insert_point): Turn into...
85 (aarch64_target::low_insert_point): ...this.
86 (aarch64_remove_point): Turn into...
87 (aarch64_target::low_remove_point): ...this.
88 (the_low_target): Remove the op fields.
89 * linux-arm-low.cc (class arm_target) <low_insert_point>
90 <low_remove_point>: Declare.
91 (arm_insert_point): Turn into...
92 (arm_target::low_insert_point): ...this.
93 (arm_remove_point): Turn into...
94 (arm_target::low_remove_point): ...this.
95 (the_low_target): Remove the op fields.
96 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
97 <low_remove_point>: Declare.
98 (crisv32_insert_point): Turn into...
99 (crisv32_target::low_insert_point): ...this.
100 (crisv32_remove_point): Turn into...
101 (crisv32_target::low_remove_point): ...this.
102 (the_low_target): Remove the op fields.
103 * linux-mips-low.cc (class mips_target) <low_insert_point>
104 <low_remove_point>: Declare.
105 (mips_insert_point): Turn into...
106 (mips_target::low_insert_point): ...this.
107 (mips_remove_point): Turn into...
108 (mips_target::low_remove_point): ...this.
109 (the_low_target): Remove the op fields.
110 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
111 <low_remove_point>: Declare.
112 (ppc_insert_point): Turn into...
113 (ppc_target::low_insert_point): ...this.
114 (ppc_remove_point): Turn into...
115 (ppc_target::low_remove_point): ...this.
116 (the_low_target): Remove the op fields.
117 * linux-bfin-low.cc (the_low_target): Remove the op fields.
118 * linux-m32r-low.cc (the_low_target): Ditto.
119 * linux-m68k-low.cc (the_low_target): Ditto.
120 * linux-s390-low.cc (the_low_target): Ditto.
121 * linux-sh-low.cc (the_low_target): Ditto.
122 * linux-sparc-low.cc (the_low_target): Ditto.
123 * linux-tic6x-low.cc (the_low_target): Ditto.
124 * linux-tile-low.cc (the_low_target): Ditto.
125 * linux-xtensa-low.cc (the_low_target): Ditto.
126
1272020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
128
129 Remove the 'supports_z_point_type' linux target op and let the
130 concrete linux target define it by overriding the op declared in
131 process_stratum_target.
132
133 * linux-low.cc (linux_process_target::supports_z_point_type):
134 Remove.
135 * linux-low.h (struct linux_target_ops): Remove the op.
136 (class linux_process_target) <supports_z_point_type>: Remove.
137 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
138 Declare.
139 (x86_supports_z_point_type): Turn into...
140 (x86_target::supports_z_point_type): ...this.
141 (the_low_target): Remove the op field.
142 * linux-aarch64-low.cc (class aarch64_target)
143 <supports_z_point_type>: Declare.
144 (aarch64_supports_z_point_type): Turn into...
145 (aarch64_target::supports_z_point_type): ...this.
146 (the_low_target): Remove the op field.
147 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
148 Declare.
149 (arm_supports_z_point_type): Turn into...
150 (arm_target::supports_z_point_type): ...this.
151 (the_low_target): Remove the op field.
152 * linux-crisv32-low.cc (class crisv32_target)
153 <supports_z_point_type>: Declare.
154 (cris_supports_z_point_type): Turn into...
155 (crisv32_target::supports_z_point_type): ...this.
156 (the_low_target): Remove the op field.
157 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
158 Declare.
159 (mips_supports_z_point_type): Turn into...
160 (mips_target::supports_z_point_type): ...this.
161 (the_low_target): Remove the op field.
162 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
163 Declare.
164 (ppc_supports_z_point_type): Turn into...
165 (ppc_target::supports_z_point_type): ...this.
166 (the_low_target): Remove the op field.
167 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
168 Declare.
169 (s390_supports_z_point_type): Turn into...
170 (s390_target::supports_z_point_type): ...this.
171 (the_low_target): Remove the op field.
172 * linux-bfin-low.cc (the_low_target): Remove the op field.
173 * linux-m32r-low.cc (the_low_target): Ditto.
174 * linux-m68k-low.cc (the_low_target): Ditto.
175 * linux-sh-low.cc (the_low_target): Ditto.
176 * linux-sparc-low.cc (the_low_target): Ditto.
177 * linux-tic6x-low.cc (the_low_target): Ditto.
178 * linux-tile-low.cc (the_low_target): Ditto.
179 * linux-xtensa-low.cc (the_low_target): Ditto.
180
1812020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
182
183 Turn the 'breakpoint_at' linux target op into a method of
184 linux_process_target.
185
186 * linux-low.h (struct linux_target_ops): Remove the op.
187 (class linux_process_target) <low_breakpoint_at>: Declare.
188
189 Update the callers below:
190
191 * linux-low.cc (linux_process_target::save_stop_reason)
192 (linux_process_target::thread_still_has_status_pending)
193 (linux_process_target::wait_1)
194
195 * linux-x86-low.cc (class x86_target)
196 <low_breakpoint_at>: Declare.
197 (x86_breakpoint_at): Turn into...
198 (x86_target::low_breakpoint_at): ...this.
199 (the_low_target): Remove the op field.
200 * linux-aarch64-low.cc (class aarch64_target)
201 <low_breakpoint_at>: Declare.
202 (aarch64_breakpoint_at): Turn into...
203 (aarch64_target::low_breakpoint_at): ...this.
204 (the_low_target): Remove the op field.
205 * linux-arm-low.cc (class arm_target)
206 <low_breakpoint_at>: Declare.
207 (arm_target::low_breakpoint_at): Define.
208 (the_low_target): Remove the op field.
209 * linux-bfin-low.cc (class bfin_target)
210 <low_breakpoint_at>: Declare.
211 (bfin_breakpoint_at): Turn into...
212 (bfin_target::low_breakpoint_at): ...this.
213 (the_low_target): Remove the op field.
214 * linux-cris-low.cc (class cris_target)
215 <low_breakpoint_at>: Declare.
216 (cris_breakpoint_at): Turn into...
217 (cris_target::low_breakpoint_at): ...this.
218 (the_low_target): Remove the op field.
219 * linux-crisv32-low.cc (class crisv32_target)
220 <low_breakpoint_at>: Declare.
221 (crisv32_breakpoint_at): Turn into...
222 (crisv32_target::low_breakpoint_at): ...this.
223 (the_low_target): Remove the op field.
224 * linux-ia64-low.cc (class ia64_target)
225 <low_breakpoint_at>: Declare.
226 (ia64_target::low_breakpoint_at): Define.
227 * linux-m32r-low.cc (class m32r_target)
228 <low_breakpoint_at>: Declare.
229 (m32r_breakpoint_at): Turn into...
230 (m32r_target::low_breakpoint_at): ...this.
231 (the_low_target): Remove the op field.
232 * linux-m68k-low.cc (class m68k_target)
233 <low_breakpoint_at>: Declare.
234 (m68k_breakpoint_at): Turn into...
235 (m68k_target::low_breakpoint_at): ...this.
236 (the_low_target): Remove the op field.
237 * linux-mips-low.cc (class mips_target)
238 <low_breakpoint_at>: Declare.
239 (mips_breakpoint_at): Turn into...
240 (mips_target::low_breakpoint_at): ...this.
241 (the_low_target): Remove the op field.
242 * linux-nios2-low.cc (class nios2_target)
243 <low_breakpoint_at>: Declare.
244 (nios2_breakpoint_at): Turn into...
245 (nios2_target::low_breakpoint_at): ...this.
246 (the_low_target): Remove the op field.
247 * linux-ppc-low.cc (class ppc_target)
248 <low_breakpoint_at>: Declare.
249 (ppc_breakpoint_at): Turn into...
250 (ppc_target::low_breakpoint_at): ...this.
251 (the_low_target): Remove the op field.
252 * linux-riscv-low.cc (class riscv_target)
253 <low_breakpoint_at>: Declare.
254 (riscv_breakpoint_at): Turn into...
255 (riscv_target::low_breakpoint_at): ...this.
256 (the_low_target): Remove the op field.
257 * linux-s390-low.cc (class s390_target)
258 <low_breakpoint_at>: Declare.
259 (s390_breakpoint_at): Turn into...
260 (s390_target::low_breakpoint_at): ...this.
261 (the_low_target): Remove the op field.
262 * linux-sh-low.cc (class sh_target)
263 <low_breakpoint_at>: Declare.
264 (sh_breakpoint_at): Turn into...
265 (sh_target::low_breakpoint_at): ...this.
266 (the_low_target): Remove the op field.
267 * linux-sparc-low.cc (class sparc_target)
268 <low_breakpoint_at>: Declare.
269 (sparc_breakpoint_at): Turn into...
270 (sparc_target::low_breakpoint_at): ...this.
271 (the_low_target): Remove the op field.
272 * linux-tic6x-low.cc (class tic6x_target)
273 <low_breakpoint_at>: Declare.
274 (tic6x_breakpoint_at): Turn into...
275 (tic6x_target::low_breakpoint_at): ...this.
276 (the_low_target): Remove the op field.
277 * linux-tile-low.cc (class tile_target)
278 <low_breakpoint_at>: Declare.
279 (tile_breakpoint_at): Turn into...
280 (tile_target::low_breakpoint_at): ...this.
281 (the_low_target): Remove the op field.
282 * linux-xtensa-low.cc (class xtensa_target)
283 <low_breakpoint_at>: Declare.
284 (xtensa_breakpoint_at): Turn into...
285 (xtensa_target::low_breakpoint_at): ...this.
286 (the_low_target): Remove the op field.
287
2882020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
289
290 Turn the 'decr_pc_after_break' linux_target_ops field into
291 a method of linux_process_target.
292
293 * linux-low.h (struct linux_target_ops)
294 <decr_pc_after_break>: Remove.
295 (class linux_process_target) <low_decr_pc_after_break>: New method
296 declaration.
297 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
298 New method implementation.
299
300 Update the users below.
301
302 (linux_process_target::save_stop_reason)
303 (linux_process_target::wait_1)
304 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
305 New declaration.
306 (x86_target::low_decr_pc_after_break): New method implementation.
307 (the_low_target): Remove the field.
308 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
309 New declaration.
310 (bfin_target::low_decr_pc_after_break): New method implementation.
311 (the_low_target): Remove the field.
312 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
313 New declaration.
314 (m68k_target::low_decr_pc_after_break): New method implementation.
315 (the_low_target): Remove the field.
316 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
317 New declaration.
318 (s390_target::low_decr_pc_after_break): New method implementation.
319 (the_low_target): Remove the field.
320 * linux-aarch64-low.cc (the_low_target): Remove the field.
321 * linux-arm-low.cc (the_low_target): Remove the field.
322 * linux-cris-low.cc (the_low_target): Remove the field.
323 * linux-crisv32-low.cc (the_low_target): Remove the field.
324 * linux-m32r-low.cc (the_low_target): Remove the field.
325 * linux-mips-low.cc (the_low_target): Remove the field.
326 * linux-nios2-low.cc (the_low_target): Remove the field.
327 * linux-ppc-low.cc (the_low_target): Remove the field.
328 * linux-riscv-low.cc (the_low_target): Remove the field.
329 * linux-sh-low.cc (the_low_target): Remove the field.
330 * linux-sparc-low.cc (the_low_target): Remove the field.
331 * linux-tic6x-low.cc (the_low_target): Remove the field.
332 * linux-tile-low.cc (the_low_target): Remove the field.
333 * linux-xtensa-low.cc (the_low_target): Remove the field.
334
3352020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
336
337 Remove the 'supports_software_single_step' linux target op and let
338 the concrete linux target define it by overriding the op in
339 process_stratum_target.
340 Turn the 'get_next_pcs' linux target op into a method of
341 linux_process_target.
342
343 * linux-low.h (struct linux_target_ops): Remove the ops.
344 (class linux_process_target) <supports_software_single_step>:
345 Remove.
346 <low_get_next_pcs>: Declare.
347 * linux-low.cc (can_software_single_step): Remove.
348 (linux_process_target::low_get_next_pcs): Define.
349 (linux_process_target::supports_software_single_step): Remove.
350
351 Update the callers below.
352
353 (linux_process_target::handle_extended_wait)
354 (linux_process_target::wait_1)
355 (linux_process_target::install_software_single_step_breakpoints)
356 (linux_process_target::single_step)
357 (linux_process_target::thread_needs_step_over)
358 (linux_process_target::proceed_one_lwp)
359 (linux_process_target::supports_range_stepping)
360
361 * linux-x86-low.cc (the_low_target): Remove the op field.
362 * linux-aarch64-low.cc (the_low_target): Ditto.
363 * linux-bfin-low.cc (the_low_target): Ditto.
364 * linux-cris-low.cc (the_low_target): Ditto.
365 * linux-crisv32-low.cc (the_low_target): Ditto.
366 * linux-m32r-low.cc (the_low_target): Ditto.
367 * linux-m68k-low.cc (the_low_target): Ditto.
368 * linux-mips-low.cc (the_low_target): Ditto.
369 * linux-nios2-low.cc (the_low_target): Ditto.
370 * linux-ppc-low.cc (the_low_target): Ditto.
371 * linux-riscv-low.cc (the_low_target): Ditto.
372 * linux-s390-low.cc (the_low_target): Ditto.
373 * linux-sh-low.cc (the_low_target): Ditto.
374 * linux-sparc-low.cc (the_low_target): Ditto.
375 * linux-tic6x-low.cc (the_low_target): Ditto.
376 * linux-tile-low.cc (the_low_target): Ditto.
377 * linux-xtensa-low.cc (the_low_target): Ditto.
378 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
379 <supports_software_single_step>: Declare.
380 (arm_target::supports_software_single_step): Define.
381 (arm_gdbserver_get_next_pcs): Turn into...
382 (arm_target::low_get_next_pcs): ...this.
383 (the_low_target): Remove the op field.
384
3852020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
386
387 Remove the 'sw_breakpoint_from_kind' linux target op, and let
388 the concrete linux target define it by overriding the op
389 in process_stratum_target.
390
391 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
392 Remove.
393 * linux-low.h (struct linux_target_ops): Remove the op.
394 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
395 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
396 Declare.
397 (x86_sw_breakpoint_from_kind): Turn into...
398 (x86_target::sw_breakpoint_from_kind): ...this.
399 (the_low_target): Remove the op field.
400 * linux-aarch64-low.cc (class aarch64_target)
401 <sw_breakpoint_from_kind>: Declare.
402 (aarch64_sw_breakpoint_from_kind): Turn into...
403 (aarch64_target::sw_breakpoint_from_kind): ...this.
404 (the_low_target): Remove the op field.
405 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
406 Declare.
407 (arm_target::sw_breakpoint_from_kind): Define.
408 (the_low_target): Remove the op field.
409 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
410 Declare.
411 (bfin_sw_breakpoint_from_kind): Turn into...
412 (bfin_target::sw_breakpoint_from_kind): ...this.
413 (the_low_target): Remove the op field.
414 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
415 Declare.
416 (cris_sw_breakpoint_from_kind): Turn into...
417 (cris_target::sw_breakpoint_from_kind): ...this.
418 (the_low_target): Remove the op field.
419 * linux-crisv32-low.cc (class crisv32_target)
420 <sw_breakpoint_from_kind>: Declare.
421 (cris_sw_breakpoint_from_kind): Turn into...
422 (crisv32_target::sw_breakpoint_from_kind): ...this.
423 (the_low_target): Remove the op field.
424 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
425 Declare.
426 (ia64_target::sw_breakpoint_from_kind): Define.
427 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
428 Declare.
429 (m32r_sw_breakpoint_from_kind): Turn into...
430 (m32r_target::sw_breakpoint_from_kind): ...this.
431 (the_low_target): Remove the op field.
432 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
433 Declare.
434 (m68k_sw_breakpoint_from_kind): Turn into...
435 (m68k_target::sw_breakpoint_from_kind): ...this.
436 (the_low_target): Remove the op field.
437 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
438 Declare.
439 (mips_sw_breakpoint_from_kind): Turn into...
440 (mips_target::sw_breakpoint_from_kind): ...this.
441 (the_low_target): Remove the op field.
442 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
443 Declare.
444 (nios2_sw_breakpoint_from_kind): Turn into...
445 (nios2_target::sw_breakpoint_from_kind): ...this.
446 (the_low_target): Remove the op field.
447 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
448 Declare.
449 (ppc_sw_breakpoint_from_kind): Turn into...
450 (ppc_target::sw_breakpoint_from_kind): ...this.
451 (the_low_target): Remove the op field.
452 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
453 Declare.
454 (riscv_sw_breakpoint_from_kind): Turn into...
455 (riscv_target::sw_breakpoint_from_kind): ...this.
456 (the_low_target): Remove the op field.
457 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
458 Declare.
459 (s390_sw_breakpoint_from_kind): Turn into...
460 (s390_target::sw_breakpoint_from_kind): ...this.
461 (the_low_target): Remove the op field.
462 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
463 Declare.
464 (sh_sw_breakpoint_from_kind): Turn into...
465 (sh_target::sw_breakpoint_from_kind): ...this.
466 (the_low_target): Remove the op field.
467 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
468 Declare.
469 (sparc_sw_breakpoint_from_kind): Turn into...
470 (sparc_target::sw_breakpoint_from_kind): ...this.
471 (the_low_target): Remove the op field.
472 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
473 Declare.
474 (tic6x_sw_breakpoint_from_kind): Turn into...
475 (tic6x_target::sw_breakpoint_from_kind): ...this.
476 (the_low_target): Remove the op field.
477 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
478 Declare.
479 (tile_sw_breakpoint_from_kind): Turn into...
480 (tile_target::sw_breakpoint_from_kind): ...this.
481 (the_low_target): Remove the op field.
482 * linux-xtensa-low.cc (class xtensa_target)
483 <sw_breakpoint_from_kind>: Declare.
484 (xtensa_sw_breakpoint_from_kind): Turn into...
485 (xtensa_target::sw_breakpoint_from_kind): ...this.
486 (the_low_target): Remove the op field.
487
4882020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
489
490 Remove the 'breakpoint_kind_from_pc' and
491 'breakpoint_kind_from_current_state' linux target ops, and let the
492 concrete linux target define them by overriding the ops of
493 process_stratum_target.
494
495 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
496 Remove.
497 (linux_process_target::breakpoint_kind_from_current_state): Remove.
498 * linux-low.h (struct linux_target_ops): Remove ops.
499 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
500 <breakpoint_kind_from_current_state>: Remove.
501 * linux-x86-low.cc (the_low_target): Remove the op fields.
502 * linux-bfin-low.cc (the_low_target): Ditto.
503 * linux-cris-low.cc (the_low_target): Ditto.
504 * linux-crisv32-low.cc (the_low_target): Ditto.
505 * linux-m32r-low.cc (the_low_target): Ditto.
506 * linux-m68k-low.cc (the_low_target): Ditto.
507 * linux-mips-low.cc (the_low_target): Ditto.
508 * linux-nios2-low.cc (the_low_target): Ditto.
509 * linux-ppc-low.cc (the_low_target): Ditto.
510 * linux-s390-low.cc (the_low_target): Ditto.
511 * linux-sh-low.cc (the_low_target): Ditto.
512 * linux-sparc-low.cc (the_low_target): Ditto.
513 * linux-tic6x-low.cc (the_low_target): Ditto.
514 * linux-tile-low.cc (the_low_target): Ditto.
515 * linux-xtensa-low.cc (the_low_target): Ditto.
516 * linux-aarch64-low.cc (class aarch64_target)
517 <breakpoint_kind_from_pc>
518 <breakpoint_kind_from_current_state>: Declare.
519 (aarch64_breakpoint_kind_from_pc): Turn into...
520 (aarch64_target::breakpoint_kind_from_pc): ...this.
521 (aarch64_breakpoint_kind_from_current_state): Turn into...
522 (aarch64_target::breakpoint_kind_from_current_state): ...this.
523 (the_low_target): Remove the op fields.
524 * linux-arm-low.cc (class arm_target):
525 <breakpoint_kind_from_pc>
526 <breakpoint_kind_from_current_state>: Declare.
527 (arm_target::breakpoint_kind_from_pc): Define.
528 (arm_target::breakpoint_kind_from_current_state): Define.
529 (the_low_target): Remove the op fields.
530 * linux-riscv-low.cc (class riscv_target):
531 <breakpoint_kind_from_pc>: Declare.
532 (riscv_breakpoint_kind_from_pc): Turn into...
533 (riscv_target::breakpoint_kind_from_pc): ...this.
534 (the_low_target): Remove the op fields.
535
5362020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
537
538 Turn the 'get_pc' and 'set_pc' linux target ops into methods
539 of linux_process_target.
540
541 * linux-low.h (struct linux_target_ops): Remove the ops.
542 (class linux_process_target) <low_supports_breakpoints>
543 <low_get_pc>
544 <low_set_pc>: Declare.
545 * linux-low.cc (supports_breakpoints): Turn into...
546 (linux_process_target::low_supports_breakpoints): ...this.
547 (linux_process_target::low_get_pc): Define.
548 (linux_process_target::low_set_pc): Define.
549
550 Update the callers below.
551
552 (linux_process_target::get_pc)
553 (linux_process_target::save_stop_reason)
554 (linux_process_target::maybe_move_out_of_jump_pad)
555 (linux_process_target::wait_1)
556 (linux_process_target::resume_one_lwp_throw)
557 (linux_process_target::resume)
558 (linux_process_target::proceed_all_lwps)
559 (linux_process_target::read_pc)
560 (linux_process_target::write_pc)
561
562 * linux-x86-low.cc (class linux_process_target)
563 <low_supports_breakpoints>
564 <low_get_pc>
565 <low_set_pc>: Declare.
566 (x86_target::low_supports_breakpoints): Define.
567 (x86_get_pc): Turn into...
568 (x86_target::low_get_pc): ...this.
569 (x86_set_pc): Turn into...
570 (x86_target::low_set_pc): ...this.
571 (the_low_target): Remove the op fields.
572 * linux-arm-low.cc (class arm_target)
573 <low_supports_breakpoints>
574 <low_get_pc>
575 <low_set_pc>: Declare.
576 (arm_target::low_supports_breakpoints)
577 (arm_target::low_get_pc)
578 (arm_target::low_set_pc): Define.
579 (the_low_target): Remove the op fields.
580 * linux-bfin-low.cc (class bfin_target)
581 <low_supports_breakpoints>
582 <low_get_pc>
583 <low_set_pc>: Declare.
584 (bfin_target::low_supports_breakpoints)
585 (bfin_target::low_get_pc)
586 (bfin_target::low_set_pc): Define.
587 (the_low_target): Remove the op fields.
588 * linux-cris-low.cc (class cris_target)
589 <low_supports_breakpoints>
590 <low_get_pc>
591 <low_set_pc>: Declare.
592 (cris_target::low_supports_breakpoints)
593 (cris_target::low_get_pc)
594 (cris_target::low_set_pc): Define.
595 (the_low_target): Remove the op fields.
596 * linux-crisv32-low.cc (class crisv32_target)
597 <low_supports_breakpoints>
598 <low_get_pc>
599 <low_set_pc>: Declare.
600 (crisv32_target::low_supports_breakpoints)
601 (crisv32_target::low_get_pc)
602 (crisv32_target::low_set_pc): Define.
603 (the_low_target): Remove the op fields.
604 * linux-m32r-low.cc (class m32r_target)
605 <low_supports_breakpoints>
606 <low_get_pc>
607 <low_set_pc>: Declare.
608 (m32r_target::low_supports_breakpoints)
609 (m32r_target::low_get_pc)
610 (m32r_target::low_set_pc): Define.
611 (the_low_target): Remove the op fields.
612 * linux-m68k-low.cc (class m68k_target)
613 <low_supports_breakpoints>
614 <low_get_pc>
615 <low_set_pc>: Declare.
616 (m68k_target::low_supports_breakpoints)
617 (m68k_target::low_get_pc)
618 (m68k_target::low_set_pc): Define.
619 (the_low_target): Remove the op fields.
620 * linux-nios2-low.cc (class nios2_target)
621 <low_supports_breakpoints>
622 <low_get_pc>
623 <low_set_pc>: Declare.
624 (nios2_target::low_supports_breakpoints)
625 (nios2_target::low_get_pc)
626 (nios2_target::low_set_pc): Define.
627 (the_low_target): Remove the op fields.
628 * linux-sh-low.cc (class sh_target)
629 <low_supports_breakpoints>
630 <low_get_pc>
631 <low_set_pc>: Declare.
632 (sh_target::low_supports_breakpoints)
633 (sh_target::low_get_pc)
634 (sh_target::low_set_pc): Define.
635 (the_low_target): Remove the op fields.
636 * linux-xtensa-low.cc (class xtensa_target)
637 <low_supports_breakpoints>
638 <low_get_pc>
639 <low_set_pc>: Declare.
640 (xtensa_target::low_supports_breakpoints)
641 (xtensa_target::low_get_pc)
642 (xtensa_target::low_set_pc): Define.
643 (the_low_target): Remove the op fields.
644 * linux-sparc-low.cc (class sparc_target)
645 <low_supports_breakpoints>
646 <low_get_pc>: Declare.
647 (sparc_target::low_supports_breakpoints)
648 (sparc_target::low_get_pc): Define.
649 (the_low_target): Remove the op fields.
650 * linux-tile-low.cc (class tile_target)
651 <low_supports_breakpoints>
652 <low_get_pc>
653 <low_set_pc>: Declare.
654 (tile_target::low_supports_breakpoints)
655 (tile_target::low_get_pc)
656 (tile_target::low_set_pc): Define.
657 (the_low_target): Remove the op fields.
658 * linux-aarch64-low.cc (class aarch64_target)
659 <low_supports_breakpoints>
660 <low_get_pc>
661 <low_set_pc>: Declare.
662 (aarch64_target::low_supports_breakpoints): Define.
663 (aarch64_get_pc): Turn into...
664 (aarch64_target::low_get_pc): ...this.
665 (aarch64_set_pc): Turn into...
666 (aarch64_target::low_set_pc): ...this.
667 (the_low_target): Remove the op fields.
668 * linux-mips-low.cc (class mips_target)
669 <low_supports_breakpoints>
670 <low_get_pc>
671 <low_set_pc>: Declare.
672 (mips_target::low_supports_breakpoints): Define.
673 (mips_get_pc): Turn into...
674 (mips_target::low_get_pc): ...this.
675 (mips_set_pc): Turn into...
676 (mips_target::low_set_pc): ...this.
677 (the_low_target): Remove the op fields.
678 * linux-ppc-low.cc (class ppc_target)
679 <low_supports_breakpoints>
680 <low_get_pc>
681 <low_set_pc>: Declare.
682 (ppc_target::low_supports_breakpoints): Define.
683 (ppc_get_pc): Turn into...
684 (ppc_target::low_get_pc): ...this.
685 (ppc_set_pc): Turn into...
686 (ppc_target::low_set_pc): ...this.
687 (the_low_target): Remove the op fields.
688 * linux-riscv-low.cc (class riscv_target)
689 <low_supports_breakpoints>
690 <low_get_pc>
691 <low_set_pc>: Declare.
692 (riscv_target::low_supports_breakpoints): Define.
693 (riscv_get_pc): Turn into...
694 (riscv_target::low_get_pc): ...this.
695 (riscv_set_pc): Turn into...
696 (riscv_target::low_set_pc): ...this.
697 (the_low_target): Remove the op fields.
698 * linux-s390-low.cc (class s390_target)
699 <low_supports_breakpoints>
700 <low_get_pc>
701 <low_set_pc>: Declare.
702 (s390_target::low_supports_breakpoints): Define.
703 (s390_get_pc): Turn into...
704 (s390_target::low_get_pc): ...this.
705 (s390_set_pc): Turn into...
706 (s390_target::low_set_pc): ...this.
707 (the_low_target): Remove the op fields.
708 * linux-tic6x-low.cc (class tic6x_target)
709 <low_supports_breakpoints>
710 <low_get_pc>
711 <low_set_pc>: Declare.
712 (tic6x_target::low_supports_breakpoints): Define.
713 (tic6x_get_pc): Turn into...
714 (tic6x_target::low_get_pc): ...this.
715 (tic6x_set_pc): Turn into...
716 (tic6x_target::low_set_pc): ...this.
717 (the_low_target): Remove the op fields.
718
7192020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
720
721 Turn some more static methods in linux-low into private methods
722 of linux_process_target.
723
724 * linux-low.cc (get_pc): Turn into...
725 (linux_process_target::get_pc): ...this.
726 (save_stop_reason): Turn into...
727 (linux_process_target::save_stop_reason): ...this.
728 (thread_still_has_status_pending_p): Turn into...
729 (linux_process_target::thread_still_has_status_pending): ...this.
730 (status_pending_p_callback): Turn into...
731 (linux_process_target::status_pending_p_callback): ...this.
732 (resume_stopped_resumed_lwps): Turn into...
733 (linux_process_target::resume_stopped_resumed_lwps): ...this.
734 (install_software_single_step_breakpoints): Turn into...
735 (linux_process_target::install_software_single_step_breakpoints):
736 ...this.
737 (single_step): Turn into...
738 (linux_process_target::single_step): ...this.
739 (linux_resume_one_lwp_throw): Turn into...
740 (linux_process_target::resume_one_lwp_throw): ...this.
741 (linux_resume_one_lwp): Turn into...
742 (linux_process_target::resume_one_lwp): ...this.
743 (resume_status_pending_p): Turn into...
744 (linux_process_target::resume_status_pending): ...this.
745 (need_step_over_p): Turn into...
746 (linux_process_target::thread_needs_step_over): ...this.
747 (linux_resume_one_thread): Turn into...
748 (linux_process_target::resume_one_thread): ...this.
749 (proceed_one_lwp): Turn into...
750 (linux_process_target::proceed_one_lwp): ...this.
751 (unsuspend_and_proceed_one_lwp): Turn into...
752 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
753
754 Update the calls/references to the above functions below.
755
756 (linux_process_target::handle_extended_wait)
757 (linux_process_target::filter_event)
758 (linux_process_target::wait_for_event_filtered)
759 (linux_process_target::wait_1)
760 (linux_process_target::move_out_of_jump_pad)
761 (linux_process_target::start_step_over)
762 (linux_process_target::resume)
763 (linux_process_target::proceed_all_lwps)
764 (regsets_store_inferior_registers)
765 (linux_process_target::store_register)
766
767 * linux-low.h (class linux_process_target)
768 <get_pc>
769 <save_stop_reason>
770 <thread_still_has_status_pending>
771 <status_pending_p_callback>
772 <resume_stopped_resumed_lwps>
773 <install_software_single_step_breakpoints>
774 <single_step>
775 <resume_one_lwp_throw>
776 <resume_one_lwp>
777 <resume_status_pending>
778 <thread_needs_step_over>
779 <resume_one_thread>
780 <proceed_one_lwp>
781 <unsuspend_and_proceed_one_lwp>: Declare.
782
7832020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
784
785 Turn the 'fetch_register' linux target op into a method of
786 linux_process_target.
787
788 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
789 (class linux_process_target) <low_fetch_register>: Declare.
790 * linux-x86-low.cc (the_low_target)
791 * linux-aarch64-low.cc (the_low_target)
792 * linux-arm-low.cc (the_low_target)
793 * linux-bfin-low.cc (the_low_target)
794 * linux-cris-low.cc (the_low_target)
795 * linux-crisv32-low.cc (the_low_target)
796 * linux-m32r-low.cc (the_low_target)
797 * linux-m68k-low.cc (the_low_target)
798 * linux-nios2-low.cc (the_low_target)
799 * linux-ppc-low.cc (the_low_target)
800 * linux-s390-low.cc (the_low_target)
801 * linux-sh-low.cc (the_low_target)
802 * linux-sparc-low.cc (the_low_target)
803 * linux-tic6x-low.cc (the_low_target)
804 * linux-tile-low.cc (the_low_target)
805 * linux-xtensa-low.cc (the_low_target): Remove the op field.
806 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
807 Declare.
808 (ia64_fetch_register): Turn into...
809 (ia64_target::low_fetch_register): ...this.
810 (the_low_target): Remove the op field.
811 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
812 Declare.
813 (mips_fetch_register): Turn into...
814 (mips_target::low_fetch_register): ...this.
815 (the_low_target): Remove the op field.
816 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
817 Declare.
818 (riscv_fetch_register): Turn into...
819 (riscv_target::low_fetch_register): ...this.
820 (the_low_target): Remove the op field.
821
822 Update the callers below.
823
824 * linux-low.cc (linux_process_target::fetch_registers)
825 (linux_process_target::low_fetch_register)
826
8272020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
828
829 Turn the 'cannot_fetch_register' and 'cannot_store_register'
830 linux target ops into methods of linux_process_target.
831
832 * linux-low.h (struct linux_target_ops): Remove the low target ops.
833 (class linux_process_target) <fetch_register>
834 <store_register>
835 <usr_fetch_inferior_registers>
836 <usr_store_inferior_registers>
837 <low_cannot_fetch_register>
838 <low_cannot_fetch_register> Declare.
839 * linux-low.cc (fetch_register): Turn into...
840 (linux_process_target::fetch_register): ...this.
841 (store_register): Turn into ...
842 (linux_process_target::store_register): ...this.
843 (usr_fetch_inferior_registers): Turn into...
844 (linux_process_target::usr_fetch_inferior_registers): ...this.
845 (usr_store_inferior_registers): Turn into...
846 (linux_process_target::usr_store_inferior_registers): ...this.
847 * linux-x86-low.cc (class x86_target)
848 <low_cannot_fetch_register>
849 <low_cannot_store_register>: Declare.
850 (x86_cannot_store_register): Turn into...
851 (x86_target::low_cannot_store_register): ...this.
852 (x86_cannot_fetch_register): Turn into...
853 (x86_target::low_cannot_fetch_register): ...this.
854 (the_low_target): Remove the target op fields.
855 * linux-aarch64-low.cc (class aarch64_target)
856 <low_cannot_fetch_register>
857 <low_cannot_store_register>: Declare.
858 (aarch64_target::low_cannot_fetch_register)
859 (aarch64_target::low_cannot_store_register): Define.
860 (the_low_target): Remove the op fields.
861 * linux-arm-low.cc (class arm_target)
862 <low_cannot_fetch_register>
863 <low_cannot_store_register>: Declare.
864 (arm_cannot_fetch_register): Turn into...
865 (arm_target::low_cannot_fetch_register): ...this.
866 (arm_cannot_store_register): Turn into...
867 (arm_target::low_cannot_store_register): ...this.
868 (the_low_target): Remove the op fields.
869 * linux-bfin-low.cc (class bfin_target)
870 <low_cannot_fetch_register>
871 <low_cannot_store_register>: Declare.
872 (bfin_cannot_fetch_register): Turn into...
873 (bfin_target::low_cannot_fetch_register): ...this.
874 (bfin_cannot_store_register): Turn into...
875 (bfin_target::low_cannot_store_register): ...this.
876 (the_low_target): Remove the op fields.
877 * linux-cris-low.cc (class cris_target)
878 <low_cannot_fetch_register>
879 <low_cannot_store_register>: Declare.
880 (cris_cannot_fetch_register): Turn into...
881 (cris_target::low_cannot_fetch_register): ...this.
882 (cris_cannot_store_register): Turn into...
883 (cris_target::low_cannot_store_register): ...this.
884 (the_low_target): Remove the op fields.
885 * linux-crisv32-low.cc (class crisv32_target)
886 <low_cannot_fetch_register>
887 <low_cannot_store_register>: Declare.
888 (crisv32_target::low_cannot_fetch_register)
889 (crisv32_target::low_cannot_store_register): Define.
890 (the_low_target): Remove the op fields.
891 * linux-ia64-low.cc (class ia64_target)
892 <low_cannot_fetch_register>
893 <low_cannot_store_register>: Declare.
894 (ia64_cannot_fetch_register): Turn into...
895 (ia64_target::low_cannot_fetch_register): ...this.
896 (ia64_cannot_store_register): Turn into...
897 (ia64_target::low_cannot_store_register): ...this.
898 (the_low_target): Remove the op fields.
899 * linux-m32r-low.cc (class m32r_target)
900 <low_cannot_fetch_register>
901 <low_cannot_store_register>: Declare.
902 (m32r_cannot_fetch_register): Turn into...
903 (m32r_target::low_cannot_fetch_register): ...this.
904 (m32r_cannot_store_register): Turn into...
905 (m32r_target::low_cannot_store_register): ...this.
906 (the_low_target): Remove the op fields.
907 * linux-m68k-low.cc (class m68k_target)
908 <low_cannot_fetch_register>
909 <low_cannot_store_register>: Declare.
910 (m68k_cannot_fetch_register): Turn into...
911 (m68k_target::low_cannot_fetch_register): ...this.
912 (m68k_cannot_store_register): Turn into...
913 (m68k_target::low_cannot_store_register): ...this.
914 (the_low_target): Remove the op fields.
915 * linux-mips-low.cc (class mips_target)
916 <low_cannot_fetch_register>
917 <low_cannot_store_register>: Declare.
918 (mips_cannot_fetch_register): Turn into...
919 (mips_target::low_cannot_fetch_register): ...this.
920 (mips_cannot_store_register): Turn into...
921 (mips_target::low_cannot_store_register): ...this.
922 (get_usrregs_info): Inline at the call sites in
923 low_cannot_fetch_register and low_cannot_store_register,
924 and remove.
925 (the_low_target): Remove the op fields.
926 * linux-nios2-low.cc (class nios2_target)
927 <low_cannot_fetch_register>
928 <low_cannot_store_register>: Declare.
929 (nios2_cannot_fetch_register): Turn into...
930 (nios2_target::low_cannot_fetch_register): ...this.
931 (nios2_cannot_store_register): Turn into...
932 (nios2_target::low_cannot_store_register): ...this.
933 (the_low_target): Remove the op fields.
934 * linux-ppc-low.cc (class ppc_target)
935 <low_cannot_fetch_register>
936 <low_cannot_store_register>: Declare.
937 (ppc_cannot_fetch_register): Turn into...
938 (ppc_target::low_cannot_fetch_register): ...this.
939 (ppc_cannot_store_register): Turn into...
940 (ppc_target::low_cannot_store_register): ...this.
941 (the_low_target): Remove the op fields.
942 * linux-riscv-low.cc (class riscv_target)
943 <low_cannot_fetch_register>
944 <low_cannot_store_register>: Declare.
945 (riscv_target::low_cannot_fetch_register)
946 (riscv_target::low_cannot_store_register): Define.
947 (the_low_target): Remove the op fields.
948 * linux-s390-low.cc (class s390_target)
949 <low_cannot_fetch_register>
950 <low_cannot_store_register>: Declare.
951 (s390_cannot_fetch_register): Turn into...
952 (s390_target::low_cannot_fetch_register): ...this.
953 (s390_cannot_store_register): Turn into...
954 (s390_target::low_cannot_store_register): ...this.
955 (the_low_target): Remove the op fields.
956 * linux-sh-low.cc (class sh_target)
957 <low_cannot_fetch_register>
958 <low_cannot_store_register>: Declare.
959 (sh_cannot_fetch_register): Turn into...
960 (sh_target::low_cannot_fetch_register): ...this.
961 (sh_cannot_store_register): Turn into...
962 (sh_target::low_cannot_store_register): ...this.
963 (the_low_target): Remove the op fields.
964 * linux-sparc-low.cc (class sparc_target)
965 <low_cannot_fetch_register>
966 <low_cannot_store_register>: Declare.
967 (sparc_cannot_fetch_register): Turn into...
968 (sparc_target::low_cannot_fetch_register): ...this.
969 (sparc_cannot_store_register): Turn into...
970 (sparc_target::low_cannot_store_register): ...this.
971 (the_low_target): Remove the op fields.
972 * linux-tic6x-low.cc (class tic6x_target)
973 <low_cannot_fetch_register>
974 <low_cannot_store_register>: Declare.
975 (tic6x_cannot_fetch_register): Turn into...
976 (tic6x_target::low_cannot_fetch_register): ...this.
977 (tic6x_cannot_store_register): Turn into...
978 (tic6x_target::low_cannot_store_register): ...this.
979 (the_low_target): Remove the op fields.
980 * linux-tile-low.cc (class tile_target)
981 <low_cannot_fetch_register>
982 <low_cannot_store_register>: Declare.
983 (tile_cannot_fetch_register): Turn into...
984 (tile_target::low_cannot_fetch_register): ...this.
985 (tile_cannot_store_register): Turn into...
986 (tile_target::low_cannot_store_register): ...this.
987 (the_low_target): Remove the op fields.
988 * linux-xtensa-low.cc (class xtensa_target)
989 <low_cannot_fetch_register>
990 <low_cannot_store_register>: Declare.
991 (xtensa_target::low_cannot_fetch_register)
992 (xtensa_target::low_cannot_store_register): Define.
993 (the_low_target): Remove the op fields.
994
9952020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
996
997 Turn the 'regs_info' linux target op into a method of
998 linux_process_target.
999
1000 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1001 (class linux_process_target) <get_regs_info>: Define.
1002
1003 Update the callers below.
1004
1005 * linux-low.cc (linux_process_target::fetch_registers)
1006 (linux_process_target::store_registers)
1007 * proc-service.cc (gregset_info)
1008
1009 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1010 (x86_linux_regs_info): Turn into ...
1011 (x86_target::get_regs_info): ...this.
1012 (the_low_target): Remove the op field.
1013 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1014 Declare.
1015 (aarch64_regs_info): Turn into ...
1016 (aarch64_target::get_regs_info): ...this.
1017 (the_low_target): Remove the op field.
1018 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1019 (arm_regs_info): Turn into ...
1020 (arm_target::get_regs_info): ...this.
1021 (the_low_target): Remove the op field.
1022 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1023 (bfin_regs_info): Turn into ...
1024 (bfin_target::get_regs_info): ...this.
1025 (the_low_target): Remove the op field.
1026 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1027 (cris_regs_info): Turn into ...
1028 (cris_target::get_regs_info): ...this.
1029 (the_low_target): Remove the op field.
1030 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1031 Declare.
1032 (crisv32_regs_info): Turn into ...
1033 (crisv32_target::get_regs_info): ...this.
1034 (the_low_target): Remove the op field.
1035 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1036 (ia64_regs_info): Turn into ...
1037 (ia64_target::get_regs_info): ...this.
1038 (the_low_target): Remove the op field.
1039 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1040 (m32r_regs_info): Turn into ...
1041 (m32r_target::get_regs_info): ...this.
1042 (the_low_target): Remove the op field.
1043 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1044 (m68k_regs_info): Turn into ...
1045 (m68k_target::get_regs_info): ...this.
1046 (the_low_target): Remove the op field.
1047 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1048 (mips_regs_info): Turn into ...
1049 (mips_target::get_regs_info): ...this.
1050 (the_low_target): Remove the op field.
1051 (get_usrregs_info): Update the call to the op.
1052 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1053 (nios2_regs_info): Turn into ...
1054 (nios2_target::get_regs_info): ...this.
1055 (the_low_target): Remove the op field.
1056 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1057 (ppc_regs_info): Turn into ...
1058 (ppc_target::get_regs_info): ...this.
1059 (the_low_target): Remove the op field.
1060 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1061 (riscv_regs_info): Turn into ...
1062 (riscv_target::get_regs_info): ...this.
1063 (the_low_target): Remove the op field.
1064 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1065 (s390_regs_info): Turn into ...
1066 (s390_target::get_regs_info): ...this.
1067 (the_low_target): Remove the op field.
1068 (s390_collect_ptrace_register)
1069 (s390_supply_ptrace_register)
1070 (s390_fill_gregset): Update the call to the op.
1071 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1072 (sh_regs_info): Turn into ...
1073 (sh_target::get_regs_info): ...this.
1074 (the_low_target): Remove the op field.
1075 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1076 (sparc_regs_info): Turn into ...
1077 (sparc_target::get_regs_info): ...this.
1078 (the_low_target): Remove the op field.
1079 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1080 (tic6x_regs_info): Turn into ...
1081 (tic6x_target::get_regs_info): ...this.
1082 (the_low_target): Remove the op field.
1083 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1084 (tile_regs_info): Turn into ...
1085 (tile_target::get_regs_info): ...this.
1086 (the_low_target): Remove the op field.
1087 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1088 Declare.
1089 (xtensa_regs_info): Turn into ...
1090 (xtensa_target::get_regs_info): ...this.
1091 (the_low_target): Remove the op field.
1092
10932020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1094
1095 Turn the 'arch_setup' linux target op into a method of
1096 linux_process_target.
1097
1098 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1099 (class linux_process_target) <arch_setup_thread>
1100 <low_arch_setup>: New declarations.
1101 * linux-low.cc (linux_arch_setup): Delete.
1102 (linux_arch_setup_thread): Turn into...
1103 (linux_process_target::arch_setup_thread): ... this.
1104
1105 Update the callers below.
1106
1107 (linux_process_target::handle_extended_wait)
1108 (linux_process_target::post_create_inferior)
1109 (linux_process_target::filter_event)
1110
1111 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1112 declaration.
1113 (x86_linux_update_xmltarget): Turn into...
1114 (x86_target::update_xmltarget): ...this.
1115 (x86_linux_process_qsupported): Update the call to
1116 x86_linux_update_xmltarget.
1117 (x86_arch_setup): Turn into ...
1118 (x86_target::low_arch_setup): ...this.
1119 (the_low_target): Remove the op field.
1120 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1121 declaration.
1122 (aarch64_arch_setup): Turn into ...
1123 (aarch64_target::low_arch_setup): ...this.
1124 (the_low_target): Remove the op field.
1125 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1126 declaration.
1127 (arm_arch_setup): Turn into ...
1128 (arm_target::low_arch_setup): ...this.
1129 (the_low_target): Remove the op field.
1130 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1131 declaration.
1132 (bfin_arch_setup): Turn into ...
1133 (bfin_target::low_arch_setup): ...this.
1134 (the_low_target): Remove the op field.
1135 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1136 declaration.
1137 (cris_arch_setup): Turn into ...
1138 (cris_target::low_arch_setup): ...this.
1139 (the_low_target): Remove the op field.
1140 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1141 declaration.
1142 (crisv32_arch_setup): Turn into ...
1143 (crisv32_target::low_arch_setup): ...this.
1144 (the_low_target): Remove the op field.
1145 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1146 declaration.
1147 (ia64_arch_setup): Turn into ...
1148 (ia64_target::low_arch_setup): ...this.
1149 (the_low_target): Remove the op field.
1150 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1151 declaration.
1152 (m32r_arch_setup): Turn into ...
1153 (m32r_target::low_arch_setup): ...this.
1154 (the_low_target): Remove the op field.
1155 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1156 declaration.
1157 (m68k_arch_setup): Turn into ...
1158 (m68k_target::low_arch_setup): ...this.
1159 (the_low_target): Remove the op field.
1160 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1161 declaration.
1162 (mips_arch_setup): Turn into ...
1163 (mips_target::low_arch_setup): ...this.
1164 (the_low_target): Remove the op field.
1165 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1166 declaration.
1167 (nios2_arch_setup): Turn into ...
1168 (nios2_target::low_arch_setup): ...this.
1169 (the_low_target): Remove the op field.
1170 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1171 declaration.
1172 (ppc_arch_setup): Turn into ...
1173 (ppc_target::low_arch_setup): ...this.
1174 (the_low_target): Remove the op field.
1175 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1176 declaration.
1177 (riscv_arch_setup): Turn into ...
1178 (riscv_target::low_arch_setup): ...this.
1179 (the_low_target): Remove the op field.
1180 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1181 declaration.
1182 (s390_arch_setup): Turn into ...
1183 (s390_target::low_arch_setup): ...this.
1184 (the_low_target): Remove the op field.
1185 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1186 declaration.
1187 (sh_arch_setup): Turn into ...
1188 (sh_target::low_arch_setup): ...this.
1189 (the_low_target): Remove the op field.
1190 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1191 declaration.
1192 (sparc_arch_setup): Turn into ...
1193 (sparc_target::low_arch_setup): ...this.
1194 (the_low_target): Remove the op field.
1195 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1196 declaration.
1197 (tic6x_arch_setup): Turn into ...
1198 (tic6x_target::low_arch_setup): ...this.
1199 (the_low_target): Remove the op field.
1200 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1201 declaration.
1202 (tile_arch_setup): Turn into ...
1203 (tile_target::low_arch_setup): ...this.
1204 (the_low_target): Remove the op field.
1205 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1206 declaration.
1207 (xtensa_arch_setup): Turn into ...
1208 (xtensa_target::low_arch_setup): ...this.
1209 (the_low_target): Remove the op field.
1210
12112020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1212
1213 * linux-low.h (the_linux_target): New extern declaration.
1214 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1215 'the_target'.
1216 (the_linux_target): Remove.
1217 * linux-x86-low.cc (class x86_target): New class.
1218 (the_x86_target): New static object.
1219 (the_linux_target): Define as pointer to the_x86_target.
1220 * linux-aarch64-low.cc (class aarch64_target): New class.
1221 (the_aarch64_target): New static object.
1222 (the_linux_target): Define as pointer to the_aarch64_target.
1223 * linux-arm-low.cc (class arm_target): New class.
1224 (the_arm_target): New static object.
1225 (the_linux_target): Define as pointer to the_arm_target.
1226 * linux-bfin-low.cc (class bfin_target): New class.
1227 (the_bfin_target): New static object.
1228 (the_linux_target): Define as pointer to the_bfin_target.
1229 * linux-cris-low.cc (class cris_target): New class.
1230 (the_cris_target): New static object.
1231 (the_linux_target): Define as pointer to the_cris_target.
1232 * linux-crisv32-low.cc (class crisv32_target): New class.
1233 (the_crisv32_target): New static object.
1234 (the_linux_target): Define as pointer to the_crisv32_target.
1235 * linux-ia64-low.cc (class ia64_target): New class.
1236 (the_ia64_target): New static object.
1237 (the_linux_target): Define as pointer to the_ia64_target.
1238 * linux-m32r-low.cc (class m32r_target): New class.
1239 (the_m32r_target): New static object.
1240 (the_linux_target): Define as pointer to the_m32r_target.
1241 * linux-m68k-low.cc (class m68k_target): New class.
1242 (the_m68k_target): New static object.
1243 (the_linux_target): Define as pointer to the_m68k_target.
1244 * linux-mips-low.cc (class mips_target): New class.
1245 (the_mips_target): New static object.
1246 (the_linux_target): Define as pointer to the_mips_target.
1247 * linux-nios2-low.cc (class nios2_target): New class.
1248 (the_nios2_target): New static object.
1249 (the_linux_target): Define as pointer to the_nios2_target.
1250 * linux-ppc-low.cc (class ppc_target): New class.
1251 (the_ppc_target): New static object.
1252 (the_linux_target): Define as pointer to the_ppc_target.
1253 * linux-riscv-low.cc (class riscv_target): New class.
1254 (the_riscv_target): New static object.
1255 (the_linux_target): Define as pointer to the_riscv_target.
1256 * linux-s390-low.cc (class s390_target): New class.
1257 (the_s390_target): New static object.
1258 (the_linux_target): Define as pointer to the_s390_target.
1259 * linux-sh-low.cc (class sh_target): New class.
1260 (the_sh_target): New static object.
1261 (the_linux_target): Define as pointer to the_sh_target.
1262 * linux-sparc-low.cc (class sparc_target): New class.
1263 (the_sparc_target): New static object.
1264 (the_linux_target): Define as pointer to the_sparc_target.
1265 * linux-tic6x-low.cc (class tic6x_target): New class.
1266 (the_tic6x_target): New static object.
1267 (the_linux_target): Define as pointer to the_tic6x_target.
1268 * linux-tile-low.cc (class tile_target): New class.
1269 (the_tile_target): New static object.
1270 (the_linux_target): Define as pointer to the_tile_target.
1271 * linux-xtensa-low.cc (class xtensa_target): New class.
1272 (the_xtensa_target): New static object.
1273 (the_linux_target): Define as pointer to the_xtensa_target.
1274
12752020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1276
1277 Turn some static functions in linux-low.cc into private methods of
1278 linux_process_target.
1279
1280 * linux-low.cc (handle_extended_wait): Turn into ...
1281 (linux_process_target::handle_extended_wait): ...this. Call
1282 'mourn' on 'this' object instead of 'the_target'.
1283 (maybe_move_out_of_jump_pad): Turn into...
1284 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1285 (linux_low_filter_event): Turn into...
1286 (linux_process_target::filter_event): ...this.
1287 (linux_wait_for_event_filtered): Turn into...
1288 (linux_process_target::wait_for_event_filtered): ...this.
1289 (linux_wait_for_event): Turn into...
1290 (linux_process_target::wait_for_event): ...this.
1291 (linux_wait_1): Turn into...
1292 (linux_process_target::wait_1): ...this.
1293 (wait_for_sigstop): Turn into...
1294 (linux_process_target::wait_for_sigstop): ...this.
1295 (move_out_of_jump_pad_callback): Turn into...
1296 (linux_process_target::move_out_of_jump_pad): ...this.
1297 (stop_all_lwps): Turn into...
1298 (linux_process_target::stop_all_lwps): ...this.
1299 (start_step_over): Turn into...
1300 (linux_process_target::start_step_over): ...this.
1301 (complete_ongoing_step_over): Turn into...
1302 (linux_process_target::complete_ongoing_step_over): ...this.
1303 (proceed_all_lwps): Turn into...
1304 (linux_process_target::proceed_all_lwps): ...this.
1305 (unstop_all_lwps): Turn into...
1306 (linux_process_target::unstop_all_lwps): ...this.
1307
1308 * linux-low.h (class linux_process_target)
1309 <handle_extended_wait>
1310 <maybe_move_out_of_jump_pad>
1311 filter_event>
1312 <wait_for_event_filtered>
1313 <wait_for_event>
1314 <wait_1>
1315 <wait_for_sigstop>
1316 <move_out_of_jump_pad>
1317 <stop_all_lwps>
1318 <start_step_over>
1319 <complete_ongoing_step_over>
1320 <proceed_all_lwps>
1321 <unstop_all_lwps>: Declare.
1322
1323 Update the callers below.
1324
1325 * linux-low.cc (linux_process_target::attach): Update.
1326 (linux_process_target::stabilize_threads): Ditto.
1327 (linux_process_target::wait): Ditto.
1328
13292020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1330
1331 * linux-low.h (struct linux_target_ops): Update the comment for
1332 'cannot_store_register' to return 0 or 1.
1333 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1334 of 2.
1335
13362020-03-20 Simon Marchi <simon.marchi@efficios.com>
1337
1338 * config.in: Re-generate.
1339 * configure: Re-generate.
1340
13412020-03-17 Kamil Rytarowski <n54@gmx.com>
1342
1343 * regcache.cc (find_register_by_number): Update.
1344 * tdesc.cc (init_target_desc): Likewise.
1345 * tdesc.h (target_desc::reg_defs): Likewise.
1346
13472020-03-12 Tom Tromey <tom@tromey.com>
1348
1349 * configure: Rebuild.
1350 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1351 (WIN32APILIBS): New subst.
1352 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1353 gdbsupport files.
1354 (gdbsupport/%.o): Remove target.
1355 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1356 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1357 (WIN32APILIBS): New variable.
1358 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1359 (gdbreplay$(EXEEXT)): Likewise.
1360
13612020-03-12 Tom Tromey <tom@tromey.com>
1362
1363 * config.in, configure: Rebuild.
1364 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1365 * acinclude.m4: Include gettext-sister.m4.
1366 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1367 variables.
1368 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1369 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1370
13712020-03-12 Simon Marchi <simon.marchi@efficios.com>
1372
1373 * acinclude.m4: Update path to selftest.m4.
1374
13752020-03-12 Simon Marchi <simon.marchi@efficios.com>
1376
1377 * configure.ac: Don't source bfd/development.sh, move
1378 GDB_AC_COMMON higher.
1379 * configure: Re-generate.
1380
13812020-03-12 Simon Marchi <simon.marchi@efficios.com>
1382
1383 * configure: Re-generate.
1384
13852020-03-11 Simon Marchi <simon.marchi@efficios.com>
1386
1387 * configure: Re-generate.
1388
13892020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1390
1391 * .dir-locals.el: New file.
1392
13932020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1394
1395 * .gitattributes: New file.
1396
13972020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1398
1399 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1400 reply into an S reply.
1401 * server.cc (disable_packet_T): New global.
1402 (captured_main): Set new global when appropriate.
1403 * server.h (disable_packet_T): Declare.
1404
14052020-02-21 Tom Tromey <tom@tromey.com>
1406
1407 * Makefile.in (mostlyclean): New target.
1408
14092020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1410
1411 * target.h (struct process_stratum_target): Remove.
1412 (class process_target): Rename to ...
1413 (class process_stratum_target): ... this.
1414 * linux-low.h (class linux_process_target): Derive from
1415 'process_stratum_target'.
1416 * linux-low.cc (linux_target_ops): Remove.
1417 (initialize_low): Set the_target to the singleton instance of
1418 linux_process_target.
1419 * lynx-low.h (class lynx_process_target): Derive from
1420 'process_stratum_target'.
1421 * lynx-low.cc (lynx_target_ops): Remove.
1422 (initialize_low): Set the_target to the singleton instance of
1423 lynx_process_target.
1424 * nto-low.h (class nto_process_target): Derive from
1425 'process_stratum_target'.
1426 * nto-low.cc (nto_target_ops): Remove.
1427 (initialize_low): Set the_target to the singleton instance of
1428 nto_process_target.
1429 * win32-low.h (class win32_process_target): Derive from
1430 'process_stratum_target'.
1431 * win32-low.cc (win32_target_ops): Remove.
1432 (initialize_low): Set the_target to the singleton instance of
1433 win32_process_target.
1434
1435 Replace 'the_target->pt' with 'the_target' in the uses below.
1436
1437 * hostio.cc (hostio_error)
1438 (handle_setfs)
1439 (handle_open)
1440 (handle_unlink)
1441 (handle_readlink)
1442 * linux-aarch32-low.cc (arm_breakpoint_at)
1443 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1444 * linux-arm-low.cc (arm_sigreturn_next_pc)
1445 (arm_get_hwcap)
1446 (arm_get_syscall_trapinfo)
1447 * linux-cris-low.cc (cris_breakpoint_at)
1448 * linux-crisv32-low.cc (cris_breakpoint_at)
1449 * linux-low.cc (handle_extended_wait)
1450 (linux_wait_1)
1451 (linux_read_memory)
1452 (linux_process_target::breakpoint_kind_from_pc)
1453 (linux_get_auxv)
1454 * linux-m32r-low.cc (m32r_breakpoint_at)
1455 * linux-mips-low.cc (mips_breakpoint_at)
1456 * linux-nios2-low.cc (nios2_breakpoint_at)
1457 * linux-ppc-low.cc (ppc_breakpoint_at)
1458 * linux-s390-low.cc (s390_get_hwcap)
1459 * linux-sh-low.cc (sh_breakpoint_at)
1460 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1461 (sparc_store_gregset_from_stack)
1462 (sparc_breakpoint_at)
1463 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1464 * linux-tile-low.cc (tile_breakpoint_at)
1465 * linux-x86-low.cc (x86_breakpoint_at)
1466 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1467 * mem-break.cc (bp_size)
1468 (bp_opcode)
1469 (insert_memory_breakpoint)
1470 (set_raw_breakpoint_at)
1471 (delete_raw_breakpoint)
1472 (z_type_supported)
1473 (uninsert_raw_breakpoint)
1474 (reinsert_raw_breakpoint)
1475 (validate_inserted_breakpoint)
1476 * regcache.cc (regcache_read_pc)
1477 (regcache_write_pc)
1478 * remote-utils.cc (putpkt_binary_1)
1479 (input_interrupt)
1480 (getpkt)
1481 (prepare_resume_reply)
1482 * server.cc (handle_general_set)
1483 (handle_detach)
1484 (handle_qxfer_auxv)
1485 (handle_qxfer_exec_file)
1486 (handle_qxfer_libraries_svr4)
1487 (handle_qxfer_osdata)
1488 (handle_qxfer_siginfo)
1489 (handle_qxfer_fdpic)
1490 (handle_query)
1491 (resume)
1492 (handle_v_requests)
1493 (queue_stop_reply_callback)
1494 (captured_main)
1495 * target.cc (prepare_to_access_memory)
1496 (done_accessing_memory)
1497 (read_inferior_memory)
1498 (target_write_memory)
1499 (target_stop_and_wait)
1500 (target_wait)
1501 (target_mourn_inferior)
1502 (target_continue_no_signal)
1503 (target_continue)
1504 (target_supports_multi_process)
1505 (kill_inferior)
1506 * target.h
1507 (target_create_inferior)
1508 (target_post_create_inferior)
1509 (myattach)
1510 (target_supports_fork_events)
1511 (target_supports_vfork_events)
1512 (target_supports_exec_events)
1513 (target_handle_new_gdb_connection)
1514 (detach_inferior)
1515 (mythread_alive)
1516 (fetch_inferior_registers)
1517 (store_inferior_registers)
1518 (join_inferior)
1519 (target_supports_non_stop)
1520 (target_async)
1521 (target_process_qsupported)
1522 (target_supports_catch_syscall)
1523 (target_get_ipa_tdesc_idx)
1524 (target_supports_tracepoints)
1525 (target_supports_fast_tracepoints)
1526 (target_get_min_fast_tracepoint_insn_len)
1527 (target_thread_stopped)
1528 (target_pause_all)
1529 (target_unpause_all)
1530 (target_stabilize_threads)
1531 (target_install_fast_tracepoint_jump_pad)
1532 (target_emit_ops)
1533 (target_supports_disable_randomization)
1534 (target_supports_agent)
1535 (target_enable_btrace)
1536 (target_disable_btrace)
1537 (target_read_btrace)
1538 (target_read_btrace_conf)
1539 (target_supports_range_stepping)
1540 (target_supports_stopped_by_sw_breakpoint)
1541 (target_stopped_by_sw_breakpoint)
1542 (target_supports_stopped_by_hw_breakpoint)
1543 (target_supports_hardware_single_step)
1544 (target_stopped_by_hw_breakpoint)
1545 (target_breakpoint_kind_from_pc)
1546 (target_breakpoint_kind_from_current_state)
1547 (target_supports_software_single_step)
1548 (target_core_of_thread)
1549 (target_thread_name)
1550 (target_thread_handle)
1551 * win32-low.cc (do_initial_child_stuff)
1552
1553 Rename target op default definitions listed below.
1554
1555 * target.cc (process_target::post_create_inferior): Rename as ...
1556 (process_stratum_target::post_create_inferior): ... this.
1557 (process_target::prepare_to_access_memory): Rename as ...
1558 (process_stratum_target::prepare_to_access_memory): ... this.
1559 (process_target::done_accessing_memory): Rename as ...
1560 (process_stratum_target::done_accessing_memory): ... this.
1561 (process_target::look_up_symbols): Rename as ...
1562 (process_stratum_target::look_up_symbols): ... this.
1563 (process_target::supports_read_auxv): Rename as ...
1564 (process_stratum_target::supports_read_auxv): ... this.
1565 (process_target::read_auxv): Rename as ...
1566 (process_stratum_target::read_auxv): ... this.
1567 (process_target::supports_z_point_type): Rename as ...
1568 (process_stratum_target::supports_z_point_type): ... this.
1569 (process_target::insert_point): Rename as ...
1570 (process_stratum_target::insert_point): ... this.
1571 (process_target::remove_point): Rename as ...
1572 (process_stratum_target::remove_point): ... this.
1573 (process_target::stopped_by_sw_breakpoint): Rename as ...
1574 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1575 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1576 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1577 (process_target::stopped_by_hw_breakpoint): Rename as ...
1578 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1579 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1580 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1581 (process_target::supports_hardware_single_step): Rename as ...
1582 (process_stratum_target::supports_hardware_single_step): ... this.
1583 (process_target::stopped_by_watchpoint): Rename as ...
1584 (process_stratum_target::stopped_by_watchpoint): ... this.
1585 (process_target::stopped_data_address): Rename as ...
1586 (process_stratum_target::stopped_data_address): ... this.
1587 (process_target::supports_read_offsets): Rename as ...
1588 (process_stratum_target::supports_read_offsets): ... this.
1589 (process_target::read_offsets): Rename as ...
1590 (process_stratum_target::read_offsets): ... this.
1591 (process_target::supports_get_tls_address): Rename as ...
1592 (process_stratum_target::supports_get_tls_address): ... this.
1593 (process_target::get_tls_address): Rename as ...
1594 (process_stratum_target::get_tls_address): ... this.
1595 (process_target::hostio_last_error): Rename as ...
1596 (process_stratum_target::hostio_last_error): ... this.
1597 (process_target::supports_qxfer_osdata): Rename as ...
1598 (process_stratum_target::supports_qxfer_osdata): ... this.
1599 (process_target::qxfer_osdata): Rename as ...
1600 (process_stratum_target::qxfer_osdata): ... this.
1601 (process_target::supports_qxfer_siginfo): Rename as ...
1602 (process_stratum_target::supports_qxfer_siginfo): ... this.
1603 (process_target::qxfer_siginfo): Rename as ...
1604 (process_stratum_target::qxfer_siginfo): ... this.
1605 (process_target::supports_non_stop): Rename as ...
1606 (process_stratum_target::supports_non_stop): ... this.
1607 (process_target::async): Rename as ...
1608 (process_stratum_target::async): ... this.
1609 (process_target::start_non_stop): Rename as ...
1610 (process_stratum_target::start_non_stop): ... this.
1611 (process_target::supports_multi_process): Rename as ...
1612 (process_stratum_target::supports_multi_process): ... this.
1613 (process_target::supports_fork_events): Rename as ...
1614 (process_stratum_target::supports_fork_events): ... this.
1615 (process_target::supports_vfork_events): Rename as ...
1616 (process_stratum_target::supports_vfork_events): ... this.
1617 (process_target::supports_exec_events): Rename as ...
1618 (process_stratum_target::supports_exec_events): ... this.
1619 (process_target::handle_new_gdb_connection): Rename as ...
1620 (process_stratum_target::handle_new_gdb_connection): ... this.
1621 (process_target::handle_monitor_command): Rename as ...
1622 (process_stratum_target::handle_monitor_command): ... this.
1623 (process_target::core_of_thread): Rename as ...
1624 (process_stratum_target::core_of_thread): ... this.
1625 (process_target::supports_read_loadmap): Rename as ...
1626 (process_stratum_target::supports_read_loadmap): ... this.
1627 (process_target::read_loadmap): Rename as ...
1628 (process_stratum_target::read_loadmap): ... this.
1629 (process_target::process_qsupported): Rename as ...
1630 (process_stratum_target::process_qsupported): ... this.
1631 (process_target::supports_tracepoints): Rename as ...
1632 (process_stratum_target::supports_tracepoints): ... this.
1633 (process_target::read_pc): Rename as ...
1634 (process_stratum_target::read_pc): ... this.
1635 (process_target::write_pc): Rename as ...
1636 (process_stratum_target::write_pc): ... this.
1637 (process_target::supports_thread_stopped): Rename as ...
1638 (process_stratum_target::supports_thread_stopped): ... this.
1639 (process_target::thread_stopped): Rename as ...
1640 (process_stratum_target::thread_stopped): ... this.
1641 (process_target::supports_get_tib_address): Rename as ...
1642 (process_stratum_target::supports_get_tib_address): ... this.
1643 (process_target::get_tib_address): Rename as ...
1644 (process_stratum_target::get_tib_address): ... this.
1645 (process_target::pause_all): Rename as ...
1646 (process_stratum_target::pause_all): ... this.
1647 (process_target::unpause_all): Rename as ...
1648 (process_stratum_target::unpause_all): ... this.
1649 (process_target::stabilize_threads): Rename as ...
1650 (process_stratum_target::stabilize_threads): ... this.
1651 (process_target::supports_fast_tracepoints): Rename as ...
1652 (process_stratum_target::supports_fast_tracepoints): ... this.
1653 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1654 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1655 (process_target::emit_ops): Rename as ...
1656 (process_stratum_target::emit_ops): ... this.
1657 (process_target::supports_disable_randomization): Rename as ...
1658 (process_stratum_target::supports_disable_randomization): ... this.
1659 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1660 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1661 (process_target::qxfer_libraries_svr4): Rename as ...
1662 (process_stratum_target::qxfer_libraries_svr4): ... this.
1663 (process_target::supports_agent): Rename as ...
1664 (process_stratum_target::supports_agent): ... this.
1665 (process_target::enable_btrace): Rename as ...
1666 (process_stratum_target::enable_btrace): ... this.
1667 (process_target::disable_btrace): Rename as ...
1668 (process_stratum_target::disable_btrace): ... this.
1669 (process_target::read_btrace): Rename as ...
1670 (process_stratum_target::read_btrace): ... this.
1671 (process_target::read_btrace_conf): Rename as ...
1672 (process_stratum_target::read_btrace_conf): ... this.
1673 (process_target::supports_range_stepping): Rename as ...
1674 (process_stratum_target::supports_range_stepping): ... this.
1675 (process_target::supports_pid_to_exec_file): Rename as ...
1676 (process_stratum_target::supports_pid_to_exec_file): ... this.
1677 (process_target::pid_to_exec_file): Rename as ...
1678 (process_stratum_target::pid_to_exec_file): ... this.
1679 (process_target::supports_multifs): Rename as ...
1680 (process_stratum_target::supports_multifs): ... this.
1681 (process_target::multifs_open): Rename as ...
1682 (process_stratum_target::multifs_open): ... this.
1683 (process_target::multifs_unlink): Rename as ...
1684 (process_stratum_target::multifs_unlink): ... this.
1685 (process_target::multifs_readlink): Rename as ...
1686 (process_stratum_target::multifs_readlink): ... this.
1687 (process_target::breakpoint_kind_from_pc): Rename as ...
1688 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1689 (process_target::breakpoint_kind_from_current_state): Rename as ...
1690 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1691 (process_target::thread_name): Rename as ...
1692 (process_stratum_target::thread_name): ... this.
1693 (process_target::thread_handle): Rename as ...
1694 (process_stratum_target::thread_handle): ... this.
1695 (process_target::supports_software_single_step): Rename as ...
1696 (process_stratum_target::supports_software_single_step): ... this.
1697 (process_target::supports_catch_syscall): Rename as ...
1698 (process_stratum_target::supports_catch_syscall): ... this.
1699 (process_target::get_ipa_tdesc_idx): Rename as ...
1700 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1701
17022020-02-20 Pedro Alves <palves@redhat.com>
1703
1704 * target.cc (set_target_ops): Simply copy the given target pointer
1705 instead of creating a copy of the pointed object.
1706
17072020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1708
1709 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1710 of process_target.
1711
1712 * target.h (struct process_stratum_target): Remove the target op.
1713 (class process_target): Add the target op.
1714 (target_get_ipa_tdesc_idx): Update the macro.
1715 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1716
1717 Update the derived classes and callers below.
1718
1719 * linux-low.cc (linux_target_ops): Update.
1720 (linux_get_ipa_tdesc_idx): Turn into ...
1721 (linux_process_target::get_ipa_tdesc_idx): ... this.
1722 * linux-low.h (class linux_process_target): Update.
1723 * lynx-low.cc (lynx_target_ops): Update.
1724 * nto-low.cc (nto_target_ops): Update.
1725 * win32-low.cc (win32_target_ops): Update.
1726
17272020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1728
1729 Turn process_stratum_target's supports_catch_syscall op into a
1730 method of process_target.
1731
1732 * target.h (struct process_stratum_target): Remove the target op.
1733 (class process_target): Add the target op.
1734 (target_supports_catch_syscall): Update the macro.
1735 * target.cc (process_target::supports_catch_syscall): Define.
1736
1737 Update the derived classes and callers below.
1738
1739 * linux-low.cc (linux_target_ops): Update.
1740 (linux_supports_catch_syscall): Turn into ...
1741 (linux_process_target::supports_catch_syscall): ... this.
1742 * linux-low.h (class linux_process_target): Update.
1743 * lynx-low.cc (lynx_target_ops): Update.
1744 * nto-low.cc (nto_target_ops): Update.
1745 * win32-low.cc (win32_target_ops): Update.
1746
17472020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1748
1749 Turn process_stratum_target's supports_software_single_step op
1750 into a method of process_target.
1751
1752 * target.h (struct process_stratum_target): Remove the target op.
1753 (class process_target): Add the target op.
1754 (target_supports_software_single_step): Update the macro.
1755 * target.cc (process_target::supports_software_single_step): Define.
1756
1757 Update the derived classes and callers below.
1758
1759 * linux-low.cc (linux_target_ops): Update.
1760 (linux_supports_software_single_step): Turn into ...
1761 (linux_process_target::supports_software_single_step): ... this.
1762 * linux-low.h (class linux_process_target): Update.
1763 * lynx-low.cc (lynx_target_ops): Update.
1764 * nto-low.cc (nto_target_ops): Update.
1765 * win32-low.cc (win32_target_ops): Update.
1766
17672020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1768
1769 Turn process_stratum_target's thread_name and thread_handle ops
1770 into methods of process_target.
1771
1772 * target.h (struct process_stratum_target): Remove the target ops.
1773 (class process_target): Add the target ops.
1774 (target_thread_name): Update the macro.
1775 (target_thread_handle): Update the macro.
1776 * target.cc (process_target::thread_name): Define.
1777 (process_target::thread_handle): Define.
1778
1779 Update the derived classes and callers below.
1780
1781 * linux-low.cc (linux_target_ops): Update.
1782 (linux_process_target::thread_name): Define.
1783 (linux_process_target::thread_handle): Define.
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
17892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1790
1791 Turn process_stratum_target's breakpoint_kind_from_pc,
1792 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
1793 ops into methods of process_target.
1794
1795 * target.h (struct process_stratum_target): Remove the target op.
1796 (class process_target): Add the target op.
1797 (target_breakpoint_kind_from_pc): Update the macro.
1798 (target_breakpoint_kind_from_current_state): Update the macro.
1799 (default_breakpoint_kind_from_pc): Remove declaration.
1800 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
1801 (process_target::breakpoint_kind_from_pc): ... this.
1802 (process_target::breakpoint_kind_from_current_state): Define.
1803
1804 Update the derived classes and callers below.
1805
1806 * mem-break.cc (bp_size): Update.
1807 (bp_opcode): Update.
1808 * linux-low.cc (linux_target_ops): Update.
1809 (linux_wait_1): Update.
1810 (linux_breakpoint_kind_from_pc): Turn into ...
1811 (linux_process_target::breakpoint_kind_from_pc): ... this.
1812 (linux_sw_breakpoint_from_kind): Turn into ...
1813 (linux_process_target::sw_breakpoint_from_kind): ... this.
1814 (linux_breakpoint_kind_from_current_state): Turn into ...
1815 (linux_process_target::breakpoint_kind_from_current_state): ... this.
1816 * linux-low.h (class linux_process_target): Update.
1817 * lynx-low.cc (lynx_target_ops): Update.
1818 (lynx_process_target::sw_breakpoint_from_kind): Define.
1819 * lynx-low.h (class lynx_process_target): Update.
1820 * nto-low.cc (nto_target_ops): Update.
1821 (nto_sw_breakpoint_from_kind): Turn into ...
1822 (nto_process_target::sw_breakpoint_from_kind): ... this.
1823 * nto-low.h (class nto_process_target): Update.
1824 * win32-low.cc (win32_target_ops): Update.
1825 (win32_sw_breakpoint_from_kind): Turn into ...
1826 (win32_process_target::sw_breakpoint_from_kind): ... this.
1827 * win32-low.h (class win32_process_target): Update.
1828
18292020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1830
1831 Turn process_stratum_target's multifs_open, multifs_readlink,
1832 multifs_unlink ops into methods of process_target.
1833
1834 * target.h (struct process_stratum_target): Remove the target ops.
1835 (class process_target): Add the target ops. Also add
1836 'supports_multifs'.
1837 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
1838 "sys/stat.h".
1839 (process_target::supports_multifs): Define.
1840 (process_target::multifs_open): Define.
1841 (process_target::multifs_readlink): Define.
1842 (process_target::multifs_unlink): Define.
1843
1844 Update the derived classes and callers below.
1845
1846 * hostio.cc (handle_setfs): Update.
1847 (handle_open): Update.
1848 (handle_unlink): Update.
1849 (handle_readlink): Update.
1850 * linux-low.cc (linux_target_ops): Update.
1851 (linux_process_target::supports_multifs): Define.
1852 (linux_process_target::multifs_open): Define.
1853 (linux_process_target::multifs_readlink): Define.
1854 (linux_process_target::multifs_unlink): Define.
1855 * linux-low.h (class linux_process_target): Update.
1856 * lynx-low.cc (lynx_target_ops): Update.
1857 * nto-low.cc (nto_target_ops): Update.
1858 * win32-low.cc (win32_target_ops): Update.
1859
18602020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1861
1862 Turn process_stratum_target's pid_to_exec_file op into a method
1863 of process_target.
1864
1865 * target.h (struct process_stratum_target): Remove the target op.
1866 (class process_target): Add the target op. Also add
1867 'supports_pid_to_exec_file'.
1868 * target.cc (process_target::pid_to_exec_file): Define.
1869 (process_target::supports_pid_to_exec_file): Define.
1870
1871 Update the derived classes and callers below.
1872
1873 * server.cc (handle_qxfer_exec_file): Update.
1874 (handle_query): Update.
1875 * linux-low.cc (linux_target_ops): Update.
1876 (linux_process_target::supports_pid_to_exec_file): Define.
1877 (linux_process_target::pid_to_exec_file): Define.
1878 * linux-low.h (class linux_process_target): Update.
1879 * lynx-low.cc (lynx_target_ops): Update.
1880 * nto-low.cc (nto_target_ops): Update.
1881 * win32-low.cc (win32_target_ops): Update.
1882
18832020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1884
1885 Turn process_stratum_target's supports_range_stepping op into a
1886 method of process_target.
1887
1888 * target.h (struct process_stratum_target): Remove the target op.
1889 (class process_target): Add the target op.
1890 (target_supports_range_stepping): Update the macro.
1891 * target.cc (process_target::supports_range_stepping): Define.
1892
1893 Update the derived classes and callers below.
1894
1895 * linux-low.cc (linux_target_ops): Update.
1896 (linux_supports_range_stepping): Turn into ...
1897 (linux_process_target::supports_range_stepping): ... this.
1898 * linux-low.h (class linux_process_target): Update.
1899 * lynx-low.cc (lynx_target_ops): Update.
1900 * nto-low.cc (nto_target_ops): Update.
1901 * win32-low.cc (win32_target_ops): Update.
1902
19032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1904
1905 Turn process_stratum_target's btrace-related ops (enable_btrace,
1906 disable_btrace, read_btrace, read_btrace_conf) into methods of
1907 process_target.
1908
1909 * target.h (struct process_stratum_target): Remove the target ops.
1910 (class process_target): Add the target ops.
1911 (target_enable_btrace): Update.
1912 (target_disable_btrace): Update.
1913 (target_read_btrace): Update.
1914 (target_read_btrace_conf): Update.
1915 * target.cc (process_target::enable_btrace): Define.
1916 (process_target::disable_btrace): Define.
1917 (process_target::read_btrace): Define.
1918 (process_target::read_btrace_conf): Define.
1919
1920 Update the derived classes and callers below.
1921
1922 * linux-low.cc (linux_target_ops): Update.
1923 (linux_process_target:enable_btrace): Define as a wrapper around
1924 linux_enable_btrace.
1925 (linux_low_disable_btrace): Turn into ...
1926 (linux_process_target::disable_btrace): ... this.
1927 (linux_low_read_btrace): Turn into ...
1928 (linux_process_target::read_btrace): ... this.
1929 (linux_low_btrace_conf): Turn into ...
1930 (linux_process_target::read_btrace_conf): ... this.
1931 * linux-low.h (class linux_process_target): Update.
1932 * lynx-low.cc (lynx_target_ops): Update.
1933 * nto-low.cc (nto_target_ops): Update.
1934 * win32-low.cc (win32_target_ops): Update.
1935
19362020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1937
1938 Turn process_stratum_target's supports_agent op into a method of
1939 process_target.
1940
1941 * target.h (struct process_stratum_target): Remove the target op.
1942 (class process_target): Add the target op.
1943 (target_supports_agent): Update the macro.
1944 * target.cc (process_target::supports_agent): Define.
1945
1946 Update the derived classes and callers below.
1947
1948 * linux-low.cc (linux_target_ops): Update.
1949 (linux_supports_agent): Turn into ...
1950 (linux_process_target::supports_agent): ... this.
1951 * linux-low.h (class linux_process_target): Update.
1952 * lynx-low.cc (lynx_target_ops): Update.
1953 * nto-low.cc (nto_target_ops): Update.
1954 * win32-low.cc (win32_target_ops): Update.
1955
19562020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1957
1958 Turn process_stratum_target's qxfer_libraries_svr4 op into a
1959 method of process_target.
1960
1961 * target.h (struct process_stratum_target): Remove the target op.
1962 (class process_target): Add the target op. Also add
1963 'supports_qxfer_libraries_svr4'.
1964 * target.cc (process_target::qxfer_libraries_svr4): Define.
1965 (process_target::supports_qxfer_libraries_svr4): Define.
1966
1967 Update the derived classes and callers below.
1968
1969 * server.cc (handle_qxfer_libraries_svr4): Update.
1970 (handle_query): Update.
1971 * linux-low.cc (linux_target_ops): Update.
1972 (linux_process_target::supports_qxfer_libraries_svr4): Define.
1973 (linux_qxfer_libraries_svr4): Turn into ...
1974 (linux_process_target::qxfer_libraries_svr4): ... this.
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
19802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1981
1982 Turn process_stratum_target's supports_disable_randomization op
1983 into a 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_supports_disable_randomization): Update the macro.
1988 * target.cc (process_target::supports_disable_randomization): Define.
1989
1990 Update the derived classes and callers below.
1991
1992 * linux-low.cc (linux_target_ops): Update.
1993 (linux_supports_disable_randomization): Turn into ...
1994 (linux_process_target::supports_disable_randomization): ... this.
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
20002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2001
2002 Turn process_stratum_target's emit_ops op into a method of
2003 process_target.
2004
2005 * target.h (struct process_stratum_target): Remove the target op.
2006 (class process_target): Add the target op.
2007 (target_emit_ops): Update the macro.
2008 * target.cc (process_target::emit_ops): Define.
2009
2010 Update the derived classes and callers below.
2011
2012 * linux-low.cc (linux_target_ops): Update.
2013 (linux_emit_ops): Turn into ...
2014 (linux_process_target::emit_ops): ... 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
20202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2021
2022 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2023 and get_min_fast_tracepoint_insn_len ops into methods of
2024 process_target.
2025
2026 * target.h (struct process_stratum_target): Remove the target ops.
2027 (class process_target): Add the target ops. Also add
2028 'supports_fast_tracepoints'.
2029 (target_supports_fast_tracepoints): Update the macro.
2030 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2031 (install_fast_tracepoint_jump_pad): Update and rename the macro
2032 to ...
2033 (target_install_fast_tracepoint_jump_pad): ... this.
2034 * target.cc (process_target::supports_fast_tracepoints): Define.
2035 (process_target::install_fast_tracepoint_jump_pad): Define.
2036 (process_target::get_min_fast_tracepoint_insn_len): Define.
2037
2038 Update the derived classes and callers below.
2039
2040 * tracepoint.cc (install_fast_tracepoint): Update.
2041 * linux-low.cc (linux_target_ops): Update.
2042 (linux_process_target::supports_fast_tracepoints): Define.
2043 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2044 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2045 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2046 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2047 * linux-low.h (class linux_process_target): Update.
2048 * lynx-low.cc (lynx_target_ops): Update.
2049 * nto-low.cc (nto_target_ops): Update.
2050 * win32-low.cc (win32_target_ops): Update.
2051
20522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2053
2054 Turn process_stratum_target's stabilize_threads op into a
2055 method of process_target.
2056
2057 * target.h (struct process_stratum_target): Remove the target op.
2058 (class process_target): Add the target op.
2059 (target_stabilize_threads): Update the macro.
2060 * target.cc (process_target::stabilize_threads): Define.
2061
2062 Update the derived classes and callers below.
2063
2064 * server.cc (handle_status): Update.
2065 * tracepoint.cc (cmd_qtdp): Update.
2066 (cmd_qtstart): Update.
2067 * linux-low.cc (linux_target_ops): Update.
2068 (linux_stabilize_threads): Turn into ...
2069 (linux_process_target::stabilize_threads): ... this.
2070 (linux_wait_1): Update.
2071 * linux-low.h (class linux_process_target): Update.
2072 * lynx-low.cc (lynx_target_ops): Update.
2073 * nto-low.cc (nto_target_ops): Update.
2074 * win32-low.cc (win32_target_ops): Update.
2075
20762020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2077
2078 Turn process_stratum_target's pause_all and unpause_all ops
2079 into methods of process_target.
2080
2081 * target.h (struct process_stratum_target): Remove the target ops.
2082 (class process_target): Add the target ops.
2083 (pause_all): Update the macro and rename to...
2084 (target_pause_all): ... this.
2085 (unpause_all): Update the macro and rename to...
2086 (target_unpause_all): ... this.
2087 * target.cc (process_target::pause_all): Define.
2088 (process_target::unpause_all): Define.
2089
2090 Update the derived classes and callers below.
2091
2092 * server.cc (handle_status): Update.
2093 * tracepoint.cc (clear_installed_tracepoints): Update.
2094 (cmd_qtdp): Update.
2095 (cmd_qtstart): Update.
2096 (stop_tracing): Update.
2097 (cmd_qtstatus): Update.
2098 (upload_fast_traceframes): Update.
2099 (run_inferior_command): Update.
2100 * linux-low.cc (linux_target_ops): Update.
2101 (linux_pause_all): Turn into ...
2102 (linux_process_target::pause_all): ... this.
2103 (linux_unpause_all): Turn into ...
2104 (linux_process_target::unpause_all): ... this.
2105 (linux_process_target::prepare_to_access_memory): Update.
2106 (linux_process_target::done_accessing_memory): Update.
2107 * linux-low.h (class linux_process_target): Update.
2108 * lynx-low.cc (lynx_target_ops): Update.
2109 * nto-low.cc (nto_target_ops): Update.
2110 * win32-low.cc (win32_target_ops): Update.
2111
21122020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2113
2114 Turn process_stratum_target's get_tib_address op into a method of
2115 process_target.
2116
2117 * target.h (struct process_stratum_target): Remove the target op.
2118 (class process_target): Add the target op. Also add
2119 'supports_get_tib_address'.
2120 * target.cc (process_target::get_tib_address): Define.
2121 (process_target::supports_get_tib_address): Define.
2122
2123 Update the derived classes and callers below.
2124
2125 * server.cc (handle_query): Update.
2126 * linux-low.cc (win32_target_ops): Update.
2127 * lynx-low.cc (lynx_target_ops): Update.
2128 * nto-low.cc (nto_target_ops): Update.
2129 * win32-low.cc (win32_target_ops): Update.
2130 (win32_process_target::supports_get_tib_address): Define.
2131 (win32_get_tib_address): Turn into ...
2132 (win32_process_target::get_tib_address): ... this.
2133 * win32-low.h (class win32_process_target): Update.
2134
21352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2136
2137 Turn process_stratum_target's thread_stopped op into a method of
2138 process_target.
2139
2140 * target.h (struct process_stratum_target): Remove the target op.
2141 (class process_target): Add the target op. Also add
2142 'supports_thread_stopped'.
2143 (target_thread_stopped): Update the macro.
2144 * target.cc (process_target::thread_stopped): Define.
2145 (process_target::supports_thread_stopped): Define.
2146 (prepare_to_access_memory): Update.
2147
2148 Update the derived classes and callers below.
2149
2150 * server.cc (queue_stop_reply_callback): Update.
2151 * linux-low.cc (linux_target_ops): Update.
2152 (linux_process_target::supports_thread_stopped): Define.
2153 (linux_thread_stopped): Turn into ...
2154 (linux_process_target::thread_stopped): ... this.
2155 * linux-low.h (class linux_process_target): Update.
2156 * lynx-low.cc (lynx_target_ops): Update.
2157 * nto-low.cc (nto_target_ops): Update.
2158 * win32-low.cc (win32_target_ops): Update.
2159
21602020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2161
2162 Turn process_stratum_target's read_pc and write_pc ops into
2163 methods of process_target.
2164
2165 * target.h (struct process_stratum_target): Remove the target ops.
2166 (class process_target): Add the target ops.
2167 * target.cc (process_target::read_pc): Define.
2168 (process_target::write_pc): Define.
2169
2170 Update the derived classes and callers below.
2171
2172 * regcache.cc (regcache_read_pc): Update.
2173 (regcache_write_pc): Update.
2174 * linux-low.cc (linux_target_ops): Update.
2175 (linux_read_pc): Turn into ...
2176 (linux_process_target::read_pc): ... this.
2177 (linux_write_pc): Turn into ...
2178 (linux_process_target::write_pc): ... this.
2179 * linux-low.h (class linux_process_target): Update.
2180 * lynx-low.cc (lynx_target_ops): Update.
2181 * nto-low.cc (nto_target_ops): Update.
2182 * win32-low.cc (win32_target_ops): Update.
2183
21842020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2185
2186 Turn process_stratum_target's supports_tracepoints op into a
2187 method of process_target.
2188
2189 * target.h (struct process_stratum_target): Remove the target op.
2190 (class process_target): Add the target op.
2191 (target_supports_tracepoints): Update the macro.
2192 * target.cc (process_target::supports_tracepoints): Define.
2193
2194 Update the derived classes and callers below.
2195
2196 * linux-low.cc (linux_target_ops): Update.
2197 (linux_supports_tracepoints): Turn into ...
2198 (linux_process_target::supports_tracepoints): ... this.
2199 * linux-low.h (class linux_process_target): Update.
2200 * lynx-low.cc (lynx_target_ops): Update.
2201 * nto-low.cc (nto_target_ops): Update.
2202 * win32-low.cc (win32_target_ops): Update.
2203
22042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2205
2206 Turn process_stratum_target's process_qsupported op into a method
2207 of process_target.
2208
2209 * target.h (struct process_stratum_target): Remove the target op.
2210 (class process_target): Add the target op.
2211 (target_process_qsupported): Update the macro.
2212 * target.cc (process_target::process_qsupported): Define.
2213
2214 Update the derived classes and callers below.
2215
2216 * linux-low.cc (linux_target_ops): Update.
2217 (linux_process_qsupported): Turn into ...
2218 (linux_process_target::process_qsupported): ... this.
2219 * linux-low.h (class linux_process_target): Update.
2220 * lynx-low.cc (lynx_target_ops): Update.
2221 * nto-low.cc (nto_target_ops): Update.
2222 * win32-low.cc (win32_target_ops): Update.
2223
22242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2225
2226 Turn process_stratum_target's read_loadmap op into a method of
2227 process_target.
2228
2229 * target.h (struct process_stratum_target): Remove the target op.
2230 (class process_target): Add the target op. Also add
2231 'supports_read_loadmap'.
2232 * target.cc (process_target::read_loadmap): Define.
2233 (process_target::supports_read_loadmap): Define.
2234
2235 Update the derived classes and callers below.
2236
2237 * server.cc (handle_qxfer_fdpic): Update.
2238 (handle_query): Update.
2239 * linux-low.cc (linux_target_ops): Update.
2240 (linux_process_target::supports_read_loadmap): Define.
2241 (linux_read_loadmap): Turn into ...
2242 (linux_process_target::read_loadmap): ... this.
2243 * linux-low.h (class linux_process_target): Update.
2244 * lynx-low.cc (lynx_target_ops): Update.
2245 * nto-low.cc (nto_target_ops): Update.
2246 * win32-low.cc (win32_target_ops): Update.
2247
22482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2249
2250 Turn process_stratum_target's core_of_thread op into a method of
2251 process_target.
2252
2253 * target.h (struct process_stratum_target): Remove the target op.
2254 (class process_target): Add the target op.
2255 (target_core_of_thread): Update the macro.
2256 * target.cc (process_target::core_of_thread): Define.
2257
2258 Update the derived classes and callers below.
2259
2260 * linux-low.cc (linux_target_ops): Update.
2261 (linux_process_target::core_of_thread): Define.
2262 * linux-low.h (class linux_process_target): Update.
2263 * lynx-low.cc (lynx_target_ops): Update.
2264 * nto-low.cc (nto_target_ops): Update.
2265 * win32-low.cc (win32_target_ops): Update.
2266
22672020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2268
2269 Turn process_stratum_target's handle_monitor_command op into a
2270 method of process_target.
2271
2272 * target.h (struct process_stratum_target): Remove the target op.
2273 (class process_target): Add the target op.
2274 (target_handle_monitor_command): Update the macro.
2275 * target.cc (process_target::handle_monitor_command): Define.
2276
2277 Update the derived classes and callers below.
2278
2279 * server.cc (handle_query): Update.
2280 * linux-low.cc (linux_target_ops): Update.
2281 (linux_process_target::handle_monitor_command): Define.
2282 * linux-low.h (class linux_process_target): Update.
2283 * lynx-low.cc (lynx_target_ops): Update.
2284 * nto-low.cc (nto_target_ops): Update.
2285 * win32-low.cc (win32_target_ops): Update.
2286
22872020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2288
2289 Turn process_stratum_target's handle_new_gdb_connection op into a
2290 method of process_target.
2291
2292 * target.h (struct process_stratum_target): Remove the target op.
2293 (class process_target): Add the target op.
2294 (target_handle_new_gdb_connection): Update the macro.
2295 * target.cc (process_target::handle_new_gdb_connection): Define.
2296
2297 Update the derived classes and callers below.
2298
2299 * linux-low.cc (linux_target_ops): Update.
2300 (linux_handle_new_gdb_connection): Turn into ...
2301 (linux_process_target::handle_new_gdb_connection): ... this.
2302 * linux-low.h (class linux_process_target): Update.
2303 * lynx-low.cc (lynx_target_ops): Update.
2304 * nto-low.cc (nto_target_ops): Update.
2305 * win32-low.cc (win32_target_ops): Update.
2306
23072020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2308
2309 Turn process_stratum_target's supports_fork_events,
2310 supports_vfork_events, and supports_exec_events ops into methods
2311 of process_target.
2312
2313 * target.h (struct process_stratum_target): Remove the target ops.
2314 (class process_target): Add the target ops.
2315 (target_supports_fork_events): Update the macro.
2316 (target_supports_vfork_events): Update the macro.
2317 (target_supports_exec_events): Update the macro.
2318 * target.cc (process_target::supports_fork_events): Define.
2319 (process_target::supports_vfork_events): Define.
2320 (process_target::supports_exec_events): Define.
2321
2322 Update the derived classes and callers below.
2323
2324 * linux-low.cc (linux_target_ops): Update.
2325 (linux_supports_fork_events): Turn into ...
2326 (linux_process_target::supports_fork_events): ... this.
2327 (linux_supports_vfork_events): Turn into ...
2328 (linux_process_target::supports_vfork_events): ... this.
2329 (linux_supports_exec_events): Turn into ...
2330 (linux_process_target::supports_exec_events): ... this.
2331 * linux-low.h (class linux_process_target): Update.
2332 * lynx-low.cc (lynx_target_ops): Update.
2333 * nto-low.cc (nto_target_ops): Update.
2334 * win32-low.cc (win32_target_ops): Update.
2335
23362020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2337
2338 Turn process_stratum_target's supports_multi_process op into a
2339 method of process_target.
2340
2341 * target.h (struct process_stratum_target): Remove the target op.
2342 (class process_target): Add the target op.
2343 * target.cc (process_target::supports_multi_process): Define.
2344 (target_supports_multi_process): Update.
2345
2346 Update the derived classes and callers below.
2347
2348 * linux-low.cc (linux_target_ops): Update.
2349 (linux_supports_multi_process): Turn into ...
2350 (linux_process_target::supports_multi_process): ... this.
2351 * linux-low.h (class linux_process_target): Update.
2352 * lynx-low.cc (lynx_target_ops): Update.
2353 * nto-low.cc (nto_target_ops): Update.
2354 * win32-low.cc (win32_target_ops): Update.
2355
23562020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2357
2358 Turn process_stratum_target's supports_non_stop, async, and
2359 start_non_stop ops into methods of process_target.
2360
2361 * target.h (struct process_stratum_target): Remove the target ops.
2362 (class process_target): Add the target ops.
2363 (target_supports_non_stop): Update the macro.
2364 (target_async): Update the macro.
2365 (start_non_stop): Remove declaration.
2366 * target.cc (process_target::supports_non_stop): Define.
2367 (process_target::async): Define.
2368 (process_target::start_non_stop): Define.
2369 (start_non_stop): Remove.
2370
2371 Update the derived classes and callers below.
2372
2373 * server.cc (handle_qxfer_siginfo): Update.
2374 (handle_query): Update.
2375 * linux-low.cc (linux_target_ops): Update.
2376 (linux_supports_non_stop): Turn into ...
2377 (linux_process_target::supports_non_stop): ... this.
2378 (linux_async): Turn into ...
2379 (linux_process_target::async): ... this.
2380 (linux_start_non_stop): Turn into ...
2381 (linux_process_target::start_non_stop): ... this.
2382 * linux-low.h (class linux_process_target): Update.
2383 * lynx-low.cc (lynx_target_ops): Update.
2384 * nto-low.cc (nto_target_ops): Update.
2385 (nto_supports_non_stop): Remove; rely on the default behavior
2386 instead.
2387 * win32-low.cc (win32_target_ops): Update.
2388
23892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2390
2391 Turn process_stratum_target's qxfer_siginfo op into a method of
2392 process_target.
2393
2394 * target.h (struct process_stratum_target): Remove the target op.
2395 (class process_target): Add the target op. Also add
2396 'supports_qxfer_siginfo'.
2397 * target.cc (process_target::qxfer_siginfo): Define.
2398 (process_target::supports_qxfer_siginfo): Define.
2399
2400 Update the derived classes and callers below.
2401
2402 * server.cc (handle_qxfer_siginfo): Update.
2403 (handle_query): Update.
2404 * linux-low.cc (linux_target_ops): Update.
2405 (linux_process_target::supports_qxfer_siginfo): Define.
2406 (linux_xfer_siginfo): Turn into ...
2407 (linux_process_target::qxfer_siginfo): ... 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 * win32-low.cc (win32_target_ops): Update.
2412
24132020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2414
2415 Turn process_stratum_target's qxfer_osdata op into a method of
2416 process_target.
2417
2418 * target.h (struct process_stratum_target): Remove the target op.
2419 (class process_target): Add the target op. Also add
2420 'supports_qxfer_osdata'.
2421 * target.cc (process_target::qxfer_osdata): Define.
2422 (process_target::supports_qxfer_osdata): Define.
2423
2424 Update the derived classes and callers below.
2425
2426 * server.cc (handle_qxfer_osdata): Update.
2427 (handle_query): Update.
2428 * linux-low.cc (linux_target_ops): Update.
2429 (linux_process_target::supports_qxfer_osdata): Define.
2430 (linux_qxfer_osdata): Turn into ...
2431 (linux_process_target::qxfer_osdata): ... this.
2432 * linux-low.h (class linux_process_target): Update.
2433 * lynx-low.cc (lynx_target_ops): Update.
2434 * nto-low.cc (nto_target_ops): Update.
2435 * win32-low.cc (win32_target_ops): Update.
2436
24372020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2438
2439 Turn process_stratum_target's hostio_last_error op into a
2440 method of process_target.
2441
2442 * target.h (struct process_stratum_target): Remove the target op.
2443 (class process_target): Add the target op.
2444 * target.cc: Add "hostio.h" to includes.
2445 (process_target::hostio_last_error): Define.
2446
2447 Update the derived classes and callers below.
2448
2449 * hostio.cc (hostio_error): Update.
2450 * linux-low.cc: Remove "hostio.h" from includes.
2451 (linux_target_ops): Update.
2452 * lynx-low.cc (lynx_target_ops): Update.
2453 * nto-low.cc (nto_target_ops): Update.
2454 * win32-low.h (class win32_process_target): Update.
2455 * win32-low.cc (win32_target_ops): Update.
2456 (wince_hostio_last_error): Turn into ...
2457 (win32_process_target::hostio_last_error): ... this.
2458
24592020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2460
2461 Turn process_stratum_target's get_tls_address op into a method of
2462 process_target.
2463
2464 * target.h (struct process_stratum_target): Remove the target op.
2465 (class process_target): Add the target op. Also add
2466 'supports_get_tls_address'.
2467 * target.cc (process_target::get_tls_address): Define.
2468 (process_target::supports_get_tls_address): Define.
2469
2470 Update the derived classes and callers below.
2471
2472 * server.cc (handle_query): Update.
2473 * linux-low.cc (linux_target_ops): Update.
2474 (linux_process_target::supports_get_tls_address): Define.
2475 (linux_process_target::get_tls_address): Define.
2476 * linux-low.h (class linux_process_target): Update.
2477 * lynx-low.cc (lynx_target_ops): Update.
2478 * nto-low.cc (nto_target_ops): Update.
2479 * win32-low.cc (win32_target_ops): Update.
2480
24812020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2482
2483 Turn process_stratum_target's read_offsets op into a method of
2484 process_target.
2485
2486 * target.h (struct process_stratum_target): Remove the target op.
2487 (class process_target): Add the target op. Also add
2488 'supports_read_offsets'.
2489 * target.cc (process_target::read_offsets): Define.
2490 (process_target::supports_read_offsets): Define.
2491
2492 Update the derived classes and callers below.
2493
2494 * server.cc (handle_query): Update.
2495 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2496 (linux_target_ops): Update.
2497 (linux_process_target::supports_read_offsets): Define.
2498 (linux_read_offsets): Turn into ...
2499 (linux_process_target::read_offsets): ... this.
2500 * linux-low.h (class linux_process_target): Update.
2501 * lynx-low.cc (lynx_target_ops): Update.
2502 * nto-low.cc (nto_target_ops): Update.
2503 * win32-low.cc (win32_target_ops): Update.
2504
25052020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2506
2507 Turn process_stratum_target's stopped_by_watchpoint and
2508 stopped_data_address ops into methods of process_target.
2509
2510 * target.h (struct process_stratum_target): Remove the target ops.
2511 (class process_target): Add the target ops.
2512 * target.cc (process_target::stopped_by_watchpoint): Define.
2513 (process_target::stopped_data_address): Define.
2514
2515 Update the derived classes and callers below.
2516
2517 * remote-utils.cc (prepare_resume_reply): Update.
2518 * linux-low.cc (linux_target_ops): Update.
2519 (linux_stopped_by_watchpoint): Turn into ...
2520 (linux_process_target::stopped_by_watchpoint): ... this.
2521 (linux_stopped_data_address): Turn into ...
2522 (linux_process_target::stopped_data_address): ... this.
2523 * linux-low.h (class linux_process_target): Update.
2524 * lynx-low.cc (lynx_target_ops): Update.
2525 * nto-low.cc (nto_target_ops): Update.
2526 (nto_stopped_by_watchpoint): Turn into ...
2527 (nto_process_target::stopped_by_watchpoint): ... this.
2528 (nto_stopped_data_address): Turn into ...
2529 (nto_process_target::stopped_data_address): ... this.
2530 * nto-low.h (class nto_process_target): Update.
2531 * win32-low.cc (win32_target_ops): Update.
2532 (win32_stopped_by_watchpoint): Turn into ...
2533 (win32_process_target::stopped_by_watchpoint): ... this.
2534 (win32_stopped_data_address): Turn into ...
2535 (win32_process_target::stopped_data_address): ... this.
2536 * win32-low.h (class win32_process_target): Update.
2537
25382020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2539
2540 Turn process_stratum_target's supports_hardware_single_step op into
2541 a method of process_target.
2542
2543 * target.h (struct process_stratum_target): Remove the target op.
2544 (class process_target): Add the target op.
2545 (target_supports_hardware_single_step): Update the macro.
2546 (target_can_do_hardware_single_step): Remove declaration.
2547 * target.cc (process_target::supports_hardware_single_step): Define.
2548 (target_can_do_hardware_single_step): Remove.
2549
2550 Update the derived classes and callers below.
2551
2552 * linux-low.h (class linux_process_target): Update.
2553 * linux-low.cc (linux_target_ops): Update.
2554 (linux_supports_hardware_single_step): Turn into ...
2555 (linux_process_target::supports_hardware_single_step): ... this.
2556 * lynx-low.h (class lynx_process_target): Update.
2557 * lynx-low.cc (lynx_target_ops): Update.
2558 (lynx_process_target::supports_hardware_single_step): Define.
2559 * nto-low.h (class nto_process_target): Update.
2560 * nto-low.cc (nto_target_ops): Update.
2561 (nto_process_target::supports_hardware_single_step): Define.
2562 * win32-low.h (class win32_process_target): Update.
2563 * win32-low.cc (win32_target_ops): Update.
2564 (win32_process_target::supports_hardware_single_step): Define.
2565
25662020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2567
2568 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2569 ops into methods of process_target.
2570
2571 * target.h (struct process_stratum_target): Remove the target ops.
2572 (class process_target): Add the target ops.
2573 (target_stopped_by_hw_breakpoint): Update the macro.
2574 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2575 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2576 (process_target::supports_stopped_by_hw_breakpoint): Define.
2577
2578 Update the derived classes and callers below.
2579
2580 * linux-low.cc (linux_target_ops): Update.
2581 (linux_stopped_by_hw_breakpoint): Turn into ...
2582 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2583 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2584 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2585 * linux-low.h (class linux_process_target): Update.
2586 * lynx-low.cc (lynx_target_ops): Update.
2587 * nto-low.cc (nto_target_ops): Update.
2588 * win32-low.cc (win32_target_ops): Update.
2589
25902020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2591
2592 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2593 ops into methods of process_target.
2594
2595 * target.h (struct process_stratum_target): Remove the target ops.
2596 (class process_target): Add the target ops.
2597 (target_stopped_by_sw_breakpoint): Update the macro.
2598 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2599 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2600 (process_target::supports_stopped_by_sw_breakpoint): Define.
2601
2602 Update the derived classes and callers below.
2603
2604 * linux-low.cc (linux_target_ops): Update.
2605 (linux_stopped_by_sw_breakpoint): Turn into ...
2606 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2607 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2608 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2609 * linux-low.h (class linux_process_target): Update.
2610 * lynx-low.cc (lynx_target_ops): Update.
2611 * nto-low.cc (nto_target_ops): Update.
2612 * win32-low.cc (win32_target_ops): Update.
2613
26142020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2615
2616 Turn process_stratum_target's insert_point and remove_point ops
2617 into methods of process_target.
2618
2619 * target.h (struct process_stratum_target): Remove the target ops.
2620 (class process_target): Add the target ops.
2621 * target.cc (process_target::insert_point): Define.
2622 (process_target::remove_point): Define.
2623
2624 Update the derived classes and callers below.
2625
2626 * mem-break.cc (set_raw_breakpoint_at): Update.
2627 (delete_raw_breakpoint): Update.
2628 (uninsert_raw_breakpoint): Update.
2629 (reinsert_raw_breakpoint): Update.
2630 * linux-low.cc (linux_target_ops): Update.
2631 (linux_insert_point): Turn into ...
2632 (linux_process_target::insert_point): ... this.
2633 (linux_remove_point): Turn into ...
2634 (linux_process_target::remove_point): ... this.
2635 * linux-low.h (class linux_process_target): Update.
2636 * lynx-low.cc (lynx_target_ops): Update.
2637 * nto-low.cc (nto_target_ops): Update.
2638 (nto_insert_point): Turn into ...
2639 (nto_process_target::insert_point): ... this.
2640 (nto_remove_point): Turn into ...
2641 (nto_process_target::remove_point): ... this.
2642 * nto-low.h (class nto_process_target): Update.
2643 * win32-low.cc (win32_target_ops): Update.
2644 (win32_insert_point): Turn into ...
2645 (win32_process_target::insert_point): ... this.
2646 (win32_remove_point): Turn into ...
2647 (win32_process_target::remove_point): ... this.
2648 * win32-low.h (class win32_process_target): Update.
2649
26502020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2651
2652 Turn process_stratum_target's supports_z_point_type op into a
2653 method of process_target.
2654
2655 * target.h (struct process_stratum_target): Remove the target op.
2656 (class process_target): Add the target op.
2657 * target.cc (process_target::supports_z_point_type): Define.
2658
2659 Update the derived classes and callers below.
2660
2661 * mem-break.cc (z_type_supported): Update.
2662 * linux-low.cc (linux_target_ops): Update.
2663 (linux_supports_z_point_type): Turn into ...
2664 (linux_process_target::supports_z_point_type): ... this.
2665 * linux-low.h (class linux_process_target): Update.
2666 * lynx-low.cc (lynx_target_ops): Update.
2667 * nto-low.cc (nto_target_ops): Update.
2668 (nto_supports_z_point_type): Turn into ...
2669 (nto_process_target::supports_z_point_type): ... this.
2670 * nto-low.h (class nto_process_target): Update.
2671 * win32-low.cc (win32_target_ops): Update.
2672 (win32_supports_z_point_type): Turn into ...
2673 (win32_process_target::supports_z_point_type): ... this.
2674 * win32-low.h (class win32_process_target): Update.
2675
26762020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2677
2678 Turn process_stratum_target's read_auxv op into a method of
2679 process_target.
2680
2681 * target.h (class process_stratum_target): Remove the target op.
2682 (struct process_target): Add the target op. Also add
2683 'supports_read_auxv'.
2684 * target.cc (process_target::read_auxv): Define.
2685 (process_target::supports_read_auxv): Define.
2686
2687 Update the derived classes and callers below.
2688
2689 * server.cc (handle_qxfer_auxv): Update.
2690 (handle_query): Update.
2691 * linux-low.cc (linux_target_ops): Update.
2692 (linux_process_target::supports_read_auxv): Define.
2693 (linux_read_auxv): Turn into ...
2694 (linux_process_target::read_auxv): ... this.
2695 * linux-low.h (class linux_process_target): Update.
2696 * lynx-low.cc (lynx_target_ops): Update.
2697 * nto-low.cc (nto_target_ops): Update.
2698 (nto_process_target::supports_read_auxv): Define.
2699 (nto_read_auxv): Turn into ...
2700 (nto_process_target::read_auxv): ... this.
2701 * nto-low.h (class nto_process_target): Update.
2702 * win32-low.cc (win32_target_ops): Update.
2703
27042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2705
2706 Turn process_stratum_target's request_interrupt op into a method of
2707 process_target.
2708
2709 * target.h (struct process_stratum_target): Remove the target op.
2710 (class process_target): Add the target op.
2711
2712 Update the derived classes and callers below.
2713
2714 * remote-utils.cc (putpkt_binary_1): Update.
2715 (input_interrupt): Update.
2716 (getpkt): Update.
2717 * server.cc (handle_v_requests): Update.
2718 * linux-low.cc (linux_target_ops): Update.
2719 (linux_request_interrupt): Turn into ...
2720 (linux_process_target::request_interrupt): ... this.
2721 * linux-low.h (class linux_process_target): Update.
2722 * lynx-low.cc (lynx_target_ops): Update.
2723 (lynx_request_interrupt): Turn into ...
2724 (lynx_process_target::request_interrupt): ... this.
2725 * lynx-low.h (class lynx_process_target): Update.
2726 * nto-low.cc (nto_target_ops): Update.
2727 (nto_request_interrupt): Turn into ...
2728 (nto_process_target::request_interrupt): ... this.
2729 * nto-low.h (class nto_process_target): Update.
2730 * win32-low.cc (win32_target_ops): Update.
2731 (win32_request_interrupt): Turn into ...
2732 (win32_process_target::request_interrupt): ... this.
2733 * win32-low.h (class win32_process_target): Update.
2734
27352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2736
2737 Turn process_stratum_target's look_up_symbols op into a method of
2738 process_target.
2739
2740 * target.h (struct process_stratum_target): Remove the target op.
2741 (class process_target): Add the target op.
2742 * target.cc (process_target::look_up_symbols): Define.
2743
2744 Update the derived classes and callers below.
2745
2746 * server.cc (handle_query): Update.
2747 * linux-low.cc (linux_target_ops): Update.
2748 (linux_look_up_symbols): Turn into ...
2749 (linux_process_target::look_up_symbols): ... this.
2750 * linux-low.h (class linux_process_target): Update.
2751 * lynx-low.cc (lynx_target_ops): Update.
2752 * nto-low.cc (nto_target_ops): Update.
2753 * win32-low.cc (win32_target_ops): Update.
2754
27552020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2756
2757 Turn process_stratum_target's read_memory and write_memory
2758 ops into methods of process_target.
2759
2760 * target.h (struct process_stratum_target): Remove the target ops.
2761 (class process_target): Add the target ops.
2762
2763 Update the derived classes and callers below.
2764
2765 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2766 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2767 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2768 (arm_get_syscall_trapinfo): Update.
2769 * linux-cris-low.cc (cris_breakpoint_at): Update.
2770 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2771 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2772 * linux-mips-low.cc (mips_breakpoint_at): Update.
2773 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2774 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2775 * linux-sh-low.cc (sh_breakpoint_at): Update.
2776 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2777 (sparc_store_gregset_from_stack): Update.
2778 (sparc_breakpoint_at): Update.
2779 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2780 * linux-tile-low.cc (tile_breakpoint_at): Update.
2781 * linux-x86-low.cc (x86_breakpoint_at): Update.
2782 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2783 * mem-brea.cc (insert_memory_breakpoint): Update.
2784 (validate_inserted_breakpoint): Update.
2785 * target.cc (read_inferior_memory): Update.
2786 (target_write_memory): Update.
2787 * linux-low.cc (linux_target_ops): Update.
2788 (linux_read_memory): Make a wrapper around the read_memory target
2789 op call.
2790 (linux_process_target::read_memory): Rename from linux_read_memory.
2791 (linux_write_memory): Turn into ...
2792 (linux_process_target::write_memory): ... this.
2793 * linux-low.h (class linux_process_target): Update.
2794 * lynx-low.cc (lynx_target_ops): Update.
2795 (lynx_read_memory): Turn into ...
2796 (lynx_process_target::read_memory): ... this.
2797 (lynx_write_memory): Turn into ...
2798 (lynx_process_target::write_memory): ... this.
2799 * lynx-low.h (class lynx_process_target): Update.
2800 * nto-low.cc (nto_target_ops): Update.
2801 (nto_read_memory): Turn into ...
2802 (nto_process_target::read_memory): ... this.
2803 (nto_write_memory): Turn into ...
2804 (nto_process_target::write_memory): ... this.
2805 * nto-low.h (class nto_process_target): Update.
2806 * win32-low.cc (win32_target_ops): Update.
2807 (win32_read_inferior_memory): Turn into ...
2808 (win32_process_target::read_memory): ... this.
2809 (win32_write_inferior_memory): Turn into ...
2810 (win32_process_target::write_memory): ... this.
2811 * win32-low.h (class win32_process_target): Update.
2812
28132020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2814
2815 Turn process_stratum_target's prepare_to_access_memory and
2816 done_accessing_memory ops into methods of process_target.
2817
2818 * target.h (struct process_stratum_target): Remove the target ops.
2819 (class process_target): Add the target ops.
2820 * target.cc (process_target::prepare_to_access_memory): Define.
2821 (process_target::done_accessing_memory): Define.
2822 (prepare_to_access_memory): Update.
2823 (done_accessing_memory): Update.
2824
2825 Update the derived classes and callers below.
2826
2827 * linux-low.cc (linux_target_ops): Update.
2828 (linux_prepare_to_access_memory): Turn into ...
2829 (linux_process_target::prepare_to_access_memory): ... this.
2830 (linux_done_accessing_memory): Turn into ...
2831 (linux_process_target::done_accessing_memory): ... this.
2832 * linux-low.h (class linux_process_target): Update.
2833 * lynx-low.cc (lynx_target_ops): Update.
2834 * nto-low.cc (nto_target_ops): Update.
2835 * win32-low.cc (win32_target_ops): Update.
2836
28372020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2838
2839 Turn process_stratum_target's fetch_registers and store_registers
2840 ops into methods of process_target.
2841
2842 * target.h (struct process_stratum_target): Remove the target ops.
2843 (class process_target): Add the target ops.
2844 (fetch_inferior_registers): Update the macro.
2845 (store_inferior_registers): Update the macro.
2846
2847 Update the derived classes and callers below.
2848
2849 * linux-low.cc (linux_target_ops): Update.
2850 (linux_fetch_registers): Turn into ...
2851 (linux_process_target::fetch_registers): ... this.
2852 (linux_store_registers): Turn into ...
2853 (linux_process_target::store_registers): ... this.
2854 * linux-low.h (class linux_process_target): Update.
2855 * lynx-low.cc (lynx_target_ops): Update.
2856 (lynx_fetch_registers): Turn into ...
2857 (lynx_process_target::fetch_registers): ... this.
2858 (lynx_store_registers): Turn into ...
2859 (lynx_process_target::store_registers): ... this.
2860 * lynx-low.h (class lynx_process_target): Update.
2861 * nto-low.cc (nto_target_ops): Update.
2862 (nto_fetch_registers): Turn into ...
2863 (nto_process_target::fetch_registers): ... this.
2864 (nto_store_registers): Turn into ...
2865 (nto_process_target::store_registers): ... this.
2866 * nto-low.h (class nto_process_target): Update.
2867 * win32-low.cc (win32_target_ops): Update.
2868 (win32_fetch_inferior_registers): Turn into ...
2869 (win32_process_target::fetch_registers): ... this.
2870 (win32_store_inferior_registers): Turn into ...
2871 (win32_process_target::store_registers): ... this.
2872 * win32-low.h (class win32_process_target): Update.
2873
28742020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2875
2876 Turn process_stratum_target's wait op into a method of
2877 process_target.
2878
2879 * target.h (struct process_stratum_target): Remove the target op.
2880 (class process_target): Add the target op.
2881
2882 Update the derived classes and callers below.
2883
2884 * target.cc (target_wait): Update.
2885 * linux-low.cc (linux_target_ops): Update.
2886 (linux_wait): Turn into ...
2887 (linux_process_target::wait): ... this.
2888 * linux-low.h (class linux_process_target): Update.
2889 * lynx-low.cc (lynx_target_ops): Update.
2890 (lynx_wait): Turn into ...
2891 (lynx_process_target::wait): ... this.
2892 * lynx-low.h (class lynx_process_target): Update.
2893 * nto-low.cc (nto_target_ops): Update.
2894 (nto_wait): Turn into ...
2895 (nto_process_target::wait): ... this.
2896 * nto-low.h (class nto_process_target): Update.
2897 * win32-low.cc (win32_target_ops): Update.
2898 (win32_wait): Turn into ...
2899 (win32_process_target::wait): ... this.
2900 (do_initial_child_stuff): Update.
2901 * win32-low.h (class win32_process_target): Update.
2902
29032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2904
2905 Turn process_stratum_target's resume op into a method of
2906 process_target.
2907
2908 * target.h (struct process_stratum_target): Remove the target op.
2909 (class process_target): Add the target op.
2910
2911 Update the derived classes and callers below.
2912
2913 * server.cc (resume): Update.
2914 * target.cc (target_stop_and_wait): Update.
2915 (target_continue_no_signal): Update.
2916 (target_continue): Update.
2917 * linux-low.cc (linux_target_ops): Update.
2918 (linux_resume): Turn into ...
2919 (linux_process_target::resume): ... this.
2920 * linux-low.h (class linux_process_target): Update.
2921 * lynx-low.cc (lynx_target_ops): Update.
2922 (lynx_resume): Turn into ...
2923 (lynx_process_target::resume): ... this.
2924 * lynx-low.h (class lynx_process_target): Update.
2925 * nto-low.cc (nto_target_ops): Update.
2926 (nto_resume): Turn into ...
2927 (nto_process_target::resume): ... this.
2928 * nto-low.h (class nto_process_target): Update.
2929 * win32-low.cc (win32_target_ops): Update.
2930 (win32_resume): Turn into ...
2931 (win32_process_target::resume): ... this.
2932 (win32_process_target::detach): Update.
2933 (do_initial_child_stuff): Update.
2934 * win32-low.h (class win32_process_target): Update.
2935
29362020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2937
2938 Turn process_stratum_target's thread_alive op into a method of
2939 process_target.
2940
2941 * target.h (struct process_stratum_target): Remove the target op.
2942 (class process_target): Add the target op.
2943 (mythread_alive): Update the macro.
2944
2945 Update the derived classes and callers below.
2946
2947 * linux-low.cc (linux_target_ops): Update.
2948 (linux_thread_alive): Turn into ...
2949 (linux_process_target::thread_alive): ... this.
2950 (wait_for_sigstop): Update.
2951 * linux-low.h (class linux_process_target): Update.
2952 * lynx-low.cc (lynx_target_ops): Update.
2953 (lynx_thread_alive): Turn into ...
2954 (lynx_process_target::thread_alive): ... this.
2955 * lynx-low.h (class lynx_process_target): Update.
2956 * nto-low.cc (nto_target_ops): Update.
2957 (nto_thread_alive): Turn into ...
2958 (nto_process_target::thread_alive): ... this.
2959 * nto-low.h (class nto_process_target): Update.
2960 * win32-low.cc (win32_target_ops): Update.
2961 (win32_thread_alive): Turn into ...
2962 (win32_process_target::thread_alive): ... this.
2963 * win32-low.h (class win32_process_target): Update.
2964
29652020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2966
2967 Turn process_stratum_target's join op into a method of
2968 process_target.
2969
2970 * target.h (struct process_stratum_target): Remove the target op.
2971 (class process_target): Add the target op.
2972 (join_inferior): Update the macro.
2973
2974 Update the derived classes and callers below.
2975
2976 * linux-low.cc (linux_target_ops): Update.
2977 (linux_join): Turn into ...
2978 (linux_process_target::join): ... this.
2979 * linux-low.h (class linux_process_target): Update.
2980 * lynx-low.cc (lynx_target_ops): Update.
2981 (lynx_join): Turn into ...
2982 (lynx_process_target::join): ... this.
2983 * lynx-low.h (class lynx_process_target): Update.
2984 * nto-low.cc (nto_target_ops): Update.
2985 (nto_process_target::join): Define.
2986 * nto-low.h (class nto_process_target): Update.
2987 * win32-low.cc (win32_target_ops): Update.
2988 (win32_join): Turn into ...
2989 (win32_process_target::join): ... this.
2990 * win32-low.h (class win32_process_target): Update.
2991
29922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2993
2994 Turn process_stratum_target's mourn op into a method of
2995 process_target.
2996
2997 * target.h (struct process_stratum_target): Remove the target op.
2998 (class process_target): Add the target op.
2999
3000 Update the derived classes and callers below.
3001
3002 * target.cc (target_mourn_inferior): Update.
3003 * linux-low.cc (linux_target_ops): Update.
3004 (linux_mourn): Turn into ...
3005 (linux_process_target::mourn): ... this.
3006 (handle_extended_wait): Update.
3007 (linux_process_target::kill): Update.
3008 (linux_process_target::detach): Update.
3009 * linux-low.h (class linux_process_target): Update.
3010 * lynx-low.cc (lynx_target_ops): Update.
3011 (lynx_mourn): Turn into ...
3012 (lynx_process_target::mourn): ... this.
3013 * lynx-low.h (class lynx_process_target): Update.
3014 * nto-low.cc (nto_target_ops): Update.
3015 (nto_mourn): Turn into ...
3016 (nto_process_target::mourn): ... this.
3017 * nto-low.h (class nto_process_target): Update.
3018 * win32-low.cc (win32_target_ops): Update.
3019 (win32_mourn): Turn into ...
3020 (win32_process_target::mourn): ... this.
3021 * win32-low.h (class win32_process_target): Update.
3022
30232020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3024
3025 Turn process_stratum_target's detach op into a method of
3026 process_target.
3027
3028 * target.h (struct process_stratum_target): Remove the target op.
3029 (class process_target): Add the target op.
3030 (detach_inferior): Update the macro.
3031
3032 Update the derived classes and callers below.
3033
3034 * linux-low.cc (linux_target_ops): Update.
3035 (linux_detach): Turn into ...
3036 (linux_process_target::detach): ... this.
3037 * linux-low.h (class linux_process_target): Update.
3038 * lynx-low.cc (lynx_target_ops): Update.
3039 (lynx_detach): Turn into ...
3040 (lynx_process_target::detach): ... this.
3041 * lynx-low.h (class lynx_process_target): Update.
3042 * nto-low.cc (nto_target_ops): Update.
3043 (nto_detach): Turn into ...
3044 (nto_process_target::detach): ... this.
3045 * nto-low.h (class nto_process_target): Update.
3046 * win32-low.cc (win32_target_ops): Update.
3047 (win32_detach): Turn into ...
3048 (win32_process_target::detach): ... this.
3049 * win32-low.h (class win32_process_target): Update.
3050
30512020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3052
3053 Turn process_stratum_target's kill op into a method of
3054 process_target.
3055
3056 * target.h (struct process_stratum_target): Remove the target op.
3057 (class process_target): Add the target op.
3058
3059 Update the derived classes and callers below.
3060
3061 * target.cc (kill_inferior): Update.
3062 * linux-low.cc (linux_target_ops): Update.
3063 (linux_kill): Turn into ...
3064 (linux_process_target::kill): ... this.
3065 * linux-low.h (class linux_process_target): Update.
3066 * lynx-low.cc (lynx_target_ops): Update.
3067 (lynx_kill): Turn into ...
3068 (lynx_process_target::kill): ... this.
3069 * lynx-low.h (class lynx_process_target): Update.
3070 * nto-low.cc (nto_target_ops): Update.
3071 (nto_kill): Turn into ...
3072 (nto_process_target::kill): ... this.
3073 * nto-low.h (class nto_process_target): Update.
3074 * win32-low.cc (win32_target_ops): Update.
3075 (win32_kill): Turn into ...
3076 (win32_process_target::kill): ... this.
3077 * win32-low.h (class win32_process_target): Update.
3078
30792020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3080
3081 Turn process_stratum_target's attach op into a method of
3082 process_target.
3083
3084 * target.h (struct process_stratum_target): Remove the target op.
3085 (class process_target): Add the target op.
3086 (myattach): Update the macro.
3087
3088 Update the derived classes and callers below.
3089
3090 * linux-low.cc (linux_target_ops): Update.
3091 (linux_attach): Turn into ...
3092 (linux_process_target::attach): ... this.
3093 * linux-low.h (class linux_process_target): Update.
3094 * lynx-low.cc (lynx_target_ops): Update.
3095 (lynx_attach): Turn into ...
3096 (lynx_process_target::attach): ... this.
3097 * lynx-low.h (class lynx_process_target): Update.
3098 * nto-low.cc (nto_target_ops): Update.
3099 (nto_attach): Turn into ...
3100 (nto_process_target::attach): ... this.
3101 * nto-low.h (class nto_process_target): Update.
3102 * win32-low.cc (win32_target_ops): Update.
3103 (win32_attach): Turn into ...
3104 (win32_process_target::attach): ... this.
3105 * win32-low.h (class win32_process_target): Update.
3106
31072020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3108
3109 Turn process_stratum_target's post_create_inferior op into a method
3110 of process_target.
3111
3112 * target.h (struct process_stratum_target): Remove the target op.
3113 (class process_target): Add the target op.
3114 (target_post_create_inferior): Update the macro.
3115 * target.cc (process_target::post_create_inferior): Define.
3116
3117 Update the derived classes and callers below.
3118
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_post_create_inferior): Turn into ...
3121 (linux_process_target::post_create_inferior): ... this.
3122 * linux-low.h (class linux_process_target): Update.
3123 * lynx-low.cc (lynx_target_ops): Update.
3124 * nto-low.cc (nto_target_ops): Update.
3125 * win32-low.cc (win32_target_ops): Update.
3126
31272020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3128
3129 Turn process_stratum_target's create_inferior op into a method of
3130 process_target.
3131
3132 * target.h (struct process_stratum_target): Remove the target op.
3133 (class process_target): Add the target op.
3134 (create_inferior): Rename the macro to ...
3135 (target_create_inferior): ... this.
3136
3137 Update the derived classes and callers below.
3138
3139 * server.cc (handle_v_run): Update.
3140 (captured_main): Update.
3141 (process_serial_event): Update.
3142 * linux-low.cc (linux_target_ops): Update.
3143 (linux_create_inferior): Turn into ...
3144 (linux_process_target::create_inferior): ... this.
3145 * linux-low.h (class linux_process_target): Update.
3146 * lynx-low.cc (lynx_target_ops): Update.
3147 (lynx_create_inferior): Turn into ...
3148 (lynx_process_target::create_inferior): ... this.
3149 * lynx-low.h (class lynx_process_target): Update.
3150 * nto-low.cc (nto_target_ops): Update.
3151 (nto_create_inferior): Turn into ...
3152 (nto_process_target::create_inferior): ... this.
3153 * nto-low.h (class nto_process_target): Update.
3154 * win32-low.cc (win32_target_ops): Update.
3155 (win32_create_inferior): Turn into ...
3156 (win32_process_target::create_inferior): ... this.
3157 * win32-low.h (class win32_process_target): Update.
3158
31592020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3160
3161 * target.h (class process_target): New class definition.
3162 (struct process_stratum_target) <pt>: New field with type
3163 'process_target*'.
3164 * linux-low.h (class linux_process_target): Define as a derived
3165 class of 'process_target'.
3166 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3167 as the 'pt' field.
3168 * lynx-low.h (class lynx_process_target): Define as a derived
3169 class of 'process_target'.
3170 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3171 as the 'pt' field.
3172 * nto-low.h (class nto_process_target): Define as a derived
3173 class of 'process_target'.
3174 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3175 as the 'pt' field.
3176 * win32-low.h (class win32_process_target): Define as a derived
3177 class of 'process_target'.
3178 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3179 as the 'pt' field.
3180
31812020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3182
3183 * configure: Regenerate.
3184
31852020-02-19 Maciej W. Rozycki <macro@wdc.com>
3186 Andrew Burgess <andrew.burgess@embecosm.com>
3187
3188 * linux-riscv-low.cc: New file.
3189 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3190 and nat/riscv-linux-tdesc.c.
3191 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3192 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3193 Define.
3194
31952020-02-14 Tom Tromey <tom@tromey.com>
3196
3197 * acinclude.m4: Don't include acx_configure_dir.m4.
3198 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3199 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3200 (all, install-only, uninstall, clean-info, clean)
3201 (maintainer-clean): Don't recurse.
3202 (subdir_do, all-lib): Remove.
3203 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3204 (GNULIB_H): Remove.
3205 (generated_files): Update.
3206 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3207 * configure: Rebuild.
3208 * configure.ac: Don't configure gnulib or libiberty.
3209 (GNULIB): Update.
3210
32112020-02-14 Eli Zaretskii <eliz@gnu.org>
3212
3213 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3214 preparing the command line for CreateProcess.
3215 (win32_create_inferior): Reflect the program name in debugging
3216 output that shows the process and its command line.
3217
32182020-02-13 Simon Marchi <simon.marchi@efficios.com>
3219
3220 * Makefile.in: Rename source files from .c to .cc.
3221 * %.c: Rename to %.cc.
3222 * configure.ac: Rename server.c to server.cc.
3223 * configure: Re-generate.
3224
32252020-02-13 Simon Marchi <simon.marchi@efficios.com>
3226
3227 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3228
32292020-02-12 Hannes Domani <ssbssa@yahoo.de>
3230
3231 * win32-low.c (win32_create_inferior): Set signal_pid.
3232
32332020-02-12 Maciej W. Rozycki <macro@wdc.com>
3234 Pedro Alves <palves@redhat.com>
3235
3236 Skip building gdbserver in a cross-configuration.
3237 * configure.srv: Set $gdbserver_host depending on whether $target
3238 is $host. Use $gdbserver_host instead of $host.
3239
32402020-02-11 Simon Marchi <simon.marchi@efficios.com>
3241
3242 * configure: Re-generate.
3243
32442020-02-11 Simon Marchi <simon.marchi@efficios.com>
3245
3246 * configure: Re-generate.
3247
32482020-02-11 Simon Marchi <simon.marchi@efficios.com>
3249
3250 * acinclude.m4: Update warning.m4 path.
3251
32522020-02-09 Hannes Domani <ssbssa@yahoo.de>
3253
3254 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3255 (handle_exception): Set siginfo_er.
3256 (win32_xfer_siginfo): New function.
3257
32582020-02-07 Tom Tromey <tom@tromey.com>
3259 Pedro Alves <palves@redhat.com>
3260
3261 * README: Update build documentation.
3262 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3263 host, not target.
3264 * configure.ac: Update paths.
3265 * configure: Rebuild.
3266 * acinclude.m4: Update paths.
3267 * Makefile.in: Update include paths.
3268 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3269 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3270 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3271 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3272 (%-generated.c): Update paths.
3273 * Move entire directory from ../gdb/gdbserver.
3274
32752020-01-29 Maciej W. Rozycki <macro@wdc.com>
3276
3277 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3278
32792020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3280
3281 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3282 assignment instead of srv_linux_obj.
3283
32842020-01-28 Hannes Domani <ssbssa@yahoo.de>
3285
3286 * server.c (handle_qxfer_libraries): Write segment-address with
3287 paddress.
3288
32892020-01-24 Hannes Domani <ssbssa@yahoo.de>
3290
3291 * Makefile.in (install-strip): New target.
3292 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3293 * aclocal.m4: Regenerate.
3294 * configure: Regenerate.
3295 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3296
32972020-01-24 Maciej W. Rozycki <macro@wdc.com>
3298
3299 * Makefile.in (SFILES): Adjust paths to point to real files.
3300 (OBS): Move waitstatus.o to target/waitstatus.o.
3301 (TAGS): Transform paths appropriately.
3302 (%.o): Rename to...
3303 (nat/%.o): ... this pattern rule.
3304 (%.o): Rename to...
3305 (target/%.o): ... this pattern rule.
3306 * configure.srv: Adjust paths throughout to include nat/ prefix
3307 with the revant files.
3308 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3309 * configure: Regenerate.
3310
33112020-01-24 Maciej W. Rozycki <macro@wdc.com>
3312
3313 * Makefile.in (TAGS): Remove config files from the recipe.
3314
33152020-01-14 Tom Tromey <tom@tromey.com>
3316
3317 * configure: Rebuild.
3318 * configure.ac: Remove any checks that were added to common.m4.
3319 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3320 lib-link.m4.
3321
33222020-01-14 Tom Tromey <tom@tromey.com>
3323
3324 * server.h: Include config.h.
3325 * gdbreplay.c: Include config.h.
3326 * configure: Rebuild.
3327 * configure.ac: Don't source common.host.
3328 * acinclude.m4: Update path.
3329 * Makefile.in (INCSUPPORT): New variable.
3330 (INCLUDE_CFLAGS): Add INCSUPPORT.
3331 (SFILES): Update paths.
3332 (version-generated.c): Update path to create-version.sh.
3333 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3334
33352020-01-14 Tom Tromey <tom@tromey.com>
3336
3337 * configure.ac (LIBS): Use WIN32APILIBS.
3338 (USE_WIN32API): Don't define.
3339 * configure: Rebuild.
3340
33412020-01-14 Tom Tromey <tom@tromey.com>
3342
3343 * configure: Rebuild.
3344
33452020-01-13 Simon Marchi <simon.marchi@efficios.com>
3346
3347 * Makefile.in (%-generated.c): Remove rule for files from
3348 regformats/i386.
3349
33502020-01-13 Simon Marchi <simon.marchi@efficios.com>
3351
3352 * configure: Re-generate.
3353
33542020-01-13 Simon Marchi <simon.marchi@efficios.com>
3355
3356 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3357 Define to static.
3358 * tracepoint.c (stop_tracing, flush_trace_buffer,
3359 about_to_request_buffer_space, get_trace_state_variable_value,
3360 set_trace_state_variable_value, gdb_collect): Add declaration.
3361
33622020-01-13 Simon Marchi <simon.marchi@efficios.com>
3363
3364 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3365 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3366 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3367 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3368 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3369 static.
3370
33712020-01-13 Simon Marchi <simon.marchi@efficios.com>
3372
3373 * inferiors.c: Include gdbsupport/common-inferior.h.
3374
33752020-01-13 Simon Marchi <simon.marchi@efficios.com>
3376
3377 * hostio-errno.c: Include hostio.h.
3378
33792020-01-13 Simon Marchi <simon.marchi@efficios.com>
3380
3381 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3382 prerequisite.
3383
33842020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3385
3386 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3387 * linux-arm-tdesc.h: Include arch/arm.h.
3388
33892020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3390
3391 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3392
33932020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3394
3395 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3396 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3397
33982020-01-10 Pedro Alves <palves@redhat.com>
3399
3400 * fork-child.c (post_fork_inferior): Pass target down to
3401 startup_inferior.
3402 * inferiors.c (switch_to_thread): Add process_stratum_target
3403 parameter.
3404 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3405 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3406 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3407 * remote-utils.c (prepare_resume_reply): Pass the target to
3408 switch_to_thread.
3409 * target.c (the_target): Now a process_stratum_target.
3410 (done_accessing_memory): Pass the target to switch_to_thread.
3411 (set_target_ops): Ajust to use process_stratum_target.
3412 * target.h (struct target_ops): Rename to ...
3413 (struct process_stratum_target): ... this.
3414 (the_target, set_target_ops): Adjust.
3415 (prepare_to_access_memory): Adjust comment.
3416 * win32-low.c (child_xfer_memory): Adjust to use
3417 process_stratum_target.
3418 (win32_target_ops): Now a process_stratum_target.
3419
34202020-01-06 Eli Zaretskii <eliz@gnu.org>
3421 Pedro Alves <palves@redhat.com>
3422
3423 * win32-low.c (get_child_debug_event): Extract the fatal exception
3424 from the exit status and convert to the equivalent Posix signal
3425 number.
3426 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3427 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3428
34292020-01-01 Hannes Domani <ssbssa@yahoo.de>
3430
3431 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3432
34332020-01-01 Joel Brobecker <brobecker@adacore.com>
3434
3435 * server.c (gdbserver_version): Change copyright year to 2020.
3436 * gdbreplay.c (gdbreplay_version): Likewise.
3437
34382019-12-19 Christian Biesinger <cbiesinger@google.com>
3439
3440 * configure: Regenerate.
3441 * configure.ac: Quote variable arguments of test.
3442
34432019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3444
3445 * Makefile.in: Fix build with GNU Make 3.81
3446
34472019-12-16 Tom Tromey <tromey@adacore.com>
3448
3449 * server.c (get_exec_file): Constify result.
3450
34512019-12-10 Christian Biesinger <cbiesinger@google.com>
3452
3453 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3454 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3455 * config.in: Regenerate.
3456 * configure: Regenerate.
3457 * configure.ac: Don't check for strerror.
3458 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3459 Call safe_strerror instead of strerror.
3460 * server.h (strerror): Remove this now-unnecessary declaration.
3461 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3462 strerror.
3463 (gdb_agent_helper_thread): Likewise.
3464 * utils.c (perror_with_name): Likewise.
3465
34662019-11-26 Tom Tromey <tom@tromey.com>
3467
3468 * configure, config.in: Rebuild.
3469
34702019-11-26 Tom Tromey <tom@tromey.com>
3471
3472 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3473 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3474 gdb_sigmask.
3475 * configure, config.in: Rebuild.
3476
34772019-11-26 Tom Tromey <tom@tromey.com>
3478
3479 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3480 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3481 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3482 * acinclude.m4: Include ax_pthread.m4.
3483 * config.in, configure: Rebuild.
3484
34852019-11-26 Christian Biesinger <cbiesinger@google.com>
3486
3487 * debug.c (debug_set_output): Call safe_strerror instead of
3488 strerror.
3489 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3490 (linux_kill_one_lwp): Likewise.
3491 (linux_detach_one_lwp): Likewise.
3492 (linux_wait_for_event_filtered): Likewise.
3493 (store_register): Likewise.
3494 * lynx-low.c (lynx_attach): Likewise.
3495 * mem-break.c (insert_memory_breakpoint): Likewise.
3496 (remove_memory_breakpoint): Likewise.
3497 (delete_fast_tracepoint_jump): Likewise.
3498 (set_fast_tracepoint_jump): Likewise.
3499 (uninsert_fast_tracepoint_jumps_at): Likewise.
3500 (reinsert_fast_tracepoint_jumps_at): Likewise.
3501 * nto-low.c (nto_xfer_memory): Likewise.
3502 (nto_resume): Likewise.
3503
35042019-11-20 Luis Machado <luis.machado@linaro.org>
3505
3506 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3507 instead of register count.
3508 * tdesc.c (tdesc_contains_feature): New function.
3509 * tdesc.h (tdesc_contains_feature): New prototype.
3510
35112019-11-15 Christian Biesinger <cbiesinger@google.com>
3512
3513 * Makefile.in: Add safe-strerror.c.
3514 * configure: Regenerate.
3515 * configure.ac: Don't source common.host.
3516
35172019-11-15 Christian Biesinger <cbiesinger@google.com>
3518
3519 * config.in: Regenerate.
3520 * configure: Regenerate.
3521
35222019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3523
3524 * ax.c (ax_printf): Handle size_t_arg.
3525
35262019-11-06 Christian Biesinger <cbiesinger@google.com>
3527
3528 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3529 * mi/mi-main.c (output_cores): Likewise.
3530 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3531 (linux_xfer_osdata_modules): Likewise.
3532 * remote.c (register_remote_support_xml): Likewise.
3533 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3534 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3535
35362019-11-01 Christian Biesinger <cbiesinger@google.com>
3537
3538 * configure: Regenerate.
3539 * configure.ac: Remove check for strerror_r.
3540
35412019-10-31 Christian Biesinger <cbiesinger@google.com>
3542
3543 * config.in: Regenerate.
3544 * configure: Regenerate.
3545 * configure.ac: Also check for strerror_r.
3546
35472019-10-31 Christian Biesinger <cbiesinger@google.com>
3548
3549 * ax.h (debug_agent): Remove duplicate declaration.
3550
35512019-10-26 Tom de Vries <tdevries@suse.de>
3552
3553 * linux-aarch64-low.c: Fix typos in comments.
3554 * linux-arm-low.c: Same.
3555 * linux-low.c: Same.
3556 * linux-ppc-low.c: Same.
3557 * proc-service.c: Same.
3558 * regcache.h: Same.
3559 * server.c: Same.
3560 * tracepoint.c: Same.
3561 * win32-low.c: Same.
3562
35632019-10-25 Tom Tromey <tromey@adacore.com>
3564
3565 * utils.c (xstrdup): Remove.
3566
35672019-10-23 Tom Tromey <tom@tromey.com>
3568
3569 * configure, config.in: Rebuild.
3570
35712019-10-23 Tom Tromey <tom@tromey.com>
3572
3573 * configure: Rebuild.
3574 * acinclude.m4: Use m4_include, not sinclude.
3575
35762019-10-17 Tom Tromey <tromey@adacore.com>
3577
3578 * configure: Rebuild.
3579 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3580 in AC_CONFIG_FILES invocation.
3581 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3582 invocation.
3583
35842019-10-16 Christian Biesinger <cbiesinger@google.com>
3585
3586 * server.c: Include xml-builtin.h.
3587 (get_xml_features): Don't declare xml_builtins here.
3588
35892019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3590
3591 * Makefile.in: Remove references to vec-ipa.o.
3592
35932019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3594
3595 * Makefile.in: Remove references to vec.c.
3596
35972019-10-02 Christian Biesinger <cbiesinger@google.com>
3598
3599 * server.c (server_waiting): Change to bool.
3600 (extended_protocol): Likewise.
3601 (response_needed): Likewise.
3602 (exit_requested): Likewise.
3603 (run_once): Likewise.
3604 (report_no_resumed): Likewise.
3605 (non_stop): Likewise.
3606 (disable_packet_vCont): Likewise.
3607 (disable_packet_Tthread): Likewise.
3608 (disable_packet_qC): Likewise.
3609 (disable_packet_qfThreadInfo): Likewise.
3610 (handle_general_set): Update.
3611 (handle_detach): Update.
3612 (handle_monitor_command): Update.
3613 (handle_query): Update.
3614 (captured_main): Update.
3615 (process_serial_event): Update.
3616 * server.h (server_waiting): Change to bool.
3617 (disable_packet_vCont): Likewise.
3618 (disable_packet_Tthread): Likewise.
3619 (disable_packet_qC): Likewise.
3620 (disable_packet_qfThreadInfo): Likewise.
3621 (run_once): Likewise.
3622 (non_stop): Likewise.
3623 * target.c (target_stop_and_wait): Update.
3624
36252019-10-02 Tom Tromey <tromey@adacore.com>
3626
3627 * Makefile.in (SFILES): Add common-inferior.c.
3628 (OBS): Add common-inferior.o.
3629 * server.c (startup_with_shell): Don't define.
3630
36312019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3632
3633 * linux-low.c (linux_low_read_btrace): Update for change to
3634 std::vector.
3635
36362019-09-20 Christian Biesinger <cbiesinger@google.com>
3637
3638 * debug.c (debug_threads): Remove comment in favor of the header.
3639 * debug.h (using_threads): Add declaration.
3640 (debug_threads): Add comment.
3641 * linux-aarch64-low.c: Include debug.h and remove declaration of
3642 debug_threads.
3643 * nto-low.c: Likewise.
3644 * remote-utils.c: Likewise.
3645 * thread-db.c: Likewise.
3646
36472019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3648
3649 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3650 and powerpc-cell64l-ipa.o.
3651 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3652 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3653 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3654 (spu*-*-*): Remove.
3655
3656 * spu-low.c: Remove file.
3657
3658 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3659 (parse_spufs_run): Remove.
3660 (ppc_get_pc): Remove Cell/B.E. support.
3661 (ppc_set_pc): Likewise.
3662 (ppc_breakpoint_at): Likewise.
3663 (ppc_arch_setup): Likewise.
3664 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3665 tdesc_powerpc_cell32l.
3666 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3667 or init_registers_powerpc_cell32l.
3668 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3669 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3670 or init_registers_powerpc_cell32l.
3671 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3672 (init_registers_powerpc_cell32l): Remove prototype.
3673 (init_registers_powerpc_cell64l): Likewise.
3674
3675 * target.h (struct target_ops): Remove qxfer_spu member.
3676 * server.c (handle_qxfer_spu): Remove.
3677 (qxfer_packets): Remove entry for "spu".
3678 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3679 * linux-low.c (SPUFS_MAGIC): Remove.
3680 (spu_enumerate_spu_ids): Remove.
3681 (linux_qxfer_spu): Remove.
3682 (linux_target_ops): Remove qxfer_spu member.
3683 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3684 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3685 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3686
36872019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3688
3689 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3690 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3691 * config.in: Regenerate.
3692 * configure: Regenerate.
3693
36942019-08-15 Tom Tromey <tromey@adacore.com>
3695
3696 * target.c (target_write_memory): Use gdb::byte_vector.
3697
36982019-08-15 Tom Tromey <tromey@adacore.com>
3699
3700 * tracepoint.c (write_inferior_data_pointer)
3701 (write_inferior_integer, write_inferior_int8)
3702 (write_inferior_uinteger, m_tracepoint_action_download)
3703 (r_tracepoint_action_download, x_tracepoint_action_download)
3704 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3705 (download_agent_expr, download_tracepoint_1)
3706 (download_trace_state_variables, upload_fast_traceframes): Update.
3707 * server.c (gdb_write_memory): Update.
3708 * remote-utils.c (relocate_instruction): Update.
3709 * proc-service.c (ps_pdwrite): Update.
3710 * mem-break.c (remove_memory_breakpoint)
3711 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3712 (uninsert_fast_tracepoint_jumps_at)
3713 (reinsert_fast_tracepoint_jumps_at): Update.
3714 * linux-x86-low.c (append_insns)
3715 (i386_install_fast_tracepoint_jump_pad)
3716 (amd64_write_goto_address, i386_write_goto_address): Update.
3717 * linux-s390-low.c (append_insns, s390_write_goto_address):
3718 Update.
3719 * linux-ppc-low.c (ppc_relocate_instruction)
3720 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3721 (ppc_write_goto_address): Update.
3722 * linux-aarch64-low.c (append_insns): Update.
3723 * target.h (struct target_ops): Update.
3724 (write_inferior_memory): Don't declare.
3725 * target.c (target_write_memory): Rename from
3726 write_inferior_memory. Remove old target_write_memory.
3727
37282019-08-15 Tom Tromey <tromey@adacore.com>
3729
3730 * target.c (write_inferior_memory): Use std::vector.
3731
37322019-08-06 Frank Ch. Eigler <fche@redhat.com>
3733
3734 PR build/24886
3735 * configure.ac: Drop enable-libmcheck support.
3736 * configure, config.in: Rebuild.
3737 * acinclude.m4: Don't include it.
3738
37392019-07-19 Alan Hayward <alan.hayward@arm.com>
3740
3741 * configure.srv: Remove Arm xml files.
3742
37432019-07-19 Alan Hayward <alan.hayward@arm.com>
3744
3745 * configure.srv: Add new files. Remove xml generated files.
3746 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3747 registers.
3748 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3749 * linux-aarch32-tdesc.c: New file.
3750 * linux-aarch32-tdesc.h: New file.
3751 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3752 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3753 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3754 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3755 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3756 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3757 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3758 (arm_read_description): Call arm_linux_read_description.
3759 (initialize_low_arch): Don't init registers.
3760 * linux-arm-tdesc.c: New file.
3761 * linux-arm-tdesc.h: New file.
3762
37632019-07-10 Alan Hayward <alan.hayward@arm.com>
3764
3765 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3766 Move counter inside for.
3767 (arm_read_description): Check ptrace earlier.
3768 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3769
37702019-07-09 Tom Tromey <tom@tromey.com>
3771
3772 * configure: Rebuild.
3773 * configure.ac: Change common to gdbsupport.
3774 * acinclude.m4: Change common to gdbsupport.
3775 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3776 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3777 common to gdbsupport.
3778 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3779 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3780 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3781 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3782 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3783 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3784 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3785 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3786 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3787 common to gdbsupport.
3788
37892019-07-04 Alan Hayward <alan.hayward@arm.com>
3790
3791 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
3792 defines.
3793 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
3794
37952019-07-04 Alan Hayward <alan.hayward@arm.com>
3796
3797 * configure.srv: Remove legacy xml.
3798 * linux-aarch64-low.c (initialize_low_arch): Remove
3799 initialize_low_tdesc call.
3800 * linux-aarch64-tdesc-selftest.c: Remove file.
3801 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
3802 * linux-x86-low.c (initialize_low_arch): Remove
3803 initialize_low_tdesc call.
3804 * linux-x86-tdesc-selftest.c: Remove file.
3805 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
3806
38072019-06-20 Tom de Vries <tdevries@suse.de>
3808
3809 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
3810 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
3811
38122019-06-19 Tom de Vries <tdevries@suse.de>
3813
3814 * debug.h (debug_write): Change return type to ssize_t.
3815 * debug.c (debug_write): Same.
3816
38172019-06-14 Tom Tromey <tom@tromey.com>
3818
3819 * configure.ac: Use new path to gnulib.
3820 * configure: Rebuild.
3821 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
3822 to gnulib.
3823
38242019-06-11 Tom Tromey <tom@tromey.com>
3825
3826 * Makefile.in (SFILES): Add alloc.c.
3827 (OBS): Add alloc.o.
3828 (IPA_OBJS): Add alloc-ipa.o.
3829 (alloc-ipa.o): New target.
3830 (%.o: ../%.c): New pattern rule.
3831
38322019-06-10 Tom Tromey <tromey@adacore.com>
3833
3834 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
3835 end warning with a newline.
3836 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
3837 newline.
3838 * thread-db.c (attach_thread): Don't end warning with a newline.
3839 (thread_db_notice_clone): Likewise.
3840 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
3841 newline.
3842 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
3843 end warning with a newline.
3844
38452019-06-04 Pedro Alves <palves@redhat.com>
3846
3847 * server.c (captured_main): Use make_unique_xstrdup.
3848
38492019-06-02 Tom Tromey <tom@tromey.com>
3850
3851 * gdbreplay.c (fromhex): Remove.
3852 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
3853
38542019-05-29 Tom Tromey <tromey@adacore.com>
3855
3856 * configure: Rebuild.
3857
38582019-05-06 Kevin Buettner <kevinb@redhat.com>
3859
3860 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
3861 sign extension code on 32-bit builds.
3862
38632019-05-03 Eli Zaretskii <eliz@gnu.org>
3864
3865 * remote-utils.c:
3866 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
3867
38682019-04-19 Tom Tromey <tom@tromey.com>
3869
3870 * server.c (struct vstop_notif): Derive from notif_event.
3871 <base>: Remove.
3872 (queue_stop_reply): Update.
3873 (remove_all_on_match_ptid): Change type. Rewrite.
3874 (discard_queued_stop_replies): Rewrite.
3875 (in_queued_stop_replies_ptid): Change type.
3876 (in_queued_stop_replies): Rewrite.
3877 (notif_stop): Update.
3878 (queue_stop_reply_callback): Update.
3879 (captured_main): Don't call initialize_notif.
3880 (push_stop_notification): Update.
3881 * notif.c (notif_write_event, handle_notif_ack)
3882 (notif_event_enque, notif_push): Update.
3883 (notif_event_xfree, initialize_notif): Remove.
3884 * notif.h (struct notif_event): Include <list>, not
3885 "common/queue.h".
3886 (struct notif_server) <queue>: Now a std::list.
3887 (notif_event_p): Remove typedef.
3888 (initialize_notif): Don't declare.
3889 (struct notif_event): Add virtual destructor.
3890
38912019-04-17 Alan Hayward <alan.hayward@arm.com>
3892
3893 * ax.c (ax_vdebug): Call debug_printf.
3894 * debug.c (debug_write): New function.
3895 * debug.h (debug_write): New declaration.
3896 * linux-low.c (sigchld_handler): Call debug_write.
3897
38982019-04-17 Alan Hayward <alan.hayward@arm.com>
3899
3900 * debug.c (debug_set_output): New function.
3901 (debug_vprintf): Send output to debug_file.
3902 (debug_flush): Likewise.
3903 * debug.h (debug_set_output): New declaration.
3904 * server.c (handle_monitor_command): Add debug-file option.
3905 (captured_main): Likewise.
3906
39072019-04-17 Alan Hayward <alan.hayward@arm.com>
3908
3909 * debug.c (remote_debug): Add definition.
3910 * debug.h (remote_debug): Add declaration.
3911 * hostio.c (remote_debug): Remove declaration.
3912 * remote-utils.c (struct ui_file): Likewise.
3913 (remote_debug): Likewise.
3914 * remote-utils.h (remote_debug): Likewise,
3915 * server.c (remote_debug): Remove definition.
3916
39172019-04-10 Kevin Buettner <kevinb@redhat.com>
3918
3919 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
3920 when using a 64-bit gdbserver.
3921
39222019-04-09 Tom Tromey <tromey@adacore.com>
3923
3924 * linux-low.c (select_event_lwp): Use find_thread_in_random.
3925
39262019-04-08 Tom Tromey <tom@tromey.com>
3927
3928 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
3929 throw.
3930 (linux_resume_one_lwp): Likewise.
3931
39322019-04-08 Tom Tromey <tom@tromey.com>
3933
3934 * gdbreplay.c: Update.
3935 * linux-low.c: Update.
3936 * server.c: Update.
3937
39382019-04-08 Tom Tromey <tom@tromey.com>
3939
3940 * server.c: Use C++ exception handling.
3941 * linux-low.c: Use C++ exception handling.
3942 * gdbreplay.c: Use C++ exception handling.
3943
39442019-04-08 Tom Tromey <tom@tromey.com>
3945
3946 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
3947 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
3948 (captured_main, main): Update.
3949 * gdbreplay.c (main): Update.
3950
39512019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3952
3953 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
3954 value in argument pointer, return 1 if the entry is found and 0
3955 otherwise. Move comment.
3956 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
3957 * linux-low.h (linux_get_auxv): Declare.
3958 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
3959
39602019-04-05 Tom Tromey <tromey@adacore.com>
3961
3962 * server.c (gdbserver_usage): Use upper-case for metasyntactic
3963 variables.
3964
39652019-03-28 Alan Hayward <alan.hayward@arm.com>
3966
3967 * linux-low.c (AT_HWCAP2): Add define if not already included.
3968
39692019-03-26 Alan Hayward <alan.hayward@arm.com>
3970
3971 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
3972 (aarch64_arch_setup): Call linux_get_hwcap.
3973 * linux-arm-low.c (arm_get_hwcap): Remove function.
3974 (arm_read_description): Call linux_get_hwcap.
3975 * linux-low.c (linux_get_auxv): New function.
3976 (linux_get_hwcap): Likewise.
3977 (linux_get_hwcap2): Likewise.
3978 * linux-low.h (linux_get_hwcap): New declaration.
3979 (linux_get_hwcap2): Likewise.
3980 * linux-ppc-low.c (ppc_get_auxv): Remove function.
3981 (ppc_arch_setup): Call linux_get_hwcap.
3982 * linux-s390-low.c (s390_get_hwcap): Remove function.
3983 (s390_arch_setup): Call linux_get_hwcap.
3984
39852019-03-22 Alan Hayward <alan.hayward@arm.com>
3986 Jiong Wang <jiong.wang@arm.com>
3987
3988 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
3989 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
3990 to fail.
3991 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
3992
39932019-03-22 Alan Hayward <alan.hayward@arm.com>
3994 Jiong Wang <jiong.wang@arm.com>
3995
3996 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
3997 (aarch64_get_hwcap): New function.
3998 (aarch64_arch_setup): Read APIA hwcap.
3999
40002019-03-22 Alan Hayward <alan.hayward@arm.com>
4001 Jiong Wang <jiong.wang@arm.com>
4002
4003 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4004 (initialize_low_tracepoint): Likewise.
4005 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4006 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4007 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4008 (aarch64_linux_read_description): Likewise.
4009 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4010
40112019-03-12 John Baldwin <jhb@FreeBSD.org>
4012
4013 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4014 i386_create_target_description for 'segments' parameter.
4015 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4016 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4017 * win32-i386-low.c (i386_arch_setup): Likewise.
4018
40192019-03-12 Tom Tromey <tromey@adacore.com>
4020
4021 * linux-low.c (iterate_over_lwps): Update.
4022
40232019-03-06 Tom Tromey <tom@tromey.com>
4024
4025 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4026 (captured_main): Use SCOPE_EXIT.
4027
40282019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4029
4030 * configure.srv: Use '$enable_unittest' instead of '$development'
4031 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4032 case.
4033
40342019-02-27 Tom Tromey <tromey@adacore.com>
4035
4036 * gdbreplay.c (logchar): Handle \r\n.
4037
40382019-02-07 Alan Hayward <alan.hayward@arm.com>
4039
4040 * linux-low.c (linux_attach): Add process before lwp.
4041 * server.c (attach_inferior): Check if already attached.
4042
40432019-02-07 Tom Tromey <tom@tromey.com>
4044
4045 * x86-tdesc.h: Rename include guard.
4046 * x86-low.h: Add include guard.
4047 * wincecompat.h: Rename include guard.
4048 * win32-low.h: Add include guard.
4049 * utils.h: Rename include guard.
4050 * tracepoint.h: Rename include guard.
4051 * tdesc.h: Rename include guard.
4052 * target.h: Rename include guard.
4053 * server.h: Rename include guard.
4054 * remote-utils.h: Rename include guard.
4055 * regcache.h: Rename include guard.
4056 * nto-low.h: Rename include guard.
4057 * notif.h: Add include guard.
4058 * mem-break.h: Rename include guard.
4059 * lynx-low.h: Add include guard.
4060 * linux-x86-tdesc.h: Add include guard.
4061 * linux-s390-tdesc.h: Add include guard.
4062 * linux-ppc-tdesc-init.h: Add include guard.
4063 * linux-low.h: Add include guard.
4064 * linux-aarch64-tdesc.h: Add include guard.
4065 * linux-aarch32-low.h: Add include guard.
4066 * inferiors.h: Rename include guard.
4067 * i387-fp.h: Rename include guard.
4068 * hostio.h: Rename include guard.
4069 * gdbthread.h: Rename include guard.
4070 * gdb_proc_service.h: Rename include guard.
4071 * event-loop.h: Rename include guard.
4072 * dll.h: Rename include guard.
4073 * debug.h: Rename include guard.
4074 * ax.h: Rename include guard.
4075
40762018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4077
4078 PR gdb/23985
4079 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4080 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4081
40822019-01-25 Tom Tromey <tom@tromey.com>
4083
4084 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4085
40862019-01-25 Tom Tromey <tom@tromey.com>
4087
4088 * win32-low.c: Fix common/ includes.
4089 * win32-i386-low.c: Fix common/ includes.
4090 * tracepoint.c: Fix common/ includes.
4091 * thread-db.c: Fix common/ includes.
4092 * target.h: Fix common/ includes.
4093 * symbol.c: Fix common/ includes.
4094 * spu-low.c: Fix common/ includes.
4095 * server.h: Fix common/ includes.
4096 * server.c: Fix common/ includes.
4097 * remote-utils.c: Fix common/ includes.
4098 * regcache.h: Fix common/ includes.
4099 * regcache.c: Fix common/ includes.
4100 * nto-x86-low.c: Fix common/ includes.
4101 * notif.h: Fix common/ includes.
4102 * mem-break.h: Fix common/ includes.
4103 * lynx-low.c: Fix common/ includes.
4104 * lynx-i386-low.c: Fix common/ includes.
4105 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4106 * linux-x86-low.c: Fix common/ includes.
4107 * linux-low.c: Fix common/ includes.
4108 * inferiors.h: Fix common/ includes.
4109 * i387-fp.c: Fix common/ includes.
4110 * hostio.c: Fix common/ includes.
4111 * hostio-errno.c: Fix common/ includes.
4112 * gdbthread.h: Fix common/ includes.
4113 * gdbreplay.c: Fix common/ includes.
4114 * fork-child.c: Fix common/ includes.
4115 * event-loop.c: Fix common/ includes.
4116 * ax.c:
4117 (enum gdb_agent_op): Fix common/ includes.
4118
41192019-01-21 Tom Tromey <tom@tromey.com>
4120
4121 * tracepoint.c: Fix includes.
4122 * remote-utils.c: Fix includes.
4123 * linux-x86-low.c: Fix includes.
4124
41252019-01-01 Joel Brobecker <brobecker@adacore.com>
4126
4127 * gdbreplay.c (gdbreplay_version): Update copyright year in
4128 version message.
4129 * server.c (gdbserver_version): Likewise.
4130
41312018-12-05 Alan Hayward <alan.hayward@arm.com>
4132
4133 * linux-low.c (add_lwp): Switch ordering.
4134
41352018-11-29 Tom Tromey <tom@tromey.com>
4136
4137 * win32-low.c (win32_join): Take pid, not process.
4138 * target.h (struct target_ops) <join>: Change argument type.
4139 (join_inferior): Change argument name.
4140 * spu-low.c (spu_join): Take pid, not process.
4141 * server.c (handle_detach): Preserve pid before destroying
4142 process.
4143 * lynx-low.c (lynx_join): Take pid, not process.
4144 * linux-low.c (linux_join): Take pid, not process.
4145
41462018-11-23 Alan Hayward <alan.hayward@arm.com>
4147
4148 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4149 (aarch64_cannot_fetch_register): Likewise.
4150 (struct linux_target_ops): Update references.
4151
41522018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4153
4154 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4155
41562018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4157
4158 * configure.srv (ipa_ppc_linux_regobj): Add
4159 powerpc-isa207-htm-vsx32l-ipa.o and
4160 powerpc-isa207-htm-vsx64l-ipa.o.
4161 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4162 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4163 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4164 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4165 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4166 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4167 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4168 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4169 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4170 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4171 (init_registers_powerpc_isa207_htm_vsx32l)
4172 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4173 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4174 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4175 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4176 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4177 (ppc_store_tm_ctarregset): New functions.
4178 (ppc_regsets): Add entries for HTM regsets.
4179 (ppc_arch_setup): Set htm in features struct when needed. Set
4180 sizes for the HTM regsets.
4181 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4182 (initialize_low_arch): Call
4183 init_registers_powerpc_isa207_htm_vsx32l and
4184 init_registers_powerpc_isa207_htm_vsx64l.
4185 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4186 PPC_TDESC_ISA207_HTM_VSX.
4187 (initialize_low_tracepoint): Call
4188 init_registers_powerpc_isa207_htm_vsx32l and
4189 init_registers_powerpc_isa207_htm_vsx64l.
4190
41912018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4192
4193 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4194 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4195 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4196 (ppc_store_pmuregset): New functions.
4197 (ppc_regsets): Add entries for ebb and pmu regsets.
4198 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4199 pmu regsets are available. Set sizes for these regsets.
4200
42012018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4202
4203 * configure.srv (ipa_ppc_linux_regobj): Add
4204 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4205 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4206 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4207 rs6000/powerpc-isa207-vsx32l.xml, and
4208 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4209 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4210 <PPC_TDESC_ISA207_VSX>: New enum value.
4211 (init_registers_powerpc_isa207_vsx32l): Declare.
4212 (init_registers_powerpc_isa207_vsx64l): Declare.
4213 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4214 (ppc_store_tarregset): New function.
4215 (ppc_regsets): Add entry for the TAR regset.
4216 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4217 size for the TAR regsets.
4218 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4219 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4220 and init_registers_powerpc_isa207_vsx64l.
4221 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4222 (initialize_low_tracepoint): Call
4223 init_registers_powerpc_isa207_vsx32l and
4224 init_registers_powerpc_isa207_vsx64l.
4225
42262018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4227 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4228
4229 * configure.srv (ipa_ppc_linux_regobj): Add
4230 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4231 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4232 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4233 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4234 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4235 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4236 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4237 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4238 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4239 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4240 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4241 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4242 (ppc_hwcap): Add comment.
4243 (ppc_hwcap2): New global.
4244 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4245 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4246 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4247 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4248 when needed. Set sizes for the the DSCR and PPR regsets.
4249 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4250 (initialize_low_arch): Call
4251 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4252 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4253 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4254 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4255 (initialize_low_tracepoint): Call
4256 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4257 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4258
42592018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4260
4261 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4262
42632018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4264 Simon Marchi <simark@simark.ca>
4265
4266 * acinclude.m4: Include "../selftest.m4".
4267 * configure: Regenerate.
4268 * configure.ac: Use "GDB_AC_SELFTEST".
4269 * configure.srv: Use "$enable_unittests" instead of
4270 "$development" when checking whether unit tests have been
4271 enabled.
4272 * server.c (captured_main): Update message informing that
4273 selftests have been disabled.
4274
42752018-10-04 Tom Tromey <tom@tromey.com>
4276
4277 * configure: Rebuild.
4278
42792018-10-04 Tom Tromey <tom@tromey.com>
4280
4281 * server.c (handle_status): Rename inner "thread".
4282 (process_serial_event): Declare "res" in 'm' case.
4283 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4284 (iterate_over_lwps): Rename inner "thread".
4285 (linux_qxfer_libraries_svr4): Rename inner "len".
4286 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4287
42882018-10-01 Gary Benson <gbenson@redhat.com>
4289
4290 * gdb_proc_service.h: Moved common code to
4291 common/gdb_proc_service.h.
4292
42932018-10-01 Gary Benson <gbenson@redhat.com>
4294
4295 * gdb_proc_service.h: Synchronize comments and whitespace with
4296 GDB's version of this file.
4297
42982018-09-25 Tom Tromey <tom@tromey.com>
4299
4300 * configure: Rebuild.
4301 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4302
43032018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4304
4305 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4306 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4307 ($(IPA_LIB)): Sort IPA_OBJS.
4308
43092018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4310
4311 * Makefile.in: Remove references to $(ADD_DEPS).
4312
43132018-09-16 Tom Tromey <tom@tromey.com>
4314
4315 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4316 variables.
4317 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4318 variables.
4319
43202018-09-05 Tom Tromey <tom@tromey.com>
4321
4322 * configure: Rebuild.
4323
43242018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4325
4326 PR build/23399
4327 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4328
43292018-08-27 Tom Tromey <tom@tromey.com>
4330
4331 PR build/23087:
4332 * configure: Rebuild.
4333
43342018-08-27 Tom Tromey <tom@tromey.com>
4335
4336 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4337 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4338 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4339 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4340 (s390x_emit_stack_adjust): Add casts to unsigned char.
4341
43422018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4343
4344 PR gdb/23374
4345 PR gdb/23375
4346 * server.h (struct client_state) <disable_randomization>:
4347 Initialize to 1.
4348
43492018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4350
4351 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4352 variable.
4353 (mips_supply_ptrace_register): Likewise.
4354
43552018-07-22 Tom Tromey <tom@tromey.com>
4356
4357 * configure: Rebuild.
4358
43592018-07-22 Tom Tromey <tom@tromey.com>
4360
4361 * win32-low.c (win32_create_inferior): Remove unused variables.
4362 * gdbreplay.c (remote_open): Remove unused variable.
4363 * remote-utils.c (remote_prepare): Remove unused variable.
4364 * x86-tdesc.h (X86_TDESC_H): Define.
4365 (amd64_expedite_regs): Define conditionally.
4366 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4367 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4368 * remote-utils.c (readchar): Remove unused variable.
4369
43702018-07-13 Pedro Alves <palves@redhat.com>
4371
4372 * linux-low.c (linux_kill): Change parameter to process_info
4373 pointer instead of pid. Adjust.
4374 * lynx-low.c (lynx_kill): Likewise.
4375 * nto-low.c (nto_kill): Likewise.
4376 * spu-low.c (spu_kill): Likewise.
4377 * win32-low.c (win32_kill): Likewise.
4378 * server.c (handle_v_kill, kill_inferior_callback)
4379 (detach_or_kill_for_exit): Adjust.
4380 * target.c (kill_inferior): Change parameter to process_info
4381 pointer instead of pid. Adjust.
4382 * target.h (struct target_ops) <kill>: Change parameter to
4383 process_info pointer instead of pid. Adjust all implementations
4384 and callers.
4385 (kill_inferior): Likewise.
4386
43872018-07-13 Pedro Alves <palves@redhat.com>
4388
4389 * linux-low.c (linux_detach, linux_join): Change parameter to
4390 process_info pointer instead of pid. Adjust.
4391 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4392 * nto-low.c (nto_detach): Likewise.
4393 * spu-low.c (spu_detach, spu_join): Likewise.
4394 * win32-low.c (win32_detach, win32_join): Likewise.
4395 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4396 * target.h (struct target_ops) <detach, join>: Change parameter to
4397 process_info pointer instead of pid. Adjust all implementations
4398 and callers.
4399 (detach_inferior, join_inferior): Rename 'pid' parameter to
4400 'proc'.
4401
44022018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4403 Jan Kratochvil <jan.kratochvil@redhat.com>
4404 Paul Fertser <fercerpav@gmail.com>
4405 Tsutomu Seki <sekiriki@gmail.com>
4406
4407 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4408 (OBS): Add 'common/netstuff.o'.
4409 (GDBREPLAY_OBS): Likewise.
4410 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4411 (remote_open): Implement support for IPv6
4412 connections.
4413 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4414 and 'wspiapi.h'.
4415 (handle_accept_event): Accept connections from IPv6 sources.
4416 (remote_prepare): Handle IPv6-style hostnames; implement
4417 support for IPv6 connections.
4418 (remote_open): Implement support for printing connections from
4419 IPv6 sources.
4420
44212018-07-11 Pedro Alves <palves@redhat.com>
4422
4423 PR gdb/23377
4424 * mem-break.c (any_persistent_commands): Add process_info
4425 parameter and use it instead of relying on the current process.
4426 Change return type to bool.
4427 * mem-break.h (any_persistent_commands): Add process_info
4428 parameter and change return type to bool.
4429 * server.c (handle_detach): Remove require_running_or_return call.
4430 Look up the process_info for the process we're about to detach.
4431 If not found, return back error to GDB. Adjust
4432 any_persistent_commands call to pass down a process pointer.
4433
44342018-07-11 Pedro Alves <palves@redhat.com>
4435
4436 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4437 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4438 instead of collect_register_by_name.
4439 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4440 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4441
44422018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4443 Pedro Alves <palves@redhat.com>
4444
4445 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4446
44472018-07-03 Tom Tromey <tom@tromey.com>
4448
4449 * linux-low.c: Update.
4450 * lynx-low.c: Update.
4451 * mem-break.c: Update.
4452 * nto-low.c: Update.
4453 * remote-utils.c: Update.
4454 * server.c: Update.
4455 * spu-low.c: Update.
4456 * target.c: Update.
4457 * win32-low.c: Update.
4458
44592018-07-03 Tom Tromey <tom@tromey.com>
4460
4461 * server.c: Update.
4462
44632018-07-03 Tom Tromey <tom@tromey.com>
4464
4465 * linux-low.c: Update.
4466
44672018-07-03 Tom Tromey <tom@tromey.com>
4468
4469 * target.c: Update.
4470
44712018-07-03 Tom Tromey <tom@tromey.com>
4472
4473 * linux-low.c: Update.
4474 * linux-mips-low.c: Update.
4475 * lynx-low.c: Update.
4476 * nto-low.c: Update.
4477 * remote-utils.c: Update.
4478 * server.c: Update.
4479 * spu-low.c: Update.
4480 * target.c: Update.
4481 * thread-db.c: Update.
4482
44832018-07-03 Tom Tromey <tom@tromey.com>
4484
4485 * linux-low.c: Update.
4486 * linux-mips-low.c: Update.
4487 * lynx-low.c: Update.
4488 * mem-break.c: Update.
4489 * nto-low.c: Update.
4490 * remote-utils.c: Update.
4491 * server.c: Update.
4492 * spu-low.c: Update.
4493 * target.c: Update.
4494 * tracepoint.c: Update.
4495
44962018-07-03 Tom Tromey <tom@tromey.com>
4497
4498 * linux-low.c: Update.
4499 * linux-ppc-low.c: Update.
4500 * linux-x86-low.c: Update.
4501 * proc-service.c: Update.
4502 * server.c: Update.
4503 * spu-low.c: Update.
4504 * thread-db.c: Update.
4505 * win32-low.c: Update.
4506
45072018-07-03 Tom Tromey <tom@tromey.com>
4508
4509 * linux-low.c: Update.
4510 * lynx-low.c: Update.
4511 * nto-low.c: Update.
4512 * remote-utils.c: Update.
4513 * spu-low.c: Update.
4514 * thread-db.c: Update.
4515 * win32-low.c: Update.
4516
45172018-06-29 Joel Brobecker <brobecker@adacore.com>
4518
4519 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4520 parameter in call to 'amd64_create_target_description'.
4521
45222018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4523
4524 * x86-tdesc.h: Remove executable permission flag.
4525
45262018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4527
4528 * configure.ac: Remove AC_PREREQ, add missing quoting.
4529 * configure: Re-generate.
4530 * config.in: Re-generate.
4531 * aclocal.m4: Re-generate.
4532
45332018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4534
4535 * tracepoint.h (current_traceframe): Remove declaration.
4536
45372018-06-18 Alan Hayward <alan.hayward@arm.com>
4538
4539 * linux-aarch64-low.c (is_sve_tdesc): New function.
4540 (aarch64_sve_regs_copy_to_regcache): Likewise.
4541 (aarch64_sve_regs_copy_from_regcache): Likewise.
4542 (aarch64_regs_info): Add SVE checks.
4543 (initialize_low_arch): Initialize SVE.
4544
45452018-06-18 Alan Hayward <alan.hayward@arm.com>
4546
4547 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4548
45492018-06-11 Alan Hayward <alan.hayward@arm.com>
4550
4551 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4552 (initialize_low_tracepoint): Likewise
4553 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4554 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4555 param.
4556 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4557 checks.
4558 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4559
45602018-06-11 Alan Hayward <alan.hayward@arm.com>
4561
4562 * server.h (PBUFSIZ): Increase size
4563
45642018-06-11 Alan Hayward <alan.hayward@arm.com>
4565
4566 * regcache.c (regcache::raw_compare): New function.
4567 * regcache.h (regcache::raw_compare): New declaration.
4568
45692018-06-11 Alan Hayward <alan.hayward@arm.com>
4570
4571 * regcache.c (new_register_cache): Use new.
4572 (free_register_cache): Use delete.
4573 (register_data): Use const.
4574 (supply_register): Move body inside regcache.
4575 (regcache::raw_supply): New override function.
4576 (collect_register): Move body inside regcache.
4577 (regcache::raw_collect): New override function.
4578 (regcache::get_register_status): New override function.
4579 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4580
45812018-06-09 Tom Tromey <tom@tromey.com>
4582
4583 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4584 declare queue.
4585 (event_queue): Use std::queue.
4586 (gdb_event_xfree): Remove.
4587 (initialize_event_loop, process_event, wait_for_event): Update.
4588
45892018-06-08 Stan Cox <scox@redhat.com>
4590
4591 * win32-low.c (win32_create_inferior): last_ptid and last_status
4592 moved to client_state.
4593
45942018-06-08 Pedro Alves <palves@redhat.com>
4595
4596 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4597 common/common-exceptions.o, common/common-utils.o,
4598 common/errors.o, common/print-utils.o and utils.o.
4599 * gdbreplay.c: Include "common-defs.h" instead of the two
4600 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4601 string.h or alloca.h.
4602 (perror_with_name): Delete.
4603 (remote_open): Use xstrdup instead of strdup.
4604 (main): Rename to ...
4605 (captured_main): ... this.
4606 (main): New.
4607
46082018-06-08 Tom Tromey <tom@tromey.com>
4609
4610 * linux-low.c (linux_low_read_btrace): Update.
4611
46122018-06-04 Stan Cox <scox@redhat.com>
4613
4614 * server.h (struct client_state): New.
4615 * server.c (cont_thread, general_thread, multi_process)
4616 (report_fork_events, report_vfork_events, report_exec_events)
4617 (report_thread_events, swbreak_feature, hwbreak_feature)
4618 (vCont_supported, disable_randomization, pass_signals)
4619 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4620 Moved to client_state.
4621 * remote-utils.c (remote_debug, noack_mode)
4622 (transport_is_reliable): Moved to client_state.
4623 * tracepoint.c (current_traceframe): Moved to client_state.
4624
4625 Update all callers.
4626 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4627 linux-low.c, remote-utils.h, target.c: Use client_state.
4628
46292018-05-31 Alan Hayward <alan.hayward@arm.com>
4630
4631 * configure.srv: Add new c/h file.
4632
46332018-05-31 Alan Hayward <alan.hayward@arm.com>
4634
4635 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4636 null VQ.
4637
46382018-05-25 Maciej W. Rozycki <macro@mips.com>
4639
4640 * gdb.arch/mips-fpregset-core.exp: New test.
4641 * gdb.arch/mips-fpregset-core.c: New test source.
4642
46432018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4644
4645 PR server/23198
4646 * hostio.c (require_int): Do not report overflow for integers
4647 between 0xfffffff and 0x7fffffff.
4648
46492018-05-22 Maciej W. Rozycki <macro@mips.com>
4650
4651 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4652 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4653 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4654 functions.
4655 (the_low_target): Wire them.
4656
46572018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4658
4659 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4660 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4661 mode. Call collect_register_by_name with vscr using
4662 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4663 (ppc_store_vrregset): Add and set vscr_offset variable as in
4664 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4665 vscr_offset.
4666
46672018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4668
4669 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4670 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4671 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4672
46732018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4674
4675 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4676 (ppc_store_vsxregset): Likewise.
4677 (ppc_fill_vrregset): Likewise.
4678 (ppc_store_vrregset): Likewise.
4679 (ppc_fill_evrregset): Likewise.
4680 (ppc_store_evrregset): Likewise.
4681 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4682 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4683 needed.
4684
46852018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4686
4687 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4688 wordsize of the inferior. Call ppc_linux_target_wordsize.
4689
46902018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4691
4692 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4693 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4694 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4695 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4696 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4697 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4698 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4699 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4700 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4701 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4702 (tdesc_powerpc_e500l): Remove.
4703 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4704 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4705 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4706 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4707 linux-ppc-tdesc.h.
4708 (ppc_arch_setup): Remove target description matching code. Fill a
4709 ppc_linux_features struct and call ppc_linux_match_description
4710 with it.
4711
47122018-05-22 Maciej W. Rozycki <macro@mips.com>
4713
4714 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4715 width of the requested register exceeds the width of the
4716 `ptrace' data type.
4717 (mips_cannot_store_register): Likewise.
4718
47192018-05-21 Maciej W. Rozycki <macro@mips.com>
4720
4721 * linux-mips-low.c (mips_fetch_register): New function. Update
4722 preceding comment.
4723 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4724 (the_low_target): Wire `mips_fetch_register'.
4725
47262018-05-10 Joel Brobecker <brobecker@adacore.com>
4727
4728 * lynx-i386-low.c (LYNXOS_178): New macro.
4729 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4730 the layout on LynxOS-178.
4731 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4732 handle floating point registers that are not supported by
4733 LynxOS-178.
4734
47352018-05-10 Tom Tromey <tom@tromey.com>
4736
4737 * configure: Rebuild.
4738
47392018-05-10 Joel Brobecker <brobecker@adacore.com>
4740
4741 PR server/23158:
4742 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4743 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4744 Use it to set the expedite_regs field in the given tdesc.
4745 * x86-tdesc.h: New file.
4746 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4747 Adjust following the addition of the new expedite_regs parameter
4748 to init_target_desc.
4749 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4750 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4751 (i386_linux_read_description, amd64_linux_read_description):
4752 Adjust following the addition of the new expedite_regs parameter
4753 to init_target_desc.
4754 * lynx-i386-low.c: #include "x86-tdesc.h".
4755 (lynx_i386_arch_setup): Adjust following the addition of the new
4756 expedite_regs parameter to init_target_desc.
4757 * nto-x86-low.c: #include "x86-tdesc.h".
4758 (nto_x86_arch_setup): Adjust following the addition of the new
4759 expedite_regs parameter to init_target_desc.
4760 * win32-i386-low.c: #include "x86-tdesc.h".
4761 (i386_arch_setup): Adjust following the addition of the new
4762 expedite_regs parameter to init_target_desc.
4763
47642018-05-10 Joel Brobecker <brobecker@adacore.com>
4765
4766 PR server/23158:
4767 * win32-low.c (win32_create_inferior): Add call to my_wait
4768 setting last_status global.
4769
47702018-05-10 Joel Brobecker <brobecker@adacore.com>
4771
4772 PR server/23158:
4773 * win32-low.c (create_process): Only call gdb_tilde_expand if
4774 inferior_cwd is not NULL.
4775
47762018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4777
4778 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4779 registers to the cache if their values have changed.
4780 (i387_xsave_to_cache): Provide default values for x87 control
4781 registers when these features are available, but disabled.
4782 * regcache.c (supply_register_by_name_zeroed): New function.
4783 * regcache.h (supply_register_by_name_zeroed): Declare new
4784 function.
4785
47862018-05-07 Tom Tromey <tom@tromey.com>
4787
4788 * configure: Rebuild.
4789
47902018-05-04 Tom Tromey <tom@tromey.com>
4791
4792 * configure: Rebuild.
4793
47942018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4795 Pedro Alves <palves@redhat.com>
4796
4797 * linux-aarch64-low.c (aarch64_stopped_data_address):
4798 Likewise.
4799
48002018-04-27 Tom Tromey <tom@tromey.com>
4801
4802 * configure: Rebuild.
4803
48042018-04-23 Tom Tromey <tom@tromey.com>
4805
4806 * configure: Rebuild.
4807
48082018-04-19 Simon Marchi <simon.marchi@ericsson.com>
4809
4810 * Makefile.in (depcomp): Add "..".
4811 (all_deps_files): New and use it.
4812
48132018-04-18 Alan Hayward <alan.hayward@arm.com>
4814
4815 * configure.srv (aarch64*-*-linux*): Don't include xml.
4816 (i[34567]86-*-cygwin*): Likewise.
4817 (i[34567]86-*-linux*): Likewise.
4818 (i[34567]86-*-lynxos*): Likewise.
4819 (i[34567]86-*-mingw32ce*): Likewise.
4820 (i[34567]86-*-mingw*): Likewise.
4821 (i[34567]86-*-nto*): Likewise.
4822 (tic6x-*-uclinux): Likewise.
4823 (x86_64-*-linux*): Likewise.
4824 (x86_64-*-mingw*): Likewise.
4825 (x86_64-*-cygwin*): Likewise.
4826
48272018-04-18 Alan Hayward <alan.hayward@arm.com>
4828
4829 * tdesc.c: Remove xml parameter.
4830
48312018-04-18 Alan Hayward <alan.hayward@arm.com>
4832
4833 * server.c (get_features_xml): Remove cast.
4834 * tdesc.c (void target_desc::accept): Fill in function.
4835 (tdesc_get_features_xml): Remove old xml creation.
4836 (print_xml_feature::visit_pre): Add xml vistor.
4837 * tdesc.h (struct target_desc): Make xmltarget mutable.
4838 (tdesc_get_features_xml): Remove declaration.
4839
48402018-04-18 Alan Hayward <alan.hayward@arm.com>
4841
4842 * tdesc.c (tdesc_architecture_name): Add new function.
4843 (tdesc_osabi_name): Likewise.
4844 (tdesc_get_features_xml): Use new functions.
4845
48462018-04-18 Alan Hayward <alan.hayward@arm.com>
4847
4848 * tdesc.c (tdesc_create_flags): Remove.
4849 (tdesc_add_flag): Likewise.
4850 (tdesc_named_type): Likewise.
4851 (tdesc_create_union): Likewise.
4852 (tdesc_create_struct): Likewise.
4853 (tdesc_create_vector): Likewise.
4854 (tdesc_add_bitfield): Likewise.
4855 (tdesc_add_field): Likewise.
4856 (tdesc_set_struct_size): Likewise.
4857
48582018-04-18 Alan Hayward <alan.hayward@arm.com>
4859
4860 * tdesc.c (~target_desc): Remove implictly deleted items.
4861 (init_target_desc): Iterate all features.
4862 (tdesc_get_features_xml): Use vector.
4863 (tdesc_create_feature): Create feature.
4864 * tdesc.h (tdesc_feature) Remove
4865 (target_desc): Add features.
4866
48672018-04-18 Alan Hayward <alan.hayward@arm.com>
4868
4869 * Makefile.in: Add common/tdesc.c
4870 * tdesc.c (init_target_desc): init all reg_defs from register
4871 vector.
4872 (tdesc_create_reg): Create tdesc_reg.
4873 * tdesc.h (tdesc_feature): Add register vector.
4874
48752018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4876
4877 * tdesc.h (struct target_desc) <features>: Change type to
4878 std::vector<std::string>.
4879 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
4880 changes.
4881 (tdesc_get_features_xml): Likewise.
4882 (tdesc_create_feature): Likewise.
4883
48842018-03-26 Alan Hayward <alan.hayward@arm.com>
4885
4886 * regcache.c (find_register_by_number): Return a ref.
4887 (find_regno): Use references.
4888 (register_size): Likewise.
4889 (register_data): Likewise.
4890 * tdesc.c (target_desc::~target_desc): Remove free calls.
4891 (target_desc::operator==): Use std::vector compare.
4892 (init_target_desc): Use reference.
4893 (tdesc_create_reg): Use reg constructors.
4894 * tdesc.h (struct target_desc): Replace pointer with object.
4895
48962018-03-23 Alan Hayward <alan.hayward@arm.com>
4897
4898 * regcache.c (find_register_by_number): Make static.
4899 (find_regno): Use find_register_by_number
4900 * regcache.h (struct reg): Remove declaration.
4901
49022018-03-23 Alan Hayward <alan.hayward@arm.com>
4903
4904 * tdesc.c (target_desc::~target_desc): Move to here.
4905 (target_desc::operator==): Likewise.
4906 * tdesc.h (target_desc::~target_desc): Move from here.
4907 (target_desc::operator==): Likewise.
4908
49092018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4910
4911 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4912
49132018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4914
4915 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4916 S390_TDESC_GS.
4917 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
4918 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
4919 and init_registers_s390_gs_linux64.
4920
49212018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4922
4923 * linux-s390-low.c (s390_fill_gs): Remove function.
4924 (s390_fill_gsbc): Remove function.
4925 (s390_regsets): Set fill functions for the guarded storage regsets
4926 to NULL.
4927
49282018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4929
4930 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4931 the word size. Add comment.
4932 (s390_get_wordsize): New function.
4933 (s390_arch_setup): No longer select a temporary tdesc to fetch the
4934 pswm with it. Instead, use s390_get_wordsize to determine the
4935 word size first and derive the correct tdesc from that directly.
4936
49372018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4938
4939 * Makefile.in: Include silent-rules.mk.
4940 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
4941 (COMPILE): Add ECHO_CXX.
4942 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4943 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4944 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
4945 (version-generated.c): Add ECHO_GEN.
4946 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
4947 (IPAGENT_COMPILE): Add ECHO_CXX.
4948 (%-generated.c): Add ECHO_REGDAT.
4949
49502018-03-14 Tom Tromey <tom@tromey.com>
4951
4952 PR cli/14977:
4953 * ax.c (ax_printf): Special case for NULL.
4954
49552018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4956
4957 * linux-low.c (linux_qxfer_libraries_svr4): Use
4958 xml_escape_text_append.
4959
49602018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4961
4962 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
4963
49642018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4965
4966 * server.c (handle_general_set): Remove unnecessary xstrdup.
4967
49682018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4969
4970 * server.c (parse_debug_format_options): Adjust to
4971 delim_string_to_char_ptr_vec changes.
4972 * thread-db.c (thread_db_load_search): Adjust to
4973 dirnames_to_char_ptr_vec changes.
4974
49752018-03-01 Markus Metzger <markus.t.metzger@intel.com>
4976
4977 * target.h (target_enable_btrace, target_disable_btrace)
4978 (target_read_btrace, target_read_btrace_conf): Turn macro into
4979 inline function. Throw error if target method is not defined.
4980 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
4981 check for btrace target method. Be prepared to handle exceptions
4982 from btrace target methods.
4983
49842018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4985
4986 * server.c (captured_main): Change order of error message printed
4987 when the current working directory cannot be found.
4988
49892018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4990
4991 * server.c: Include "filenames.h" and "pathstuff.h".
4992 (program_name): Delete variable.
4993 (program_path): New anonymous class.
4994 (get_exec_wrapper): Use "program_path" instead of
4995 "program_name".
4996 (handle_v_run): Likewise.
4997 (captured_main): Likewise.
4998 (process_serial_event): Likewise.
4999
50002018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5001
5002 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5003 (OBJS): Add "pathstuff.o".
5004 * server.c (current_directory): New global variable.
5005 (captured_main): Initialize "current_directory".
5006
50072018-02-26 Alan Hayward <alan.hayward@arm.com>
5008
5009 * tdesc.c: Use common/tdesc.h.
5010 * tdesc.h: Likewise.
5011
50122018-02-20 Alan Hayward <alan.hayward@arm.com>
5013 Simon Marchi <simon.marchi@ericsson.com>
5014
5015 * Makefile.in: Switch order of make rules.
5016
50172018-02-19 Alan Hayward <alan.hayward@arm.com>
5018
5019 * Makefile.in: Add common directory in build.
5020 * configure.ac: Add common reference.
5021 * configure: Regenerate.
5022
50232018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5024
5025 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5026 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5027 * spu-low.c (spu_target_ops): Likewise.
5028 * win32-low.c (win32_target_ops): Likewise.
5029 * server.c (supported_btrace_packets): Report packets unconditionally.
5030 * target.h (target_ops) <supports_btrace>: Remove.
5031 (target_supports_btrace): Remove.
5032
50332018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5034
5035 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5036 (handle_btrace_disable): Change return type to void. Use exceptions
5037 to report errors.
5038 (handle_btrace_general_set): Catch exception and copy message to
5039 return message.
5040
50412018-02-08 Tom Tromey <tom@tromey.com>
5042
5043 * linux-low.c (install_software_single_step_breakpoints): Use
5044 make_scoped_restore.
5045 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5046 (do_restore_current_thread_cleanup): Remove.
5047 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5048 declare.
5049
50502018-02-08 Tom Tromey <tom@tromey.com>
5051
5052 * mem-break.c (set_raw_breakpoint_at): Use
5053 gdb::unique_xmalloc_ptr.
5054
50552018-01-30 Pedro Alves <palves@redhat.com>
5056
5057 PR gdb/13211
5058 * target.c (target_terminal::terminal_state): Rename to ...
5059 (target_terminal::m_terminal_state): ... this.
5060
50612018-01-19 James Clarke <jrtc27@jrtc27.com>
5062
5063 * linux-low.c (handle_extended_wait): Surround call to
5064 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5065
50662018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5067
5068 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5069 linux_ptrace_attach_fail_reason_string now returning an
5070 std::string.
5071 (linux_attach): Likewise.
5072 * thread-db.c (attach_thread): Likewise.
5073
50742018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5075
5076 PR gdb/21559
5077 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5078 checking for fs_base/gs_base fields in struct user_regs_struct.
5079 * configure: Regenerate.
5080
50812018-01-16 Yao Qi <yao.qi@linaro.org>
5082
5083 PR gdb/18749
5084 * linux-low.c (fetch_register): Call supply_register instead of
5085 error.
5086
50872018-01-08 Yao Qi <yao.qi@linaro.org>
5088 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * Makefile.in (OBS): Remove selftest.o.
5091 * configure.ac: Set srv_selftest_objs if $development is true.
5092 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5093 * configure: Re-generated.
5094 * server.c (captured_main): Wrap variable selftest_filter with
5095 GDB_SELF_TEST.
5096
50972018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5098
5099 * server.c (parse_debug_format_options): Return std::string.
5100 (handle_monitor_command, captured_main): Adjust.
5101
51022018-01-05 Pedro Alves <palves@redhat.com>
5103
5104 PR gdb/18653
5105 * server.c (captured_main): Pass quiet=false to
5106 save_original_signals_state.
5107
51082018-01-01 Joel Brobecker <brobecker@adacore.com>
5109
5110 * gdbreplay.c (gdbreplay_version): Update copyright year in
5111 version message.
5112 * server.c (gdbserver_version): Likewise.
5113
51142017-12-08 Tom Tromey <tom@tromey.com>
5115
5116 * ax.c (ax_printf): Update.
5117
51182017-12-07 Yao Qi <yao.qi@linaro.org>
5119
5120 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5121 aarch64_linux_read_description.
5122 * linux-amd64-ipa.c (idx2mask): New array.
5123 (get_ipa_tdesc): Move idx2mask out.
5124 (initialize_low_tracepoint): Initialize target descriptions.
5125 * linux-i386-ipa.c (idx2mask): New array.
5126 (get_ipa_tdesc): Move idx2mask out.
5127 (initialize_low_tracepoint): Initialize target descriptions.
5128
51292017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5130
5131 * tdesc.c (struct tdesc_type): Change return type.
5132 (tdesc_add_flag): Change parameter type.
5133 (tdesc_add_bitfield): Likewise.
5134 (tdesc_add_field): Likewise.
5135 (tdesc_set_struct_size): Likewise.
5136
51372017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5138
5139 * regcache.c (registers_to_string): Remove unused variable.
5140
51412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5142
5143 * inferiors.c (for_each_inferior_with_data): Remove.
5144 * inferiors.h (for_each_inferior_with_data): Remove.
5145 * server.c (handle_qxfer_threads_worker): Change parameter type.
5146 (handle_qxfer_threads_proper): Use for_each_thread.
5147
51482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5149
5150 * inferiors.c (for_each_inferior): Remove.
5151 (clear_inferiors): Use for_each_thread.
5152 * inferiors.h (for_each_inferior): Remove.
5153 * linux-low.c (linux_wait_for_event_filtered): Use
5154 for_each_thread.
5155 (linux_stabilize_threads): Likewise.
5156 * regcache.c (regcache_release): Likewise.
5157 * server.c (gdb_wants_all_threads_stopped): Likewise.
5158 (clear_pending_status_callback): Remove.
5159 (handle_status): Use for_each_thread.
5160 (captured_main): Likewise.
5161 * win32-low.c (child_init_thread_list): Likewise.
5162 (win32_clear_inferiors): Likewise.
5163 (fake_breakpoint_event): Likewise.
5164
51652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5166
5167 * inferiors.h (find_inferior): Remove.
5168 * inferiors.c (find_inferior): Remove.
5169
51702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5171
5172 * linux-low.c (resume_status_pending_p): Update comment.
5173 (need_step_over_p): Update comment.
5174
51752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5176
5177 * linux-low.c (proceed_one_lwp): Return void, change parameter
5178 type.
5179 (unsuspend_and_proceed_one_lwp): Likewise.
5180 (proceed_all_lwps): Use for_each_thread.
5181 (unstop_all_lwps): Likewise.
5182
51832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5184
5185 * linux-low.c (linux_resume_one_thread): Return void, take
5186 parameter directly.
5187 (linux_resume): Use for_each_thread.
5188
51892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5190
5191 * linux-low.c (send_sigstop_callback): Return void, change
5192 parameter type. Rename to...
5193 (send_sigstop): ... this.
5194 (suspend_and_send_sigstop_callback): Return void, change parameter
5195 type. Rename to...
5196 (suspend_and_send_sigstop): ... this.
5197 (stop_all_lwps): Use for_each_thread.
5198
51992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5200
5201 * linux-low.c (lwp_running): Return bool, remove unused
5202 argument.
5203 (linux_stabilize_threads): Use find_thread.
5204
52052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5206
5207 * linux-low.c (select_singlestep_lwp_callback): Remove.
5208 (count_events_callback): Remove.
5209 (select_event_lwp_callback): Remove.
5210 (select_event_lwp): Use find_thread/for_each_thread.
5211
52122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5213
5214 * linux-low.c (not_stopped_callback): Return bool, take filter
5215 argument directly.
5216 (linux_wait_for_event_filtered): Use find_thread.
5217 (linux_wait_1): Likewise.
5218
52192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5220
5221 * linux-low.c (same_lwp): Remove.
5222 (find_lwp_pid): Use find_thread.
5223
52242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5225
5226 * linux-low.c (delete_lwp_callback): Remove.
5227 (linux_mourn): Use for_each_thread.
5228
52292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5230
5231 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5232 args parameter, don't check for pid.
5233 (linux_detach): Use for_each_thread.
5234
52352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5236
5237 * linux-low.c (struct counter): Remove.
5238 (second_thread_of_pid_p): Remove.
5239 (last_thread_of_process_p): Use find_thread.
5240
52412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5242
5243 * inferiors.c (find_inferior_in_random): Remove.
5244 * inferiors.h (find_inferior_in_random): Remove.
5245 * linux-low.c (status_pending_p_callback): Return bool, accept
5246 parameter ptid directly.
5247 (linux_wait_for_event_filtered): Use find_thread_in_random.
5248 (linux_wait_1): Likewise.
5249
52502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5251
5252 * inferiors.c (find_inferior_id): Remove.
5253 (find_thread_ptid): Move implemention from find_inferior_id to
5254 here.
5255 * inferiors.h (find_inferior_id): Remove.
5256 * server.c (handle_status): Use find_thread_ptid.
5257 (process_serial_event): Likewise.
5258 * thread-db.c (find_one_thread): Likewise.
5259 (thread_db_thread_handle): Likewise.
5260 * win32-low.c (thread_rec): Likewise.
5261 (child_delete_thread): Likewise.
5262 (win32_thread_alive): Likewise.
5263 (get_child_debug_event): Likewise.
5264
52652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5266
5267 * linux-mips-low.c (update_watch_registers_callback): Return
5268 void, remove pid_p parameter, don't check for pid.
5269 (mips_insert_point, mips_remove_point): Use for_each_thread.
5270
52712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5272
5273 * lynx.low (lynx_delete_thread_callback): Remove.
5274 (lynx_mourn): Use for_each_thread.
5275
52762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5277
5278 * regcache.c (regcache_invalidate_one): Remove.
5279 (regcache_invalidate_pid): use for_each_thread.
5280
52812017-11-26 Tom Tromey <tom@tromey.com>
5282
5283 * linux-low.c (linux_create_inferior): Update.
5284
52852017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5286
5287 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5288
52892017-11-24 Alan Hayward <alan.hayward@arm.com>
5290
5291 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5292 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5293 * linux-aarch64-tdesc-selftest.c: New file.
5294 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5295
52962017-11-24 Alan Hayward <alan.hayward@arm.com>
5297
5298 * configure.srv: Add new file.
5299 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5300 * linux-aarch64-tdesc-selftest.c: New file.
5301 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5302
53032017-11-24 Alan Hayward <alan.hayward@arm.com>
5304
5305 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5306 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5307 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5308
53092017-11-24 Alan Hayward <alan.hayward@arm.com>
5310
5311 * configure.srv: Add new files.
5312 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5313 aarch64_linux_read_description.
5314 * linux-aarch64-low.c (aarch64_linux_read_description):
5315 Merge with aarch64_arch_setup.
5316 (aarch64_arch_setup): Call aarch64_linux_read_description.
5317 * linux-aarch64-tdesc.c: New file.
5318 * linux-aarch64-tdesc.h: New file.
5319
53202017-11-24 Yao Qi <yao.qi@linaro.org>
5321
5322 * configure.srv: Set $srv_regobj for tic6x-linux.
5323 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5324 (tic6x_read_description): Move some code to tic6x_arch_setup.
5325 (tic6x_tdesc_test): New function.
5326 (initialize_low_arch): Call selftests::register_test.
5327
53282017-11-22 Yao Qi <yao.qi@linaro.org>
5329
5330 * remote-utils.c (prepare_resume_reply): Use memcpy.
5331
53322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5333
5334 * linux-low.c (kill_one_lwp_callback): Return void, take
5335 argument directly, don't filter on pid.
5336 (linux_kill): Use for_each_thread.
5337
53382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5339
5340 * linux-low.c (need_step_over_p): Return bool, remove dummy
5341 argument.
5342 (linux_resume, proceed_all_lwps): Use find_thread.
5343
53442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5345
5346 * linux-low.c (resume_status_pending_p): Return bool, remove
5347 flag_p argument.
5348 (linux_resume): Use find_thread.
5349
53502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5351
5352 * linux-low.c (struct thread_resume_array): Remove.
5353 (linux_set_resume_request): Return void, take arguments
5354 directly.
5355 (linux_resume): Use for_each_thread.
5356
53572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5358
5359 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5360 return bool, remove data argument.
5361 (linux_stabilize_threads): Use find_thread.
5362
53632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5364
5365 * linux-low.c (unsuspend_one_lwp): Remove.
5366 (unsuspend_all_lwps): Use for_each_thread, inline code from
5367 unsuspend_one_lwp.
5368
53692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5370
5371 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5372 * linux-low.c (struct iterate_over_lwps_args): Remove.
5373 (iterate_over_lwps_filter): Remove.
5374 (iterate_over_lwps): Use find_thread.
5375
53762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5377
5378 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5379 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5380 code from reset_lwp_ptrace_options_callback.
5381
53822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5383
5384 * linux-arm-low.c (struct update_registers_data): Remove.
5385 (update_registers_callback): Return void, take arguments
5386 directly, don't check thread's pid.
5387 (arm_insert_point, arm_remove_point): Use for_each_thread.
5388
53892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5390
5391 * win32-low.c (continue_one_thread): Return void, take argument
5392 directly.
5393 (child_continue): Use for_each_thread.
5394
53952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5396
5397 * win32-i386-low.c (update_debug_registers_callback): Rename
5398 to ...
5399 (update_debug_registers): ... this, return void, remove pid_p arg.
5400 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5401
54022017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5403
5404 * inferiors.h (struct process_info): Add constructor, initialize
5405 fields..
5406 <syscalls_to_catch>: Change type to std::vector<int>.
5407 * inferiors.c (add_process): Allocate process_info with new.
5408 (remove_process): Free process_info with delete.
5409 * linux-low.c (handle_extended_wait): Adjust.
5410 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5411 * server.c (handle_general_set): Adjust.
5412
54132017-11-16 Pedro Alves <palves@redhat.com>
5414
5415 * remote-utils.c (remote_close): Block SIGIO signals instead of
5416 uninstalling the SIGIO handler.
5417
54182017-11-16 Alan Hayward <alan.hayward@arm.com>
5419
5420 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5421
54222017-11-16 Yao Qi <yao.qi@linaro.org>
5423
5424 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5425 (tic6x_store_gregset): Likewise.
5426 (tic6x_usrregs_info): Move it up.
5427
54282017-11-15 Alan Hayward <alan.hayward@arm.com>
5429
5430 * Makefile.in: Update arch rules.
5431 * configure.srv: Explicitly mark arch/ files.
5432
54332017-11-13 Andreas Schwab <schwab@suse.de>
5434
5435 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5436 function.
5437 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5438
54392017-11-06 Pedro Alves <palves@redhat.com>
5440
5441 * config.in, configure: Regenerate.
5442
54432017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5444
5445 * target.c (struct thread_search): Remove.
5446 (thread_search_callback): Remove.
5447 (prepare_to_access_memory): Use for_each_thread instead of
5448 find_inferior. Inline code from thread_search_callback.
5449
54502017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5451
5452 * server.c (struct visit_actioned_threads_data): Remove.
5453 (visit_actioned_threads): Change prototype to take arguments
5454 directly.
5455 (resume): Use find_thread instead of find_inferior.
5456
54572017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5458
5459 * server.c (queue_stop_reply_callback): Change prototype, return
5460 void.
5461 (find_status_pending_thread_callback): Remove.
5462 (handle_status): Replace find_inferior with find_thread and
5463 for_each_thread.
5464
54652017-10-25 Alan Hayward <alan.hayward@arm.com>
5466
5467 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5468 with REGNO.
5469 (aarch64_store_gregset): Likewise.
5470 (aarch64_fill_fpregset): Likewise.
5471 (aarch64_store_fpregset): Likewise.
5472
54732017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5474
5475 * gdbthread.h (find_thread, for_each_thread): New functions.
5476 * inferiors.c (thread_of_pid): Remove.
5477 (find_any_thread_of_pid): Use find_thread.
5478 * linux-low.c (num_lwps): Use for_each_thread.
5479
54802017-10-17 Yao Qi <yao.qi@linaro.org>
5481
5482 * Makefile.in: Remove one rule.
5483 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5484
54852017-10-17 Yao Qi <yao.qi@linaro.org>
5486
5487 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5488 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5489
54902017-10-17 Yao Qi <yao.qi@linaro.org>
5491
5492 * configure.srv: Rename arm.o with arch/arm.o.
5493
54942017-10-17 Yao Qi <yao.qi@linaro.org>
5495
5496 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5497 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5498 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5499 (arch-i386.o, arch-amd64.o): Remove rules.
5500 (arch/%.o): New rule.
5501 Update POSTCOMPILE and COMPILE.pre.
5502 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5503 * configure: Re-generated.
5504 * configure.srv: Replace arch-i386.o with arch/i386.o.
5505 Replace arch-amd64.o with arch/amd64.o.
5506
55072017-10-16 Yao Qi <yao.qi@linaro.org>
5508
5509 * configure: Regenerated.
5510
55112017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5512
5513 * inferiors.h: (struct inferior_list): Remove.
5514 (struct inferior_list_entry); Remove.
5515 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5516 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5517 get_first_inferior): Remove.
5518 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5519 find_inferior_id, find_inferior_in_random): Change signature.
5520 * inferiors.c (all_threads): Change type to
5521 std::list<thread_info *>.
5522 (get_thread): Remove macro.
5523 (find_inferior, find_inferior_id): Change signature, implement
5524 using find_thread.
5525 (find_inferior_in_random): Change signature, implement using
5526 find_thread_in_random.
5527 (for_each_inferior, for_each_inferior_with_data): Change
5528 signature, implement using for_each_thread.
5529 (add_inferior_to_list, remove_inferior): Remove.
5530 (add_thread, get_first_thread, thread_of_pid,
5531 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5532 (get_first_inferior, one_inferior_p, clear_inferior_list):
5533 Remove.
5534 (clear_inferiors, get_thread_process): Update.
5535 * gdbthread.h: Include <list>.
5536 (struct thread_info) <entry>: Remove field.
5537 <id>: New field.
5538 (all_threads): Change type to std::list<thread_info *>.
5539 (get_first_inferior): Add doc.
5540 (find_thread, for_each_thread, find_thread_in_random): New
5541 functions.
5542 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5543 * linux-arm-low.c (update_registers_callback): Update.
5544 * linux-low.c (second_thread_of_pid_p): Update.
5545 (kill_one_lwp_callback, linux_detach_lwp_callback,
5546 delete_lwp_callback, status_pending_p_callback, same_lwp,
5547 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5548 iterate_over_lwps, not_stopped_callback,
5549 resume_stopped_resumed_lwps, count_events_callback,
5550 select_singlestep_lwp_callback, select_event_lwp_callback,
5551 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5552 suspend_and_send_sigstop_callback, wait_for_sigstop,
5553 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5554 lwp_running, linux_set_resume_request, resume_status_pending_p,
5555 need_step_over_p, start_step_over, linux_resume_one_thread,
5556 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5557 reset_lwp_ptrace_options_callback): Update.
5558 * linux-mips-low.c (update_watch_registers_callback): Update.
5559 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5560 Update.
5561 (free_register_cache_thread_one): Remove.
5562 (regcache_release): Update.
5563 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5564 handle_qxfer_threads_worker): Update.
5565 (handle_query): Update, use list iterator.
5566 (visit_actioned_threads, handle_pending_status,
5567 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5568 clear_pending_status_callback, set_pending_status_callback,
5569 find_status_pending_thread_callback, handle_status,
5570 process_serial_event): Update.
5571 * target.c (thread_search_callback): Update.
5572 * thread-db.c (thread_db_get_tls_address): Update.
5573 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5574 Update.
5575 * win32-i386-low.c (update_debug_registers_callback): Update.
5576 * win32-low.c (delete_thread_info, child_delete_thread,
5577 continue_one_thread, suspend_one_thread,
5578 get_child_debug_event): Adjust.
5579
55802017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5581
5582 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5583 * inferiors.h: Include <list>.
5584 (struct process_info) <entry>: Remove field.
5585 <pid>: New field.
5586 (pid_of): Change macro to function.
5587 (ptid_of, lwpid_of): Remove macro.
5588 (all_processes): Change type to std::list<process_info *>.
5589 (ALL_PROCESSES): Remove macro.
5590 (for_each_process, find_process): New function.
5591 * inferiors.c (all_processes): Change type to
5592 std::list<process_info *>.
5593 (find_thread_process): Adjust.
5594 (add_process): Likewise.
5595 (remove_process): Likewise.
5596 (find_process_pid): Likewise.
5597 (get_first_process): Likewise.
5598 (started_inferior_callback): Remove.
5599 (have_started_inferiors_p): Adjust.
5600 (attached_inferior_callback): Remove.
5601 (have_attached_inferiors_p): Adjust.
5602 * linux-low.c (check_zombie_leaders): Likewise.
5603 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5604 (x86_linux_update_xmltarget): Adjust.
5605 * server.c (handle_query): Likewise.
5606 (gdb_reattached_process): Remove.
5607 (handle_status): Adjust.
5608 (kill_inferior_callback): Likewise.
5609 (detach_or_kill_inferior): Remove.
5610 (print_started_pid): Likewise.
5611 (print_attached_pid): Likewise.
5612 (detach_or_kill_for_exit): Update.
5613 (process_serial_event): Likewise.
5614 * linux-arm-low.c (arm_new_fork): Likewise.
5615
56162017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5617
5618 * dll.h: Include <list>.
5619 (struct dll_info): Add constructor.
5620 <entry>: Remove field.
5621 (all_dlls): Change type to std::list<dll_info>.
5622 * dll.c: Include <algorithm>.
5623 (get_dll): Remove macro.
5624 (all_dlls): Change type to std::list<dll_info *>.
5625 (free_one_dll): Remove.
5626 (match_dll): Likewise.
5627 (loaded_dll): Adjust.
5628 (unloaded_dll): Adjust to all_dlls type change, use
5629 std::find_if. Inline code from match_dll.
5630 (clear_dlls): Adjust to all_dlls type change.
5631 * server.c (emit_dll_description): Remove.
5632 (handle_qxfer_libraries): Adjust to all_dlls type change,
5633 integrate emit_dll_description's functionality.
5634
56352017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5636
5637 * linux-low.h (struct linux_target_ops) <delete_process>: New
5638 field.
5639 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5640 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5641 (struct linux_target_ops): Add delete_process callback.
5642 * linux-arm-low.c (arm_delete_process): New.
5643 (struct linux_target_ops): Add delete_process callback.
5644 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5645 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5646 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5647 * linux-mips-low.c (mips_linux_delete_process): New.
5648 (struct linux_target_ops): Add delete_process callback.
5649 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5650 * linux-s390-low.c (struct linux_target_ops): Likewise.
5651 * linux-sh-low.c (struct linux_target_ops): Likewise.
5652 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5653 * linux-tile-low.c (struct linux_target_ops): Likewise.
5654 * linux-x86-low.c (x86_linux_delete_process): New.
5655 (struct linux_target_ops): Add delete_process callback.
5656 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5657
56582017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5659
5660 * linux-aarch64-low.c (the_low_target): Add thread delete
5661 callback.
5662 * linux-arm-low.c (arm_delete_thread): New function.
5663 (the_low_target): Add thread delete callback.
5664 * linux-bfin-low.c (the_low_target): Likewise.
5665 * linux-crisv32-low.c (the_low_target): Likewise.
5666 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5667 set.
5668 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5669 field.
5670 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5671 * linux-mips-low.c (mips_linux_delete_thread): New function.
5672 (the_low_target): Add thread delete callback.
5673 * linux-ppc-low.c (the_low_target): Likewise.
5674 * linux-s390-low.c (the_low_target): Likewise.
5675 * linux-sh-low.c (the_low_target): Likewise.
5676 * linux-tic6x-low.c (the_low_target): Likewise.
5677 * linux-tile-low.c (the_low_target): Likewise.
5678 * linux-x86-low.c (the_low_target): Likewise.
5679 * linux-xtensa-low.c (the_low_target): Likewise.
5680
56812017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5682
5683 * win32-low.c: Include "common-inferior.h".
5684
56852017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5686
5687 * inferiors.c (set_inferior_cwd): New function.
5688 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5689 (handle_query): Inform that QSetWorkingDir is supported.
5690 * win32-low.c (create_process): Pass the inferior's cwd to
5691 CreateProcess.
5692
56932017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5694
5695 * inferiors.c (current_inferior_cwd): New global variable.
5696 (get_inferior_cwd): New function.
5697 * inferiors.h (struct process_info) <cwd>: New field.
5698
56992017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5700
5701 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5702 (OBS): Add gdb_tilde_expand.o.
5703
57042017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5707 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5708
57092017-09-29 Pedro Alves <palves@redhat.com>
5710
5711 * ax.c (gdb_parse_agent_expr): Constify.
5712 * ax.h (gdb_parse_agent_expr): Constify.
5713 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5714 Constify.
5715 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5716 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5717 * remote-utils.h (read_ptid): Constify.
5718 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5719 (process_point_options, process_serial_event): Constify.
5720 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5721 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5722 (cmd_qtbuffer): Constify.
5723
57242017-09-29 Pedro Alves <palves@redhat.com>
5725
5726 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5727 fails.
5728
57292017-09-29 Pedro Alves <palves@redhat.com>
5730
5731 * linux-low.c (handle_extended_wait): Pass parent thread instead
5732 of process to thread_db_notice_clone.
5733 * linux-low.h (thread_db_notice_clone): Replace parent process
5734 parameter with parent thread parameter.
5735 * thread-db.c (find_one_thread): Add comment.
5736 (thread_db_notice_clone): Replace parent process parameter with
5737 parent thread parameter. Temporarily switch to the parent thread.
5738
57392017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5740
5741 * gdbthread.h: Include "common-gdbthread.h".
5742 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5743 "if" when validating the ptid.
5744 * remote-utils.c: Include "gdbthread.h".
5745 (prepare_resume_reply): Use "switch_to_thread".
5746 * target.c (done_accessing_memory): Likewise.
5747
57482017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5749
5750 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5751 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5752 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5753 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5754 s390x-gs-linux64-ipa.o to ipa_obj.
5755 * linux-s390-low.c (HWCAP_S390_GS): New define.
5756 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5757 New functions.
5758 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5759 (s390_arch_setup): Check for guarded-storage support and choose
5760 appropriate tdesc.
5761 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5762 init_registers_s390x_gs_linux64.
5763 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5764 enum value.
5765 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5766 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5767
57682017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5769
5770 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5771
57722017-09-21 Kevin Buettner <kevinb@redhat.com>
5773
5774 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5775 (thread_db_thread_handle): Declare.
5776 * linux-low.c (linux_target_ops): Initialize thread_handle.
5777 * server.c (handle_qxfer_threads_worker): Add support for
5778 "handle" attribute.
5779 * target.h (struct target_ops): Add new function pointer,
5780 thread_handle.
5781 (target_thread_handle): Define.
5782 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5783 field in lwp.
5784 (thread_db_thread_handle): New function.
5785
57862017-09-21 Kevin Buettner <kevinb@redhat.com>
5787
5788 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
5789 * linux-low.h (thread_db_notice_clone): Declare.
5790 * thread-db.c (thread_db_notice_clone): New function.
5791
57922017-09-21 Pedro Alves <palves@redhat.com>
5793
5794 * server.c (gdb_read_memory, handle_status, process_serial_event)
5795 (handle_serial_event, handle_target_event): Adjust to
5796 set_desired_thread prototype change.
5797 * target.c (set_desired_thread): Remove 'use_general' parameter
5798 and adjust.
5799 * target.h (set_desired_thread): Remove 'use_general' parameter.
5800
58012017-09-20 Tom Tromey <tom@tromey.com>
5802
5803 * target.c (target_terminal::terminal_state): Define.
5804 (target_terminal::init): Rename from target_terminal_init.
5805 (target_terminal::inferior): Rename from
5806 target_terminal_inferior.
5807 (target_terminal::ours): Rename from target_terminal_ours.
5808 (target_terminal::ours_for_output, target_terminal::info): New.
5809
58102017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5811
5812 * server.c (accumulate_file_name_length): Remove.
5813 (emit_dll_description): Adjust to std::string change.
5814 (handle_qxfer_libraries): Use std::string to hold document.
5815
58162017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5817
5818 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
5819 return type of xml_escape_text.
5820 * server.c (emit_dll_description): Likewise.
5821
58222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5823
5824 * server.c (captured_main): Accept argument for --selftest.
5825 Update run_tests call.
5826 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
5827 when registering selftests.
5828
58292017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
5830
5831 * regcache.c (get_thread_regcache): Update code to use "std::vector"
5832 instead of "VEC" for "target_desc.reg_defs".
5833 (regcache_cpy): Likewise.
5834 (registers_to_string): Likewise.
5835 (registers_from_string): Likewise.
5836 (find_regno): Likewise.
5837 (supply_regblock): Likewise.
5838 (regcache_raw_read_unsigned): Likewise.
5839 * tdesc.c (init_target_desc): Likewise.
5840 (tdesc_create_reg): Likewise.
5841 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
5842 (struct target_desc) <reg_defs>: Convert to "std::vector".
5843 (target_desc): Do not initialize "reg_defs".
5844 (~target_desc): Update code to use "std::vector" instead of "VEC"
5845 for "target_desc.reg_defs".
5846 (operator==): Likewise.
5847
58482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5849
5850 * inferiors.h (thread_to_gdb_id): Remove.
5851 * inferiors.c (thread_to_gdb_id): Remove.
5852 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
5853 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
5854 lynx_store_registers, lynx_read_memory, lynx_write_memory):
5855 Likewise.
5856 * nto-low.c (nto_fetch_registers, nto_store_registers,
5857 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
5858
58592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5860
5861 * inferiors.h (gdb_id_to_thread_id): Remove.
5862 * inferiors.c (gdb_id_to_thread_id): Remove.
5863 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
5864 removal. Move pid declaration closer to where it's used.
5865
58662017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5867
5868 * server.c (handle_detach): New function.
5869 (process_serial_event): Move code out, call handle_detach.
5870
58712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5872
5873 * server.c (require_running): Rename to ...
5874 (require_running_or_return): ... this ...
5875 (require_running_or_break): ... and this.
5876 (handle_query, process_serial_event): Adjust.
5877
58782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5879
5880 * linux-low.c (linux_set_resume_request): Remove unused
5881 variables.
5882
58832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5884
5885 * server.c (first_thread_of): Remove.
5886 (process_serial_event): Replace usage of first_thread_of with
5887 find_any_thread_of_pid.
5888 * tracepoint.c (same_process_p): Remove.
5889 (gdb_agent_about_to_close): Replace usage of same_process_p with
5890 find_any_thread_of_pid.
5891 * linux-x86-low.c (same_process_callback): Remove.
5892 (x86_arch_setup_process_callback): Replace usage of
5893 same_process_callback with find_any_thread_of_pid.
5894 * thread-db.c (any_thread_of): Remove.
5895 (switch_to_process): Replace usage of any_thread_of with
5896 find_any_thread_of_pid.
5897 * inferiors.c (thread_pid_matches_callback): Remove.
5898 (find_thread_process): Adjust to use find_any_thread_of_pid.
5899
59002017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5901
5902 * regcache.c (get_thread_regcache): Guard calls to "memset"
5903 with "!VEC_empty".
5904
59052017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5906
5907 * linux-low.c (handle_extended_wait): Use
5908 "allocate_target_description" instead of "XNEW".
5909 * linux-x86-low.c (initialize_low_arch): Likewise.
5910
59112017-09-05 Yao Qi <yao.qi@linaro.org>
5912
5913 * configure.srv (srv_i386_regobj): Remove.
5914 (srv_amd64_regobj): Remove.
5915 (srv_regobj): Set it to "" for x86 non-linux targets.
5916 * linux-x86-tdesc.c (i386_linux_read_description):
5917 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
5918 (init_registers_i386): Remove the declaration.
5919 (tdesc_i386): Remove the declaration.
5920 (lynx_i386_arch_setup): Call i386_create_target_description.
5921 * nto-x86-low.c: Likewise.
5922 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
5923 [!__x86_64__]: include arch/i386.h.
5924 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
5925
59262017-09-05 Yao Qi <yao.qi@linaro.org>
5927
5928 * configure.srv (srv_amd64_linux_xmlfiles): Remove
5929 i386/amd64-XXX-linux from it.
5930
59312017-09-05 Yao Qi <yao.qi@linaro.org>
5932
5933 * configure.srv: Empty srv_amd64_linux_regobj if $development is
5934 false.
5935 (ipa_amd64_linux_regobj): Remove.
5936 (ipa_x32_linux_regobj): Remove.
5937
59382017-09-05 Yao Qi <yao.qi@linaro.org>
5939
5940 * Makefile.in (arch-amd64.o): New rule.
5941 * configure.srv: Append arch-amd64.o.
5942 * linux-amd64-ipa.c: Include common/x86-xstate.h.
5943 (get_ipa_tdesc): Call amd64_linux_read_description.
5944 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
5945 and init_registers_amd64_XXX.
5946 * linux-x86-low.c (x86_linux_read_description): Call
5947 amd64_linux_read_description.
5948 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
5949 (initialize_low_arch): Don't call init_registers_x32_XXX and
5950 init_registers_amd64_XXX.
5951 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
5952 and tdesc_amd64_XXX.
5953 [__x86_64__] (amd64_tdesc_test): New function.
5954 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
5955 and init_registers_amd64_XXX.
5956 * linux-x86-tdesc.c: Include arch/amd64.h.
5957 (xcr0_to_tdesc_idx): New function.
5958 (i386_linux_read_description): New function.
5959 (amd64_get_ipa_tdesc_idx): New function.
5960 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
5961 (amd64_get_ipa_tdesc): Declare.
5962
59632017-09-05 Yao Qi <yao.qi@linaro.org>
5964
5965 * configure.srv (srv_i386_linux_xmlfiles): Remove
5966 i386/i386-XXX-linux.xml from it.
5967
59682017-09-05 Yao Qi <yao.qi@linaro.org>
5969
5970 * configure.srv: Set srv_i386_linux_regobj empty if $development
5971 is false.
5972 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
5973 initialize_low_tdesc.
5974 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
5975 with #if initialize_low_tdesc.
5976 * linux-x86-tdesc-selftest.c: New file.
5977 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
5978
59792017-09-05 Yao Qi <yao.qi@linaro.org>
5980
5981 * Makefile.in (arch-i386.o): New rule.
5982 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
5983 (x86_64-*-linux*): Likewise.
5984 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
5985 include arch/i386.h.
5986 (i386_linux_read_description): Remove code and call
5987 i386_create_target_description.
5988 * tdesc.c (allocate_target_description): New function.
5989 * tdesc.h (set_tdesc_architecture): Remove declaration.
5990 (set_tdesc_osabi): Likewise.
5991
59922017-09-05 Yao Qi <yao.qi@linaro.org>
5993
5994 * linux-x86-tdesc.c: Don't include <inttypes.h>.
5995 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5996 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
5997 .xmltarget.
5998 * server.c (get_features_xml): Call tdesc_get_features_xml.
5999 * tdesc.c (set_tdesc_architecture): New function.
6000 (set_tdesc_osabi): New function.
6001 (tdesc_get_features_xml): New function.
6002 (tdesc_create_feature): Add an argument.
6003 * tdesc.h (struct target_desc) <features>: New field.
6004 <arch, osabi>: New field.
6005 (~target_desc): xfree features, arch, and osabi.
6006 (target_desc::oerator==): Don't compare .xmltarget.
6007 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6008 (set_tdesc_osabi): Likewise.
6009 (tdesc_get_features_xml): Likewise.
6010
60112017-09-05 Yao Qi <yao.qi@linaro.org>
6012
6013 * linux-x86-tdesc.c: Include selftest.h.
6014 (i386_tdesc_test): New function.
6015 (initialize_low_tdesc): Call selftests::register_test.
6016 * tdesc.h: Include regdef.h.
6017 (target_desc): Override operator == and !=.
6018
60192017-09-05 Yao Qi <yao.qi@linaro.org>
6020
6021 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6022 (ipa_obj): Likewise.
6023 * linux-i386-ipa.c: Include common/x86-xstate.h
6024 (get_ipa_tdesc): Call i386_linux_read_description.
6025 (initialize_low_tracepoint): Don't call init_registers_XXX
6026 functions, call initialize_low_tdesc instead.
6027 * linux-x86-low.c (x86_linux_read_description): Call
6028 i386_linux_read_description.
6029 (initialize_low_arch): Don't call init_registers_i386_XXX
6030 functions, call initialize_low_tdesc.
6031 * linux-x86-tdesc.c: New file.
6032 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6033 (i386_get_ipa_tdesc_idx): Declare.
6034 (i386_get_ipa_tdesc): Declare.
6035 (initialize_low_tdesc): Declare.
6036
60372017-09-05 Yao Qi <yao.qi@linaro.org>
6038
6039 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6040 instead of 0.
6041
60422017-09-05 Yao Qi <yao.qi@linaro.org>
6043
6044 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6045 * regcache.c (get_thread_regcache): Use VEC_length.
6046 (init_register_cache): Likewise.
6047 (regcache_cpy): Likewise.
6048 (registers_to_string): Iterate reg_defs via VEC_iterate.
6049 (find_regno): Likewise.
6050 (find_register_by_number): Use VEC_index.
6051 (register_size): Call find_register_by_number.
6052 (register_data): Call find_register_by_number.
6053 (supply_regblock): Use VEC_length.
6054 (regcache_raw_read_unsigned): Likewise.
6055 * tdesc.c (init_target_desc): Iterate reg_defs via
6056 VEC_iterate.
6057 (default_description): Update initializer.
6058 (copy_target_description): Don't update field num_registers.
6059 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6060 <num_registers>: Remove.
6061
60622017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6063
6064 * Makefile.in (.SECONDARY): Define target.
6065
60662017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6067
6068 * linux-low.c (linux_wait_1): Adjust.
6069 * server.c (queue_stop_reply_callback): Adjust.
6070
60712017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6072
6073 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6074 QEnvironmentUnset and QEnvironmentReset packets.
6075 (handle_query): Inform remote that QEnvironmentHexEncoded,
6076 QEnvironmentUnset and QEnvironmentReset are supported.
6077
60782017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6079
6080 * inferiors.h (inferior_target_data): Rename to ...
6081 (thread_target_data): ... this.
6082 (inferior_regcache_data): Rename to ...
6083 (thread_regcache_data): ... this.
6084 (set_inferior_regcache_data): Rename to ...
6085 (set_thread_regcache_data): ... this.
6086 * inferiors.c (inferior_target_data): Rename to ...
6087 (thread_target_data): ... this.
6088 (inferior_regcache_data): Rename to ...
6089 (thread_regcache_data): ... this.
6090 (set_inferior_regcache_data): Rename to ...
6091 (set_thread_regcache_data): ... this.
6092 (free_one_thread): Update.
6093 * linux-low.h (get_thread_lwp): Update.
6094 * regcache.c (get_thread_regcache): Update.
6095 (regcache_invalidate_thread): Update.
6096 (free_register_cache_thread): Update.
6097 * win32-i386-low.c (update_debug_registers_callback): Update.
6098 (win32_get_current_dr): Update.
6099 * win32-low.c (thread_rec): Update.
6100 (delete_thread_info): Update.
6101 (continue_one_thread): Update.
6102 (suspend_one_thread): Update.
6103
61042017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6105
6106 * inferiors.c (set_inferior_target_data): Remove.
6107 * inferiors.h (set_inferior_target_data): Remove.
6108
61092017-08-18 Yao Qi <yao.qi@linaro.org>
6110
6111 * Makefile.in (OBS): Add selftest.o.
6112 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6113 * configure, config.in: Re-generated.
6114 * server.c: Include common/sefltest.h.
6115 (captured_main): Handle option --selftest.
6116
61172017-08-09 Yao Qi <yao.qi@linaro.org>
6118
6119 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6120 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6121 i386-avx-mpx.o and i386-mmx.o.
6122 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6123 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6124 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6125 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6126 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6127 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6128 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6129 i386/amd64-avx-mpx.xml.
6130
61312017-08-09 Yao Qi <yao.qi@linaro.org>
6132
6133 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6134 and x32-avx-avx512.o.
6135 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6136 i386/x32-avx-avx512.xml.
6137
61382017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6139
6140 * tracepoint.h (enum class fast_tpoint_collect_result): New
6141 enumeration.
6142 (fast_tracepoint_collecting): Change return type to
6143 fast_tpoint_collect_result.
6144 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6145 * linux-low.h: Include tracepoint.h.
6146 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6147 fast_tpoint_collect_result.
6148 * linux-low.c (handle_tracepoints): Adjust.
6149 (linux_fast_tracepoint_collecting): Change return type to
6150 fast_tpoint_collect_result.
6151 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6152 linux_wait_1, stuck_in_jump_pad_callback,
6153 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6154 proceed_one_lwp): Adjust to type change.
6155
61562017-07-10 Yao Qi <yao.qi@linaro.org>
6157
6158 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6159
61602017-06-29 Yao Qi <yao.qi@linaro.org>
6161
6162 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6163 Remove.
6164 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6165
61662017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6167
6168 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6169
61702017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6171
6172 * linux-low.c (linux_create_inferior): Adjust code to access the
6173 environment information via 'gdb_environ' class.
6174 * lynx-low.c (lynx_create_inferior): Likewise.
6175 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6176 (get_environ): Return a pointer to 'our_environ'.
6177 (captured_main): Initialize 'our_environ'.
6178 * server.h (get_environ): Adjust prototype.
6179 * spu-low.c (spu_create_inferior): Adjust code to access the
6180 environment information via 'gdb_environ' class.
6181
61822017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6183
6184 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6185 usage of "register" keyword.
6186
61872017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6188
6189 * configure: Re-generate.
6190
61912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6192
6193 * configure: Re-generate.
6194
61952017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6196
6197 * Makefile.in (COMPILE.pre): Add "-x c++".
6198
61992017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6200
6201 * fork-child.c: Conditionally include <signal.h>.
6202
62032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6204
6205 * server.c (handle_general_set): Handle new packet
6206 "QStartupWithShell".
6207 (handle_query): Add "QStartupWithShell" to the list of supported
6208 packets.
6209 (gdbserver_usage): Add help text explaining the
6210 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6211 options.
6212 (captured_main): Recognize and act upon the presence of the new
6213 CLI options.
6214
62152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6216 Pedro Alves <palves@redhat.com>
6217
6218 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6219 * configure: Regenerate.
6220 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6221 "fork-inferior.o".
6222 (i[34567]86-*-lynxos*): Likewise.
6223 (spu*-*-*): Likewise.
6224 * fork-child.c: New file.
6225 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6226 and "environ.h".
6227 (linux_ptrace_fun): New function.
6228 (linux_create_inferior): Adjust function prototype to reflect
6229 change on "target.h". Adjust function code to use
6230 "fork_inferior".
6231 (linux_request_interrupt): Delete "signal_pid".
6232 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6233 (lynx_ptrace_fun): New function.
6234 (lynx_create_inferior): Adjust function prototype to reflect
6235 change on "target.h". Adjust function code to use
6236 "fork_inferior".
6237 * nto-low.c (nto_create_inferior): Adjust function prototype and
6238 code to reflect change on "target.h". Update comments.
6239 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6240 "common-terminal.h" and "environ.h".
6241 (terminal_fd): Moved to fork-child.c.
6242 (old_foreground_pgrp): Likewise.
6243 (restore_old_foreground_pgrp): Likewise.
6244 (last_status): Make it global.
6245 (last_ptid): Likewise.
6246 (our_environ): New variable.
6247 (startup_with_shell): Likewise.
6248 (program_name): Likewise.
6249 (program_argv): Rename to...
6250 (program_args): ...this.
6251 (wrapper_argv): New variable.
6252 (start_inferior): Delete function.
6253 (get_exec_wrapper): New function.
6254 (get_exec_file): Likewise.
6255 (get_environ): Likewise.
6256 (prefork_hook): Likewise.
6257 (post_fork_inferior): Likewise.
6258 (postfork_hook): Likewise.
6259 (postfork_child_hook): Likewise.
6260 (handle_v_run): Update code to deal with arguments coming from the
6261 remote host. Update calls from "start_inferior" to
6262 "create_inferior".
6263 (captured_main): Likewise. Initialize environment variable. Call
6264 "have_job_control".
6265 * server.h (post_fork_inferior): New prototype.
6266 (get_environ): Likewise.
6267 (last_status): Declare.
6268 (last_ptid): Likewise.
6269 (signal_pid): Likewise.
6270 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6271 (spu_ptrace_fun): New function.
6272 (spu_create_inferior): Adjust function prototype to reflect change
6273 on "target.h". Adjust function code to use "fork_inferior".
6274 * target.c (target_terminal_init): New function.
6275 (target_terminal_inferior): Likewise.
6276 (target_terminal_ours): Likewise.
6277 * target.h: Include <vector>.
6278 (struct target_ops) <create_inferior>: Update prototype.
6279 (create_inferior): Update macro.
6280 * utils.c (gdb_flush_out_err): New function.
6281 * win32-low.c (win32_create_inferior): Adjust function prototype
6282 and code to reflect change on "target.h".
6283
62842017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6285
6286 * inferiors.c (switch_to_thread): New function.
6287
62882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6289
6290 * Makefile.in (SFILE): Add "common/job-control.c".
6291 (OBS): Add "job-control.o".
6292
62932017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6294
6295 * Makefile: Remove "@host_makefile_frag@".
6296
62972017-05-05 Pedro Alves <palves@redhat.com>
6298
6299 * configure: Regenerate.
6300
63012017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6302
6303 * configure: Regenerate.
6304
63052017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6306
6307 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6308 software_single_step change of return type to
6309 std::vector<CORE_ADDR>.
6310 * linux-low.c (install_software_single_step_breakpoints):
6311 Likewise.
6312 * linux-low.h (install_software_single_step_breakpoints):
6313 Likewise.
6314
63152017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6316
6317 * remote-utils.c: Include "gdb_termios.h" instead of
6318 "terminal.h".
6319 * terminal.h: Delete file.
6320
63212017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6322
6323 * server.c: Include <vector>.
6324 <program_argv, wrapper_argv>: Convert to std::vector.
6325 (start_inferior): Rewrite function to use C++.
6326 (handle_v_run): Likewise. Update code that calculates the argv
6327 based on the vRun packet; use C++.
6328 (captured_main): Likewise.
6329
63302017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6331
6332 * server.c (handle_v_cont): Initialize thread_resume::thread
6333 with null_ptid.
6334
63352017-04-05 Pedro Alves <palves@redhat.com>
6336
6337 * configure: Regenerate.
6338
63392017-04-05 Pedro Alves <palves@redhat.com>
6340
6341 * gdbreplay.c (sync_error): Constify.
6342 * linux-x86-low.c (push_opcode): Constify.
6343
63442017-04-05 Pedro Alves <palves@redhat.com>
6345
6346 * win32-low.c (get_child_debug_event)
6347 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6348 Report TARGET_WAITKIND_SPURIOUS instead.
6349
63502017-04-05 Pedro Alves <palves@redhat.com>
6351
6352 * remote-utils.c (remote_prepare, remote_open): Constify.
6353 * remote-utils.h (remote_prepare, remote_open): Constify.
6354 * server.c (captured_main): Constify 'port' handling.
6355
63562017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6357
6358 * Makefile.in (clean): Clear .deps.
6359
63602017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6361
6362 * .gitignore: Remove generated files, replace with wildcard.
6363 * (clean): Replace removal of generated files with wildcard.
6364 (version.c): Replace with...
6365 (version-generated.c): ...this.
6366 (xml-builtin.c): Replace with...
6367 (xml-builtin-generated.c): ...this.
6368 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6369 (%.c: *regformats*): Replace with...
6370 (%-generated.c: *regformats*): ...this.
6371
63722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6373
6374 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6375 (xtensa_fill_gregset): Call collect_register_by_name for
6376 threadptr register.
6377 (xtensa_store_gregset): Call supply_register_by_name for
6378 threadptr register.
6379
63802017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6381
6382 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6383 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6384 (xtensa_store_gregset): Call supply_register for all registers in
6385 a0_regnum..a0_regnum + C0_NREGS range.
6386
63872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6388
6389 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6390 (ax-ipa.o: ax.c): Remove.
6391 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6392 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6393 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6394 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6395 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6396
63972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6398
6399 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6400 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6401 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6402 (errors-ipa.o: ../common/errors.c): Remove.
6403 (format-ipa.o: ../common/format.c): Remove.
6404 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6405
64062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6407
6408 * Makefile.in (%-ipa.o: %.c): New rule.
6409 (tracepoint-ipa.o: tracepoint.c): Remove.
6410 (utils-ipa.o: utils.c): Remove.
6411 (remote-utils-ipa.o: remote-utils.c): Remove.
6412 (regcache-ipa.o: regcache.c): Remove.
6413 (i386-linux-ipa.o: i386-linux.c): Remove.
6414 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6415 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6416 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6417 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6418 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6419 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6420 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6421 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6422 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6423 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6424 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6425 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6426 (aarch64-ipa.o: aarch64.c): Remove.
6427 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6428 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6429 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6430 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6431 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6432 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6433 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6434 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6435 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6436 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6437 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6438 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6439 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6440 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6441 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6442 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6443 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6444 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6445 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6446 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6447 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6448 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6449 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6450 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6451 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6452 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6453 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6454 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6455 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6456 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6457 (tdesc-ipa.o: tdesc.c): Remove.
6458 (x32-linux-ipa.o: x32-linux.c): Remove.
6459 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6460 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6461
64622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6463
6464 * Makefile.in (%.o: ../arch/%.c): New rule.
6465 (arm.o: ../arch/arm.c): Remove.
6466 (arm-linux.o: ../arch/arm-linux.c): Remove.
6467 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6468 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6469
64702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6471
6472 * Makefile.in (%.o: ../nat/%.c): New rule.
6473 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6474 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6475 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6476 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6477 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6478 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6479 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6480 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6481 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6482 (linux-personality.o: ../nat/linux-personality.c): Remove.
6483 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6484 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6485 (x86-linux.o: ../nat/x86-linux.c): Remove.
6486 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6487 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6488
64892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6490
6491 * Makefile.in (%.o: ../common/%.c): New rule.
6492 (signals.o: ../common/signals.c): Remove.
6493 (print-utils.o: ../common/print-utils.c): Remove.
6494 (rsp-low.o: ../common/rsp-low.c): Remove.
6495 (common-utils.o: ../common/common-utils.c): Remove.
6496 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6497 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6498 (vec.o: ../common/vec.c): Remove.
6499 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6500 (xml-utils.o: ../common/xml-utils.c): Remove.
6501 (ptid.o: ../common/ptid.c): Remove.
6502 (buffer.o: ../common/buffer.c): Remove.
6503 (format.o: ../common/format.c): Remove.
6504 (filestuff.o: ../common/filestuff.c): Remove.
6505 (agent.o: ../common/agent.c): Remove.
6506 (errors.o: ../common/errors.c): Remove.
6507 (environ.o: ../common/environ.c): Remove.
6508 (common-debug.o: ../common/common-debug.c): Remove.
6509 (cleanups.o: ../common/cleanups.c): Remove.
6510 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6511 (fileio.o: ../common/fileio.c): Remove.
6512 (common-regcache.o: ../common/common-regcache.c): Remove.
6513 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6514 (new-op.o: ../common/new-op.c): Remove.
6515 (btrace-common.o: ../common/btrace-common.c): Remove.
6516
65172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6518
6519 * Makefile.in (%.o: ../target/%.c): New rule.
6520 (waitstatus.o: ../target/waitstatus.c): Remove.
6521
65222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6523
6524 * Makefile.in
6525 (%.c: ../regformats/%.dat,
6526 (%.c: ../regformats/arm/%.dat,
6527 (%.c: ../regformats/i386/%.dat,
6528 (%.c: ../regformats/rs6000/%.dat): New rules.
6529 (aarch64.c): Remove.
6530 (reg-arm.c): Remove.
6531 (arm-with-iwmmxt.c): Remove.
6532 (arm-with-vfpv2.c): Remove.
6533 (arm-with-vfpv3.c): Remove.
6534 (arm-with-neon.c): Remove.
6535 (reg-bfin.c): Remove.
6536 (reg-cris.c): Remove.
6537 (reg-crisv32.c): Remove.
6538 (i386.c): Remove.
6539 (i386-linux.c): Remove.
6540 (i386-avx.c): Remove.
6541 (i386-avx-linux.c): Remove.
6542 (i386-avx-avx512.c): Remove.
6543 (i386-avx-avx512-linux.c): Remove.
6544 (i386-mpx.c): Remove.
6545 (i386-mpx-linux.c): Remove.
6546 (i386-avx-mpx-avx512-pku.c): Remove.
6547 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6548 (i386-avx-mpx.c): Remove.
6549 (i386-avx-mpx-linux.c): Remove.
6550 (i386-mmx.c): Remove.
6551 (i386-mmx-linux.c): Remove.
6552 (reg-ia64.c): Remove.
6553 (reg-m32r.c): Remove.
6554 (reg-m68k.c): Remove.
6555 (reg-cf.c): Remove.
6556 (mips-linux.c): Remove.
6557 (mips-dsp-linux.c): Remove.
6558 (mips64-linux.c): Remove.
6559 (mips64-dsp-linux.c): Remove.
6560 (nios2-linux.c): Remove.
6561 (powerpc-32.c): Remove.
6562 (powerpc-32l.c): Remove.
6563 (powerpc-altivec32l.c): Remove.
6564 (powerpc-cell32l.c): Remove.
6565 (powerpc-vsx32l.c): Remove.
6566 (powerpc-isa205-32l.c): Remove.
6567 (powerpc-isa205-altivec32l.c): Remove.
6568 (powerpc-isa205-vsx32l.c): Remove.
6569 (powerpc-e500l.c): Remove.
6570 (powerpc-64l.c): Remove.
6571 (powerpc-altivec64l.c): Remove.
6572 (powerpc-cell64l.c): Remove.
6573 (powerpc-vsx64l.c): Remove.
6574 (powerpc-isa205-64l.c): Remove.
6575 (powerpc-isa205-altivec64l.c): Remove.
6576 (powerpc-isa205-vsx64l.c): Remove.
6577 (s390-linux32.c): Remove.
6578 (s390-linux32v1.c): Remove.
6579 (s390-linux32v2.c): Remove.
6580 (s390-linux64.c): Remove.
6581 (s390-linux64v1.c): Remove.
6582 (s390-linux64v2.c): Remove.
6583 (s390-te-linux64.c): Remove.
6584 (s390-vx-linux64.c): Remove.
6585 (s390-tevx-linux64.c): Remove.
6586 (s390x-linux64.c): Remove.
6587 (s390x-linux64v1.c): Remove.
6588 (s390x-linux64v2.c): Remove.
6589 (s390x-te-linux64.c): Remove.
6590 (s390x-vx-linux64.c): Remove.
6591 (s390x-tevx-linux64.c): Remove.
6592 (tic6x-c64xp-linux.c): Remove.
6593 (tic6x-c64x-linux.c): Remove.
6594 (tic6x-c62x-linux.c): Remove.
6595 (reg-sh.c): Remove.
6596 (reg-sparc64.c): Remove.
6597 (reg-spu.c): Remove.
6598 (amd64.c): Remove.
6599 (amd64-linux.c): Remove.
6600 (amd64-avx.c): Remove.
6601 (amd64-avx-linux.c): Remove.
6602 (amd64-avx-avx512.c): Remove.
6603 (amd64-avx-avx512-linux.c): Remove.
6604 (amd64-mpx.c): Remove.
6605 (amd64-mpx-linux.c): Remove.
6606 (amd64-avx-mpx-avx512-pku.c): Remove.
6607 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6608 (amd64-avx-mpx.c): Remove.
6609 (amd64-avx-mpx-linux.c): Remove.
6610 (x32.c): Remove.
6611 (x32-linux.c): Remove.
6612 (x32-avx.c): Remove.
6613 (x32-avx-linux.c): Remove.
6614 (x32-avx-avx512.c): Remove.
6615 (x32-avx-avx512-linux.c): Remove.
6616 (reg-xtensa.c): Remove.
6617 (reg-tilegx.c): Remove.
6618 (reg-tilegx32.c): Remove.
6619
66202017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6621
6622 * Makefile.in (SFILES): Add "common/environ.c".
6623 (OBJS): Add "common/environ.h".
6624
66252017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6626
6627 * configure.ac: Check if the fs_base and gs_base members of
6628 `struct user_regs_struct' exist.
6629 * config.in: Regenerated.
6630 * configure: Likewise.
6631
66322017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6633
6634 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6635 target_read_memory.
6636 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6637 (get_next_pcs_syscall_next_pc): Likewise.
6638
66392016-12-23 Luis Machado <lgustavo@codesourcery.com>
6640
6641 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6642 * nto-x86-low.c: Likewise.
6643
66442016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6645
6646 * Makefile.in: Include disable-implicit-rules.mk.
6647
66482016-11-23 Pedro Alves <palves@redhat.com>
6649
6650 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6651 (debug_vprintf): Use std::chrono::steady_clock instead of
6652 gettimeofday. Use '.' instead of ':'.
6653 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6654 (get_timestamp): Use std::chrono::steady_clock instead of
6655 gettimeofday.
6656
66572016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6658
6659 * Makefile.in: Fix whitespace formatting.
6660
66612016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6662
6663 * Makefile.in (SFILES, OBS): Flatten list and order
6664 alphabetically.
6665
66662016-11-23 Pedro Alves <palves@redhat.com>
6667
6668 * event-loop.c (handle_file_event): Use warning.
6669 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6670 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6671 Use warning.
6672
66732016-11-23 Pedro Alves <palves@redhat.com>
6674
6675 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6676 output.
6677 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6678 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6679 debug_printf and debug_flush for debug output.
6680 * server.c (handle_general_set): Likewise.
6681 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6682 output.
6683
66842016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6685
6686 * Makefile.in (.c.o): Replace rule with ...
6687 (%.o: %.c): ... this one.
6688
66892016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6690
6691 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6692 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6693 make.
6694 * configure.ac: Remove checks for the make program.
6695 * configure: Re-generate.
6696
66972016-10-28 Pedro Alves <palves@redhat.com>
6698
6699 * Makefile.in (CXX_DIALECT): Get from configure.
6700 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6701 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6702 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6703 * config.in: Regenerate.
6704 * configure: Regenerate.
6705
67062016-10-27 Yao Qi <yao.qi@linaro.org>
6707
6708 * linux-low.c (linux_supports_range_stepping): Return true if
6709 can_software_single_step return true.
6710
67112016-10-27 Yao Qi <yao.qi@linaro.org>
6712
6713 * inferiors.c (find_inferior_in_random): New function.
6714 * inferiors.h (find_inferior_in_random): Declare.
6715 * linux-low.c (linux_wait_for_event_filtered): Call
6716 find_inferior_in_random instead of find_inferior.
6717
67182016-10-27 Yao Qi <yao.qi@linaro.org>
6719
6720 * linux-low.c (linux_wait_1): If single-step breakpoints are
6721 inserted, remove them.
6722
67232016-10-26 Pedro Alves <palves@redhat.com>
6724
6725 * linux-low.c (handle_extended_wait): Link parent/child fork
6726 threads.
6727 (linux_wait_1): Unlink them.
6728 (linux_set_resume_request): Ignore resume requests for
6729 already-resumed and unhandled fork child threads.
6730 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6731 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6732 New functions.
6733 (handle_v_requests) <vCont>: Don't call require_running.
6734 * server.h (in_queued_stop_replies): New declaration.
6735
67362016-10-24 Yao Qi <yao.qi@linaro.org>
6737
6738 PR server/20733
6739 * linux-aarch64-low.c (append_insns): Cast the return value to
6740 'uint32_t *'.
6741
67422016-10-10 Yao Qi <yao.qi@linaro.org>
6743
6744 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6745
67462016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6747
6748 * target.c (target_supports_multi_process): New function, moved
6749 from...
6750 * target.h (target_supports_multi_process): ... here. Remove
6751 macro.
6752
67532016-10-05 Tom Tromey <tom@tromey.com>
6754
6755 PR remote/20655:
6756 * tracepoint.c (handle_tracepoint_bkpts): Check
6757 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6758
67592016-10-05 Yao Qi <yao.qi@linaro.org>
6760
6761 * configure.srv: Update the path of arm-*.xml files.
6762
67632016-10-05 Terry Guo <terry.guo@arm.com>
6764 Yao Qi <yao.qi@linaro.org>
6765
6766 * Makefile.in: Adjust the path of rules.
6767 * configure.srv: Update the path of xml files.
6768 * regformats/arm-with-iwmmxt.dat: Regenerated.
6769 * regformats/arm-with-neon.dat: Likewise.
6770 * regformats/arm-with-vfpv2.dat: Likewise.
6771 * regformats/arm-with-vfpv3.dat Likewise.
6772
67732016-09-30 Yao Qi <yao.qi@linaro.org>
6774
6775 PR gdbserver/20627
6776 * target.c (target_stop_and_wait): Don't call
6777 target_continue_no_signal, use resume_stop instead.
6778
67792016-09-26 Yao Qi <yao.qi@linaro.org>
6780
6781 * linux-low.c (linux_wait_1): Call debug_exit.
6782
67832016-09-23 Pedro Alves <palves@redhat.com>
6784
6785 * Makefile.in (SFILES): Add common/new-op.c.
6786 (OBS): Add common/new-op.o.
6787 (new-op.o): New rule.
6788
67892016-09-21 Simon Marchi <simon.marchi@ericsson.com>
6790
6791 * .gitinore: Ignore more files.
6792
67932016-09-21 Yao Qi <yao.qi@linaro.org>
6794
6795 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
6796 23.
6797
67982016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
6799
6800 * server.c (start_inferior): Call target_mourn_inferior instead of
6801 mourn_inferior; pass ptid_t argument to it.
6802 (resume): Likewise.
6803 (handle_target_event): Likewise.
6804 * target.c (target_mourn_inferior): New function.
6805 * target.h (mourn_inferior): Delete macro.
6806
68072016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6808
6809 * linux-low.c (lwp_is_stepping): New function.
6810
68112016-09-06 Carl Love <cel@us.ibm.com>
6812
6813 * server.c (start_inferior): Fixed comment, requested comment change
6814 didn't get updated correctly. Removed reference to ptrace () call as
6815 it is only true on Linux systems.
6816
68172016-09-06 Carl Love <cel@us.ibm.com>
6818
6819 * server.c (start_inferior): Do not call
6820 function target_post_create_inferior () if the
6821 inferior process has already exited.
6822
68232016-09-05 Pedro Alves <palves@redhat.com>
6824
6825 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
6826 (COMPILE.pre, CC_LD): Use CXX directly.
6827 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6828 * acinclude.m4: Don't include build-with-cxx.m4.
6829 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
6830 * configure: Regenerate.
6831
68322016-09-02 Akash Trehan <akash.trehan123@gmail.com>
6833
6834 PR gdb/19495
6835 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
6836 call writing data to own_buf.
6837
68382016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6839
6840 * target.c (mywait): Call target_wait instead of
6841 the_target->wait.
6842 (target_wait): New function.
6843
68442016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6845
6846 * server.c (start_inferior): New variable 'ptid'. Replace calls
6847 to the_target->resume by target_continue{,_no_signal}, depending
6848 on the case.
6849 * target.c (target_stop_and_wait): Call target_continue_no_signal
6850 instead of the_target->resume.
6851 (target_continue): New function.
6852
68532016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
6854
6855 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
6856
68572016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
6858
6859 PR server/20491
6860 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
6861 ps_prochandle.
6862 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
6863 * linux-arm-low.c (ps_get_thread_area): Likewise.
6864 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
6865 * linux-m68k-low.c (ps_get_thread_area): Likewise.
6866 * linux-mips-low.c (ps_get_thread_area): Likewise.
6867 * linux-nios2-low.c (ps_get_thread_area): Likewise.
6868 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
6869 * linux-x86-low.c (ps_get_thread_area): Likewise.
6870 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
6871
68722016-08-19 Pedro Alves <palves@redhat.com>
6873
6874 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
6875
68762016-08-19 Pedro Alves <palves@redhat.com>
6877
6878 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
6879 comment. Use memcpy instead of casting through unsigned long.
6880
68812016-08-19 Pedro Alves <palves@redhat.com>
6882
6883 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
6884 allocating around 0x80000000.
6885
68862016-08-19 Pedro Alves <palves@redhat.com>
6887
6888 PR gdb/20415
6889 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
6890 (x32-avx512-linux-ipa.o): New rules.
6891 * configure.ac (x86_64-*-linux*): New x32 check.
6892 * configure.srv (ipa_x32_linux_regobj): New.
6893 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
6894 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
6895 descriptions.
6896 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
6897 descriptions.
6898 * configure: Regenerate.
6899
69002016-08-09 Pedro Alves <palves@redhat.com>
6901
6902 PR gdb/18653
6903 * Makefile.in (OBS): Add signals-state-save-restore.o.
6904 (signals-state-save-restore.o): New rule.
6905 * config.in: Regenerate.
6906 * configure: Regenerate.
6907 * linux-low.c: Include "signals-state-save-restore.h".
6908 (linux_create_inferior): Call
6909 restore_original_signals_state.
6910 * server.c: Include "dispositions-save-restore.h".
6911 (captured_main): Call save_original_signals_state.
6912
69132016-08-05 Pedro Alves <palves@redhat.com>
6914
6915 * configure: Regenerate.
6916
69172016-08-04 Yao Qi <yao.qi@linaro.org>
6918
6919 * linux-low.c (regsets_fetch_inferior_registers): Check
6920 errno is ESRCH or not.
6921
69222016-08-02 Yao Qi <yao.qi@linaro.org>
6923
6924 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
6925 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
6926 (thread_db_load_search): Update.
6927 (try_thread_db_load_1): Don't look for td_ta_event_addr,
6928 td_ta_set_event and td_ta_event_getmsg.
6929
69302016-07-26 Pedro Alves <palves@redhat.com>
6931
6932 PR server/20414
6933 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
6934 of unsigned long for 64-bit registers and use uint32_t instead of
6935 unsigned int for 32-bit registers.
6936
69372016-07-26 Pedro Alves <palves@redhat.com>
6938
6939 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
6940 to 'ptrace'.
6941
69422016-07-21 Tom Tromey <tom@tromey.com>
6943
6944 * configure: Rebuild.
6945
69462016-07-21 Yao Qi <yao.qi@linaro.org>
6947
6948 * mem-break.c (find_gdb_breakpoint): Cast bp to
6949 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
6950
69512016-07-21 Yao Qi <yao.qi@linaro.org>
6952
6953 * server.c (handle_v_requests): Support s and S actions
6954 if target_supports_software_single_step return true.
6955
69562016-07-21 Yao Qi <yao.qi@linaro.org>
6957
6958 * linux-low.c (resume_stopped_resumed_lwps): If resume request
6959 is resume_step, call maybe_hw_step.
6960 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
6961 and unstop them.
6962 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
6963 breakpoints or not.
6964 (proceed_one_lwp): If resume request is resume_step, install
6965 reinsert breakpoints and call maybe_hw_step.
6966
69672016-07-21 Yao Qi <yao.qi@linaro.org>
6968
6969 * linux-low.c (proceed_one_lwp): Declare.
6970 (linux_resume_one_thread): Remove local variable 'step'.
6971 Lift code enqueue signal. Call proceed_one_lwp instead of
6972 linux_resume_one_lwp.
6973
69742016-07-21 Yao Qi <yao.qi@linaro.org>
6975
6976 * linux-low.c (linux_resume_one_thread): Call
6977 enqueue_pending_signal.
6978
69792016-07-21 Yao Qi <yao.qi@linaro.org>
6980
6981 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
6982 * inferiors.c (do_restore_current_thread_cleanup): New function.
6983 (make_cleanup_restore_current_thread): Likewise.
6984 * linux-low.c (install_software_single_step_breakpoints): Call
6985 make_cleanup_restore_current_thread. Switch current_thread to
6986 thread.
6987
69882016-07-21 Yao Qi <yao.qi@linaro.org>
6989
6990 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
6991 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
6992 (clone_one_breakpoint): Likewise.
6993 (delete_reinsert_breakpoints): Change parameter to thread.
6994 Callers updated.
6995 (has_reinsert_breakpoints): Likewise.
6996 (uninsert_reinsert_breakpoints): Likewise.
6997 (reinsert_reinsert_breakpoints): Likewise.
6998 * mem-break.h (set_reinsert_breakpoint): Update declaration.
6999 (delete_reinsert_breakpoints): Likewise.
7000 (reinsert_reinsert_breakpoints): Likewise.
7001 (uninsert_reinsert_breakpoints): Likewise.
7002 (has_reinsert_breakpoints): Likewise.
7003
70042016-07-21 Yao Qi <yao.qi@linaro.org>
7005
7006 * inferiors.c (get_thread_process): Make parameter const.
7007 * inferiors.h (get_thread_process): Update declaration.
7008 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7009 Add new parameters child_thread and parent_thread. Callers
7010 updated.
7011 * mem-break.h (clone_all_breakpoints): Update declaration.
7012
70132016-07-21 Yao Qi <yao.qi@linaro.org>
7014
7015 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7016 <command_list, handler>: Remove.
7017 (struct gdb_breakpoint): New.
7018 (struct other_breakpoint): New.
7019 (struct reinsert_breakpoint): New.
7020 (is_gdb_breakpoint): New function.
7021 (any_persistent_commands): Update command_list if
7022 is_gdb_breakpoint returns true.
7023 (set_breakpoint): Create breakpoints according to their types.
7024 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7025 (set_gdb_breakpoint_1): Likewise.
7026 (set_gdb_breakpoint): Likewise.
7027 (clear_breakpoint_conditions): Change parameter type to
7028 'struct gdb_breakpoint *'.
7029 (clear_breakpoint_commands): Likewise.
7030 (clear_breakpoint_conditions_and_commands): Likewise.
7031 (add_condition_to_breakpoint): Likewise.
7032 (add_breakpoint_condition): Likewise.
7033 (add_commands_to_breakpoint): Likewise.
7034 (check_breakpoints): Check other_breakpoint.
7035 (clone_one_breakpoint): Clone breakpopint according to its type.
7036 * mem-break.h (struct gdb_breakpoint): Declare.
7037 (set_gdb_breakpoint): Update declaration.
7038 (clear_breakpoint_conditions_and_commands): Likewise.
7039 (add_breakpoint_condition): Likewise.
7040 (add_breakpoint_commands): Likewise.
7041 * server.c (process_point_options): Change parameter type to
7042 'struct gdb_breakpoint *'.
7043
70442016-07-21 Yao Qi <yao.qi@linaro.org>
7045
7046 * mem-break.c (set_breakpoint_at): Rename it to ...
7047 (set_breakpoint_type_at): ... it.
7048 (set_breakpoint_at): Call set_breakpoint_type_at.
7049 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7050 * mem-break.h (set_breakpoint_at): Update comments.
7051
70522016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7053
7054 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7055 to buf parameter.
7056 (nios2_store_gregset): Likewise.
7057
70582016-07-01 Pedro Alves <palves@redhat.com>
7059 Antoine Tremblay <antoine.tremblay@ericsson.com>
7060
7061 * linux-low.c: Change interface to take the target lwp_info
7062 pointer directly and return void. Handle detaching from a zombie
7063 thread.
7064 (linux_detach_lwp_callback): New function.
7065 (linux_detach): Detach from the leader thread after detaching from
7066 the clone threads.
7067
70682016-06-28 Yao Qi <yao.qi@linaro.org>
7069
7070 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7071 for variable new_offset.
7072 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7073 (aarch64_ftrace_insn_reloc_cb): Likewise.
7074 (aarch64_ftrace_insn_reloc_tb): Likewise.
7075 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7076 PRIx64 instead of PRIx32.
7077
70782016-06-28 Yao Qi <yao.qi@linaro.org>
7079
7080 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7081 (the_low_target): Install arm_get_syscall_trapinfo.
7082
70832016-06-28 Yao Qi <yao.qi@linaro.org>
7084
7085 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7086 function.
7087 (the_low_target): Install aarch64_get_syscall_trapinfo.
7088
70892016-06-28 Yao Qi <yao.qi@linaro.org>
7090
7091 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7092 Callers updated.
7093 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7094 Remove parameter sysno.
7095 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7096 sysret.
7097
70982016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7099
7100 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7101 (s390_emit_ne_goto): Likewise.
7102 (s390_emit_lt_goto): Likewise.
7103 (s390_emit_le_goto): Likewise.
7104 (s390_emit_gt_goto): Likewise.
7105 (s390_emit_ge_goto): Likewise.
7106 (s390x_emit_eq_goto): Likewise.
7107 (s390x_emit_ne_goto): Likewise.
7108 (s390x_emit_lt_goto): Likewise.
7109 (s390x_emit_le_goto): Likewise.
7110 (s390x_emit_gt_goto): Likewise.
7111 (s390x_emit_ge_goto): Likewise.
7112 (s390_emit_ops_impl): Mark variable static.
7113 (s390x_emit_ops): Likewise.
7114
71152016-06-17 Yao Qi <yao.qi@linaro.org>
7116
7117 * linux-low.c (handle_extended_wait): Call
7118 uninsert_reinsert_breakpoints for the parent process. Remove
7119 reinsert breakpoints from the child process. Reinsert them to
7120 the parent process when vfork is done.
7121 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7122 (reinsert_reinsert_breakpoints): New function.
7123 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7124 (reinsert_reinsert_breakpoints): Declare.
7125
71262016-06-17 Yao Qi <yao.qi@linaro.org>
7127
7128 * linux-low.c (handle_extended_wait): If the parent is doing
7129 step-over, remove the reinsert breakpoints from the forked child.
7130
71312016-06-17 Yao Qi <yao.qi@linaro.org>
7132
7133 * linux-low.c (unsuspend_all_lwps): Declare.
7134 (linux_low_filter_event): If thread exited, call finish_step_over.
7135 If step-over is finished, unsuspend other threads.
7136
71372016-06-17 Yao Qi <yao.qi@linaro.org>
7138
7139 * linux-low.c (linux_resume_one_lwp_throw): Assert
7140 has_reinsert_breakpoints returns false.
7141 * mem-break.c (delete_disabled_breakpoints): Assert
7142 bp type isn't reinsert_breakpoint.
7143
71442016-06-17 Yao Qi <yao.qi@linaro.org>
7145
7146 * linux-low.c (maybe_hw_step): New function.
7147 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7148 (finish_step_over): Switch current_thread to lwp temporarily,
7149 and assert has_reinsert_breakpoints returns true.
7150 (proceed_one_lwp): Call maybe_hw_step.
7151 * mem-break.c (has_reinsert_breakpoints): New function.
7152 * mem-break.h (has_reinsert_breakpoints): Declare.
7153
71542016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7155
7156 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7157
71582016-05-17 Yao Qi <yao.qi@linaro.org>
7159
7160 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7161 instead of find_inferior.
7162
71632016-05-05 Yao Qi <yao.qi@linaro.org>
7164
7165 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7166 Initialize res to zero.
7167
71682016-05-05 Yao Qi <yao.qi@linaro.org>
7169
7170 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7171 to uint32_t.
7172
71732016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7174
7175 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7176 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7177 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7178
71792016-04-28 Par Olsson <par.olsson@windriver.com>
7180 Simon Marchi <simon.marchi@ericsson.com>
7181
7182 * tracepoint.c (write_inferior_int8): New function.
7183 (cmd_qtenable_disable): Write enable flag using
7184 write_inferior_int8.
7185
71862016-04-25 Yao Qi <yao.qi@linaro.org>
7187
7188 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7189 (need_step_over_p): Return zero if the LWP has pending signals
7190 can be delivered on software single step target.
7191
71922016-04-25 Yao Qi <yao.qi@linaro.org>
7193
7194 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7195 return instead of error.
7196
71972016-04-22 Yao Qi <yao.qi@linaro.org>
7198
7199 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7200 to 23.
7201
72022016-04-22 Yao Qi <yao.qi@linaro.org>
7203
7204 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7205 signal when stepping over breakpoint with software single
7206 step.
7207
72082016-04-21 Pedro Alves <palves@redhat.com>
7209
7210 * linux-s390-low.c (s390_collect_ptrace_register)
7211 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7212 add casts.
7213 (s390_check_regset): Use void * instead of gdb_byte *.
7214
72152016-04-20 Pedro Alves <palves@redhat.com>
7216
7217 * configure: Renegerate.
7218
72192016-04-20 Yao Qi <yao.qi@linaro.org>
7220
7221 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7222 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7223 number 16.
7224 (arm_store_gregset): Likewise.
7225
72262016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7227
7228 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7229 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7230 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7231 (amd64-avx-mpx-linux.c): New rules.
7232 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7233 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7234 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7235 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7236 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7237 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7238 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7239 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7240 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7241 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7242 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7243 * linux-x86-low.c (x86_linux_read_description): Add case for
7244 X86_XSTATE_AVX_MPX_MASK.
7245 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7246 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7247 init_registers_i386_avx_mpx_linux.
7248 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7249 (initialize_low_tracepoint): Call
7250 init_registers_i386_avx_mpx_linux.
7251 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7252 (initialize_low_tracepoint): Call
7253 init_registers_amd64_avx_mpx_linux.
7254 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7255 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7256 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7257 declarations.
7258
72592016-04-18 Pedro Alves <palves@redhat.com>
7260
7261 * configure: Regenerate.
7262
72632016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7264
7265 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7266 (aarch64_emit_sub): Likewise.
7267
72682016-04-12 Pedro Alves <palves@redhat.com>
7269
7270 * utils.c (prepare_to_throw_exception): Delete.
7271
72722016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7273
7274 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7275
72762016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7277
7278 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7279
72802016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7281
7282 * linux-aarch64-ipa.c: Add <elf.h> include.
7283 * linux-ppc-ipa.c: Add <elf.h> include.
7284 * linux-s390-ipa.c: Add <elf.h> include.
7285
72862016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7287
7288 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7289 (get_raw_reg_ptr): Likewise.
7290 (get_trace_state_variable_value_ptr): Likewise.
7291 (set_trace_state_variable_value_ptr): Likewise.
7292 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7293 char *.
7294
72952016-03-31 Wei-cheng Wang <cole945@gmail.com>
7296 Marcin Kościelnicki <koriakin@0x04.net>
7297
7298 PR/17221
7299 * linux-ppc-low.c (emit_insns): New function.
7300 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7301 (ppc_emit_prologue): New function.
7302 (ppc_emit_epilogue): New function.
7303 (ppc_emit_add): New function.
7304 (ppc_emit_sub): New function.
7305 (ppc_emit_mul): New function.
7306 (ppc_emit_lsh): New function.
7307 (ppc_emit_rsh_signed): New function.
7308 (ppc_emit_rsh_unsigned): New function.
7309 (ppc_emit_ext): New function.
7310 (ppc_emit_zero_ext): New function.
7311 (ppc_emit_log_not): New function.
7312 (ppc_emit_bit_and): New function.
7313 (ppc_emit_bit_or): New function.
7314 (ppc_emit_bit_xor): New function.
7315 (ppc_emit_bit_not): New function.
7316 (ppc_emit_equal): New function.
7317 (ppc_emit_less_signed): New function.
7318 (ppc_emit_less_unsigned): New function.
7319 (ppc_emit_ref): New function.
7320 (ppc_emit_const): New function.
7321 (ppc_emit_reg): New function.
7322 (ppc_emit_pop): New function.
7323 (ppc_emit_stack_flush): New function.
7324 (ppc_emit_swap): New function.
7325 (ppc_emit_stack_adjust): New function.
7326 (ppc_emit_call): New function.
7327 (ppc_emit_int_call_1): New function.
7328 (ppc_emit_void_call_2): New function.
7329 (ppc_emit_if_goto): New function.
7330 (ppc_emit_goto): New function.
7331 (ppc_emit_eq_goto): New function.
7332 (ppc_emit_ne_goto): New function.
7333 (ppc_emit_lt_goto): New function.
7334 (ppc_emit_le_goto): New function.
7335 (ppc_emit_gt_goto): New function.
7336 (ppc_emit_ge_goto): New function.
7337 (ppc_write_goto_address): New function.
7338 (ppc_emit_ops_impl): New static variable.
7339 (ppc64v1_emit_prologue): New function.
7340 (ppc64v2_emit_prologue): New function.
7341 (ppc64_emit_epilogue): New function.
7342 (ppc64_emit_add): New function.
7343 (ppc64_emit_sub): New function.
7344 (ppc64_emit_mul): New function.
7345 (ppc64_emit_lsh): New function.
7346 (ppc64_emit_rsh_signed): New function.
7347 (ppc64_emit_rsh_unsigned): New function.
7348 (ppc64_emit_ext): New function.
7349 (ppc64_emit_zero_ext): New function.
7350 (ppc64_emit_log_not): New function.
7351 (ppc64_emit_bit_and): New function.
7352 (ppc64_emit_bit_or): New function.
7353 (ppc64_emit_bit_xor): New function.
7354 (ppc64_emit_bit_not): New function.
7355 (ppc64_emit_equal): New function.
7356 (ppc64_emit_less_signed): New function.
7357 (ppc64_emit_less_unsigned): New function.
7358 (ppc64_emit_ref): New function.
7359 (ppc64_emit_const): New function.
7360 (ppc64v1_emit_reg): New function.
7361 (ppc64v2_emit_reg): New function.
7362 (ppc64_emit_pop): New function.
7363 (ppc64_emit_stack_flush): New function.
7364 (ppc64_emit_swap): New function.
7365 (ppc64v1_emit_call): New function.
7366 (ppc64v2_emit_call): New function.
7367 (ppc64v1_emit_int_call_1): New function.
7368 (ppc64v2_emit_int_call_1): New function.
7369 (ppc64v1_emit_void_call_2): New function.
7370 (ppc64v2_emit_void_call_2): New function.
7371 (ppc64_emit_if_goto): New function.
7372 (ppc64_emit_eq_goto): New function.
7373 (ppc64_emit_ne_goto): New function.
7374 (ppc64_emit_lt_goto): New function.
7375 (ppc64_emit_le_goto): New function.
7376 (ppc64_emit_gt_goto): New function.
7377 (ppc64_emit_ge_goto): New function.
7378 (ppc64v1_emit_ops_impl): New static variable.
7379 (ppc64v2_emit_ops_impl): New static variable.
7380 (ppc_emit_ops): New function.
7381 (linux_low_target): Wire in ppc_emit_ops.
7382
73832016-03-31 Wei-cheng Wang <cole945@gmail.com>
7384 Marcin Kościelnicki <koriakin@0x04.net>
7385
7386 PR/17221
7387 * Makefile.in: Add powerpc-*-ipa.o
7388 * configure.srv: Add ipa_obj for powerpc*-linux.
7389 * linux-ppc-ipa.c: New file.
7390 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7391 includes.
7392 (PPC_FIELD): New macro.
7393 (PPC_SEXT): New macro.
7394 (PPC_OP6): New macro.
7395 (PPC_BO): New macro.
7396 (PPC_LI): New macro.
7397 (PPC_BD): New macro.
7398 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7399 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7400 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7401 (ppc_get_thread_area): New function.
7402 (is_elfv2_inferior): New function.
7403 (gen_ds_form): New function.
7404 (GEN_STD): New macro.
7405 (GEN_STDU): New macro.
7406 (GEN_LD): New macro.
7407 (GEN_LDU): New macro.
7408 (gen_d_form): New function.
7409 (GEN_ADDI): New macro.
7410 (GEN_ADDIS): New macro.
7411 (GEN_LI): New macro.
7412 (GEN_LIS): New macro.
7413 (GEN_ORI): New macro.
7414 (GEN_ORIS): New macro.
7415 (GEN_LWZ): New macro.
7416 (GEN_STW): New macro.
7417 (GEN_STWU): New macro.
7418 (gen_xfx_form): New function.
7419 (GEN_MFSPR): New macro.
7420 (GEN_MTSPR): New macro.
7421 (GEN_MFCR): New macro.
7422 (GEN_MTCR): New macro.
7423 (GEN_SYNC): New macro.
7424 (GEN_LWSYNC): New macro.
7425 (gen_x_form): New function.
7426 (GEN_OR): New macro.
7427 (GEN_MR): New macro.
7428 (GEN_LWARX): New macro.
7429 (GEN_STWCX): New macro.
7430 (GEN_CMPW): New macro.
7431 (gen_md_form): New function.
7432 (GEN_RLDICL): New macro.
7433 (GEN_RLDICR): New macro.
7434 (gen_i_form): New function.
7435 (GEN_B): New macro.
7436 (GEN_BL): New macro.
7437 (gen_b_form): New function.
7438 (GEN_BNE): New macro.
7439 (GEN_LOAD): New macro.
7440 (GEN_STORE): New macro.
7441 (gen_limm): New function.
7442 (gen_atomic_xchg): New function.
7443 (gen_call): New function.
7444 (ppc_relocate_instruction): New function.
7445 (ppc_install_fast_tracepoint_jump_pad): New function.
7446 (ppc_get_min_fast_tracepoint_insn_len): New function.
7447 (ppc_get_ipa_tdesc_idx): New function.
7448 (the_low_target): Wire in the new functions.
7449 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7450 tdescs.
7451 * linux-ppc-tdesc.h: New file.
7452
74532016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7454
7455 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7456 (alloc_jump_pad_buffer): New function.
7457 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7458 (alloc_jump_pad_buffer): New function.
7459 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7460 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7461 (alloc_jump_pad_buffer): New function.
7462 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7463 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7464 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7465 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7466
74672016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7468
7469 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7470 * linux-amd64-ipa.c: Likewise.
7471 * linux-i386-ipa.c: Likewise.
7472 * linux-s390-ipa.c: Likewise.
7473 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7474 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7475 set_trace_state_variable_value_ptr.
7476 (struct ipa_sym_addresses): Likewise.
7477 (symbol_list): Likewise.
7478 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7479 accessing gdb_collect directly.
7480 (gdb_collect_ptr_type): New typedef.
7481 (get_raw_reg_ptr_type): New typedef.
7482 (get_trace_state_variable_value_ptr_type): New typedef.
7483 (set_trace_state_variable_value_ptr_type): New typedef.
7484 (gdb_collect_ptr): New global.
7485 (get_raw_reg_ptr): New global.
7486 (get_trace_state_variable_value_ptr): New global.
7487 (set_trace_state_variable_value_ptr): New global.
7488 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7489 accessing get_raw_reg directly.
7490 (get_get_tsv_func_addr): Likewise for
7491 get_trace_state_variable_value_ptr.
7492 (get_set_tsv_func_addr): Likewise for
7493 set_trace_state_variable_value_ptr.
7494 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7495
74962016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7497
7498 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7499
75002016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7501
7502 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7503 packets.
7504 (relocate_instruction): Remove own_buf.
7505 * server.c (own_buf): Make global.
7506 (handle_v_requests): Make global.
7507 * server.h (own_buf): New declaration.
7508 (handle_v_requests): New prototype.
7509
75102016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7511
7512 PR 18377
7513 * linux-s390-low.c (add_insns): New function.
7514 (s390_emit_prologue): New function.
7515 (s390_emit_epilogue): New function.
7516 (s390_emit_add): New function.
7517 (s390_emit_sub): New function.
7518 (s390_emit_mul): New function.
7519 (s390_emit_lsh): New function.
7520 (s390_emit_rsh_signed): New function.
7521 (s390_emit_rsh_unsigned): New function.
7522 (s390_emit_ext): New function.
7523 (s390_emit_log_not): New function.
7524 (s390_emit_bit_and): New function.
7525 (s390_emit_bit_or): New function.
7526 (s390_emit_bit_xor): New function.
7527 (s390_emit_bit_not): New function.
7528 (s390_emit_equal): New function.
7529 (s390_emit_less_signed): New function.
7530 (s390_emit_less_unsigned): New function.
7531 (s390_emit_ref): New function.
7532 (s390_emit_if_goto): New function.
7533 (s390_emit_goto): New function.
7534 (s390_write_goto_address): New function.
7535 (s390_emit_litpool): New function.
7536 (s390_emit_const): New function.
7537 (s390_emit_call): New function.
7538 (s390_emit_reg): New function.
7539 (s390_emit_pop): New function.
7540 (s390_emit_stack_flush): New function.
7541 (s390_emit_zero_ext): New function.
7542 (s390_emit_swap): New function.
7543 (s390_emit_stack_adjust): New function.
7544 (s390_emit_set_r2): New function.
7545 (s390_emit_int_call_1): New function.
7546 (s390_emit_void_call_2): New function.
7547 (s390_emit_eq_goto): New function.
7548 (s390_emit_ne_goto): New function.
7549 (s390_emit_lt_goto): New function.
7550 (s390_emit_le_goto): New function.
7551 (s390_emit_gt_goto): New function.
7552 (s390_emit_ge_goto): New function.
7553 (s390x_emit_prologue): New function.
7554 (s390x_emit_epilogue): New function.
7555 (s390x_emit_add): New function.
7556 (s390x_emit_sub): New function.
7557 (s390x_emit_mul): New function.
7558 (s390x_emit_lsh): New function.
7559 (s390x_emit_rsh_signed): New function.
7560 (s390x_emit_rsh_unsigned): New function.
7561 (s390x_emit_ext): New function.
7562 (s390x_emit_log_not): New function.
7563 (s390x_emit_bit_and): New function.
7564 (s390x_emit_bit_or): New function.
7565 (s390x_emit_bit_xor): New function.
7566 (s390x_emit_bit_not): New function.
7567 (s390x_emit_equal): New function.
7568 (s390x_emit_less_signed): New function.
7569 (s390x_emit_less_unsigned): New function.
7570 (s390x_emit_ref): New function.
7571 (s390x_emit_if_goto): New function.
7572 (s390x_emit_const): New function.
7573 (s390x_emit_call): New function.
7574 (s390x_emit_reg): New function.
7575 (s390x_emit_pop): New function.
7576 (s390x_emit_stack_flush): New function.
7577 (s390x_emit_zero_ext): New function.
7578 (s390x_emit_swap): New function.
7579 (s390x_emit_stack_adjust): New function.
7580 (s390x_emit_int_call_1): New function.
7581 (s390x_emit_void_call_2): New function.
7582 (s390x_emit_eq_goto): New function.
7583 (s390x_emit_ne_goto): New function.
7584 (s390x_emit_lt_goto): New function.
7585 (s390x_emit_le_goto): New function.
7586 (s390x_emit_gt_goto): New function.
7587 (s390x_emit_ge_goto): New function.
7588 (s390_emit_ops): New function.
7589 (struct linux_target_ops): Fill in emit_ops hook.
7590
75912016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7592
7593 PR 18377
7594 * Makefile.in: Add s390 IPA files.
7595 * configure.srv: Build IPA for s390.
7596 * linux-s390-ipa.c: New file.
7597 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7598 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7599 (tdesc_s390_linux32): Likewise.
7600 (init_registers_s390_linux32v1): Likewise.
7601 (tdesc_s390_linux32v1): Likewise.
7602 (init_registers_s390_linux32v2): Likewise.
7603 (tdesc_s390_linux32v2): Likewise.
7604 (init_registers_s390_linux64): Likewise.
7605 (tdesc_s390_linux64): Likewise.
7606 (init_registers_s390_linux64v1): Likewise.
7607 (tdesc_s390_linux64v1): Likewise.
7608 (init_registers_s390_linux64v2): Likewise.
7609 (tdesc_s390_linux64v2): Likewise.
7610 (init_registers_s390_te_linux64): Likewise.
7611 (tdesc_s390_te_linux64): Likewise.
7612 (init_registers_s390_vx_linux64): Likewise.
7613 (tdesc_s390_vx_linux64): Likewise.
7614 (init_registers_s390_tevx_linux64): Likewise.
7615 (tdesc_s390_tevx_linux64): Likewise.
7616 (init_registers_s390x_linux64): Likewise.
7617 (tdesc_s390x_linux64): Likewise.
7618 (init_registers_s390x_linux64v1): Likewise.
7619 (tdesc_s390x_linux64v1): Likewise.
7620 (init_registers_s390x_linux64v2): Likewise.
7621 (tdesc_s390x_linux64v2): Likewise.
7622 (init_registers_s390x_te_linux64): Likewise.
7623 (tdesc_s390x_te_linux64): Likewise.
7624 (init_registers_s390x_vx_linux64): Likewise.
7625 (tdesc_s390x_vx_linux64): Likewise.
7626 (init_registers_s390x_tevx_linux64): Likewise.
7627 (tdesc_s390x_tevx_linux64): Likewise.
7628 (have_hwcap_s390_vx): New static variable.
7629 (s390_arch_setup): Fill have_hwcap_s390_vx.
7630 (s390_get_thread_area): New function.
7631 (s390_ft_entry_gpr_esa): New const.
7632 (s390_ft_entry_gpr_zarch): New const.
7633 (s390_ft_entry_misc): New const.
7634 (s390_ft_entry_fr): New const.
7635 (s390_ft_entry_vr): New const.
7636 (s390_ft_main_31): New const.
7637 (s390_ft_main_64): New const.
7638 (s390_ft_exit_fr): New const.
7639 (s390_ft_exit_vr): New const.
7640 (s390_ft_exit_misc): New const.
7641 (s390_ft_exit_gpr_esa): New const.
7642 (s390_ft_exit_gpr_zarch): New const.
7643 (append_insns): New function.
7644 (s390_relocate_instruction): New function.
7645 (s390_install_fast_tracepoint_jump_pad): New function.
7646 (s390_get_min_fast_tracepoint_insn_len): New function.
7647 (s390_get_ipa_tdesc_idx): New function.
7648 (struct linux_target_ops): Wire in the above functions.
7649 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7650 * linux-s390-tdesc.h: New file.
7651
76522016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7653
7654 * linux-s390-low.c (s390_supports_tracepoints): New function.
7655 (struct linux_target_ops): Fill supports_tracepoints hook.
7656
76572016-03-18 Yao Qi <yao.qi@linaro.org>
7658
7659 * linux-low.c (lwp_signal_can_be_delivered): New function.
7660 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7661
76622016-03-18 Yao Qi <yao.qi@linaro.org>
7663
7664 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7665 0 if signal is enqueued. Remove 'signal' from one debugging
7666 message. Move one debugging message to some lines below.
7667 Remove code setting 'signal' to 0.
7668
76692016-03-18 Yao Qi <yao.qi@linaro.org>
7670
7671 * linux-low.c (linux_low_filter_event): Remove redundant
7672 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7673
76742016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7675
7676 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7677 (struct linux_target_ops): Wire in the above.
7678
76792016-03-03 Yao Qi <yao.qi@linaro.org>
7680
7681 * linux-low.c: Update comments to start_step_over.
7682
76832016-03-03 Yao Qi <yao.qi@linaro.org>
7684
7685 PR server/19736
7686 * linux-low.c (handle_extended_wait): Set child suspended
7687 if event_lwp->bp_reinsert isn't zero.
7688
76892016-03-02 Yao Qi <yao.qi@linaro.org>
7690
7691 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7692 enqueue_pending_signal.
7693
76942016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7695
7696 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7697 is actually loaded.
7698
76992016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7700
7701 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7702 (s390_regmap_3264) [!__s390x__]: New global.
7703 (s390_collect_ptrace_register): Skip map entries containing -1.
7704 (s390_supply_ptrace_register): Ditto.
7705 (s390_fill_gprs_high): New function.
7706 (s390_store_gprs_high): New function.
7707 (s390_regsets): Add NT_S390_HIGH_GPRS.
7708 (s390_get_hwcap): Enable on 31-bit.
7709 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7710 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7711 Detect NT_S390_HIGH_GPRS.
7712 (s390_usrregs_info_3264): Enable on 31-bit.
7713 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7714 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7715
77162016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7717
7718 PR gdb/13808
7719 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7720 * configure.srv: Ditto.
7721 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7722 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7723 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7724 (init_registers_amd64_linux): Remove prototype.
7725 (tdesc_amd64_linux): Remove declaration.
7726 (get_ipa_tdesc): New function.
7727 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7728 initialize remaining tdescs.
7729 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7730 (init_registers_i386_linux): Remove prototype.
7731 (tdesc_i386_linux): Remove declaration.
7732 (get_ipa_tdesc): New function.
7733 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7734 initialize remaining tdescs.
7735 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7736 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7737 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7738 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7739 (x86_get_ipa_tdesc_idx): New function.
7740 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7741 * linux-x86-tdesc.h: New file.
7742 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7743 (target_get_ipa_tdesc_idx): New macro.
7744 * tracepoint.c (ipa_tdesc_idx): New macro.
7745 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7746 (symbol_list): Add ipa_tdesc_idx.
7747 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7748 (ipa_tdesc): Remove.
7749 (ipa_tdesc_idx): New variable.
7750 (get_context_regcache): Use get_ipa_tdesc.
7751 (gdb_collect): Ditto.
7752 (gdb_probe): Ditto.
7753 * tracepoint.h (get_ipa_tdesc): New prototype.
7754 (ipa_tdesc): Remove.
7755
77562016-02-24 Pedro Alves <palves@redhat.com>
7757
7758 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7759 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7760 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7761 Factor out common code between the USE_SIGTRAP_SIGINFO and
7762 !USE_SIGTRAP_SIGINFO blocks.
7763 (linux_low_filter_event): Call save_stop_reason instead of
7764 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7765 Update comments.
7766 (linux_wait_1): Update comments.
7767
77682016-02-24 Wei-cheng Wang <cole945@gmail.com>
7769
7770 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7771 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7772 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7773 ppc_insert_point, ppc_remove_point.
7774
77752016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7776
7777 * linux-s390-low.c (s390_supports_z_point_type): New function.
7778 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7779
77802016-02-16 Yao Qi <yao.qi@linaro.org>
7781
7782 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7783 PC. Get pc from regcache_read_pc.
7784
77852016-02-12 Yao Qi <yao.qi@linaro.org>
7786
7787 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
7788 or linux_get_pc_32bit.
7789 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
7790
77912016-02-12 Yao Qi <yao.qi@linaro.org>
7792
7793 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
7794 arm_linux_get_next_pcs_fixup.
7795
77962016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
7797
7798 * tracepoint.c (x_tracepoint_action_download): Change
7799 write_inferior_data_ptr to write_inferior_data_pointer.
7800 (cmd_qtstart): Likewise.
7801 (write_inferior_data_ptr): Remove.
7802 (download_agent_expr): Change write_inferior_data_ptr to
7803 write_inferior_data_pointer.
7804 (download_tracepoint_1): Likewise.
7805 (download_tracepoint): Likewise.
7806 (download_trace_state_variables): Likewise.
7807
78082016-02-11 Wei-cheng Wang <cole945@gmail.com>
7809 Marcin Kościelnicki <koriakin@0x04.net>
7810
7811 * tracepoint.c (struct tracepoint_action_ops): Remove.
7812 (struct tracepoint_action): Remove ops.
7813 (m_tracepoint_action_download, r_tracepoint_action_download)
7814 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
7815 size and offset accordingly.
7816 (m_tracepoint_action_ops, r_tracepoint_action_ops)
7817 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
7818 (tracepoint_action_send, tracepoint_action_download): New functions.
7819 Helpers for trace action handlers.
7820 (add_tracepoint_action): Remove setup actions ops.
7821 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
7822
78232016-02-10 Yao Qi <yao.qi@linaro.org>
7824
7825 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
7826
78272016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7828
7829 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
7830 to AC_OUTPUT.
7831 * configure: Regenerate.
7832
78332016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7834
7835 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
7836 void * to gdb_byte *.
7837 * linux-low.c (siginfo_fixup): Likewise.
7838 (linux_xfer_siginfo): Likewise.
7839 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
7840 Likewise.
7841 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7842
78432016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7844
7845 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
7846 to srv_tgtobj.
7847 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
7848 to srv_tgtobj.
7849 * linux-x86-low.c [__x86_64__]: Include
7850 "nat/amd64-linux-siginfo.h".
7851 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7852 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
7853 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
7854 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
7855 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
7856 (cpt_si_fd, si_timerid, si_overrun): Move from
7857 nat/amd64-linux-siginfo.c.
7858 * Makefile.in (amd64-linux-siginfo.o:): New rule.
7859
78602016-01-28 Simon Marchi <simon.marchi@ericsson.com>
7861
7862 * server.c (skip_to_semicolon): Remove.
7863 (process_point_options): Use strchrnul instead of
7864 skip_to_semicolon.
7865
78662016-01-26 Yao Qi <yao.qi@linaro.org>
7867
7868 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
7869 * linux-low.c (install_software_single_step_breakpoints): Don't
7870 call regcache_read_pc.
7871 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7872 argument pc.
7873
78742016-01-26 Yao Qi <yao.qi@linaro.org>
7875
7876 * linux-low.c (install_software_single_step_breakpoints): Call
7877 regcache_read_pc instead of get_pc.
7878
78792016-01-26 Yao Qi <yao.qi@linaro.org>
7880
7881 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
7882 (unblock_async_io): Rename to ...
7883 (block_unblock_async_io): ... it. New function.
7884 (enable_async_io): Don't install SIGIO handler. Unblock it
7885 instead.
7886 (disable_async_io): Don't ignore SIGIO. Block it instead.
7887 (initialize_async_io): Install SIGIO handler. Don't call
7888 unblock_async_io.
7889
78902016-01-26 Yao Qi <yao.qi@linaro.org>
7891
7892 * remote-utils.c (getpkt): If the buffer isn't empty, and the
7893 first character is '\003', call *the_target->request_interrupt.
7894
78952016-01-25 Yao Qi <yao.qi@linaro.org>
7896
7897 * remote-utils.c (new_thread_notify): Remove.
7898 (dead_thread_notify): Likewise.
7899 * remote-utils.h (new_thread_notify): Remove declaration.
7900 (dead_thread_notify): Likewise.
7901
79022016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
7903
7904 * gdb.trace/pending.exp: Fix expected message on continue.
7905
79062016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
7907
7908 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
7909 it works properly on big-endian machines where sizeof (CORE_ADDR)
7910 != sizeof (void *).
7911
79122016-01-21 Pedro Alves <palves@redhat.com>
7913
7914 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
7915 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
7916 * configure: Regenerate.
7917
79182016-01-21 Yao Qi <yao.qi@linaro.org>
7919
7920 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
7921 is_thumb and set it according to CPSR saved on the stack.
7922 (get_next_pcs_syscall_next_pc): Pass is_thumb to
7923 arm_sigreturn_next_pc.
7924
79252016-01-18 Yao Qi <yao.qi@linaro.org>
7926
7927 * linux-low.c (linux_set_pc_64bit): New function.
7928 (linux_get_pc_64bit): New function.
7929 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
7930 Declare.
7931 * linux-sparc-low.c (debug_threads): Remove declaration.
7932 (sparc_get_pc): Remove.
7933 (the_low_target): Use linux_get_pc_64bit instead of
7934 sparc_get_pc.
7935 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
7936 (the_low_target): Use linux_get_pc_64bit and
7937 linux_set_pc_64bit.
7938
79392016-01-18 Yao Qi <yao.qi@linaro.org>
7940
7941 * linux-arm-low.c (debug_threads): Remove declaration.
7942 (arm_get_pc, arm_set_pc): Remove.
7943 (the_low_target): Use linux_get_pc_32bit and
7944 linux_set_pc_32bit.
7945 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
7946 (the_low_target): Use linux_get_pc_32bit and
7947 linux_set_pc_32bit.
7948 * linux-cris-low.c (debug_threads): Remove declaration.
7949 (cris_get_pc, cris_set_pc,): Remove.
7950 (the_low_target): Use linux_get_pc_32bit and
7951 linux_set_pc_32bit.
7952 * linux-crisv32-low.c (debug_threads): Remove declaration.
7953 (cris_get_pc, cris_set_pc): Remove.
7954 (the_low_target): Use linux_get_pc_32bit and
7955 linux_set_pc_32bit.
7956 * linux-low.c: Include inttypes.h.
7957 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
7958 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
7959 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
7960 (the_low_target): Use linux_get_pc_32bit and
7961 linux_set_pc_32bit.
7962 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
7963 (the_low_target): Use linux_get_pc_32bit and
7964 linux_set_pc_32bit.
7965 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
7966 (the_low_target): Use linux_get_pc_32bit and
7967 linux_set_pc_32bit.
7968 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
7969 (the_low_target): Use linux_get_pc_32bit and
7970 linux_set_pc_32bit.
7971 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
7972 (the_low_target): Use linux_get_pc_32bit and
7973 linux_set_pc_32bit.
7974
79752016-01-18 Gary Benson <gbenson@redhat.com>
7976
7977 * configure.ac (AC_FUNC_FORK): New check.
7978 * config.in: Regenerate.
7979 * configure: Likewise.
7980
79812016-01-14 Yao Qi <yao.qi@linaro.org>
7982
7983 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
7984 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
7985 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
7986 arm_get_next_pcs_ctor.
7987
79882016-01-12 Josh Stone <jistone@redhat.com>
7989 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7990
7991 * inferiors.h: Include "gdb_vecs.h".
7992 (struct process_info): Add syscalls_to_catch.
7993 * inferiors.c (remove_process): Free syscalls_to_catch.
7994 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
7995 syscall_return stops.
7996 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
7997 * server.c (handle_general_set): Handle QCatchSyscalls.
7998 (handle_query): Report support for QCatchSyscalls.
7999 * target.h (struct target_ops): Add supports_catch_syscall.
8000 (target_supports_catch_syscall): New macro.
8001 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8002 (struct lwp_info): Add syscall_state.
8003 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8004 Maintain syscall_state and syscalls_to_catch across exec.
8005 (get_syscall_trapinfo): New function, proxy to the_low_target.
8006 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8007 (linux_low_filter_event): Toggle syscall_state entry/return for
8008 syscall traps, and set it ignored for all others.
8009 (gdb_catching_syscalls_p): New function.
8010 (gdb_catch_this_syscall_p): New function.
8011 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8012 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8013 (linux_supports_catch_syscall): New function.
8014 (linux_target_ops): Install it.
8015 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8016 (the_low_target): Install it.
8017
80182016-01-12 Mike Frysinger <vapier@gentoo.org>
8019
8020 * acinclude.m4: Include new ../warning.m4 file.
8021 * configure: Regenerated.
8022 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8023
80242016-01-12 Mike Frysinger <vapier@gentoo.org>
8025
8026 * ax.c (is_goto_target): Mark static.
8027 * linux-low.c (register_addr): Likewise.
8028 (linux_fetch_registers, linux_store_registers): Likewise.
8029 * mem-break.c (any_persistent_commands): Fix old prototype.
8030 (add_commands_to_breakpoint): Mark static.
8031 * regcache.c (find_register_by_name): Delete unused func.
8032 * remote-utils.c (hex_or_minus_one): Mark static.
8033 * server.c (monitor_show_help): Mark static.
8034 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8035 handle_v_requests): Likewise.
8036
80372016-01-12 Pedro Alves <palves@redhat.com>
8038
8039 Remove use of the registered trademark symbol throughout.
8040
80412016-01-08 Yao Qi <yao.qi@linaro.org>
8042
8043 * remote-utils.c (getpkt): If c is '\003', call target hook
8044 request_interrupt.
8045
80462016-01-06 Yao Qi <yao.qi@linaro.org>
8047
8048 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8049 linux-aarch32-low.c.
8050 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8051 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8052 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8053 (thumb2_breakpoint): Declare.
8054 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8055 linux-aarch32-low.h.
8056 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8057 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8058 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8059
80602016-01-01 Joel Brobecker <brobecker@adacore.com>
8061
8062 * gdbreplay.c (gdbreplay_version): Change copyright year in
8063 version message.
8064 * server.c (gdbserver_version): Likewise.
8065
80662015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8067
8068 * server.c (crc32_table): Delete.
8069 (crc32): Use libiberty's xcrc32 function.
8070
80712015-12-22 Joel Brobecker <brobecker@adacore.com>
8072
8073 * lynx-low.c (lynx_delete_thread_callback): New function.
8074 (lynx_mourn): Properly delete our process and all of its
8075 threads. Remove call to clear_inferiors.
8076
80772015-12-22 Joel Brobecker <brobecker@adacore.com>
8078
8079 * target.c (thread_search_callback): Add check that
8080 the thread_stopped target callback is not NULL before
8081 calling it.
8082
80832015-12-21 Yao Qi <yao.qi@linaro.org>
8084
8085 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8086 arm breakpoint.
8087
80882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8089
8090 * server.c (handle_query): Call target_supports_software_single_step.
8091
80922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8093
8094 * linux-low.c (single_step): New function.
8095 (linux_resume_one_lwp_throw): Call single_step.
8096 (start_step_over): Likewise.
8097
80982015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8099
8100 * Makefile.in (SFILES): Append arch/arm-linux.c,
8101 arch/arm-get-next-pcs.c.
8102 (arm-linux.o): New rule.
8103 (arm-get-next-pcs.o): New rule.
8104 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8105 arm-linux.o.
8106 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8107 to linux-aarch32-low.c.
8108 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8109 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8110 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8111 (thumb2_breakpoint_len): Likewise.
8112 (arm_is_thumb_mode): Make non-static.
8113 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8114 from linux-aarch32-low.c.
8115 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8116 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8117 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8118 (thumb2_breakpoint_len): Likewise.
8119 (arm_is_thumb_mode): New declaration.
8120 * linux-arm-low.c: Include arch/arm-linux.h
8121 aarch/arm-get-next-pcs.h, sys/syscall.h.
8122 (get_next_pcs_ops): New struct.
8123 (get_next_pcs_addr_bits_remove): New function.
8124 (get_next_pcs_is_thumb): New function.
8125 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8126 (arm_sigreturn_next_pc): Likewise.
8127 (get_next_pcs_syscall_next_pc): Likewise.
8128 (arm_gdbserver_get_next_pcs): Likewise.
8129 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8130 Initialize.
8131 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8132 * server.h: Include gdb_vecs.h.
8133
81342015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8135
8136 * Makefile.in (SFILES): Append common/common-regcache.c.
8137 (OBS): Append common-regcache.o.
8138 (common-regcache.o): New rule.
8139 * regcache.c (init_register_cache): Initialize cache to
8140 REG_UNAVAILABLE.
8141 (regcache_raw_read_unsigned): New function.
8142 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8143 register_status enum.
8144
81452015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8146
8147 * linux-aarch64-low.c (the_low_targets): Rename
8148 breakpoint_reinsert_addr to get_next_pcs.
8149 * linux-arm-low.c (the_low_targets): Likewise.
8150 * linux-bfin-low.c (the_low_targets): Likewise.
8151 * linux-cris-low.c (the_low_targets): Likewise.
8152 * linux-crisv32-low.c (the_low_targets): Likewise.
8153 * linux-low.c (can_software_single_step): Likewise.
8154 (install_software_single_step_breakpoints): New function.
8155 (start_step_over): Use install_software_single_step_breakpoints.
8156 * linux-low.h: New CORE_ADDR vector.
8157 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8158 get_next_pcs.
8159 * linux-mips-low.c (the_low_targets): Likewise.
8160 * linux-nios2-low.c (the_low_targets): Likewise.
8161 * linux-sparc-low.c (the_low_targets): Likewise.
8162
81632015-12-17 Pedro Alves <palves@redhat.com>
8164
8165 * linux-low.c (linux_kill_one_lwp): Remove references to
8166 LinuxThreads.
8167 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8168 to 'kill'.
8169 (linux_init_signals): Delete.
8170 (initialize_low): Adjust.
8171 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8172
81732015-12-16 Pedro Alves <palves@redhat.com>
8174
8175 * configure.ac (compiler warning flags): When testing a
8176 -Wno-foo option, check whether -Wfoo works instead.
8177 * configure: Regenerate.
8178
81792015-12-11 Don Breazeal <donb@codesourcery.com>
8180
8181 * server.c (process_serial_event): Don't exit from gdbserver
8182 in remote mode if there are still active inferiors.
8183
81842015-12-11 Yao Qi <yao.qi@linaro.org>
8185
8186 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8187 arm_breakpoint_at if the process is 32-bit.
8188
81892015-12-11 Yao Qi <yao.qi@linaro.org>
8190
8191 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8192 arm breakpoint.
8193
81942015-12-07 Yao Qi <yao.qi@linaro.org>
8195
8196 * configure.srv: Append arm.o to srv_tgtobj for
8197 aarch64*-*-linux* target.
8198 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8199 from linux-arm-low.c.
8200 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8201 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8202 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8203 (thumb2_breakpoint_len): Likewise.
8204 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8205 (arm_breakpoint_kinds): Likewise.
8206 (arm_breakpoint_kind_from_pc): Likewise.
8207 (arm_sw_breakpoint_from_kind): Likewise.
8208 (arm_breakpoint_kind_from_current_state): Likewise.
8209 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8210 (arm_sw_breakpoint_from_kind): Declare.
8211 (arm_breakpoint_kind_from_current_state): Declare.
8212 (arm_breakpoint_at): Declare.
8213 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8214 arm_sw_breakpoint_from_kind if process is 32-bit.
8215 (aarch64_breakpoint_kind_from_pc): New function.
8216 (aarch64_breakpoint_kind_from_current_state): New function.
8217 (the_low_target): Initialize fields breakpoint_kind_from_pc
8218 and breakpoint_kind_from_current_state.
8219 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8220 linux-aarch32-low.c.
8221 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8222 (arm_breakpoint, arm_breakpoint_len): Likewise.
8223 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8224 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8225 (arm_is_thumb_mode): Likewise.
8226 (arm_breakpoint_at): Likewise.
8227 (arm_breakpoint_kind_from_pc): Likewise.
8228 (arm_sw_breakpoint_from_kind): Likewise.
8229 (arm_breakpoint_kind_from_current_state): Likewise.
8230
8231 Revert:
8232 2015-08-04 Yao Qi <yao.qi@linaro.org>
8233
8234 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8235 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8236 * server.c (extended_protocol): Remove "static".
8237 * server.h (extended_protocol): Declare it.
8238
82392015-12-04 Josh Stone <jistone@redhat.com>
8240
8241 * target.h (struct target_ops) <arch_setup>: Rename to ...
8242 (struct target_ops) <post_create_inferior>: ... this.
8243 (target_arch_setup): Rename to ...
8244 (target_post_create_inferior): ... this, calling post_create_inferior.
8245 * server.c (start_inferior): Update target_arch_setup calls to
8246 target_post_create_inferior.
8247 * linux-low.c (linux_low_ptrace_options): Forward declare.
8248 (linux_arch_setup): Update its comment for general use.
8249 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8250 (struct linux_target_ops): Use linux_post_create_inferior.
8251 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8252 to post_create_inferior.
8253 * nto-low.c (struct nto_target_ops): Likewise.
8254 * spu-low.c (struct spu_target_ops): Likewise.
8255 * win32-low.c (struct win32_target_ops): Likewise.
8256
82572015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8258
8259 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8260
82612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8262
8263 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8264 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8265 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8266 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8267 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8268 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8269 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8270 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8271 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8272 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8273 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8274 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8275
82762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8277
8278 * linux-low.c (linux_look_up_symbols): Don't call
8279 linux_supports_traceclone.
8280 * linux-low.h (thread_db_init): Remove use_events argument.
8281 * thread-db.c (thread_db_use_event): Remove global variable.
8282 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8283 (struct thread_db) <td_create_bp>: Remove field.
8284 (thread_db_create_event): Remove function.
8285 (thread_db_enable_reporting): Likewise.
8286 (find_one_thread): Don't check for thread_db_use_events.
8287 (attach_thread): Likewise.
8288 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8289 (try_thread_db_load_1): Don't check for thread_db_use_events.
8290 (thread_db_init): Remove use_events argument and thread events
8291 handling.
8292 (remove_thread_event_breakpoints): Remove function.
8293 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8294
82952015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8296
8297 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8298 New function.
8299 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8300 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8301 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8302 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8303 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8304 Initialize.
8305 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8306 New function.
8307 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8308 * linux-low.c (can_hardware_single_step): Use
8309 supports_hardware_single_step.
8310 (can_software_single_step): New function.
8311 (start_step_over): Call can_software_single_step.
8312 (linux_supports_hardware_single_step): New function.
8313 (struct target_ops) <supports_software_single_step>: Initialize.
8314 * linux-low.h (struct linux_target_ops)
8315 <supports_hardware_single_step>: Initialize.
8316 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8317 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8318 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8319 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8320 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8321 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8322 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8323 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8324 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8325 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8326 Initialize.
8327 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8328 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8329 Initialize.
8330 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8331 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8332 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8333 New function.
8334 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8335 * target.h (struct target_ops): <supports_software_single_step>:
8336 New field.
8337 (target_supports_software_single_step): New macro.
8338
83392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8340
8341 * linux-low.c (linux_wait_1): Fix pc advance condition.
8342 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8343 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8344
83452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8346
8347 * linux-arm-low.c (arm_is_thumb_mode): New function.
8348 (arm_breakpoint_at): Use arm_is_thumb_mode.
8349 (arm_breakpoint_kind_from_current_state): New function.
8350 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8351 Initialize.
8352 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8353 (linux_breakpoint_kind_from_current_state): New function.
8354 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8355 * linux-low.h (struct linux_target_ops)
8356 <breakpoint_kind_from_current_state>: New field.
8357 * target.h (struct target_ops): Likewise.
8358 (target_breakpoint_kind_from_current_state): New macro.
8359
83602015-11-30 Pedro Alves <palves@redhat.com>
8361
8362 * linux-low.c (linux_resume): Wake up the event loop before
8363 returning.
8364
83652015-11-30 Pedro Alves <palves@redhat.com>
8366
8367 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8368 check.
8369 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8370 to -1.
8371 * target.c (struct thread_search): New structure.
8372 (thread_search_callback): New function.
8373 (prev_general_thread): New global.
8374 (prepare_to_access_memory, done_accessing_memory): New functions.
8375 * target.h (prepare_to_access_memory, done_accessing_memory):
8376 Replace macros with function declarations.
8377
83782015-11-30 Pedro Alves <palves@redhat.com>
8379
8380 PR 14618
8381 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8382 report TARGET_WAITKIND_NO_RESUMED.
8383 * remote-utils.c (prepare_resume_reply): Handle
8384 TARGET_WAITKIND_NO_RESUMED.
8385 * server.c (report_no_resumed): New global.
8386 (handle_query) <qSupported>: Handle "no-resumed+". Report
8387 "no-resumed+" support.
8388 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8389 return error if the client doesn't support no-resumed events.
8390 (push_stop_notification): New function.
8391 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8392 events if the client supports them.
8393
83942015-11-30 Pedro Alves <palves@redhat.com>
8395
8396 * linux-low.c (thread_still_has_status_pending_p): Don't check
8397 vCont;t here.
8398 (lwp_resumed): New function.
8399 (status_pending_p_callback): Return early if the LWP is not
8400 supposed to be resumed.
8401
84022015-11-30 Pedro Alves <palves@redhat.com>
8403
8404 * linux-low.c (handle_extended_wait): Assert that the LWP's
8405 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8406 thread create events, leave the new child's status pending.
8407 (linux_low_filter_event): If GDB wants to hear about thread exit
8408 events, leave the LWP marked dead and don't delete it.
8409 (linux_wait_for_event_filtered): Don't check for thread exit.
8410 (filter_exit_event): New function.
8411 (linux_wait_1): Use it, when returning an exit event.
8412 (linux_resume_one_lwp_throw): Assert that the LWP's
8413 waitstatus is TARGET_WAITKIND_IGNORE.
8414 * remote-utils.c (prepare_resume_reply): Handle
8415 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8416 * server.c (report_thread_events): New global.
8417 (handle_general_set): Handle QThreadEvents.
8418 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8419 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8420 TARGET_WAITKIND_THREAD_EXITED.
8421 * server.h (report_thread_events): Declare.
8422
84232015-11-30 Pedro Alves <palves@redhat.com>
8424
8425 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8426 the thread's last_resume_kind was resume_stop.
8427
84282015-11-30 Pedro Alves <palves@redhat.com>
8429
8430 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8431 before returning.
8432
84332015-11-30 Pedro Alves <palves@redhat.com>
8434
8435 * server.c (handle_v_requests): Handle vCtrlC.
8436
84372015-11-30 Pedro Alves <palves@redhat.com>
8438
8439 * gdbthread.h (find_any_thread_of_pid): Declare.
8440 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8441 functions.
8442 * server.c (handle_query): If current_thread is NULL, look for
8443 another thread of the selected process.
8444
84452015-11-26 Daniel Colascione <dancol@dancol.org>
8446 Simon Marchi <simon.marchi@ericsson.com>
8447
8448 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8449 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8450 name in reply.
8451 * target.h (struct target_ops) <thread_name>: New field.
8452 (target_thread_name): New macro.
8453
84542015-11-23 Joel Brobecker <brobecker@adacore.com>
8455
8456 * regcache.h (regcache_invalidate_pid): Add declaration.
8457 * regcache.c (regcache_invalidate_pid): New function, extracted
8458 from regcache_invalidate.
8459 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8460 Add trivial documentation comment.
8461 * lynx-low.c: Use regcache_invalidate_pid instead of
8462 regcache_invalidate.
8463
84642015-11-23 Joel Brobecker <brobecker@adacore.com>
8465
8466 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8467 and Elf64_auxv_t if the target is Android.
8468
84692015-11-22 Doug Evans <xdje42@gmail.com>
8470
8471 * target.h: #include <sys/types.h>.
8472
84732015-11-19 Pedro Alves <palves@redhat.com>
8474
8475 * linux-low.c (linux_process_qsupported): Change prototype.
8476 Adjust.
8477 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8478 Change prototype.
8479 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8480 and adjust to loop over all features.
8481 * server.c (handle_query) <qSupported>: Adjust to call
8482 target_process_qsupported once, passing it a vector of unprocessed
8483 features.
8484 * target.h (struct target_ops) <process_qsupported>: Change
8485 prototype.
8486 (target_process_qsupported): Adjust.
8487
84882015-11-19 Pedro Alves <palves@redhat.com>
8489
8490 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8491 mode.
8492 * configure: Regenerate.
8493
84942015-11-19 Pedro Alves <palves@redhat.com>
8495
8496 * configure: Regenerate.
8497
84982015-11-19 Yao Qi <yao.qi@linaro.org>
8499
8500 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8501 type to uint32_t.
8502
85032015-11-19 Yao Qi <yao.qi@linaro.org>
8504
8505 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8506 (struct aarch64_operand): Move enum out.
8507
85082015-11-19 Yao Qi <yao.qi@linaro.org>
8509
8510 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8511 struct user_fpsimd_state *.
8512 (aarch64_store_fpregset): Likewise.
8513
85142015-11-19 Yao Qi <yao.qi@linaro.org>
8515
8516 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8517 struct user_pt_regs *.
8518 (aarch64_store_gregset): Likewise.
8519
85202015-11-18 Pedro Alves <palves@redhat.com>
8521
8522 * Makefile.in (all_object_files): Add $IPA_OBJS.
8523
85242015-11-17 Pedro Alves <palves@redhat.com>
8525
8526 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8527 GDB_SIGNAL_0 and gdb_signal_to_string.
8528
85292015-11-17 Pedro Alves <palves@redhat.com>
8530
8531 * win32-low.c (handle_output_debug_string): Remove parameter.
8532 (win32_kill): Remove our_status local and adjust call to
8533 handle_output_debug_string.
8534 (get_child_debug_event): Adjust call to
8535 handle_output_debug_string.
8536
85372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8538
8539 * linux-mips-low.c (mips_fill_gregset): Add cast.
8540 (mips_store_gregset): Likewise.
8541 (mips_fill_fpregset): Likewise.
8542 (mips_store_fpregset): Likewise.
8543
85442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8545
8546 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8547 priv.
8548
85492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8550
8551 * linux-mips-low.c (mips_linux_new_thread): Change type of
8552 watch_type to enum target_hw_bp_type.
8553
85542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8555
8556 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8557 Change return type to arm_hwbp_type.
8558
85592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8560
8561 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8562 (arm_store_gregset): Likewise.
8563 * linux-arm-low.c (arm_get_hwcap): Likewise.
8564 (arm_read_description): Likewise.
8565
85662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8567
8568 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8569
85702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8571
8572 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8573 (ppc_fill_vsxregset): Likewise.
8574 (ppc_store_vsxregset): Likewise.
8575 (ppc_fill_vrregset): Likewise.
8576 (ppc_store_vrregset): Likewise.
8577 (ppc_fill_evrregset): Likewise.
8578 (ppc_store_evrregset): Likewise.
8579
85802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8581
8582 * linux-ppc-low.c (ppc_usrregs_info): Remove
8583 forward-declaration.
8584 (ppc_arch_setup): Move lower in file.
8585
85862015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8587
8588 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8589 (ps_pdwrite): Likewise.
8590
85912015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8592
8593 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8594 to after assert checks.
8595
85962015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8597
8598 * proc-service.c (ps_pdread): Add/adjust casts.
8599 (ps_pdwrite): Add/adjust casts.
8600
86012015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8602
8603 * server.c (handle_search_memory_1): Cast return value of
8604 memmem.
8605
86062015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8607
8608 * server.c (write_qxfer_response): Change type of data to
8609 gdb_byte *.
8610
86112015-10-29 Pedro Alves <palves@redhat.com>
8612
8613 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8614
86152015-10-29 Pedro Alves <palves@redhat.com>
8616
8617 * tracepoint.c (clear_installed_tracepoints): Add casts.
8618
86192015-10-29 Pedro Alves <palves@redhat.com>
8620
8621 * server.c (handle_v_cont, process_serial_event): Add enum
8622 gdb_signal casts to signal parsing code.
8623
86242015-10-29 Pedro Alves <palves@redhat.com>
8625
8626 * linux-low.h (NULL_REGSET): Define.
8627 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8628 * linux-arm-low.c (arm_regsets): Likewise.
8629 * linux-crisv32-low.c (cris_regsets): Likewise.
8630 * linux-m68k-low.c (m68k_regsets): Likewise.
8631 * linux-mips-low.c (mips_regsets): Likewise.
8632 * linux-nios2-low.c (nios2_regsets): Likewise.
8633 * linux-ppc-low.c (ppc_regsets): Likewise.
8634 * linux-s390-low.c (s390_regsets): Likewise.
8635 * linux-sh-low.c (sh_regsets): Likewise.
8636 * linux-sparc-low.c (sparc_regsets): Likewise.
8637 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8638 * linux-tile-low.c (tile_regsets): Likewise.
8639 * linux-x86-low.c (x86_regsets): Likewise.
8640 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8641
86422015-10-29 Pedro Alves <palves@redhat.com>
8643
8644 * linux-low.h (NULL_REGSET): Define.
8645 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8646 * linux-arm-low.c (arm_regsets): Likewise.
8647 * linux-crisv32-low.c (cris_regsets): Likewise.
8648 * linux-m68k-low.c (m68k_regsets): Likewise.
8649 * linux-mips-low.c (mips_regsets): Likewise.
8650 * linux-nios2-low.c (nios2_regsets): Likewise.
8651 * linux-ppc-low.c (ppc_regsets): Likewise.
8652 * linux-s390-low.c (s390_regsets): Likewise.
8653 * linux-sh-low.c (sh_regsets): Likewise.
8654 * linux-sparc-low.c (sparc_regsets): Likewise.
8655 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8656 * linux-tile-low.c (tile_regsets): Likewise.
8657 * linux-x86-low.c (x86_regsets): Likewise.
8658 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8659
86602015-10-26 Doug Evans <dje@google.com>
8661
8662 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8663
86642015-10-26 Doug Evans <dje@google.com>
8665
8666 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8667
86682015-10-26 Doug Evans <dje@google.com>
8669
8670 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8671 for debug_printf.
8672 (attach_thread, find_new_threads_callback): Ditto.
8673
86742015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8675
8676 * mem-break.h (set_breakpoint_data): Remove.
8677
86782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8679
8680 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8681 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8682 (initialize_low): Remove set_breakpoint_data call.
8683 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8684 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8685 (initialize_low): Remove set_breakpoint_data call.
8686 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8687 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8688 (initialize_low): Remove set_breakpoint_data call.
8689
86902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8691
8692 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8693 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8694 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8695 * target.h (target_breakpoint_kind_from_pc): New macro.
8696
86972015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8698
8699 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8700 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8701 the default breakpoint kind.
8702
87032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8704
8705 * linux-arm-low.c (arm_supports_z_point_type): Add software
8706 breakpoint support.
8707
87082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8709
8710 * linux-arm-low.c: Refactor breakpoint definitions.
8711 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8712 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8713
87142015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8715
8716 * Makefile.in: Add arm.c/o.
8717 * configure.srv: Likewise.
8718 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8719 (arm_breakpoint_kind_from_pc): New function.
8720 (arm_sw_breakpoint_from_kind): Return proper kind.
8721 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8722
87232015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8724
8725 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8726 removal.
8727 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8728 (struct raw_breakpoint) <size>: Remove.
8729 (struct raw_breakpoint) <kind>: Add.
8730 (bp_size): New function.
8731 (bp_opcode): Likewise.
8732 (find_raw_breakpoint_at): Adjust for kind.
8733 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8734 (remove_memory_breakpoint): Adjust for kind call bp_size.
8735 (set_raw_breakpoint_at): Adjust for kind.
8736 (set_breakpoint): Likewise.
8737 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8738 (delete_raw_breakpoint): Adjust for kind.
8739 (delete_breakpoint): Likewise.
8740 (find_gdb_breakpoint): Likewise.
8741 (set_gdb_breakpoint_1): Likewise.
8742 (set_gdb_breakpoint): Likewise.
8743 (delete_gdb_breakpoint_1): Likewise.
8744 (delete_gdb_breakpoint): Likewise.
8745 (uninsert_raw_breakpoint): Likewise.
8746 (reinsert_raw_breakpoint): Likewise.
8747 (set_breakpoint_data): Remove.
8748 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8749 (check_mem_read): Adjust for kind call bp_size.
8750 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8751 (clone_one_breakpoint): Adjust for kind.
8752 * mem-break.h (set_gdb_breakpoint): Likewise.
8753 (delete_gdb_breakpoint): Likewise.
8754 * server.c (process_serial_event): Likewise.
8755
87562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8757
8758 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8759 (struct linux_target_ops) <breakpoint>: Remove.
8760 (struct linux_target_ops) <breakpoint_len>: Remove.
8761 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8762 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8763 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8764 (arm_sw_breakpoint_from_kind): New function.
8765 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8766 (struct linux_target_ops) <breakpoint>: Remove.
8767 (struct linux_target_ops) <breakpoint_len>: Remove.
8768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8770 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8771 (struct linux_target_ops) <breakpoint>: Remove.
8772 (struct linux_target_ops) <breakpoint_len>: Remove.
8773 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8774 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8775 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8776 (struct linux_target_ops) <breakpoint>: Remove.
8777 (struct linux_target_ops) <breakpoint_len>: Remove.
8778 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8779 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8780 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8781 and sw_breakpoint_from_kind to increment the pc.
8782 (linux_breakpoint_kind_from_pc): New function.
8783 (linux_sw_breakpoint_from_kind): New function.
8784 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8785 (initialize_low): Call breakpoint_kind_from_pc and
8786 sw_breakpoint_from_kind to replace breakpoint_data/len.
8787 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
8788 New field.
8789 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
8790 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
8791 (struct linux_target_ops) <breakpoint>: Remove.
8792 (struct linux_target_ops) <breakpoint_len>: Remove.
8793 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8794 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8795 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
8796 (struct linux_target_ops) <breakpoint>: Remove.
8797 (struct linux_target_ops) <breakpoint_len>: Remove.
8798 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8799 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8800 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
8801 (struct linux_target_ops) <breakpoint>: Remove.
8802 (struct linux_target_ops) <breakpoint_len>: Remove.
8803 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8804 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8805 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
8806 (struct linux_target_ops) <breakpoint>: Remove.
8807 (struct linux_target_ops) <breakpoint_len>: Remove.
8808 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8809 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8810 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
8811 (struct linux_target_ops) <breakpoint>: Remove.
8812 (struct linux_target_ops) <breakpoint_len>: Remove.
8813 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8814 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8815 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
8816 (struct linux_target_ops) <breakpoint>: Remove.
8817 (struct linux_target_ops) <breakpoint_len>: Remove.
8818 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8819 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8820 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
8821 (struct linux_target_ops) <breakpoint>: Remove.
8822 (struct linux_target_ops) <breakpoint_len>: Remove.
8823 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8824 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8825 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
8826 (struct linux_target_ops) <breakpoint>: Remove.
8827 (struct linux_target_ops) <breakpoint_len>: Remove.
8828 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8829 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8830 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
8831 (struct linux_target_ops) <breakpoint>: Remove.
8832 (struct linux_target_ops) <breakpoint_len>: Remove.
8833 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8834 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8835 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
8836 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
8837 (struct linux_target_ops) <breakpoint>: Remove.
8838 (struct linux_target_ops) <breakpoint_len>: Remove.
8839 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8840 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8841 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
8842 (struct linux_target_ops) <breakpoint>: Remove.
8843 (struct linux_target_ops) <breakpoint_len>: Remove.
8844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8845 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8846
88472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8848
8849 * linux-cris-low.c (cris_get_pc): Remove void arg.
8850
88512015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8852
8853 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
8854 variable name.
8855
88562015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8857
8858 * inferiors.c (thread_pid_matches_callback): New function.
8859 (find_thread_process): New function.
8860 (remove_thread): Reset current_thread.
8861 (remove_process): Assert threads have been removed first.
8862
88632015-10-15 Yao Qi <yao.qi@linaro.org>
8864
8865 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
8866 if it is 3.
8867 (aarch64_remove_point): Likewise.
8868 * regcache.c (regcache_register_size): New function.
8869
88702015-10-12 Yao Qi <yao.qi@linaro.org>
8871
8872 * linux-aarch64-low.c: Update all callers as emit_load_store
8873 is renamed to aarch64_emit_load_store.
8874
88752015-10-12 Yao Qi <yao.qi@linaro.org>
8876
8877 * linux-aarch64-low.c: Update all callers of function renaming
8878 from emit_insn to aarch64_emit_insn.
8879
88802015-10-12 Yao Qi <yao.qi@linaro.org>
8881
8882 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
8883 arch/aarch64-insn.h.
8884 (struct aarch64_memory_operand): Likewise.
8885 (ENCODE): Likewise.
8886 (emit_insn): Move to arch/aarch64-insn.c.
8887 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
8888 (emit_load_store): Move to arch/aarch64-insn.c.
8889 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
8890 (can_encode_int32): Remove.
8891
88922015-10-12 Yao Qi <yao.qi@linaro.org>
8893
8894 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
8895 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
8896 (aarch64_relocate_instruction): Likewise.
8897 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
8898 (struct aarch64_insn_visitor): Likewise.
8899
89002015-10-12 Yao Qi <yao.qi@linaro.org>
8901
8902 * linux-aarch64-low.c (struct aarch64_insn_data): New.
8903 (struct aarch64_insn_visitor): New.
8904 (struct aarch64_insn_relocation_data): New.
8905 (aarch64_ftrace_insn_reloc_b): New function.
8906 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8907 (aarch64_ftrace_insn_reloc_cb): Likewise.
8908 (aarch64_ftrace_insn_reloc_tb): Likewise.
8909 (aarch64_ftrace_insn_reloc_adr): Likewise.
8910 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
8911 (aarch64_ftrace_insn_reloc_others): Likewise.
8912 (visitor): New.
8913 (aarch64_relocate_instruction): Use visitor.
8914
89152015-10-12 Yao Qi <yao.qi@linaro.org>
8916
8917 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
8918 int. Add argument buf.
8919 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
8920 aarch64_relocate_instruction.
8921
89222015-10-12 Yao Qi <yao.qi@linaro.org>
8923
8924 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
8925 argument insn. Remove local variable insn. Don't call
8926 target_read_uint32.
8927 (aarch64_install_fast_tracepoint_jump_pad): Call
8928 target_read_uint32.
8929
89302015-09-30 Yao Qi <yao.qi@linaro.org>
8931
8932 * linux-aarch64-low.c (emit_movk): Shorten a long line.
8933 (emit_load_store_pair): Likewise.
8934
89352015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8936
8937 * dll.c (match_dll): Add cast(s).
8938 (unloaded_dll): Likewise.
8939 * linux-low.c (second_thread_of_pid_p): Likewise.
8940 (delete_lwp_callback): Likewise.
8941 (count_events_callback): Likewise.
8942 (select_event_lwp_callback): Likewise.
8943 (linux_set_resume_request): Likewise.
8944 * server.c (accumulate_file_name_length): Likewise.
8945 (emit_dll_description): Likewise.
8946 (handle_qxfer_threads_worker): Likewise.
8947 (visit_actioned_threads): Likewise.
8948 * thread-db.c (any_thread_of): Likewise.
8949 * tracepoint.c (same_process_p): Likewise.
8950 (match_blocktype): Likewise.
8951 (build_traceframe_info_xml): Likewise.
8952
89532015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8954
8955 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
8956 assignment.
8957 (gdb_unparse_agent_expr): Likewise.
8958 * hostio.c (require_data): Likewise.
8959 (handle_pread): Likewise.
8960 * linux-low.c (disable_regset): Likewise.
8961 (fetch_register): Likewise.
8962 (store_register): Likewise.
8963 (get_dynamic): Likewise.
8964 (linux_qxfer_libraries_svr4): Likewise.
8965 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
8966 (set_fast_tracepoint_jump): Likewise.
8967 (uninsert_fast_tracepoint_jumps_at): Likewise.
8968 (reinsert_fast_tracepoint_jumps_at): Likewise.
8969 (validate_inserted_breakpoint): Likewise.
8970 (clone_agent_expr): Likewise.
8971 * regcache.c (init_register_cache): Likewise.
8972 * remote-utils.c (putpkt_binary_1): Likewise.
8973 (decode_M_packet): Likewise.
8974 (decode_X_packet): Likewise.
8975 (look_up_one_symbol): Likewise.
8976 (relocate_instruction): Likewise.
8977 (monitor_output): Likewise.
8978 * server.c (handle_search_memory): Likewise.
8979 (handle_qxfer_exec_file): Likewise.
8980 (handle_qxfer_libraries): Likewise.
8981 (handle_qxfer): Likewise.
8982 (handle_query): Likewise.
8983 (handle_v_cont): Likewise.
8984 (handle_v_run): Likewise.
8985 (captured_main): Likewise.
8986 * target.c (write_inferior_memory): Likewise.
8987 * thread-db.c (try_thread_db_load_from_dir): Likewise.
8988 * tracepoint.c (init_trace_buffer): Likewise.
8989 (add_tracepoint_action): Likewise.
8990 (add_traceframe): Likewise.
8991 (add_traceframe_block): Likewise.
8992 (cmd_qtdpsrc): Likewise.
8993 (cmd_qtdv): Likewise.
8994 (cmd_qtstatus): Likewise.
8995 (response_source): Likewise.
8996 (response_tsv): Likewise.
8997 (cmd_qtnotes): Likewise.
8998 (gdb_collect): Likewise.
8999 (initialize_tracepoint): Likewise.
9000
90012015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9002
9003 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9004 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9005 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9006 <NOP>: New.
9007 (enum aarch64_condition_codes): New enum.
9008 (w0): New static global.
9009 (fp): Likewise.
9010 (lr): Likewise.
9011 (struct aarch64_memory_operand) <type>: New
9012 MEMORY_OPERAND_POSTINDEX type.
9013 (postindex_memory_operand): New helper function.
9014 (emit_ret): New function.
9015 (emit_load_store_pair): New function, factored out of emit_stp
9016 with support for MEMORY_OPERAND_POSTINDEX.
9017 (emit_stp): Rewrite using emit_load_store_pair.
9018 (emit_ldp): New function.
9019 (emit_load_store): Likewise.
9020 (emit_ldr): Mention post-index instruction in comment.
9021 (emit_ldrh): New function.
9022 (emit_ldrb): New function.
9023 (emit_ldrsw): Mention post-index instruction in comment.
9024 (emit_str): Likewise.
9025 (emit_subs): New function.
9026 (emit_cmp): Likewise.
9027 (emit_and): Likewise.
9028 (emit_orr): Likewise.
9029 (emit_orn): Likewise.
9030 (emit_eor): Likewise.
9031 (emit_mvn): Likewise.
9032 (emit_lslv): Likewise.
9033 (emit_lsrv): Likewise.
9034 (emit_asrv): Likewise.
9035 (emit_mul): Likewise.
9036 (emit_sbfm): Likewise.
9037 (emit_sbfx): Likewise.
9038 (emit_ubfm): Likewise.
9039 (emit_ubfx): Likewise.
9040 (emit_csinc): Likewise.
9041 (emit_cset): Likewise.
9042 (emit_nop): Likewise.
9043 (emit_ops_insns): New helper function.
9044 (emit_pop): Likewise.
9045 (emit_push): Likewise.
9046 (aarch64_emit_prologue): New function.
9047 (aarch64_emit_epilogue): Likewise.
9048 (aarch64_emit_add): Likewise.
9049 (aarch64_emit_sub): Likewise.
9050 (aarch64_emit_mul): Likewise.
9051 (aarch64_emit_lsh): Likewise.
9052 (aarch64_emit_rsh_signed): Likewise.
9053 (aarch64_emit_rsh_unsigned): Likewise.
9054 (aarch64_emit_ext): Likewise.
9055 (aarch64_emit_log_not): Likewise.
9056 (aarch64_emit_bit_and): Likewise.
9057 (aarch64_emit_bit_or): Likewise.
9058 (aarch64_emit_bit_xor): Likewise.
9059 (aarch64_emit_bit_not): Likewise.
9060 (aarch64_emit_equal): Likewise.
9061 (aarch64_emit_less_signed): Likewise.
9062 (aarch64_emit_less_unsigned): Likewise.
9063 (aarch64_emit_ref): Likewise.
9064 (aarch64_emit_if_goto): Likewise.
9065 (aarch64_emit_goto): Likewise.
9066 (aarch64_write_goto_address): Likewise.
9067 (aarch64_emit_const): Likewise.
9068 (aarch64_emit_call): Likewise.
9069 (aarch64_emit_reg): Likewise.
9070 (aarch64_emit_pop): Likewise.
9071 (aarch64_emit_stack_flush): Likewise.
9072 (aarch64_emit_zero_ext): Likewise.
9073 (aarch64_emit_swap): Likewise.
9074 (aarch64_emit_stack_adjust): Likewise.
9075 (aarch64_emit_int_call_1): Likewise.
9076 (aarch64_emit_void_call_2): Likewise.
9077 (aarch64_emit_eq_goto): Likewise.
9078 (aarch64_emit_ne_goto): Likewise.
9079 (aarch64_emit_lt_goto): Likewise.
9080 (aarch64_emit_le_goto): Likewise.
9081 (aarch64_emit_gt_goto): Likewise.
9082 (aarch64_emit_ge_got): Likewise.
9083 (aarch64_emit_ops_impl): New static global variable.
9084 (aarch64_emit_ops): New target function, return
9085 &aarch64_emit_ops_impl.
9086 (struct linux_target_ops): Install it.
9087
90882015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9089
9090 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9091 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9092 aarch64-ipa.o.
9093 * linux-aarch64-ipa.c: New file.
9094 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9095 and endian.h.
9096 (aarch64_get_thread_area): New target method.
9097 (extract_signed_bitfield): New helper function.
9098 (aarch64_decode_ldr_literal): New function.
9099 (enum aarch64_opcodes): New enum.
9100 (struct aarch64_register): New struct.
9101 (struct aarch64_operand): New struct.
9102 (x0): New static global.
9103 (x1): Likewise.
9104 (x2): Likewise.
9105 (x3): Likewise.
9106 (x4): Likewise.
9107 (w2): Likewise.
9108 (ip0): Likewise.
9109 (sp): Likewise.
9110 (xzr): Likewise.
9111 (aarch64_register): New helper function.
9112 (register_operand): Likewise.
9113 (immediate_operand): Likewise.
9114 (struct aarch64_memory_operand): New struct.
9115 (offset_memory_operand): New helper function.
9116 (preindex_memory_operand): Likewise.
9117 (enum aarch64_system_control_registers): New enum.
9118 (ENCODE): New macro.
9119 (emit_insn): New helper function.
9120 (emit_b): New function.
9121 (emit_bcond): Likewise.
9122 (emit_cb): Likewise.
9123 (emit_tb): Likewise.
9124 (emit_blr): Likewise.
9125 (emit_stp): Likewise.
9126 (emit_ldp_q_offset): Likewise.
9127 (emit_stp_q_offset): Likewise.
9128 (emit_load_store): Likewise.
9129 (emit_ldr): Likewise.
9130 (emit_ldrsw): Likewise.
9131 (emit_str): Likewise.
9132 (emit_ldaxr): Likewise.
9133 (emit_stxr): Likewise.
9134 (emit_stlr): Likewise.
9135 (emit_data_processing_reg): Likewise.
9136 (emit_data_processing): Likewise.
9137 (emit_add): Likewise.
9138 (emit_sub): Likewise.
9139 (emit_mov): Likewise.
9140 (emit_movk): Likewise.
9141 (emit_mov_addr): Likewise.
9142 (emit_mrs): Likewise.
9143 (emit_msr): Likewise.
9144 (emit_sevl): Likewise.
9145 (emit_wfe): Likewise.
9146 (append_insns): Likewise.
9147 (can_encode_int32_in): New helper function.
9148 (aarch64_relocate_instruction): New function.
9149 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9150 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9151 (struct linux_target_ops): Install aarch64_get_thread_area,
9152 aarch64_install_fast_tracepoint_jump_pad and
9153 aarch64_get_min_fast_tracepoint_insn_len.
9154
91552015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9156
9157 * Makefile.in (aarch64-insn.o): New rule.
9158 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9159
91602015-09-21 Yao Qi <yao.qi@linaro.org>
9161
9162 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9163
91642015-09-21 Yao Qi <yao.qi@linaro.org>
9165
9166 * tracepoint.c (max_jump_pad_size): Remove.
9167
91682015-09-18 Yao Qi <yao.qi@linaro.org>
9169
9170 * linux-aarch64-low.c: Don't include sys/uio.h.
9171 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9172
91732015-09-16 Wei-cheng Wang <cole945@gmail.com>
9174
9175 * tracepoint.c (eval_result_type): Change prototype.
9176 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9177
91782015-09-15 Pedro Alves <palves@redhat.com>
9179
9180 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9181 Check whether to report exec events instead of checking whether
9182 multiprocess is enabled.
9183
91842015-09-15 Pedro Alves <palves@redhat.com>
9185
9186 PR remote/18965
9187 * remote-utils.c (prepare_resume_reply): Merge
9188 TARGET_WAITKIND_VFORK_DONE switch case with the
9189 TARGET_WAITKIND_FORKED case.
9190
91912015-09-15 Yao Qi <yao.qi@linaro.org>
9192
9193 * server.c (handle_query): Check string comparison using
9194 "else if" instead of "if".
9195
91962015-09-15 Yao Qi <yao.qi@linaro.org>
9197
9198 * server.c (vCont_supported): New global variable.
9199 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9200 matches. Append ";vContSupported+" to own_buf.
9201 (handle_v_requests): Append ";s;S" to own_buf if target supports
9202 hardware single step or vCont_supported is false.
9203 (capture_main): Set vCont_supported to zero.
9204
92052015-09-15 Yao Qi <yao.qi@linaro.org>
9206
9207 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9208 it to ...
9209 (linux_supports_hardware_single_step): ... New function.
9210 (linux_target_ops): Update.
9211 * lynx-low.c (lynx_target_ops): Set field
9212 supports_hardware_single_step to target_can_do_hardware_single_step.
9213 * nto-low.c (nto_target_ops): Likewise.
9214 * spu-low.c (spu_target_ops): Likewise.
9215 * win32-low.c (win32_target_ops): Likewise.
9216 * target.c (target_can_do_hardware_single_step): New function.
9217 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9218 Remove. <supports_hardware_single_step>: New field.
9219 (target_supports_conditional_breakpoints): Remove.
9220 (target_supports_hardware_single_step): New macro.
9221 (target_can_do_hardware_single_step): Declare.
9222 * server.c (handle_query): Use target_supports_hardware_single_step
9223 instead of target_supports_conditional_breakpoints.
9224
92252015-09-15 Yao Qi <yao.qi@linaro.org>
9226
9227 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9228 function.
9229 (struct linux_target_ops the_low_target): Install
9230 aarch64_linux_siginfo_fixup.
9231
92322015-09-11 Don Breazeal <donb@codesourcery.com>
9233 Luis Machado <lgustavo@codesourcery.com>
9234
9235 * linux-low.c (linux_mourn): Static declaration.
9236 (linux_arch_setup): Move in front of
9237 handle_extended_wait.
9238 (linux_arch_setup_thread): New function.
9239 (handle_extended_wait): Handle exec events. Call
9240 linux_arch_setup_thread. Make event_lwp argument a
9241 pointer-to-a-pointer.
9242 (check_zombie_leaders): Do not check stopped threads.
9243 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9244 (linux_low_filter_event): Add lwp and thread for exec'ing
9245 non-leader thread if leader thread has been deleted.
9246 Refactor code into linux_arch_setup_thread and call it.
9247 Pass child lwp pointer by reference to handle_extended_wait.
9248 (linux_wait_for_event_filtered): Update comment.
9249 (linux_wait_1): Prevent clobbering exec event status.
9250 (linux_supports_exec_events): New function.
9251 (linux_target_ops) <supports_exec_events>: Initialize new member.
9252 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9253 new member.
9254 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9255 * server.c (report_exec_events): New global variable.
9256 (handle_query): Handle qSupported query for exec-events feature.
9257 (captured_main): Initialize report_exec_events.
9258 * server.h (report_exec_events): Declare new global variable.
9259 * target.h (struct target_ops) <supports_exec_events>: New
9260 member.
9261 (target_supports_exec_events): New macro.
9262 * win32-low.c (win32_target_ops) <supports_exec_events>:
9263 Initialize new member.
9264
92652015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9266
9267 * linux-low.c (linux_low_enable_btrace): Remove.
9268 (linux_target_ops): Replace linux_low_enable_btrace with
9269 linux_enable_btrace.
9270
92712015-09-03 Yao Qi <yao.qi@linaro.org>
9272
9273 * linux-aarch64-low.c (aarch64_insert_point): Call
9274 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9275 returns true.
9276
92772015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9278
9279 * linux-low.c (check_stopped_by_breakpoint): Use
9280 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9281
92822015-08-27 Pedro Alves <palves@redhat.com>
9283
9284 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9285
92862015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9287
9288 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9289 the XNEW-family equivalent.
9290 (compile_bytecodes): Likewise.
9291 * dll.c (loaded_dll): Likewise.
9292 * event-loop.c (append_callback_event): Likewise.
9293 (create_file_handler): Likewise.
9294 (create_file_event): Likewise.
9295 * hostio.c (handle_open): Likewise.
9296 * inferiors.c (add_thread): Likewise.
9297 (add_process): Likewise.
9298 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9299 * linux-arm-low.c (arm_new_process): Likewise.
9300 (arm_new_thread): Likewise.
9301 * linux-low.c (add_to_pid_list): Likewise.
9302 (linux_add_process): Likewise.
9303 (handle_extended_wait): Likewise.
9304 (add_lwp): Likewise.
9305 (enqueue_one_deferred_signal): Likewise.
9306 (enqueue_pending_signal): Likewise.
9307 (linux_resume_one_lwp_throw): Likewise.
9308 (linux_resume_one_thread): Likewise.
9309 (linux_read_memory): Likewise.
9310 (linux_write_memory): Likewise.
9311 * linux-mips-low.c (mips_linux_new_process): Likewise.
9312 (mips_linux_new_thread): Likewise.
9313 (mips_add_watchpoint): Likewise.
9314 * linux-x86-low.c (initialize_low_arch): Likewise.
9315 * lynx-low.c (lynx_add_process): Likewise.
9316 * mem-break.c (set_raw_breakpoint_at): Likewise.
9317 (set_breakpoint): Likewise.
9318 (add_condition_to_breakpoint): Likewise.
9319 (add_commands_to_breakpoint): Likewise.
9320 (clone_agent_expr): Likewise.
9321 (clone_one_breakpoint): Likewise.
9322 * regcache.c (new_register_cache): Likewise.
9323 * remote-utils.c (look_up_one_symbol): Likewise.
9324 * server.c (queue_stop_reply): Likewise.
9325 (start_inferior): Likewise.
9326 (queue_stop_reply_callback): Likewise.
9327 (handle_target_event): Likewise.
9328 * spu-low.c (fetch_ppc_memory): Likewise.
9329 (store_ppc_memory): Likewise.
9330 * target.c (set_target_ops): Likewise.
9331 * thread-db.c (thread_db_load_search): Likewise.
9332 (try_thread_db_load_1): Likewise.
9333 * tracepoint.c (add_tracepoint): Likewise.
9334 (add_tracepoint_action): Likewise.
9335 (create_trace_state_variable): Likewise.
9336 (cmd_qtdpsrc): Likewise.
9337 (cmd_qtro): Likewise.
9338 (add_while_stepping_state): Likewise.
9339 * win32-low.c (child_add_thread): Likewise.
9340 (get_image_name): Likewise.
9341
93422015-08-25 Yao Qi <yao.qi@linaro.org>
9343
9344 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9345
93462015-08-25 Yao Qi <yao.qi@linaro.org>
9347
9348 * Makefile.in (aarch64-linux.o): New rule.
9349 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9350 srv_tgtobj.
9351 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9352 (aarch64_init_debug_reg_state): Make it extern.
9353 (aarch64_linux_prepare_to_resume): Remove.
9354
93552015-08-25 Yao Qi <yao.qi@linaro.org>
9356
9357 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9358 lwp_arch_private_info and ptid_of_lwp.
9359
93602015-08-25 Yao Qi <yao.qi@linaro.org>
9361
9362 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9363 Find proc_info by find_process_pid. All callers updated.
9364
93652015-08-25 Yao Qi <yao.qi@linaro.org>
9366
9367 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9368 Remove.
9369 (debug_reg_change_callback): Remove.
9370 (aarch64_notify_debug_reg_change): Remove.
9371
93722015-08-25 Yao Qi <yao.qi@linaro.org>
9373
9374 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9375 Call current_lwp_ptid.
9376
93772015-08-25 Yao Qi <yao.qi@linaro.org>
9378
9379 * linux-aarch64-low.c (debug_reg_change_callback): Use
9380 debug_printf.
9381
93822015-08-25 Yao Qi <yao.qi@linaro.org>
9383
9384 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9385
93862015-08-25 Yao Qi <yao.qi@linaro.org>
9387
9388 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9389
93902015-08-25 Yao Qi <yao.qi@linaro.org>
9391
9392 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9393 the code.
9394
93952015-08-25 Yao Qi <yao.qi@linaro.org>
9396
9397 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9398 Remove.
9399 (debug_reg_change_callback): Remove argument entry and add argument
9400 lwp. Remove local variable thread. Don't print thread id in the
9401 debugging output. Don't check whether pid of thread equals to pid.
9402 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9403 iterate_over_lwps instead find_inferior.
9404
94052015-08-24 Pedro Alves <palves@redhat.com>
9406
9407 * inferiors.c (get_first_process): New function.
9408 * inferiors.h (get_first_process): New declaration.
9409 * remote-utils.c (read_ptid): Default to the first process in the
9410 list, instead of to the current thread's process.
9411
94122015-08-24 Pedro Alves <palves@redhat.com>
9413
9414 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9415 * event-loop.c: Likewise.
9416 * remote-utils.c: Likewise.
9417 * tracepoint.c: Likewise.
9418
94192015-08-24 Pedro Alves <palves@redhat.com>
9420
9421 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9422 ptid_get_lwp.
9423
94242015-08-21 Pedro Alves <palves@redhat.com>
9425
9426 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9427 instead of literal 1.
9428
94292015-08-21 Pedro Alves <palves@redhat.com>
9430
9431 * tdesc.c (default_description): Explicitly zero-initialize.
9432
94332015-08-21 Pedro Alves <palves@redhat.com>
9434
9435 PR gdb/18749
9436 * inferiors.c (remove_thread): Discard any pending stop reply for
9437 this thread.
9438 * server.c (remove_all_on_match_pid): Rename to ...
9439 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9440 instead of a pid.
9441 (discard_queued_stop_replies): Change parameter to a ptid. Now
9442 extern.
9443 (handle_v_kill, kill_inferior_callback, captured_main)
9444 (process_serial_event): Adjust.
9445 * server.h (discard_queued_stop_replies): Declare.
9446
94472015-08-21 Pedro Alves <palves@redhat.com>
9448
9449 * linux-low.c (wait_for_sigstop): Always switch to no thread
9450 selected if the previously current thread dies.
9451 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9452 process instead of the current thread's.
9453 * remote-utils.c (input_interrupt): Don't check if there's no
9454 current thread.
9455 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9456 current thread to the general thread fails, error out.
9457 (handle_qxfer_auxv, handle_qxfer_libraries)
9458 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9459 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9460 (handle_query): Check if there's a thread selected instead of
9461 checking whether there's any thread in the thread list.
9462 (handle_qxfer_threads, handle_qxfer_btrace)
9463 (handle_qxfer_btrace_conf): Don't error out early if there's no
9464 thread in the thread list.
9465 (handle_v_cont, myresume): Don't set the current thread to the
9466 continue thread.
9467 (process_serial_event) <Hg handling>: Also set thread_id if the
9468 previous general thread is still alive.
9469 (process_serial_event) <g/G handling>: If setting the current
9470 thread to the general thread fails, error out.
9471 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9472 thread's lwp instead of the current thread's.
9473 * target.c (set_desired_thread): If the desired thread was not
9474 found, leave the current thread pointing to NULL. Return an int
9475 (boolean) indicating success.
9476 * target.h (set_desired_thread): Change return type to int.
9477
94782015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9479
9480 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9481 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9482 #includes.
9483 (ps_get_thread_area): New function.
9484
94852015-08-19 Gary Benson <gbenson@redhat.com>
9486
9487 * hostio.c (handle_pread): Do not attempt to read more data
9488 than hostio_reply_with_data can fit in a packet.
9489
94902015-08-18 Joel Brobecker <brobecker@adacore.com>
9491
9492 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9493
94942015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9495
9496 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9497
94982015-08-06 Pedro Alves <palves@redhat.com>
9499
9500 * tracepoint.c (expr_eval_result): Now an int.
9501
95022015-08-06 Pedro Alves <palves@redhat.com>
9503
9504 * gdbthread.h (struct regcache): Forward declare.
9505 (struct thread_info) <regcache_data>: Now a struct regcache
9506 pointer.
9507 * inferiors.c (inferior_regcache_data)
9508 (set_inferior_regcache_data): Now work with struct regcache
9509 pointers.
9510 * inferiors.h (struct regcache): Forward declare.
9511 (inferior_regcache_data, set_inferior_regcache_data): Now work
9512 with struct regcache pointers.
9513 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9514 (free_register_cache_thread): Remove struct regcache pointer
9515 casts.
9516
95172015-08-06 Pedro Alves <palves@redhat.com>
9518
9519 * server.c (captured_main): On error, print the exception message
9520 to stderr, and if run_once is set, throw a quit.
9521
95222015-08-06 Pedro Alves <palves@redhat.com>
9523
9524 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9525 the current thread.
9526
95272015-08-06 Pedro Alves <palves@redhat.com>
9528
9529 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9530 reading beyond the passed in buffer length.
9531
95322015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9533
9534 * tracepoint.c (symbol_list) <required>: Remove.
9535
95362015-08-06 Pedro Alves <palves@redhat.com>
9537
9538 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9539 count if stopping and suspending threads.
9540 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9541 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9542 (linux_detach): Complete an ongoing step-over.
9543 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9544 throughout.
9545 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9546 (linux_wait_1): If passing a signal to the inferior after
9547 finishing a step-over, unsuspend and re-resume all lwps. If we
9548 see a single-step event but the thread should be continuing, don't
9549 pass the trap to gdb.
9550 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9551 internal_error instead of gdb_assert.
9552 (enqueue_pending_signal): New function.
9553 (check_ptrace_stopped_lwp_gone): Add debug output.
9554 (start_step_over): Use internal_error instead of gdb_assert.
9555 (complete_ongoing_step_over): New function.
9556 (linux_resume_one_thread): Don't resume a suspended thread.
9557 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9558 it stepping.
9559
95602015-08-06 Pedro Alves <palves@redhat.com>
9561
9562 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9563 (linux_thread_alive): Use lwp_is_marked_dead.
9564 (extended_event_reported): Delete.
9565 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9566 instead of extended_event_reported.
9567 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9568 as well.
9569 (lwp_is_marked_dead): New function.
9570 (lwp_running): Use lwp_is_marked_dead.
9571 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9572 comment.
9573
95742015-08-06 Pedro Alves <palves@redhat.com>
9575
9576 * linux-low.c (linux_wait_1): Move fork event output out of the
9577 !report_to_gdb check. Pass event_child->waitstatus to
9578 target_waitstatus_to_string instead of ourstatus.
9579
95802015-08-04 Yao Qi <yao.qi@linaro.org>
9581
9582 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9583 if current_thread is 32 bit.
9584
95852015-08-04 Yao Qi <yao.qi@linaro.org>
9586
9587 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9588 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9589 * server.c (extended_protocol): Remove "static".
9590 * server.h (extended_protocol): Declare it.
9591
95922015-08-04 Yao Qi <yao.qi@linaro.org>
9593
9594 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9595 both aarch64 and aarch32.
9596 (aarch64_set_pc): Likewise.
9597
95982015-08-04 Yao Qi <yao.qi@linaro.org>
9599
9600 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9601 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9602 arm-with-neon.xml to srv_xmlfiles.
9603 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9604 (is_64bit_tdesc): New function.
9605 (aarch64_linux_read_description): New function.
9606 (aarch64_arch_setup): Call aarch64_linux_read_description.
9607 (regs_info): Rename to regs_info_aarch64.
9608 (aarch64_regs_info): Return right regs_info.
9609 (initialize_low_arch): Call initialize_low_arch_aarch32.
9610
96112015-08-04 Yao Qi <yao.qi@linaro.org>
9612
9613 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9614 * linux-aarch32-low.c: New file.
9615 * linux-aarch32-low.h: New file.
9616 * linux-arm-low.c (arm_fill_gregset): Move it to
9617 linux-aarch32-low.c.
9618 (arm_store_gregset): Likewise.
9619 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9620 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9621 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9622 (regs_info): Rename to regs_info_arm.
9623 (arm_regs_info): Return regs_info_aarch32 if
9624 have_ptrace_getregset is 1 and target description is
9625 arm_with_neon or arm_with_vfpv3.
9626 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9627 Call initialize_low_arch_aarch32 instead.
9628
96292015-08-04 Yao Qi <yao.qi@linaro.org>
9630
9631 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9632 * linux-low.c: ... here.
9633 * linux-low.h (have_ptrace_getregset): Declare it.
9634
96352015-08-04 Pedro Alves <palves@redhat.com>
9636
9637 * thread-db.c (struct thread_db): Use new typedefs.
9638 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9639 CHK calls.
9640 (disable_thread_event_reporting): Cast result of dlsym to
9641 destination function pointer type.
9642 (thread_db_mourn): Use td_ta_delete_ftype.
9643
96442015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9645
9646 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9647 arch variant.
9648 (CDX_BREAKPOINT): Define for R2.
9649 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9650 (the_low_target): Add comments.
9651
96522015-07-30 Yao Qi <yao.qi@linaro.org>
9653
9654 * linux-arm-low.c (arm_hwcap): Remove it.
9655 (arm_read_description): New local variable arm_hwcap. Don't
9656 set arm_hwcap to zero.
9657
96582015-07-30 Yao Qi <yao.qi@linaro.org>
9659
9660 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9661 Use regcache->tdesc instead.
9662 (arm_store_wmmxregset): Likewise.
9663 (arm_fill_vfpregset): Likewise.
9664 (arm_store_vfpregset): Likewise.
9665
96662015-07-30 Yao Qi <yao.qi@linaro.org>
9667
9668 * linux-arm-low.c: Include arch/arm.h.
9669 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9670 (arm_store_gregset): Likewise.
9671
96722015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9673
9674 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9675 ptrace's 4th parameter.
9676
96772015-07-27 Yao Qi <yao.qi@linaro.org>
9678
9679 * configure.srv (case aarch64*-*-linux*): Don't set
9680 srv_linux_usrregs.
9681
96822015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9683
9684 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9685 sys/ptrace.h.
9686 * linux-arm-low.c: Likewise.
9687 * linux-cris-low.c: Likewise.
9688 * linux-crisv32-low.c: Likewise.
9689 * linux-low.c: Likewise.
9690 * linux-m68k-low.c: Likewise.
9691 * linux-mips-low.c: Likewise.
9692 * linux-nios2-low.c: Likewise.
9693 * linux-s390-low.c: Likewise.
9694 * linux-sparc-low.c: Likewise.
9695 * linux-tic6x-low.c: Likewise.
9696 * linux-tile-low.c: Likewise.
9697 * linux-x86-low.c: Likewise.
9698
96992015-07-24 Pedro Alves <palves@redhat.com>
9700
9701 * config.in: Regenerate.
9702 * configure: Regenerate.
9703
97042015-07-24 Pedro Alves <palves@redhat.com>
9705
9706 * acinclude.m4: Include ../ptrace.m4.
9707 * configure.ac: Call GDB_AC_PTRACE.
9708 * config.in, configure: Regenerate.
9709
97102015-07-24 Yao Qi <yao.qi@linaro.org>
9711
9712 * linux-low.c (linux_create_inferior): Remove setting to
9713 proc->priv->new_inferior.
9714 (linux_attach): Likewise.
9715 (linux_low_filter_event): Likewise.
9716 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9717
97182015-07-24 Yao Qi <yao.qi@linaro.org>
9719
9720 * linux-low.c (linux_arch_setup): New function.
9721 (linux_low_filter_event): If proc->tdesc is NULL and
9722 proc->attached is true, call the_low_target.arch_setup.
9723 Otherwise, keep status pending, and return.
9724 (linux_resume_one_lwp_throw): Don't call get_pc if
9725 thread->while_stepping isn't NULL. Don't call
9726 get_thread_regcache if proc->tdesc is NULL.
9727 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9728 (linux_target_ops): Install arch_setup.
9729 * server.c (start_inferior): Call the_target->arch_setup.
9730 * target.h (struct target_ops) <arch_setup>: New field.
9731 (target_arch_setup): New marco.
9732 * lynx-low.c (lynx_target_ops): Update.
9733 * nto-low.c (nto_target_ops): Update.
9734 * spu-low.c (spu_target_ops): Update.
9735 * win32-low.c (win32_target_ops): Update.
9736
97372015-07-24 Yao Qi <yao.qi@linaro.org>
9738
9739 * linux-low.c (linux_add_process): Don't set
9740 proc->priv->new_inferior.
9741 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9742 (linux_attach): Likewise.
9743
97442015-07-24 Yao Qi <yao.qi@linaro.org>
9745
9746 * server.c (start_inferior): Code refactor.
9747
97482015-07-24 Yao Qi <yao.qi@linaro.org>
9749
9750 * server.c (process_serial_event): Set general_thread.
9751
97522015-07-21 Yao Qi <yao.qi@linaro.org>
9753
9754 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9755 aarch64_linux_get_debug_reg_capacity.
9756
97572015-07-17 Yao Qi <yao.qi@linaro.org>
9758
9759 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9760 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9761 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9762 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9763 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9764 (AARCH64_HWP_ALIGNMENT): Likewise.
9765 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9766 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9767 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9768 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9769 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9770 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9771 (struct aarch64_debug_reg_state): Likewise.
9772 (struct arch_lwp_info): Likewise.
9773 (aarch64_align_watchpoint): Likewise.
9774 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9775 (aarch64_watchpoint_length): Likewise.
9776 (aarch64_point_encode_ctrl_reg): Likewise
9777 (aarch64_point_is_aligned): Likewise.
9778 (aarch64_align_watchpoint): Likewise.
9779 (aarch64_linux_set_debug_regs):
9780 (aarch64_dr_state_insert_one_point): Likewise.
9781 (aarch64_dr_state_remove_one_point): Likewise.
9782 (aarch64_handle_breakpoint): Likewise.
9783 (aarch64_handle_aligned_watchpoint): Likewise.
9784 (aarch64_handle_unaligned_watchpoint): Likewise.
9785 (aarch64_handle_watchpoint): Likewise.
9786
97872015-07-17 Yao Qi <yao.qi@linaro.org>
9788
9789 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
9790 and don't aarch64_get_debug_reg_state. All callers update.
9791 (aarch64_handle_aligned_watchpoint): Likewise.
9792 (aarch64_handle_unaligned_watchpoint): Likewise.
9793 (aarch64_handle_watchpoint): Likewise.
9794 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
9795 (aarch64_remove_point): Likewise.
9796
97972015-07-17 Yao Qi <yao.qi@linaro.org>
9798
9799 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
9800 debug_printf.
9801 (aarch64_handle_unaligned_watchpoint): Likewise.
9802
98032015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9804
9805 Revert the previous 3 commits:
9806 Move gdb_regex* to common/
9807 Move linux_find_memory_regions_full & co.
9808 gdbserver build-id attribute generator
9809
98102015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9811 Jan Kratochvil <jan.kratochvil@redhat.com>
9812
9813 gdbserver build-id attribute generator.
9814 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
9815 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
9816 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
9817 (find_phdr): New.
9818 (get_dynamic): Use find_pdhr to traverse program headers.
9819 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
9820 (compare_mapping_entry_range, struct find_memory_region_callback_data)
9821 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
9822 (get_hex_build_id): New.
9823 (linux_qxfer_libraries_svr4): Add optional build-id attribute
9824 to reply XML document.
9825
98262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9827 Jan Kratochvil <jan.kratochvil@redhat.com>
9828
9829 * target.c: Include target/target-utils.h and fcntl.h.
9830 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
9831 (target_fileio_read_stralloc): New functions.
9832
98332015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9834
9835 * Makefile.in (OBS): Add gdb_regex.o.
9836 (gdb_regex.o): New.
9837 * config.in: Rebuilt.
9838 * configure: Rebuilt.
9839
98402015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9841 Jan Kratochvil <jan.kratochvil@redhat.com>
9842
9843 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
9844 * Makefile.in (OBS): Add target-utils.o.
9845 (linux-maps.o, target-utils.o): New.
9846 * configure.srv (srv_linux_obj): Add linux-maps.o.
9847
98482015-07-15 Pierre Langlois <pierre.langlois@arm.com>
9849
9850 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
9851 function, return 1.
9852 (the_low_target): Install it.
9853
98542015-07-14 Pedro Alves <palves@redhat.com>
9855
9856 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
9857 Instead, ignore ECHILD, and throw an error for other errnos.
9858
98592015-07-10 Pedro Alves <palves@redhat.com>
9860
9861 * event-loop.c (struct callback_event) <data>: Change type to
9862 gdb_client_data instance instead of gdb_client_data pointer.
9863 (append_callback_event): Adjust.
9864
98652015-07-10 Pierre Langlois <pierre.langlois@arm.com>
9866
9867 * linux-aarch64-low.c: Add comments for each linux_target_ops
9868 method. Remove comments already covered in target_ops and
9869 linux_target_ops definitions.
9870 (the_low_target): Add comments for each unimplemented method.
9871
98722015-07-09 Yao Qi <yao.qi@linaro.org>
9873
9874 * linux-aarch64-low.c (aarch64_regmap): Remove.
9875 (aarch64_usrregs_info): Remove.
9876 (regs_info): Set field usrregs to NULL.
9877
98782015-07-02 Markus Metzger <markus.t.metzger@intel.com>
9879
9880 * linux-low.c: Include "rsp-low.h"
9881 (linux_low_encode_pt_config, linux_low_encode_raw): New.
9882 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
9883 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
9884 (handle_btrace_enable_pt): New.
9885 (handle_btrace_general_set): Support "pt".
9886 (handle_btrace_conf_general_set): Support "pt:size".
9887
98882015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9889
9890 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
9891 Z_PACKET_SW_BP.
9892
98932015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9894
9895 * linux-aarch64-low.c: Remove comment about endianness.
9896 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
9897 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
9898 memcmp.
9899
99002015-06-24 Gary Benson <gbenson@redhat.com>
9901
9902 * linux-i386-ipa.c (stdint.h): Do not include.
9903 * lynx-i386-low.c (stdint.h): Likewise.
9904 * lynx-ppc-low.c (stdint.h): Likewise.
9905 * mem-break.c (stdint.h): Likewise.
9906 * thread-db.c (stdint.h): Likewise.
9907 * tracepoint.c (stdint.h): Likewise.
9908 * win32-low.c (stdint.h): Likewise.
9909
99102015-06-18 Simon Marchi <simon.marchi@ericsson.com>
9911
9912 * server.c (write_qxfer_response): Update call to
9913 remote_escape_output.
9914
99152015-06-15 Aleksandar Ristovski <aristovski@qnx.com
9916 Jan Kratochvil <jan.kratochvil@redhat.com>
9917
9918 Merge multiple hex conversions.
9919 * gdbreplay.c (tohex): Rename to 'fromhex'.
9920 (logchar): Use fromhex.
9921
99222015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9923
9924 * server.c (handle_qxfer_libraries): Set `version' attribute for
9925 <library-list>.
9926
99272015-06-10 Gary Benson <gbenson@redhat.com>
9928
9929 * target.h (struct target_ops) <multifs_open>: New field.
9930 <multifs_unlink>: Likewise.
9931 <multifs_readlink>: Likewise.
9932 * linux-low.c (nat/linux-namespaces.h): New include.
9933 (linux_target_ops): Initialize the_target->multifs_open,
9934 the_target->multifs_unlink and the_target->multifs_readlink.
9935 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
9936 * hostio.c (hostio_fs_pid): New static variable.
9937 (hostio_handle_new_gdb_connection): New function.
9938 (handle_setfs): Likewise.
9939 (handle_open): Use the_target->multifs_open as appropriate.
9940 (handle_unlink): Use the_target->multifs_unlink as appropriate.
9941 (handle_readlink): Use the_target->multifs_readlink as
9942 appropriate.
9943 (handle_vFile): Handle vFile:setfs packets.
9944 * server.c (handle_query): Call hostio_handle_new_gdb_connection
9945 after target_handle_new_gdb_connection.
9946
99472015-06-10 Gary Benson <gbenson@redhat.com>
9948
9949 * configure.ac (AC_CHECK_FUNCS): Add setns.
9950 * config.in: Regenerate.
9951 * configure: Likewise.
9952 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
9953 (linux-namespaces.o): New rule.
9954 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
9955
99562015-06-09 Gary Benson <gbenson@redhat.com>
9957
9958 * hostio.c (handle_open): Process mode argument with
9959 fileio_to_host_mode.
9960
99612015-06-01 Yao Qi <yao.qi@linaro.org>
9962
9963 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
9964 * linux-x86-low.c: Likewise.
9965
99662015-05-28 Don Breazeal <donb@codesourcery.com>
9967
9968 * linux-low.c (handle_extended_wait): Initialize
9969 thread_info.last_resume_kind for new fork children.
9970
99712015-05-15 Pedro Alves <palves@redhat.com>
9972
9973 * target.h (target_handle_new_gdb_connection): Rewrite using if
9974 wrapped in do/while.
9975
99762015-05-14 Joel Brobecker <brobecker@adacore.com>
9977
9978 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
9979 * configure, config.in: Regenerate.
9980 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
9981 Declare typedef.
9982
99832015-05-12 Don Breazeal <donb@codesourcery.com>
9984
9985 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
9986 PTRACE_EVENT_VFORK_DONE.
9987 (linux_low_ptrace_options, extended_event_reported): Add vfork
9988 events.
9989 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
9990 and "vforkdone" for RSP 'T' Stop Reply Packet.
9991 * server.h (report_vfork_events): Declare
9992 global variable.
9993
99942015-05-12 Don Breazeal <donb@codesourcery.com>
9995
9996 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
9997 (the_low_target) <new_fork>: Initialize new member.
9998 * linux-arm-low.c (arm_new_fork): New function.
9999 (the_low_target) <new_fork>: Initialize new member.
10000 * linux-low.c (handle_extended_wait): Call new target function
10001 new_fork.
10002 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10003 * linux-mips-low.c (mips_add_watchpoint): New function
10004 extracted from mips_insert_point.
10005 (the_low_target) <new_fork>: Initialize new member.
10006 (mips_linux_new_fork): New function.
10007 (mips_insert_point): Call mips_add_watchpoint.
10008 * linux-x86-low.c (x86_linux_new_fork): New function.
10009 (the_low_target) <new_fork>: Initialize new member.
10010
100112015-05-12 Don Breazeal <donb@codesourcery.com>
10012
10013 * linux-low.c (handle_extended_wait): Implement return value,
10014 rename argument 'event_child' to 'event_lwp', handle
10015 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10016 (linux_low_ptrace_options): New function.
10017 (linux_low_filter_event): Call linux_low_ptrace_options,
10018 use different argument fo linux_enable_event_reporting,
10019 use return value from handle_extended_wait.
10020 (extended_event_reported): New function.
10021 (linux_wait_1): Call extended_event_reported and set
10022 status to report fork events.
10023 (linux_write_memory): Add pid to debug message.
10024 (reset_lwp_ptrace_options_callback): New function.
10025 (linux_handle_new_gdb_connection): New function.
10026 (linux_target_ops): Initialize new structure member.
10027 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10028 * lynx-low.c: Initialize new structure member.
10029 * remote-utils.c (prepare_resume_reply): Implement stop reason
10030 "fork" for "T" stop message.
10031 * server.c (handle_query): Call handle_new_gdb_connection.
10032 * server.h (report_fork_events): Declare global flag.
10033 * target.h (struct target_ops) <handle_new_gdb_connection>:
10034 New member.
10035 (target_handle_new_gdb_connection): New macro.
10036 * win32-low.c: Initialize new structure member.
10037
100382015-05-12 Don Breazeal <donb@codesourcery.com>
10039
10040 * mem-break.c (APPEND_TO_LIST): Define macro.
10041 (clone_agent_expr): New function.
10042 (clone_one_breakpoint): New function.
10043 (clone_all_breakpoints): New function.
10044 * mem-break.h: Declare new functions.
10045
100462015-05-12 Don Breazeal <donb@codesourcery.com>
10047
10048 * linux-low.c (linux_supports_fork_events): New function.
10049 (linux_supports_vfork_events): New function.
10050 (linux_target_ops): Initialize new structure members.
10051 (initialize_low): Call linux_check_ptrace_features.
10052 * lynx-low.c (lynx_target_ops): Initialize new structure
10053 members.
10054 * server.c (report_fork_events, report_vfork_events):
10055 New global flags.
10056 (handle_query): Add new features to qSupported packet and
10057 response.
10058 (captured_main): Initialize new global variables.
10059 * target.h (struct target_ops) <supports_fork_events>:
10060 New member.
10061 <supports_vfork_events>: New member.
10062 (target_supports_fork_events): New macro.
10063 (target_supports_vfork_events): New macro.
10064 * win32-low.c (win32_target_ops): Initialize new structure
10065 members.
10066
100672015-05-12 Gary Benson <gbenson@redhat.com>
10068
10069 * server.c (handle_qxfer_exec_file): Use current process
10070 if annex is empty.
10071
100722015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10073
10074 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10075 Remove HAVE_PTRACE_GETREGS conditionals.
10076 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10077 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10078
100792015-05-08 Yao Qi <yao.qi@linaro.org>
10080
10081 * linux-low.c (linux_supports_conditional_breakpoints): New
10082 function.
10083 (linux_target_ops): Install new target method.
10084 * lynx-low.c (lynx_target_ops): Install NULL hook for
10085 supports_conditional_breakpoints.
10086 * nto-low.c (nto_target_ops): Likewise.
10087 * spu-low.c (spu_target_ops): Likewise.
10088 * win32-low.c (win32_target_ops): Likewise.
10089 * server.c (handle_query): Check
10090 target_supports_conditional_breakpoints.
10091 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10092 New field.
10093 (target_supports_conditional_breakpoints): New macro.
10094
100952015-05-06 Pedro Alves <palves@redhat.com>
10096
10097 PR server/18081
10098 * server.c (start_inferior): If the process exits, mourn it.
10099
101002015-04-21 Gary Benson <gbenson@redhat.com>
10101
10102 * hostio.c (fileio_open_flags_to_host): Factored out to
10103 fileio_to_host_openflags in common/fileio.c. Single use
10104 updated.
10105
101062015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10107
10108 * linux-xtensa-low.c (xtensa_fill_gregset)
10109 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10110 XCHAL_HAVE_LOOP.
10111
101122015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10113
10114 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10115 (regs_info): Replace usrregs pointer with NULL.
10116
101172015-04-17 Gary Benson <gbenson@redhat.com>
10118
10119 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10120 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10121 * server.c (handle_qxfer_exec_file): New function.
10122 (qxfer_packets): Add exec-file entry.
10123 (handle_query): Report qXfer:exec-file:read as supported packet.
10124
101252015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10126
10127 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10128
101292015-04-09 Gary Benson <gbenson@redhat.com>
10130
10131 * hostio-errno.c (errno_to_fileio_error): Remove function.
10132 Update caller to use remote_fileio_to_fio_error.
10133
101342015-04-09 Yao Qi <yao.qi@linaro.org>
10135
10136 * linux-low.c (linux_insert_point): Call
10137 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10138 (linux_remove_point): Call remove_memory_breakpoint if type is
10139 raw_bkpt_type_sw.
10140 * linux-x86-low.c (x86_insert_point): Don't call
10141 insert_memory_breakpoint.
10142 (x86_remove_point): Don't call remove_memory_breakpoint.
10143
101442015-04-01 Pedro Alves <palves@redhat.com>
10145 Cleber Rosa <crosa@redhat.com>
10146
10147 * server.c (gdbserver_usage): Reorganize and extend the usage
10148 message.
10149
101502015-03-24 Pedro Alves <palves@redhat.com>
10151
10152 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10153 output. Also dump TRAP_TRACE.
10154 (linux_low_filter_event): In debug output, distinguish a
10155 resume_stop SIGSTOP from a delayed SIGSTOP.
10156
101572015-03-24 Gary Benson <gbenson@redhat.com>
10158
10159 * linux-x86-low.c (x86_linux_new_thread): Moved to
10160 nat/x86-linux.c.
10161 (x86_linux_prepare_to_resume): Likewise.
10162
101632015-03-24 Gary Benson <gbenson@redhat.com>
10164
10165 * Makefile.in (x86-linux-dregs.o): New rule.
10166 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10167 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10168 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10169 (x86_linux_dr_get): Likewise.
10170 (x86_linux_dr_set): Likewise.
10171 (update_debug_registers_callback): Likewise.
10172 (x86_linux_dr_set_addr): Likewise.
10173 (x86_linux_dr_get_addr): Likewise.
10174 (x86_linux_dr_set_control): Likewise.
10175 (x86_linux_dr_get_control): Likewise.
10176 (x86_linux_dr_get_status): Likewise.
10177 (x86_linux_update_debug_registers): Likewise.
10178
101792015-03-24 Gary Benson <gbenson@redhat.com>
10180
10181 * linux-x86-low.c (x86_linux_update_debug_registers):
10182 New function, factored out from...
10183 (x86_linux_prepare_to_resume): ...this.
10184
101852015-03-24 Gary Benson <gbenson@redhat.com>
10186
10187 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10188 (x86_linux_dr_set): Likewise.
10189 (update_debug_registers_callback): Likewise.
10190 (x86_linux_dr_set_addr): Likewise.
10191 (x86_linux_dr_get_addr): Likewise.
10192 (x86_linux_dr_set_control): Likewise.
10193 (x86_linux_dr_get_control): Likewise.
10194 (x86_linux_dr_get_status): Likewise.
10195 (x86_linux_prepare_to_resume): Likewise.
10196
101972015-03-24 Gary Benson <gbenson@redhat.com>
10198
10199 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10200 Use perror_with_name. Pass string through gettext.
10201 (x86_linux_dr_set): Likewise.
10202
102032015-03-24 Gary Benson <gbenson@redhat.com>
10204
10205 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10206 (x86_linux_dr_set_addr): ...this.
10207 (x86_dr_low_get_addr): Rename to...
10208 (x86_linux_dr_get_addr): ...this.
10209 (x86_dr_low_set_control): Rename to...
10210 (x86_linux_dr_set_control): ...this.
10211 (x86_dr_low_get_control): Rename to...
10212 (x86_linux_dr_get_control): ...this.
10213 (x86_dr_low_get_status): Rename to...
10214 (x86_linux_dr_get_status): ...this.
10215 (x86_dr_low): Update with new function names.
10216
102172015-03-24 Gary Benson <gbenson@redhat.com>
10218
10219 * Makefile.in (x86-linux.o): New rule.
10220 * configure.srv: Add x86-linux.o to relevant targets.
10221 * linux-low.c (lwp_set_arch_private_info): New function.
10222 (lwp_arch_private_info): Likewise.
10223 * linux-x86-low.c: Include nat/x86-linux.h.
10224 (arch_lwp_info): Removed structure.
10225 (update_debug_registers_callback):
10226 Use lwp_set_debug_registers_changed.
10227 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10228 and lwp_set_debug_registers_changed.
10229 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10230
102312015-03-24 Gary Benson <gbenson@redhat.com>
10232
10233 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10234 * linux-arm-low.c (arm_new_thread): Likewise.
10235 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10236 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10237 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10238 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10239
102402015-03-24 Gary Benson <gbenson@redhat.com>
10241
10242 * linux-low.c (ptid_of_lwp): New function.
10243 (lwp_is_stopped): Likewise.
10244 (lwp_stop_reason): Likewise.
10245 * linux-x86-low.c (update_debug_registers_callback):
10246 Use lwp_is_stopped.
10247 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10248 lwp_stop_reason.
10249
102502015-03-24 Gary Benson <gbenson@redhat.com>
10251
10252 * linux-low.h (linux_stop_lwp): Remove declaration.
10253
102542015-03-24 Gary Benson <gbenson@redhat.com>
10255
10256 * linux-low.h: Include nat/linux-nat.h.
10257 * linux-low.c (iterate_over_lwps_args): New structure.
10258 (iterate_over_lwps_filter): New function.
10259 (iterate_over_lwps): Likewise.
10260 * linux-x86-low.c (update_debug_registers_callback):
10261 Update signature to what iterate_over_lwps expects.
10262 Remove PID check that iterate_over_lwps now performs.
10263 (x86_dr_low_set_addr): Use iterate_over_lwps.
10264 (x86_dr_low_set_control): Likewise.
10265
102662015-03-24 Gary Benson <gbenson@redhat.com>
10267
10268 * linux-x86-low.c (x86_debug_reg_state): New function.
10269 (x86_linux_prepare_to_resume): Use the above.
10270
102712015-03-24 Gary Benson <gbenson@redhat.com>
10272
10273 * linux-low.c (current_lwp_ptid): New function.
10274 * linux-x86-low.c: Include nat/linux-nat.h.
10275 (x86_dr_low_get_addr): Use current_lwp_ptid.
10276 (x86_dr_low_get_control): Likewise.
10277 (x86_dr_low_get_status): Likewise.
10278
102792015-03-20 Pedro Alves <palves@redhat.com>
10280
10281 * tracepoint.c (cmd_qtstatus): Make "str" const.
10282
102832015-03-20 Pedro Alves <palves@redhat.com>
10284
10285 * server.c (handle_general_set): Make "req_str" const.
10286
102872015-03-19 Pedro Alves <palves@redhat.com>
10288
10289 * linux-low.c (linux_resume_one_lwp): Rename to ...
10290 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10291 instead call perror_with_name.
10292 (check_ptrace_stopped_lwp_gone): New function.
10293 (linux_resume_one_lwp): Reimplement as wrapper around
10294 linux_resume_one_lwp_throw that swallows errors if the LWP is
10295 gone.
10296
102972015-03-19 Pedro Alves <palves@redhat.com>
10298
10299 * linux-low.c (count_events_callback, select_event_lwp_callback):
10300 No longer check whether the thread has resume_stop as last resume
10301 kind.
10302
103032015-03-19 Pedro Alves <palves@redhat.com>
10304
10305 * linux-low.c (count_events_callback, select_event_lwp_callback):
10306 Use the lwp's status_pending_p field, not the thread's.
10307
103082015-03-19 Pedro Alves <palves@redhat.com>
10309
10310 * linux-low.c (select_event_lwp_callback): Update comments to
10311 no longer mention SIGTRAP.
10312
103132015-03-18 Gary Benson <gbenson@redhat.com>
10314
10315 * server.c (handle_query): Do not report vFile:fstat as supported.
10316
103172015-03-11 Gary Benson <gbenson@redhat.com>
10318
10319 * hostio.c (sys/types.h): New include.
10320 (sys/stat.h): Likewise.
10321 (common-remote-fileio.h): Likewise.
10322 (handle_fstat): New function.
10323 (handle_vFile): Handle vFile:fstat packets.
10324
103252015-03-11 Gary Benson <gbenson@redhat.com>
10326
10327 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10328 struct stat.st_blocks and struct stat.st_blksize.
10329 * configure: Regenerate.
10330 * config.in: Likewise.
10331 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10332 (OBS): Add common-remote-fileio.o.
10333 (common-remote-fileio.o): New rule.
10334
103352015-03-09 Pedro Alves <palves@redhat.com>
10336
10337 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10338 'struct sockaddr' pointer in 'accept' call.
10339
103402015-03-09 Pedro Alves <palves@redhat.com>
10341
10342 Revert:
10343 2015-03-07 Pedro Alves <palves@redhat.com>
10344 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10345 or <winsock2.h> here. Instead include "gdb_socket.h".
10346 (remote_open): Use union gdb_sockaddr_u.
10347 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10348 or <winsock2.h> here. Instead include "gdb_socket.h".
10349 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10350 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10351 or <sys/un.h>.
10352 (init_named_socket, gdb_agent_helper_thread): Use union
10353 gdb_sockaddr_u.
10354
103552015-03-07 Pedro Alves <palves@redhat.com>
10356
10357 * configure.ac (build_warnings): Move
10358 -Wdeclaration-after-statement to the C-specific set.
10359 * configure: Regenerate.
10360
103612015-03-07 Pedro Alves <palves@redhat.com>
10362
10363 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10364 or <winsock2.h> here. Instead include "gdb_socket.h".
10365 (remote_open): Use union gdb_sockaddr_u.
10366 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10367 or <winsock2.h> here. Instead include "gdb_socket.h".
10368 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10369 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10370 or <sys/un.h>.
10371 (init_named_socket, gdb_agent_helper_thread): Use union
10372 gdb_sockaddr_u.
10373
103742015-03-07 Pedro Alves <palves@redhat.com>
10375
10376 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10377 instead.
10378
103792015-03-06 Yao Qi <yao.qi@linaro.org>
10380
10381 * linux-aarch64-low.c (aarch64_insert_point): Use
10382 show_debug_regs as a boolean.
10383 (aarch64_remove_point): Likewise.
10384
103852015-03-05 Pedro Alves <palves@redhat.com>
10386
10387 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10388 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10389 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10390 * nto-low.c (nto_target_ops): Likewise.
10391 * spu-low.c (spu_target_ops): Likewise.
10392 * win32-low.c (win32_target_ops): Likewise.
10393
103942015-03-04 Pedro Alves <palves@redhat.com>
10395
10396 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10397 Decide whether a breakpoint triggered based on the SIGTRAP's
10398 siginfo.si_code.
10399 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10400 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10401 (linux_low_filter_event): Check for breakpoints before checking
10402 watchpoints.
10403 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10404 siginfo.si_code.
10405 (linux_stopped_by_sw_breakpoint)
10406 (linux_supports_stopped_by_sw_breakpoint)
10407 (linux_stopped_by_hw_breakpoint)
10408 (linux_supports_stopped_by_hw_breakpoint): New functions.
10409 (linux_target_ops): Install new target methods.
10410
104112015-03-04 Pedro Alves <palves@redhat.com>
10412
10413 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10414 * server.c (swbreak_feature, hwbreak_feature): New globals.
10415 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10416 (captured_main): Clear swbreak_feature and hwbreak_feature.
10417 * server.h (swbreak_feature, hwbreak_feature): Declare.
10418 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10419 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10420 supports_stopped_by_hw_breakpoint>: New fields.
10421 (target_supports_stopped_by_sw_breakpoint)
10422 (target_stopped_by_sw_breakpoint)
10423 (target_supports_stopped_by_hw_breakpoint)
10424 (target_stopped_by_hw_breakpoint): Declare.
10425
104262015-03-04 Pedro Alves <palves@redhat.com>
10427
10428 enum lwp_stop_reason -> enum target_stop_reason
10429 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10430 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10431 (linux_wait_1, stuck_in_jump_pad_callback)
10432 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10433 (linux_stopped_by_watchpoint):
10434 * linux-low.h (enum lwp_stop_reason): Delete.
10435 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10436 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10437
104382015-03-04 Yao Qi <yao.qi@linaro.org>
10439
10440 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10441
104422015-03-03 Gary Benson <gbenson@redhat.com>
10443
10444 * hostio.c (handle_vFile): Fix prefix lengths.
10445
104462015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10447
10448 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10449 ptr_bits.
10450
104512015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10452
10453 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10454 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10455 (clean): Add "rm -f" for above C files.
10456 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10457 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10458 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10459 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10460 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10461 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10462 (init_registers_s390x_vx_linux64)
10463 (init_registers_s390x_tevx_linux64)
10464 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10465 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10466 declarations.
10467 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10468 (s390_store_vxrs_high): New functions.
10469 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10470 NT_S390_VXRS_HIGH.
10471 (s390_arch_setup): Add logic for selecting one of the new target
10472 descriptions. Activate the new vector regsets if applicable.
10473 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10474 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10475 and init_registers_s390x_tevx_linux64.
10476
104772015-03-01 Pedro Alves <palves@redhat.com>
10478
10479 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10480 parameter.
10481
104822015-02-27 Pedro Alves <palves@redhat.com>
10483
10484 * linux-x86-low.c (u_debugreg_offset): New function.
10485 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10486
104872015-02-27 Pedro Alves <palves@redhat.com>
10488
10489 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10490 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10491 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10492 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10493 (ps_lsetfpregs, ps_getpid)
10494 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10495 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10496 (ps_lsetxregs, ps_plog): Declare.
10497
104982015-02-27 Pedro Alves <palves@redhat.com>
10499
10500 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10501 IP_AGENT_EXPORT_FUNC.
10502 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10503 IP_AGENT_EXPORT_FUNC.
10504 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10505 (IP_AGENT_EXPORT): Delete.
10506 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10507 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10508 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10509 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10510 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10511 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10512 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10513 (traceframe_read_count, traceframe_write_count)
10514 (traceframes_created, trace_state_variables, get_raw_reg)
10515 (get_trace_state_variable_value, set_trace_state_variable_value)
10516 (ust_loaded, helper_thread_id, cmd_buf): Use
10517 IPA_SYM_EXPORTED_NAME.
10518 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10519 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10520 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10521 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10522 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10523 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10524 EXTERN_C_PUSH/EXTERN_C_POP.
10525 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10526 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10527 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10528 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10529 (traceframe_write_count, traceframe_read_count)
10530 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10531 (about_to_request_buffer_space, get_trace_state_variable_value)
10532 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10533 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10534 EXTERN_C_PUSH/EXTERN_C_POP.
10535 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10536 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10537 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10538 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10539 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10540 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10541 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10542 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10543 Define.
10544 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10545 (IP_AGENT_EXPORT_VAR_DECL): Define.
10546 (tracing): Declare.
10547 (gdb_agent_get_raw_reg): Declare.
10548
105492015-02-27 Tom Tromey <tromey@redhat.com>
10550 Pedro Alves <palves@redhat.com>
10551
10552 Rename symbols whose names are reserved C++ keywords throughout.
10553
105542015-02-27 Pedro Alves <palves@redhat.com>
10555
10556 * Makefile.in (COMPILER): New, get it from autoconf.
10557 (CXX): Get from autoconf instead.
10558 (COMPILE.pre): Use COMPILER.
10559 (CC-LD): Rename to ...
10560 (CC_LD): ... this. Use COMPILER.
10561 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10562 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10563 * acinclude.m4: Include build-with-cxx.m4.
10564 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10565 Disable -Werror by default if building in C++ mode.
10566 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10567 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10568 the C++ compiler. Save/restore CXXFLAGS too.
10569 * configure: Regenerate.
10570
105712015-02-27 Pedro Alves <palves@redhat.com>
10572
10573 * acinclude.m4: Include libiberty.m4.
10574 * configure.ac: Call libiberty_INIT.
10575 * config.in, configure: Regenerate.
10576
105772015-02-26 Pedro Alves <palves@redhat.com>
10578
10579 * linux-low.c (linux_wait_1): When incrementing the PC past a
10580 program breakpoint always use the_low_target.breakpoint_len as
10581 increment, rather than the maximum between that and
10582 the_low_target.decr_pc_after_break.
10583
105842015-02-23 Pedro Alves <palves@redhat.com>
10585
10586 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10587 thread was doing a step-over; always adjust the PC if
10588 we stepped over a permanent breakpoint.
10589 (linux_wait_1): If we stepped over breakpoint that was on top of a
10590 permanent breakpoint, manually advance the PC past it.
10591
105922015-02-23 Pedro Alves <palves@redhat.com>
10593
10594 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10595 modes.
10596 (x86_fill_gregset, x86_store_gregset): Use it when handling
10597 $orig_eax.
10598
105992015-02-20 Pedro Alves <palves@redhat.com>
10600
10601 * thread-db.c: Include "nat/linux-procfs.h".
10602 (thread_db_init): Skip listing new threads if the kernel supports
10603 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10604
106052015-02-20 Pedro Alves <palves@redhat.com>
10606
10607 * linux-low.c (status_pending_p_callback): Use ptid_match.
10608
106092015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10610
10611 PR breakpoints/16812
10612 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10613 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10614 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10615
106162015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10617
10618 PR breakpoints/15956
10619 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10620
106212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10622
10623 * linux-low.c (linux_low_btrace_conf): Print size.
10624 * server.c (handle_btrace_conf_general_set): New.
10625 (hanle_general_set): Call handle_btrace_conf_general_set.
10626 (handle_query): Report Qbtrace-conf:bts:size as supported.
10627
106282015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10629
10630 * linux-low.c (linux_low_enable_btrace): Update parameters.
10631 (linux_low_btrace_conf): New.
10632 (linux_target_ops)<to_btrace_conf>: Initialize.
10633 * server.c (current_btrace_conf): New.
10634 (handle_btrace_enable): Rename to ...
10635 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10636 to target_enable_btrace. Update comment. Update users.
10637 (handle_qxfer_btrace_conf): New.
10638 (qxfer_packets): Add btrace-conf entry.
10639 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10640 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10641 (target_ops)<read_btrace_conf>: New.
10642 (target_enable_btrace): Update parameters.
10643 (target_read_btrace_conf): New.
10644
106452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10646
10647 * server.c (handle_btrace_general_set): Remove call to
10648 target_supports_btrace.
10649 (supported_btrace_packets): New.
10650 (handle_query): Call supported_btrace_packets.
10651 * target.h: include btrace-common.h.
10652 (btrace_target_info): Removed.
10653 (supports_btrace, target_supports_btrace): Update parameters.
10654
106552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10656
10657 * Makefile.in (SFILES): Add common/btrace-common.c.
10658 (OBS): Add common/btrace-common.o.
10659 (btrace-common.o): Add build rules.
10660 * linux-low: Include btrace-common.h.
10661 (linux_low_read_btrace): Use struct btrace_data. Call
10662 btrace_data_init and btrace_data_fini.
10663
106642015-02-06 Pedro Alves <palves@redhat.com>
10665
10666 * thread-db.c (find_new_threads_callback): Add debug output.
10667
106682015-02-04 Pedro Alves <palves@redhat.com>
10669
10670 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10671 (resume_stopped_resumed_lwps): New function.
10672 (linux_wait_for_event_filtered): Use it.
10673
106742015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10675
10676 * Makefile.in (SFILES): Add linux-personality.c.
10677 (linux-personality.o): New rule.
10678 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10679 list of objects to be built.
10680 * linux-low.c: Include nat/linux-personality.h.
10681 (linux_create_inferior): Remove code to disable address space
10682 randomization (moved to ../nat/linux-personality.c). Create
10683 cleanup to disable address space randomization.
10684
106852015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10686
10687 * Makefile.in (posix-strerror.o): New rule.
10688 (mingw-strerror.o): Likewise.
10689 * configure: Regenerated.
10690 * configure.ac: Source file ../common/common.host. Initialize new
10691 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10692
106932015-01-14 Yao Qi <yao@codesourcery.com>
10694
10695 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10696 (ppc-linux.o): New rule.
10697 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10698 * configure.ac: AC_CHECK_FUNCS(getauxval).
10699 * config.in: Re-generated.
10700 * configure: Re-generated.
10701 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10702 ppc64_64bit_inferior_p
10703
107042015-01-14 Yao Qi <yao@codesourcery.com>
10705
10706 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10707 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10708 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10709 (PT_ORIG_R3, PT_TRAP): Likewise.
10710 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10711 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10712 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10713
107142015-01-10 Joel Brobecker <brobecker@adacore.com>
10715
10716 * i387-fp.c (i387_cache_to_xsave): In look over
10717 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10718 zmmh_low_space field by use of zmmh_high_space.
10719
107202015-01-09 Pedro Alves <palves@redhat.com>
10721
10722 * linux-low.c (step_over_bkpt): Move higher up in the file.
10723 (handle_extended_wait): Don't store the stop_pc here.
10724 (get_stop_pc): Adjust comments and rename to ...
10725 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10726 stopped for a software breakpoint or hardware breakpoint.
10727 (thread_still_has_status_pending_p): New function.
10728 (status_pending_p_callback): Use
10729 thread_still_has_status_pending_p. If the event is no longer
10730 interesting, resume the LWP.
10731 (handle_tracepoints): Add assert.
10732 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10733 (wstatus_maybe_breakpoint): New function.
10734 (cancel_breakpoint): Delete function.
10735 (check_stopped_by_watchpoint): New function, factored out from
10736 linux_low_filter_event.
10737 (lp_status_maybe_breakpoint): Delete function.
10738 (linux_low_filter_event): Remove filter_ptid argument.
10739 Leave thread group exits pending here. Store the LWP's stop PC.
10740 Always leave events pending.
10741 (linux_wait_for_event_filtered): Pull all events out of the
10742 kernel, and leave them all pending.
10743 (count_events_callback, select_event_lwp_callback): Consider all
10744 events.
10745 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10746 (select_event_lwp): Only give preference to the stepping LWP in
10747 all-stop mode. Adjust comments.
10748 (ignore_event): New function.
10749 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10750 references to cancel_breakpoints. Adjust to renames. Also give
10751 equal priority to all LWPs that have had events in non-stop mode.
10752 If reporting a software breakpoint event, unadjust the LWP's PC.
10753 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10754 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10755 Adjust.
10756 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10757 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10758 (linux_stopped_by_watchpoint): Adjust.
10759 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10760 * linux-low.h (enum lwp_stop_reason): New.
10761 (struct lwp_info) <stop_pc>: Adjust comment.
10762 <stopped_by_watchpoint>: Delete field.
10763 <stop_reason>: New field.
10764 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10765 * mem-break.c (software_breakpoint_inserted_here)
10766 (hardware_breakpoint_inserted_here): New function.
10767 * mem-break.h (software_breakpoint_inserted_here)
10768 (hardware_breakpoint_inserted_here): Declare.
10769 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10770 (cancel_breakpoints): Delete.
10771 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10772 (upload_fast_traceframes): Remove references to
10773 cancel_breakpoints.
10774
107752015-01-09 Pedro Alves <palves@redhat.com>
10776
10777 * thread-db.c (find_new_threads_callback): Ignore thread if the
10778 kernel thread ID is -1.
10779
107802015-01-09 Pedro Alves <palves@redhat.com>
10781
10782 * linux-low.c (linux_attach_fail_reason_string): Move to
10783 nat/linux-ptrace.c, and rename.
10784 (linux_attach_lwp): Update comment.
10785 (attach_proc_task_lwp_callback): New function.
10786 (linux_attach): Adjust to rename and use
10787 linux_proc_attach_tgid_threads.
10788 (linux_attach_fail_reason_string): Delete declaration.
10789
107902015-01-01 Joel Brobecker <brobecker@adacore.com>
10791
10792 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
10793 * server.c (gdbserver_version): Likewise.
10794
107952014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
10796
10797 * remote-utils.c: Include ctype.h.
10798 (input_interrupt): Explicitly handle the case when the char
10799 received is the NUL byte. Improve the printing of non-ASCII
10800 characters.
10801
108022014-12-16 Joel Brobecker <brobecker@adacore.com>
10803
10804 * linux-low.c (linux_low_filter_event): Update call to
10805 linux_enable_event_reporting following the addition of
10806 a new parameter to that function.
10807
108082014-12-16 Catalin Udma <catalin.udma@freescale.com>
10809
10810 PR server/17457
10811 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
10812 (AARCH64_FPCR_REGNO): Likewise.
10813 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
10814 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
10815 (aarch64_store_fpregset): Likewise.
10816
108172014-12-15 Joel Brobecker <brobecker@adacore.com>
10818
10819 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
10820 Remove FIXME comment about assumption about N.
10821
108222014-12-13 Joel Brobecker <brobecker@adacore.com>
10823
10824 * configure.ac: If large-file support is disabled in GDBserver,
10825 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10826 * configure: Regenerate.
10827
108282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10829
10830 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
10831 warning upon ENODATA from ptrace.
10832 * linux-s390-low.c (s390_store_tdb): New.
10833 (s390_regsets): Add regset for NT_S390_TDB.
10834
108352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10836
10837 * linux-low.c (regsets_store_inferior_registers): Skip regsets
10838 without a fill_function.
10839 * linux-s390-low.c (s390_fill_last_break): Remove.
10840 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
10841 (s390_arch_setup): Use regset's size instead of fill_function for
10842 loop end condition.
10843
108442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10845
10846 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
10847 the regset's store function when ptrace returned an error.
10848 * regcache.c (get_thread_regcache): Invalidate register cache
10849 before fetching inferior's registers.
10850
108512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10852
10853 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
10854 while-loop as for-loop.
10855 (regsets_store_inferior_registers): Likewise.
10856
108572014-11-28 Yao Qi <yao@codesourcery.com>
10858
10859 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10860 * config.in, configure: Re-generate.
10861 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
10862 is defined.
10863
108642014-11-21 Yao Qi <yao@codesourcery.com>
10865
10866 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
10867 (AC_CHECK_HEADERS): Remove malloc.h.
10868 * configure: Re-generated.
10869 * config.in: Re-generated.
10870 * server.h: Don't include alloca.h and malloc.h.
10871 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
10872 Don't include malloc.h.
10873
108742014-11-17 Joel Brobecker <brobecker@adacore.com>
10875
10876 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
10877 corresponding ERRNO check in same block.
10878
108792014-11-12 Pedro Alves <palves@redhat.com>
10880
10881 * server.c (cont_thread): Update comment.
10882 (start_inferior, attach_inferior): No longer clear cont_thread.
10883 (handle_v_cont): No longer set cont_thread.
10884 (captured_main): Clear cont_thread each time a GDB connects.
10885
108862014-11-12 Pedro Alves <palves@redhat.com>
10887
10888 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
10889 thread, and don't resume all threads if the Hc thread has exited.
10890
108912014-11-12 Pedro Alves <palves@redhat.com>
10892
10893 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
10894 the process group instead of to a specific LWP.
10895
108962014-10-15 Pedro Alves <palves@redhat.com>
10897
10898 PR server/17487
10899 * win32-arm-low.c (arm_set_thread_context): Remove current_event
10900 parameter.
10901 (arm_set_thread_context): Delete.
10902 (the_low_target): Adjust.
10903 * win32-i386-low.c (debug_registers_changed)
10904 (debug_registers_used): Delete.
10905 (update_debug_registers_callback): New function.
10906 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
10907 needing to update their debug registers.
10908 (win32_get_current_dr): New function.
10909 (x86_dr_low_get_addr, x86_dr_low_get_control)
10910 (x86_dr_low_get_status): Fetch the debug register from the thread
10911 record's context.
10912 (i386_initial_stuff): Adjust.
10913 (i386_get_thread_context): Remove current_event parameter. Don't
10914 clear debug_registers_changed nor copy DR values to
10915 debug_reg_state.
10916 (i386_set_thread_context): Delete.
10917 (i386_prepare_to_resume): New function.
10918 (i386_thread_added): Mark the thread as needing to update irs
10919 debug registers.
10920 (the_low_target): Remove i386_set_thread_context and install
10921 i386_prepare_to_resume.
10922 * win32-low.c (win32_get_thread_context): Adjust.
10923 (win32_set_thread_context): Use SetThreadContext
10924 directly.
10925 (win32_prepare_to_resume): New function.
10926 (win32_require_context): New function, factored out from ...
10927 (thread_rec): ... this.
10928 (continue_one_thread): Call win32_prepare_to_resume on each thread
10929 we're about to continue.
10930 (win32_resume): Call win32_prepare_to_resume on the event thread.
10931 * win32-low.h (struct win32_thread_info)
10932 <debug_registers_changed>: New field.
10933 (struct win32_target_ops): Change prototype of set_thread_context,
10934 delete set_thread_context and add prepare_to_resume.
10935 (win32_require_context): New declaration.
10936
109372014-10-08 Gary Benson <gbenson@redhat.com>
10938
10939 * server.h: Do not include common-exceptions.h.
10940
109412014-10-08 Gary Benson <gbenson@redhat.com>
10942
10943 * server.h: Do not include cleanups.h.
10944
109452014-09-30 James Hogan <james.hogan@imgtec.com>
10946
10947 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
10948 mips64-dsp-linux.c.
10949
109502014-09-23 Yao Qi <yao@codesourcery.com>
10951
10952 * linux-low.c (lp_status_maybe_breakpoint): New function.
10953 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
10954 (count_events_callback): Likewise.
10955 (select_event_lwp_callback): Likewise.
10956 (cancel_breakpoints_callback): Likewise.
10957
109582014-09-19 Don Breazeal <donb@codesourcery.com>
10959
10960 * linux-low.c (handle_extended_wait): Call
10961 linux_ptrace_get_extended_event.
10962 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
10963 linux_is_extended_waitstatus.
10964
109652014-09-16 Joel Brobecker <brobecker@adacore.com>
10966
10967 * Makefile.in (CPPFLAGS): Define.
10968 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
10969 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
10970
109712014-09-16 Gary Benson <gbenson@redhat.com>
10972
10973 * inferiors.h (current_inferior): Renamed as...
10974 (current_thread): New variable. All uses updated.
10975 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
10976 (maybe_move_out_of_jump_pad): Likewise.
10977 (cancel_breakpoint): Likewise.
10978 (linux_low_filter_event): Likewise.
10979 (wait_for_sigstop): Likewise.
10980 (linux_resume_one_lwp): Likewise.
10981 (need_step_over_p): Likewise.
10982 (start_step_over): Likewise.
10983 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
10984 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
10985 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
10986 and save_inferior as saved_thread.
10987 * regcache.c (get_thread_regcache): Renamed saved_inferior as
10988 saved_thread.
10989 (regcache_invalidate_thread): Likewise.
10990 * remote-utils.c (prepare_resume_reply): Likewise.
10991 * thread-db.c (thread_db_get_tls_address): Likewise.
10992 (disable_thread_event_reporting): Likewise.
10993 (remove_thread_event_breakpoints): Likewise.
10994 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
10995 as saved_thread.
10996 * target.h (set_desired_inferior): Renamed as...
10997 (set_desired_thread): New declaration. All uses updated.
10998 * server.c (myresume): Updated comment to reference thread instead
10999 of inferior.
11000 (handle_serial_event): Likewise.
11001 (handle_target_event): Likewise.
11002
110032014-09-12 Tom Tromey <tromey@redhat.com>
11004 Gary Benson <gbenson@redhat.com>
11005
11006 * regcache.h: Include common-regcache.h.
11007 (regcache_read_pc): Don't declare.
11008 * regcache.c (get_thread_regcache_for_ptid): New function.
11009
110102014-09-11 Tom Tromey <tromey@redhat.com>
11011 Gary Benson <gbenson@redhat.com>
11012
11013 * symbol.c: New file.
11014 * Makefile.in (SFILES): Add symbol.c.
11015 (OBS): Add symbol.o.
11016
110172014-09-11 Gary Benson <gbenson@redhat.com>
11018
11019 * target.c (target_stop_ptid, target_continue_ptid): New
11020 functions.
11021
110222014-09-11 Tom Tromey <tromey@redhat.com>
11023 Gary Benson <gbenson@redhat.com>
11024
11025 * target.h: Include target/target.h.
11026 * target.c (target_read_memory, target_read_uint32)
11027 (target_write_memory): New functions.
11028
110292014-09-11 Gary Benson <gbenson@redhat.com>
11030
11031 * server.h (debug_hw_points): Don't declare.
11032 * server.c (debug_hw_points): Don't define. Replace all uses
11033 with show_debug_regs.
11034 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11035 all uses with show_debug_regs.
11036
110372014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11038
11039 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11040 endianness into account.
11041 (ppc_supply_ptrace_register): Likewise.
11042
110432014-09-03 James Hogan <james.hogan@imgtec.com>
11044
11045 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11046 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11047
110482014-09-03 Gary Benson <gbenson@redhat.com>
11049
11050 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11051 ALL_DEBUG_ADDRESS_REGISTERS.
11052
110532014-09-02 Gary Benson <gbenson@redhat.com>
11054
11055 * i386-low.h: Renamed as...
11056 * x86-low.h: New file. All type, function and variable name
11057 prefixes changed from "i386_" to "x86_". All references updated.
11058 * i386-low.c: Renamed as...
11059 * x86-low.c: New file. All type, function and variable name
11060 prefixes changed from "i386_" to "x86_". All references updated.
11061
110622014-09-02 Gary Benson <gbenson@redhat.com>
11063
11064 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11065 (x86_linux_new_thread): Likewise.
11066
110672014-08-29 Gary Benson <gbenson@redhat.com>
11068
11069 * server.h (setjmp.h): Do not include.
11070 (toplevel): Do not declare.
11071 (common-exceptions.h): Include.
11072 (cleanups.h): Likewise.
11073 * server.c (toplevel): Do not define.
11074 (exit_code): New static global.
11075 (detach_or_kill_for_exit_cleanup): New function.
11076 (main): New function. Original main renamed to...
11077 (captured_main): New function.
11078 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11079
110802014-08-29 Gary Benson <gbenson@redhat.com>
11081
11082 * Makefile.in (SFILES): Add common/common-exceptions.c.
11083 (OBS): Add common-exceptions.o.
11084 (common-exceptions.o): New rule.
11085 * utils.c (prepare_to_throw_exception): New function.
11086
110872014-08-29 Gary Benson <gbenson@redhat.com>
11088
11089 * config.in: Regenerate.
11090 * configure: Likewise.
11091
110922014-08-29 Gary Benson <gbenson@redhat.com>
11093
11094 * Makefile.in (SFILES): Add common/cleanups.c.
11095 (OBS): cleanups.o.
11096 (cleanups.o): New rule.
11097
110982014-08-29 Gary Benson <gbenson@redhat.com>
11099
11100 * utils.c (internal_vwarning): New function.
11101
111022014-08-28 Gary Benson <gbenson@redhat.com>
11103
11104 * utils.h (fatal): Remove declaration.
11105 * utils.c (fatal): Remove function.
11106
111072014-08-28 Gary Benson <gbenson@redhat.com>
11108
11109 * tracepoint.c (gdb_agent_init): Replace fatal with
11110 perror_with_name.
11111 (initialize_tracepoint): Likewise.
11112
111132014-08-28 Gary Benson <gbenson@redhat.com>
11114
11115 * remote-utils.c (remote_prepare): Replace fatal with error.
11116
111172014-08-28 Gary Benson <gbenson@redhat.com>
11118
11119 * linux-low.c (linux_async): Replace fatal with warning.
11120 Tidy up and return.
11121 (linux_start_non_stop): Return -1 if linux_async failed.
11122
111232014-08-28 Gary Benson <gbenson@redhat.com>
11124
11125 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11126 gdb_assert.
11127 (i386_dr_low_get_addr): Remove vague comment.
11128 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11129 gdb_assert.
11130
111312014-08-28 Gary Benson <gbenson@redhat.com>
11132
11133 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11134 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11135 internal_error.
11136 (linux_resume_one_lwp): Likewise.
11137 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11138 gdb_assert.
11139 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11140 with internal_error.
11141 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11142 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11143 (find_register_by_name): Replace fatal with internal_error.
11144 (find_regno): Likewise.
11145 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11146 * thread-db.c (thread_db_create_event): Likewise.
11147 (thread_db_load_search): Likewise.
11148 (try_thread_db_load_1): Likewise.
11149 * tracepoint.c (get_jump_space_head): Replace fatal with
11150 internal_error.
11151 (claim_trampoline_space): Likewise.
11152 (have_fast_tracepoint_trampoline_buffer): Likewise.
11153 (cmd_qtstart): Likewise.
11154 (stop_tracing): Likewise.
11155 (fast_tracepoint_collecting): Likewise.
11156 (target_malloc): Likewise.
11157 (download_tracepoint): Likewise.
11158 (download_trace_state_variables): Replace check with gdb_assert.
11159 (upload_fast_traceframes): Replace fatal with internal_error.
11160
111612014-08-19 Tom Tromey <tromey@redhat.com>
11162 Gary Benson <gbenson@redhat.com>
11163
11164 * Makefile.in (SFILES): Add common/common-debug.c.
11165 (OBS): Add common-debug.o.
11166 (common-debug.o): New rule.
11167 * debug.h (debug_printf): Don't declare.
11168 * debug.c (debug_printf): Renamed and rewritten as...
11169 (debug_vprintf): New function.
11170
111712014-08-19 Gary Benson <gbenson@redhat.com>
11172
11173 * utils.h: Do not include print-utils.h.
11174
111752014-08-19 Tom Tromey <tromey@redhat.com>
11176 Gary Benson <gbenson@redhat.com>
11177
11178 * server.h: Add static assertion.
11179 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11180
111812014-08-19 Tom Tromey <tromey@redhat.com>
11182 Gary Benson <gbenson@redhat.com>
11183
11184 * Makefile.in (SFILES): Add common/errors.c.
11185 (OBS): Add errors.o.
11186 (IPA_OBS): Add errors-ipa.o.
11187 (errors.o): New rule.
11188 (errors-ipa.o): Likewise.
11189 * utils.h (perror_with_name, error, warning): Don't declare.
11190 * utils.c (warning): Renamed and rewritten as...
11191 (vwarning): New function.
11192 (error): Renamed and rewritten as...
11193 (verror): New function.
11194 (internal_error): Renamed and rewritten as...
11195 (internal_verror): New function.
11196
111972014-08-07 Gary Benson <gbenson@redhat.com>
11198
11199 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11200 * configure: Regenerate.
11201 * config.in: Likewise.
11202 * server.h: Do not include errno.h.
11203 * event-loop.c: Likewise.
11204 * hostio-errno.c: Likewise.
11205 * linux-low.c: Likewise.
11206 * remote-utils.c: Likewise.
11207 * spu-low.c: Likewise.
11208 * utils.c: Likewise.
11209 * gdbreplay.c: Unconditionally include errno.h.
11210
112112014-08-07 Gary Benson <gbenson@redhat.com>
11212
11213 * server.h: Do not include string.h.
11214 * event-loop.c: Likewise.
11215 * linux-low.c: Likewise.
11216 * regcache.c: Likewise.
11217 * remote-utils.c: Likewise.
11218 * spu-low.c: Likewise.
11219 * utils.c: Likewise.
11220
112212014-08-07 Gary Benson <gbenson@redhat.com>
11222
11223 * server.h: Do not include gdb_assert.h.
11224
112252014-08-07 Gary Benson <gbenson@redhat.com>
11226
11227 * server.h: Do not include common-utils.h.
11228
112292014-08-07 Gary Benson <gbenson@redhat.com>
11230
11231 * server.h: Do not include ptid.h.
11232 * notif.h: Likewise.
11233
112342014-08-07 Gary Benson <gbenson@redhat.com>
11235
11236 * server.h: Do not include gdb_locale.h.
11237
112382014-08-07 Gary Benson <gbenson@redhat.com>
11239
11240 * server.h: Do not include gdb/signals.h.
11241 * win32-low.c: Likewise.
11242
112432014-08-07 Gary Benson <gbenson@redhat.com>
11244
11245 * server.h: Do not include pathmax.h.
11246
112472014-08-07 Gary Benson <gbenson@redhat.com>
11248
11249 * server.h: Do not include libiberty.h.
11250 * linux-bfin-low.c: Likewise.
11251
112522014-08-07 Gary Benson <gbenson@redhat.com>
11253
11254 * server.h: Do not include ansidecl.h.
11255
112562014-08-07 Gary Benson <gbenson@redhat.com>
11257
11258 * linux-x86-low.c: Do not include stddef.h.
11259 * lynx-ppc-low.c: Likewise.
11260 * tracepoint.c: Likewise.
11261
112622014-08-07 Gary Benson <gbenson@redhat.com>
11263
11264 * server.h: Do not include stdarg.h.
11265 * nto-low.c: Likewise.
11266
112672014-08-07 Gary Benson <gbenson@redhat.com>
11268
11269 * server.h: Do not include stdlib.h.
11270 * inferiors.c: Likewise.
11271 * linux-low.c: Likewise.
11272 * regcache.c: Likewise.
11273 * spu-low.c: Likewise.
11274 * tracepoint.c: Likewise.
11275 * utils.c: Likewise.
11276
112772014-08-07 Gary Benson <gbenson@redhat.com>
11278
11279 * server.h: Do not include stdio.h.
11280 * linux-low.c: Likewise.
11281 * remote-utils.c: Likewise.
11282 * spu-low.c: Likewise.
11283 * utils.c: Likewise.
11284 * wincecompat.c: Likewise.
11285
112862014-08-06 Gary Benson <gbenson@redhat.com>
11287
11288 * regcache.c (init_register_cache): Move conditionals inside if.
11289
112902014-08-06 Gary Benson <gbenson@redhat.com>
11291
11292 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11293
112942014-07-31 Gary Benson <gbenson@redhat.com>
11295
11296 * ax.h: Do not include server.h.
11297 * gdbthread.h: Likewise.
11298 * lynx-low.h: Likewise.
11299 * notif.h: Likewise.
11300
113012014-07-30 Gary Benson <gbenson@redhat.com>
11302
11303 * server.h: Include common-defs.h.
11304 Do not include config.h or build-gnulib-gdbserver/config.h.
11305
113062014-07-30 Gary Benson <gbenson@redhat.com>
11307
11308 * hostio-errno.c: Move server.h to top of includes list.
11309 * inferiors.c: Likewise.
11310 * linux-x86-low.c: Likewise.
11311 * notif.c: Include server.h.
11312
113132014-07-24 Tom Tromey <tromey@redhat.com>
11314 Gary Benson <gbenson@redhat.com>
11315
11316 * server.h (CORE_ADDR): Now unsigned.
11317
113182014-07-16 Pedro Alves <palves@redhat.com>
11319
11320 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11321
113222014-07-15 Pedro Alves <palves@redhat.com>
11323
11324 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11325 copy.
11326
113272014-07-11 Pedro Alves <palves@redhat.com>
11328
11329 * linux-low.c (kill_wait_lwp): New function, based on
11330 kill_one_lwp_callback, but use my_waitpid directly.
11331 (kill_one_lwp_callback, linux_kill): Use it.
11332
113332014-06-23 Pedro Alves <palves@redhat.com>
11334
11335 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11336 before setting DR0..DR3.
11337
113382014-06-20 Gary Benson <gbenson@redhat.com>
11339
11340 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11341 * configure: Regenerated.
11342 * config.in: Likewise.
11343
113442014-06-20 Gary Benson <gbenson@redhat.com>
11345
11346 * Makefile.in (SFILES): Update locations for files moved
11347 from common to nat.
11348 (object file files): Reordered.
11349
113502014-06-20 Gary Benson <gbenson@redhat.com>
11351
11352 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11353 (i386_dr_low_set_addr): Likewise.
11354 (i386_dr_low_get_addr): Likewise.
11355 (i386_dr_low_can_set_control): Likewise.
11356 (i386_dr_low_set_control): Likewise.
11357 (i386_dr_low_get_control): Likewise.
11358 (i386_dr_low_get_status): Likewise.
11359 (i386_get_debug_register_length): Likewise.
11360 * linux-x86-low.c (i386_dr_low_set_addr):
11361 Changed signature. Made static.
11362 (i386_dr_low_get_addr): Likewise.
11363 (i386_dr_low_set_control): Likewise.
11364 (i386_dr_low_get_control): Likewise.
11365 (i386_dr_low_get_status): Likewise.
11366 (i386_dr_low): New global variable.
11367 * win32-i386-low.c (i386_dr_low_set_addr):
11368 Changed signature. Made static.
11369 (i386_dr_low_get_addr): Likewise.
11370 (i386_dr_low_set_control): Likewise.
11371 (i386_dr_low_get_control): Likewise.
11372 (i386_dr_low_get_status): Likewise.
11373 (i386_dr_low): New global variable.
11374
113752014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11376
11377 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11378 * Makefile.in (AR, AR_FLAGS): Define.
11379 * configure: Regenerate.
11380
113812014-06-19 Gary Benson <gbenson@redhat.com>
11382
11383 * Makefile.in (i386-dregs.o): New rule.
11384 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11385 * i386-low.c (target.h): Remove include.
11386 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11387 (DR_CONTROL_SHIFT): Likewise.
11388 (DR_CONTROL_SIZE): Likewise.
11389 (DR_RW_EXECUTE): Likewise.
11390 (DR_RW_WRITE): Likewise.
11391 (DR_RW_READ): Likewise.
11392 (DR_RW_IORW): Likewise.
11393 (DR_LEN_1): Likewise.
11394 (DR_LEN_2): Likewise.
11395 (DR_LEN_4): Likewise.
11396 (DR_LEN_8): Likewise.
11397 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11398 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11399 (DR_ENABLE_SIZE): Likewise.
11400 (DR_LOCAL_SLOWDOWN): Likewise.
11401 (DR_GLOBAL_SLOWDOWN): Likewise.
11402 (DR_CONTROL_RESERVED): Likewise.
11403 (I386_DR_CONTROL_MASK): Likewise.
11404 (I386_DR_VACANT): Likewise.
11405 (I386_DR_LOCAL_ENABLE): Likewise.
11406 (I386_DR_GLOBAL_ENABLE): Likewise.
11407 (I386_DR_DISABLE): Likewise.
11408 (I386_DR_SET_RW_LEN): Likewise.
11409 (I386_DR_GET_RW_LEN): Likewise.
11410 (I386_DR_WATCH_HIT): Likewise.
11411 (i386_wp_op_t): Likewise.
11412 (i386_show_dr): Likewise.
11413 (i386_length_and_rw_bits): Likewise.
11414 (i386_insert_aligned_watchpoint): Likewise.
11415 (i386_remove_aligned_watchpoint): Likewise.
11416 (i386_handle_nonaligned_watchpoint): Likewise.
11417 i386_update_inferior_debug_regs(): Likewise.
11418 (i386_dr_insert_watchpoint): Likewise.
11419 (i386_dr_remove_watchpoint): Likewise.
11420 (i386_dr_region_ok_for_watchpoint): Likewise.
11421 (i386_dr_stopped_data_address): Likewise.
11422 (i386_dr_stopped_by_watchpoint): Likewise.
11423
114242014-06-19 Gary Benson <gbenson@redhat.com>
11425
11426 * i386-low.c (i386_dr_show): Renamed to
11427 i386_show_dr and made static. All uses updated.
11428 (i386_dr_length_and_rw_bits): Renamed to
11429 i386_length_and_rw_bits and made static.
11430 All uses updated.
11431 (i386_dr_insert_aligned_watchpoint): Renamed to
11432 i386_insert_aligned_watchpoint and made static.
11433 All uses updated.
11434 (i386_dr_remove_aligned_watchpoint): Renamed to
11435 i386_remove_aligned_watchpoint and made static.
11436 All uses updated.
11437 (i386_dr_update_inferior_debug_regs): Renamed to
11438 i386_update_inferior_debug_regs and made static.
11439 All uses updated.
11440
114412014-06-18 Gary Benson <gbenson@redhat.com>
11442
11443 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11444 (i386_dr_low_can_set_control): Likewise.
11445 (i386_get_debug_register_length): Likewise.
11446 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11447 (i386_dr_low_can_set_control): Likewise.
11448 (i386_get_debug_register_length): Likewise.
11449
114502014-06-17 Gary Benson <gbenson@redhat.com>
11451
11452 * i386-low.h (i386-dregs.h): New include.
11453 (DR_FIRSTADDR): Now in i386-dregs.h.
11454 (DR_LASTADDR): Likewise.
11455 (DR_NADDR): Likewise.
11456 (DR_STATUS): Likewise.
11457 (DR_CONTROL): Likewise.
11458 (i386_debug_reg_state): Likewise.
11459 (i386_dr_insert_watchpoint): Likewise.
11460 (i386_dr_remove_watchpoint): Likewise.
11461 (i386_dr_region_ok_for_watchpoint): Likewise.
11462 (i386_dr_stopped_data_address): Likewise.
11463 (i386_dr_stopped_by_watchpoint): Likewise.
11464 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11465
114662014-06-18 Gary Benson <gbenson@redhat.com>
11467
11468 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11469 i386_dr_insert_watchpoint.
11470 (i386_low_remove_watchpoint): Renamed to
11471 i386_dr_remove_watchpoint.
11472 (i386_low_region_ok_for_watchpoint): Renamed to
11473 i386_dr_region_ok_for_watchpoint.
11474 (i386_low_stopped_data_address): Renamed to
11475 i386_dr_stopped_data_address.
11476 (i386_low_stopped_by_watchpoint): Renamed to
11477 i386_dr_stopped_by_watchpoint.
11478 * i386-low.c (i386_show_dr): Renamed to
11479 i386_dr_show and made nonstatic. All uses updated.
11480 (i386_length_and_rw_bits): Renamed to
11481 i386_dr_length_and_rw_bits and made nonstatic.
11482 All uses updated.
11483 (i386_insert_aligned_watchpoint): Renamed to
11484 i386_dr_insert_aligned_watchpoint and made nonstatic.
11485 All uses updated.
11486 (i386_remove_aligned_watchpoint): Renamed to
11487 i386_dr_remove_aligned_watchpoint and made nonstatic.
11488 All uses updated.
11489 (i386_update_inferior_debug_regs): Renamed to
11490 i386_dr_update_inferior_debug_regs and made nonstatic.
11491 All uses updated.
11492 (i386_low_insert_watchpoint): Renamed to
11493 i386_dr_insert_watchpoint. All uses updated.
11494 (i386_low_remove_watchpoint): Renamed to
11495 i386_dr_remove_watchpoint. All uses updated.
11496 (i386_low_region_ok_for_watchpoint): Renamed to
11497 i386_dr_region_ok_for_watchpoint. All uses updated.
11498 (i386_low_stopped_data_address): Renamed to
11499 i386_dr_stopped_data_address. All uses updated.
11500 (i386_low_stopped_by_watchpoint): Renamed to
11501 i386_dr_stopped_by_watchpoint. All uses updated.
11502
115032014-06-18 Gary Benson <gbenson@redhat.com>
11504
11505 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11506 (i386_dr_low_can_set_control): Likewise.
11507 (i386_insert_aligned_watchpoint): New check.
11508
115092014-06-18 Gary Benson <gbenson@redhat.com>
11510
11511 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11512 Renamed to state.
11513
115142014-06-18 Gary Benson <gbenson@redhat.com>
11515
11516 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11517 instead of fatal and error.
11518 (i386_handle_nonaligned_watchpoint): Likewise.
11519
115202014-06-18 Gary Benson <gbenson@redhat.com>
11521
11522 * i386-low.c (i386_get_debug_register_length): New macro.
11523 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11524 (i386_show_dr): Use debug_printf instead of fprintf. Use
11525 phex to format values.
11526
115272014-06-18 Gary Benson <gbenson@redhat.com>
11528
11529 * i386-low.h: Comment changes.
11530 * i386-low.c: Likewise.
11531
115322014-06-18 Gary Benson <gbenson@redhat.com>
11533
11534 * i386-low.c: Whitespace changes.
11535
115362014-06-12 Tom Tromey <tromey@redhat.com>
11537
11538 * utils.c (freeargv): Remove.
11539
115402014-06-12 Tom Tromey <tromey@redhat.com>
11541
11542 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11543 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11544 (parse_debug_format_options): Likewise.
11545 (gdbserver_usage): Likewise.
11546 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11547 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11548 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11549 against libiberty.
11550 ($(LIBGNU)): Depend on libiberty.
11551 (all-lib): Recurse into all subdirs.
11552 (install-only): Invoke "install" target in subdirs.
11553 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11554 targets.
11555 * configure: Rebuild.
11556 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11557 for vasprintf, vsnprintf, or gettimeofday.
11558 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11559 srv_tgtobj.
11560
115612014-06-05 Joel Brobecker <brobecker@adacore.com>
11562
11563 * development.sh: Delete.
11564 * Makefile.in (config.status): Adjust dependency on development.sh.
11565 * configure.ac: Adjust development.sh source call.
11566 * configure: Regenerate.
11567
115682014-06-02 Pedro Alves <palves@redhat.com>
11569
11570 * ax.c (gdb_free_agent_expr): New function.
11571 * ax.h (gdb_free_agent_expr): New declaration.
11572 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11573 list.
11574 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11575 static.
11576 (clear_breakpoint_conditions_and_commands): New function.
11577 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11578 (clear_breakpoint_conditions_and_commands): New declaration.
11579
115802014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11581
11582 * linux-aarch64-low.c (asm/ptrace.h): Include.
11583
115842014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11585
11586 Fix TLS access for -static -pthread.
11587 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11588 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11589 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11590
115912014-05-20 Pedro Alves <palves@redhat.com>
11592
11593 * linux-aarch64-low.c (aarch64_insert_point)
11594 (aarch64_remove_point): No longer check whether the type is
11595 supported here. Adjust to new interface.
11596 (the_low_target): Install aarch64_supports_z_point_type as
11597 supports_z_point_type method.
11598 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11599 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11600 instead of a Z packet char. Adjust.
11601 (arm_supports_z_point_type): New function.
11602 (arm_insert_point, arm_remove_point): Adjust to new interface.
11603 (the_low_target): Install arm_supports_z_point_type.
11604 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11605 (cris_insert_point, cris_remove_point): Adjust to new interface.
11606 Don't check whether the type is supported here.
11607 (the_low_target): Install cris_supports_z_point_type.
11608 * linux-low.c (linux_supports_z_point_type): New function.
11609 (linux_insert_point, linux_remove_point): Adjust to new interface.
11610 * linux-low.h (struct linux_target_ops) <insert_point,
11611 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11612 raw_breakpoint pointer parameter.
11613 <supports_z_point_type>: New method.
11614 * linux-mips-low.c (mips_supports_z_point_type): New function.
11615 (mips_insert_point, mips_remove_point): Adjust to new interface.
11616 Use mips_supports_z_point_type.
11617 (the_low_target): Install mips_supports_z_point_type.
11618 * linux-ppc-low.c (the_low_target): Install NULL as
11619 supports_z_point_type method.
11620 * linux-s390-low.c (the_low_target): Install NULL as
11621 supports_z_point_type method.
11622 * linux-sparc-low.c (the_low_target): Install NULL as
11623 supports_z_point_type method.
11624 * linux-x86-low.c (x86_supports_z_point_type): New function.
11625 (x86_insert_point): Adjust to new insert_point interface. Use
11626 insert_memory_breakpoint. Adjust to new
11627 i386_low_insert_watchpoint interface.
11628 (x86_remove_point): Adjust to remove_point interface. Use
11629 remove_memory_breakpoint. Adjust to new
11630 i386_low_remove_watchpoint interface.
11631 (the_low_target): Install x86_supports_z_point_type.
11632 * lynx-low.c (lynx_target_ops): Install NULL as
11633 supports_z_point_type callback.
11634 * nto-low.c (nto_supports_z_point_type): New.
11635 (nto_insert_point, nto_remove_point): Adjust to new interface.
11636 (nto_target_ops): Install nto_supports_z_point_type.
11637 * mem-break.c: Adjust intro comment.
11638 (struct raw_breakpoint) <raw_type, size>: New fields.
11639 <inserted>: Update comment.
11640 <shlib_disabled>: Delete field.
11641 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11642 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11643 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11644 (raw_bkpt_type_to_target_hw_bp_type): New function.
11645 (find_enabled_raw_code_breakpoint_at): New function.
11646 (find_raw_breakpoint_at): New type and size parameters. Use them.
11647 (insert_memory_breakpoint): New function, based off
11648 set_raw_breakpoint_at.
11649 (remove_memory_breakpoint): New function.
11650 (set_raw_breakpoint_at): Reimplement.
11651 (set_breakpoint): New, based on set_breakpoint_at.
11652 (set_breakpoint_at): Reimplement.
11653 (delete_raw_breakpoint): Go through the_target->remove_point
11654 instead of assuming memory breakpoints.
11655 (find_gdb_breakpoint_at): Delete.
11656 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11657 (find_gdb_breakpoint): New function.
11658 (set_gdb_breakpoint_at): Delete.
11659 (z_type_supported): New function.
11660 (set_gdb_breakpoint_1): New function, loosely based off
11661 set_gdb_breakpoint_at.
11662 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11663 (delete_gdb_breakpoint_at): Delete.
11664 (delete_gdb_breakpoint_1): New function, loosely based off
11665 delete_gdb_breakpoint_at.
11666 (delete_gdb_breakpoint): New function.
11667 (clear_gdb_breakpoint_conditions): Rename to ...
11668 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11669 breakpoint.
11670 (add_condition_to_breakpoint): Make static.
11671 (add_breakpoint_condition): Take a struct breakpoint pointer
11672 instead of an address. Adjust.
11673 (gdb_condition_true_at_breakpoint): Rename to ...
11674 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11675 z_type parameter.
11676 (gdb_condition_true_at_breakpoint): Reimplement.
11677 (add_breakpoint_commands): Take a struct breakpoint pointer
11678 instead of an address. Adjust.
11679 (gdb_no_commands_at_breakpoint): Rename to ...
11680 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11681 parameter. Return true if no breakpoint was found. Change debug
11682 output.
11683 (gdb_no_commands_at_breakpoint): Reimplement.
11684 (run_breakpoint_commands): Rename to ...
11685 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11686 and change return type to boolean.
11687 (run_breakpoint_commands): New function.
11688 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11689 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11690 breakpoint. Go through the_target->remove_point instead of
11691 assuming memory breakpoint.
11692 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11693 software and hardware breakpoints.
11694 (reinsert_raw_breakpoint): Go through the_target->insert_point
11695 instead of assuming memory breakpoint.
11696 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11697 software and hardware breakpoints.
11698 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11699 Check both software and hardware breakpoints.
11700 (validate_inserted_breakpoint): Assert the breakpoint is a
11701 software breakpoint. Set the inserted flag to -1 instead of
11702 setting shlib_disabled.
11703 (delete_disabled_breakpoints): Adjust.
11704 (validate_breakpoints): Only validate software breakpoints.
11705 Adjust to inserted flag change.
11706 (check_mem_read, check_mem_write): Skip breakpoint types other
11707 than software breakpoints. Adjust to inserted flag change.
11708 * mem-break.h (enum raw_bkpt_type): New enum.
11709 (raw_breakpoint, struct process_info): Forward declare.
11710 (Z_packet_to_target_hw_bp_type): Delete declaration.
11711 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11712 (set_gdb_breakpoint, delete_gdb_breakpoint)
11713 (clear_breakpoint_conditions): New declarations.
11714 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11715 (breakpoint_inserted_here): Update comment.
11716 (add_breakpoint_condition, add_breakpoint_commands): Replace
11717 address parameter with a breakpoint pointer parameter.
11718 (gdb_breakpoint_here): Update comment.
11719 (delete_gdb_breakpoint_at): Delete.
11720 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11721 * server.c (process_point_options): Take a struct breakpoint
11722 pointer instead of an address. Adjust.
11723 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11724 delete_gdb_breakpoint.
11725 * spu-low.c (spu_target_ops): Install NULL as
11726 supports_z_point_type method.
11727 * target.h: Include mem-break.h.
11728 (struct target_ops) <prepare_to_access_memory>: Update comment.
11729 <supports_z_point_type>: New field.
11730 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11731 instead of a char. Also take a raw breakpoint pointer.
11732 * win32-arm-low.c (the_low_target): Install NULL as
11733 supports_z_point_type.
11734 * win32-i386-low.c (i386_supports_z_point_type): New function.
11735 (i386_insert_point, i386_remove_point): Adjust to new interface.
11736 (the_low_target): Install i386_supports_z_point_type.
11737 * win32-low.c (win32_supports_z_point_type): New function.
11738 (win32_insert_point, win32_remove_point): Adjust to new interface.
11739 (win32_target_ops): Install win32_supports_z_point_type.
11740 * win32-low.h (struct win32_target_ops):
11741 <supports_z_point_type>: New method.
11742 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11743 instead of a char. Also take a raw breakpoint pointer.
11744
117452014-05-20 Pedro Alves <palves@redhat.com>
11746
11747 * mem-break.h: Include break-common.h.
11748 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11749 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11750 (Z_packet_to_target_hw_bp_type): New declaration.
11751 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11752 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11753 (Z_PACKET_ACCESS_WP): Delete macros.
11754 (Z_packet_to_hw_type): Delete function.
11755 * i386-low.h: Don't include break-common.h here.
11756 (Z_packet_to_hw_type): Delete declaration.
11757 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11758 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11759 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11760 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11761 * linux-aarch64-low.c: Don't include break-common.h here.
11762 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11763 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11764 (Z_packet_to_target_hw_bp_type): Delete function.
11765 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11766 function.
11767 (mips_insert_point, mips_remove_point): Use
11768 Z_packet_to_target_hw_bp_type.
11769
117702014-05-20 Pedro Alves <palves@redhat.com>
11771
11772 * linux-aarch64-low.c: Include break-common.h.
11773 (enum target_point_type): Delete.
11774 (Z_packet_to_point_type): Rename to ...
11775 (Z_packet_to_target_hw_bp_type): ... this, and return a
11776 target_hw_bp_type instead.
11777 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11778 instead of an enum target_point_type.
11779 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11780 breakpoint type.
11781 (aarch64_dr_state_insert_one_point)
11782 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11783 (aarch64_handle_aligned_watchpoint)
11784 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11785 Take an enum target_hw_bp_type instead of an enum
11786 target_point_type.
11787 (aarch64_supports_z_point_type): New function.
11788 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
11789 use Z_packet_to_target_hw_bp_type.
11790
117912014-05-20 Joel Brobecker <brobecker@adacore.com>
11792
11793 * configure.ac: Only use -Werror by default when DEVELOPMENT
11794 is true.
11795 * configure: Regenerate.
11796
117972014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
11798
11799 Fix gdbserver qGetTLSAddr for x86_64 -m32.
11800 * linux-x86-low.c (X86_64_USER_REGS): New.
11801 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
11802
118032014-04-28 Yao Qi <yao@codesourcery.com>
11804
11805 * Makefile.in (i386-avx512.c): Fix the typo of generated file
11806 name.
11807
118082014-04-25 Pedro Alves <palves@redhat.com>
11809
11810 PR server/16255
11811 * linux-low.c (linux_attach_fail_reason_string): New function.
11812 (linux_attach_lwp): Delete.
11813 (linux_attach_lwp_1): Rename to ...
11814 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
11815 argument. Remove "initial" parameter. Return int instead of
11816 void. Don't error or warn here.
11817 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11818 failure to attach to the tgid. Call warning when failing to
11819 attach to an lwp.
11820 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
11821 argument. Remove "initial" parameter. Return int instead of
11822 void. Don't error or warn here.
11823 (linux_attach_fail_reason_string): New declaration.
11824 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
11825 interface change. Use linux_attach_fail_reason_string.
11826
118272014-04-24 Michael Sturm <michael.sturm@mintel.com>
11828 Walfred Tedeschi <walfred.tedeschi@intel.com>
11829
11830 * Makefile.in: Added rules to handle new files
11831 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
11832 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
11833 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
11834 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
11835 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
11836 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
11837 x32-avx512-linux.o.
11838 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
11839 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
11840 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
11841 i386/x32-avx512.xml.
11842 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
11843 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
11844 i386/x32-avx512-linux.xml.
11845 * i387-fp.c (num_avx512_k_registers): New constant for number
11846 of K registers.
11847 (num_avx512_zmmh_low_registers): New constant for number of
11848 lower ZMM registers (0-15).
11849 (num_avx512_zmmh_high_registers): New constant for number of
11850 higher ZMM registers (16-31).
11851 (num_avx512_ymmh_registers): New contant for number of higher
11852 YMM registers (ymm16-31 added by avx521 on x86_64).
11853 (num_avx512_xmm_registers): New constant for number of higher
11854 XMM registers (xmm16-31 added by AVX512 on x86_64).
11855 (struct i387_xsave): Add space for AVX512 registers.
11856 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
11857 Add code to handle AVX512 registers.
11858 (i387_xsave_to_cache): Add code to handle AVX512 registers.
11859 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
11860 prototypei from generated file.
11861 (tdesc_amd64_avx512_linux): Likewise.
11862 (init_registers_x32_avx512_linux): Likewise.
11863 (tdesc_x32_avx512_linux): Likewise.
11864 (init_registers_i386_avx512_linux): Likewise.
11865 (tdesc_i386_avx512_linux): Likewise.
11866 (x86_64_regmap): Add AVX512 registers.
11867 (x86_linux_read_description): Add code to handle AVX512 XSTATE
11868 mask.
11869 (initialize_low_arch): Add code to initialize AVX512 registers.
11870
118712014-04-23 Pedro Alves <palves@redhat.com>
11872
11873 * mem-break.c (find_gdb_breakpoint_at): Make static.
11874 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
11875
118762014-04-23 Pedro Alves <palves@redhat.com>
11877
11878 * i386-low.c: Don't include break-common.h here.
11879 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11880 prototype to take target_hw_bp_type as argument instead of a Z
11881 packet char.
11882 * i386-low.h: Include break-common.h here.
11883 (Z_packet_to_hw_type): Declare.
11884 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11885 prototypes.
11886 * linux-x86-low.c (x86_insert_point): Convert the packet number to
11887 a target_hw_bp_type before calling i386_low_insert_watchpoint.
11888 (x86_remove_point): Convert the packet number to a
11889 target_hw_bp_type before calling i386_low_remove_watchpoint.
11890 * win32-i386-low.c (i386_insert_point): Convert the packet number
11891 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
11892 (i386_remove_point): Convert the packet number to a
11893 target_hw_bp_type before calling i386_low_remove_watchpoint.
11894
118952014-04-23 Pedro Alves <palves@redhat.com>
11896
11897 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
11898
118992014-04-10 Pedro Alves <palves@redhat.com>
11900
11901 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11902 Check if the condition or command is NULL before checking if the
11903 breakpoint is known. On success, return true.
11904 * mem-break.h (add_breakpoint_condition): Document return.
11905 (add_breakpoint_commands): Add describing comment.
11906 * server.c (skip_to_semicolon): New function.
11907 (process_point_options): Use it.
11908
119092014-04-09 Pedro Alves <palves@redhat.com>
11910
11911 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
11912 to lwpid_of.
11913
119142014-02-27 Pedro Alves <palves@redhat.com>
11915
11916 PR 12702
11917 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
11918 macros.
11919 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
11920 output.
11921 (last_thread_of_process_p): Take a PID argument instead of a
11922 thread pointer.
11923 (linux_wait_for_lwp): Delete.
11924 (num_lwps, check_zombie_leaders, not_stopped_callback): New
11925 functions.
11926 (linux_low_filter_event): New function, party factored out from
11927 linux_wait_for_event.
11928 (linux_wait_for_event): Rename to ...
11929 (linux_wait_for_event_filtered): ... this. Add new filter ptid
11930 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
11931 sigsuspend. Check for zombie leaders.
11932 (linux_wait_for_event): Reimplement as wrapper around
11933 linux_wait_for_event_filtered.
11934 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
11935 a normal or signal exit is seen, it's the whole process exiting.
11936 (wait_for_sigstop): No longer a for_each_inferior callback.
11937 Rewrite on top of linux_wait_for_event_filtered.
11938 (stop_all_lwps): Call wait_for_sigstop directly.
11939 * server.c (resume, handle_target_event): Handle
11940 TARGET_WAITKIND_NO_RESUMED.
11941
119422014-02-26 Joel Brobecker <brobecker@adacore.com>
11943
11944 * win32-low.c (psapi_get_dll_name,
11945 * win32_CreateToolhelp32Snapshot): Delete.
11946 (win32_CreateToolhelp32Snapshot, win32_Module32First)
11947 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
11948 Delete.
11949 (handle_load_dll): Add function description.
11950 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
11951
119522014-02-26 Joel Brobecker <brobecker@adacore.com>
11953
11954 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
11955 Add comment.
11956 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
11957 base address when calling win32_add_one_solib.
11958 (handle_load_dll): Delete local variable load_addr.
11959 Remove 0x1000 offset applied to DLL base address when calling
11960 win32_add_one_solib.
11961 (handle_unload_dll): Add comment.
11962
119632014-02-26 Joel Brobecker <brobecker@adacore.com>
11964
11965 * win32-low.c (win32_add_all_dlls): Renames
11966 win32_ensure_ntdll_loaded. Rewrite function documentation.
11967 Adjust implementation to always load all DLLs.
11968 Add 0x1000 offset to DLL base address when calling
11969 win32_add_one_solib.
11970 (child_initialization_done): New static global.
11971 (do_initial_child_stuff): Set child_initialization_done to
11972 zero during child initialization, and 1 after. Replace call
11973 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
11974 Add comment.
11975 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
11976 (handle_unload_dll): Add function documentation.
11977 (get_child_debug_event): Ignore load and unload DLL events
11978 during child initialization.
11979
119802014-02-20 Doug Evans <dje@google.com>
11981
11982 Remove global all_lwps.
11983 * inferiors.h (ptid_of): Move here from linux-low.h.
11984 (pid_of, lwpid_of): Ditto.
11985 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
11986 parameter is a struct thread_info * now.
11987 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
11988 directly. Pass &all_threads to find_inferior instead of &all_lwps.
11989 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
11990 directly.
11991 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
11992 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
11993 * linux-arm-low.c (update_registers_callback): Update, "entry"
11994 parameter is a struct thread_info * now.
11995 Fetch lwpid from current_inferior directly.
11996 (arm_insert_point): Pass &all_threads to find_inferior instead of
11997 &all_lwps.
11998 (arm_remove_point): Ditto.
11999 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12000 (arm_prepare_to_resume): Fetch pid from thread.
12001 (arm_read_description): Fetch lwpid from current_inferior directly.
12002 * linux-low.c (all_lwps): Delete.
12003 (delete_lwp): Delete call to remove_inferior.
12004 (handle_extended_wait): Fetch lwpid from thread.
12005 (add_lwp): Don't set lwp->entry.id. Remove call to
12006 add_inferior_to_list.
12007 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12008 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12009 (kill_one_lwp_callback): Ditto.
12010 (linux_kill): Don't dereference NULL pointer.
12011 Fetch ptid,lwpid from thread.
12012 (get_detach_signal): Fetch ptid from thread.
12013 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12014 Simplify call to regcache_invalidate_thread.
12015 (delete_lwp_callback): Update, "entry" parameter is a
12016 struct thread_info * now. Fetch pid from thread.
12017 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12018 (status_pending_p_callback): Update, "entry" parameter is a
12019 struct thread_info * now. Fetch ptid from thread.
12020 (find_lwp_pid): Update, "entry" parameter is a
12021 struct thread_info * now.
12022 (linux_wait_for_lwp): Fetch pid from thread.
12023 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12024 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12025 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12026 (dequeue_one_deferred_signal): Ditto.
12027 (cancel_breakpoint): Fetch ptid from current_inferior.
12028 (linux_wait_for_event): Pass &all_threads to find_inferior,
12029 not &all_lwps. Fetch ptid, lwpid from thread.
12030 (count_events_callback): Update, "entry" parameter is a
12031 struct thread_info * now.
12032 (select_singlestep_lwp_callback): Ditto.
12033 (select_event_lwp_callback): Ditto.
12034 (cancel_breakpoints_callback): Ditto.
12035 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12036 not &all_lwps.
12037 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12038 (unsuspend_one_lwp): Update, "entry" parameter is a
12039 struct thread_info * now.
12040 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12041 not &all_lwps.
12042 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12043 Fetch lwpid from thread, not lwp.
12044 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12045 Pass &all_threads to find_inferior, not &all_lwps.
12046 (send_sigstop): Fetch lwpid from thread, not lwp.
12047 (send_sigstop_callback): Update, "entry" parameter is a
12048 struct thread_info * now.
12049 (suspend_and_send_sigstop_callback): Ditto.
12050 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12051 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12052 struct thread_info * now.
12053 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12054 from thread, lwp.
12055 (lwp_running): Update, "entry" parameter is a
12056 struct thread_info * now.
12057 (stop_all_lwps): Fetch ptid from thread.
12058 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12059 (linux_resume_one_lwp): Fetch lwpid from thread.
12060 (linux_set_resume_request): Update, "entry" parameter is a
12061 struct thread_info * now. Fetch pid, lwpid from thread.
12062 (resume_status_pending_p): Update, "entry" parameter is a
12063 struct thread_info * now.
12064 (need_step_over_p): Ditto. Fetch lwpid from thread.
12065 (start_step_over): Fetch lwpid from thread.
12066 (linux_resume_one_thread): Update, "entry" parameter is a
12067 struct thread_info * now. Fetch lwpid from thread.
12068 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12069 (proceed_one_lwp): Update, "entry" parameter is a
12070 struct thread_info * now. Fetch lwpid from thread.
12071 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12072 struct thread_info * now.
12073 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12074 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12075 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12076 directly.
12077 (regsets_store_inferior_registers): Ditto.
12078 (fetch_register, store_register): Ditto.
12079 (linux_read_memory, linux_write_memory): Ditto.
12080 (linux_request_interrupt): Ditto.
12081 (linux_read_auxv): Ditto.
12082 (linux_xfer_siginfo): Ditto.
12083 (linux_qxfer_spu): Ditto.
12084 (linux_qxfer_libraries_svr4): Ditto.
12085 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12086 moved to inferiors.h.
12087 (get_lwp): Delete.
12088 (get_thread_lwp): Update.
12089 (struct lwp_info): Delete member "entry". Simplify comment for
12090 member "thread".
12091 (all_lwps): Delete.
12092 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12093 current_inferior directly.
12094 (update_watch_registers_callback): Update, "entry" parameter is a
12095 struct thread_info * now. Fetch pid from thread.
12096 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12097 (mips_insert_point): Fetch lwpid from current_inferior.
12098 Pass &all_threads to find_inferior, not &all_lwps.
12099 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12100 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12101 directly.
12102 (mips_stopped_data_address): Ditto.
12103 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12104 directly.
12105 * linux-tile-low.c (tile_arch_setup): Ditto.
12106 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12107 (update_debug_registers_callback): Update, "entry" parameter is a
12108 struct thread_info * now. Fetch pid from thread.
12109 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12110 Pass &all_threads to find_inferior, not &all_lwps.
12111 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12112 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12113 Pass &all_threads to find_inferior, not &all_lwps.
12114 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12115 (i386_dr_low_get_status): Ditto.
12116 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12117 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12118 (x86_linux_read_description): Ditto.
12119 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12120
121212014-02-20 Doug Evans <dje@google.com>
12122
12123 * inferiors.c (get_first_inferior): Fix buglet.
12124
121252014-02-19 Doug Evans <dje@google.com>
12126
12127 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12128 * inferiors.c (add_thread): Change result type to struct thread_info *.
12129 All callers updated.
12130 (add_lwp): Call add_thread here instead of in callers.
12131 All callers updated.
12132 * linux-low.h (get_lwp_thread): Rewrite.
12133 (struct lwp_info): New member "thread".
12134
121352014-02-19 Doug Evans <dje@google.com>
12136
12137 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12138 All callers updated.
12139
121402014-02-19 Doug Evans <dje@google.com>
12141
12142 * inferiors.c (add_thread): Fix whitespace.
12143
121442014-02-19 Doug Evans <dje@google.com>
12145
12146 * dll.c (clear_dlls): Replace accessing list implemention details
12147 with API function.
12148 * gdbthread.h (get_first_thread): Declare.
12149 * inferiors.c (for_each_inferior_with_data): New function.
12150 (get_first_thread): New function.
12151 (find_thread_ptid): Simplify.
12152 (get_first_inferior): New function.
12153 (clear_list): Delete.
12154 (one_inferior_p): New function.
12155 (clear_inferior_list): New function.
12156 (clear_inferiors): Update.
12157 * inferiors.h (for_each_inferior_with_data): Declare.
12158 (clear_inferior_list): Declare.
12159 (one_inferior_p): Declare.
12160 (get_first_inferior): Declare.
12161 * linux-low.c (linux_wait_for_event): Replace accessing list
12162 implemention details with API function.
12163 * server.c (target_running): Ditto.
12164 (accumulate_file_name_length): New function.
12165 (emit_dll_description): New function.
12166 (handle_qxfer_libraries): Replace accessing list implemention
12167 details with API function.
12168 (handle_qxfer_threads_worker): New function.
12169 (handle_qxfer_threads_proper): Replace accessing list implemention
12170 details with API function.
12171 (handle_query): Ditto.
12172 (visit_actioned_threads_callback_ftype): New typedef.
12173 (visit_actioned_threads_data): New struct.
12174 (visit_actioned_threads): Rewrite to be find_inferior callback.
12175 (resume): Call find_inferior.
12176 (handle_status): Replace accessing list implemention
12177 details with API function.
12178 (process_serial_event): Replace accessing list implemention details
12179 with API function.
12180 * target.c (set_desired_inferior): Replace accessing list implemention
12181 details with API function.
12182 * tracepoint.c (same_process_p): New function.
12183 (gdb_agent_about_to_close): Replace accessing list implemention
12184 details with API function.
12185 * win32-low.c (child_delete_thread): Replace accessing list
12186 implemention details with API function.
12187 (match_dll_by_basename): New function.
12188 (dll_is_loaded_by_basename): New function.
12189 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12190 details call to dll_is_loaded_by_basename.
12191
121922014-02-19 Doug Evans <dje@google.com>
12193
12194 * dll.h (struct dll_info): Add comment.
12195 * gdbthread.h (struct thread_info): Add comment.
12196 (current_ptid): Simplify.
12197 * inferiors.c (add_process): Update.
12198 (remove_process): Update.
12199 * inferiors.h (struct process_info): Rename member "head" to "entry".
12200 * linux-low.c (delete_lwp): Update.
12201 (add_lwp): Update.
12202 (last_thread_of_process_p): Update.
12203 (kill_one_lwp_callback, linux_kill): Update.
12204 (status_pending_p_callback): Update.
12205 (wait_for_sigstop): Update. Simplify read of ptid.
12206 (start_step_over): Update.
12207 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12208 (get_lwp_thread): Update.
12209 (struct lwp_info): Rename member "head" to "entry".
12210 * regcache.h (inferior_list_entry): Delete.
12211 * server.c (kill_inferior_callback): Update.
12212 (detach_or_kill_inferior_callback): Update.
12213 (print_started_pid): Update.
12214 (print_attached_pid): Update.
12215 (process_serial_event): Simplify read of ptid.
12216 * thread-db.c (thread_db_create_event): Update.
12217 (thread_db_get_tls_address): Update.
12218 * win32-low.c (current_inferior_ptid): Simplify.
12219
122202014-02-19 Tom Tromey <tromey@redhat.com>
12221
12222 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12223 argument.
12224 (target_supports_btrace): Update.
12225
122262014-02-14 Yao Qi <yao@codesourcery.com>
12227
12228 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12229 (rsp-low-ipa.o): New target.
12230
122312014-02-12 Tom Tromey <tromey@redhat.com>
12232
12233 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12234 convert_ascii_to_int.
12235 * regcache.c (registers_to_string): Likewise.
12236 * remote-utils.c (decode_M_packet): Likewise.
12237 * server.c (process_serial_event): Likewise.
12238
122392014-02-12 Tom Tromey <tromey@redhat.com>
12240
12241 * server.c (handle_query, handle_v_run): Use hex2bin, not
12242 unhexify.
12243 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12244
122452014-02-12 Tom Tromey <tromey@redhat.com>
12246
12247 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12248 convert_int_to_ascii.
12249 * regcache.c (registers_to_string, collect_register_as_string):
12250 Likewise.
12251 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12252 Likewise.
12253 * server.c (process_serial_event): Likewise.
12254 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12255 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12256
122572014-02-12 Tom Tromey <tromey@redhat.com>
12258
12259 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12260 bin2hex, not hexify.
12261 * tracepoint.c (cmd_qtstatus): Likewise.
12262
122632014-02-12 Tom Tromey <tromey@redhat.com>
12264
12265 * remote-utils.c (monitor_output): Pass explicit length to
12266 hexify.
12267
122682014-02-12 Tom Tromey <tromey@redhat.com>
12269
12270 * tracepoint.c: Include rsp-low.h.
12271 * server.c: Include rsp-low.h.
12272 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12273 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12274 declare.
12275 * remote-utils.c: Include rsp-low.h.
12276 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12277 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12278 (convert_int_to_ascii, convert_ascii_to_int): Move to
12279 common/rsp-low.c.
12280 * regcache.c: Include rsp-low.h.
12281 * ax.c: Include rsp-low.h.
12282 * Makefile.in (SFILES): Add common/rsp-low.c.
12283 (OBS): Add rsp-low.o.
12284 (rsp-low.o): New target.
12285
122862014-02-12 Tom Tromey <tromey@redhat.com>
12287
12288 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12289 Include print-utils.h.
12290 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12291 (plongest, thirty_two, phex_nz): Remove.
12292 * Makefile.in (SFILES): Add common/print-utils.c.
12293 (OBS): Add print-utils.o.
12294 (print-utils-ipa.o): New target.
12295 (print-utils.o): New target.
12296 (IPA_OBJS): Add print-utils-ipa.o.
12297
122982014-02-06 Tom Tromey <tromey@redhat.com>
12299
12300 * Makefile.in (SFILES): Fix indentation.
12301
123022014-02-05 Doug Evans <dje@google.com>
12303
12304 * linux-low.c (linux_wait_for_event): Improve comment.
12305 (linux_wait_1): Keep current_inferior in sync with event_child.
12306
123072014-01-22 Doug Evans <dje@google.com>
12308
12309 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12310
123112014-01-22 Doug Evans <dje@google.com>
12312
12313 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12314 * configure: Regenerate.
12315 * config.in: Regenerate.
12316 * Makefile.in (SFILES): Add debug.c.
12317 (OBS): Add debug.o.
12318 * debug.c: New file.
12319 * debug.h: New file.
12320 * linux-aarch64-low.c (*): Update all debugging printfs to use
12321 debug_printf instead of fprintf.
12322 * linux-arm-low.c (*): Ditto.
12323 * linux-cris-low.c (*): Ditto.
12324 * linux-crisv32-low.c (*): Ditto.
12325 * linux-m32r-low.c (*): Ditto.
12326 * linux-sparc-low.c (*): Ditto.
12327 * linux-x86.c (*): Ditto.
12328 * linux-low.c (*): Ditto.
12329 (linux_wait_1): Add calls to debug_enter, debug_exit.
12330 (linux_wait): Remove redundant debugging printf.
12331 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12332 (linux_resume, unstop_all_lwps): Ditto.
12333 * mem-break.c (*): Update all debugging printfs to use
12334 debug_printf instead of fprintf.
12335 * remote-utils.c (*): Ditto.
12336 * thread-db.c (*): Ditto.
12337 * server.c #include <ctype.h>, "gdb_vecs.h".
12338 (debug_threads): Moved to debug.c.
12339 (*): Update all debugging printfs to use debug_printf instead of
12340 fprintf.
12341 (start_inferior): Replace call to fflush with call to debug_flush.
12342 (monitor_show_help): Mention set debug-format.
12343 (parse_debug_format_options): New function.
12344 (handle_monitor_command): Handle "monitor set debug-format".
12345 (gdbserver_usage): Mention --debug-format.
12346 (main): Parse --debug-format.
12347 * server.h (debug_threads): Declaration moved to debug.h.
12348 #include "debug.h".
12349 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12350 trace_debug_1 that uses debug_printf.
12351 (tracepoint_look_up_symbols): Update all debugging printfs to use
12352 debug_printf instead of fprintf.
12353
123542014-01-20 Baruch Siach <baruch@tkos.co.il>
12355
12356 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12357 sys/ptrace.h.
12358
123592014-01-17 Pedro Alves <palves@redhat.com>
12360
12361 PR build/16445
12362 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12363 defined after including gdb_proc_service.h.
12364
123652014-01-16 Doug Evans <dje@google.com>
12366
12367 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12368 (match_dll): Use it.
12369
123702014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12371
12372 * target.h (target_ops) <read_btrace>: Change parameters and
12373 return type to allow error reporting.
12374 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12375 trace reading errors on.
12376 * linux-low.c (linux_low_read_btrace): Pass trace reading
12377 errors on.
12378 (linux_low_disable_btrace): New.
12379
123802014-01-15 Doug Evans <dje@google.com>
12381
12382 * inferiors.c (thread_id_to_gdb_id): Delete.
12383 * inferiors.h (thread_id_to_gdb_id): Delete.
12384
123852014-01-13 Eli Zaretskii <eliz@gnu.org>
12386
12387 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12388 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12389 versions.
12390
123912014-01-08 Pedro Alves <palves@redhat.com>
12392
12393 * server.c (handle_status): Don't discard previous queued stop
12394 replies or thread's pending status here.
12395 (main) <disconnection>: Do it here instead.
12396
123972014-01-08 Pedro Alves <palves@redhat.com>
12398
12399 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12400 * server.c (visit_actioned_threads, handle_pending_status): New
12401 function.
12402 (handle_v_cont): Factor out parts to ...
12403 (resume): ... this new function. If in all-stop, and a thread
12404 being resumed has a pending status, report it without actually
12405 resuming.
12406 (myresume): Adjust to use the new 'resume' function.
12407 (clear_pending_status_callback, set_pending_status_callback)
12408 (find_status_pending_thread_callback): New functions.
12409 (handle_status): Handle the case of multiple threads having
12410 interesting statuses to report. Report threads' real last signal
12411 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12412 with an interesting thread to report the status for, instead of
12413 always reporting the status of the first thread.
12414
124152014-01-01 Joel Brobecker <brobecker@adacore.com>
12416
12417 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12418 * gdbreplay.c (gdbreplay_version): Likewise.
12419
124202013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12421
12422 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12423 iov.iov_len with the real length in use.
12424
124252013-12-13 Joel Brobecker <brobecker@adacore.com>
12426
12427 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12428 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12429 for all targets that use win32-low.c.
12430 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12431 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12432
124332013-12-13 Pedro Alves <palves@redhat.com>
12434
12435 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12436 if equal to TARGET_WAITKIND_LOADED.
12437 * win32-low.c (cached_status): New static global.
12438 (win32_wait): Add declaration.
12439 (do_initial_child_stuff): Flush all initial pending debug events
12440 up to the initial breakpoint.
12441 (win32_wait): If CACHED_STATUS was set, return that instead
12442 of doing a real wait. Remove the code resuming the execution
12443 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12444 during the initial phase. Also remove the code changing
12445 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12446 TARGET_WAITKIND_STOPPED.
12447
124482013-12-11 Yao Qi <yao@codesourcery.com>
12449
12450 * notif.c (handle_notif_ack): Return 0 if no notification
12451 matches.
12452
124532013-11-20 Doug Evans <dje@google.com>
12454
12455 * linux-low.c (linux_set_resume_request): Fix comment.
12456
124572013-11-20 Doug Evans <dje@google.com>
12458
12459 * linux-low.c (resume_status_pending_p): Tweak comment.
12460
124612013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12462
12463 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12464 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12465 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12466 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12467 (srv_amd64_regobj): Add amd64-mpx.o.
12468 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12469 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12470 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12471 * i387-fp.c (num_pl_bnd_register) Added constant.
12472 (num_pl_bnd_cfg_registers) Added constant.
12473 (struct i387_xsave) Added reserved area and MPX fields.
12474 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12475 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12476 function.
12477 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12478 (init_registers_amd64_mpx_linux): Declare new function.
12479 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12480 (x86_64_regmap): Add MPX registers.
12481 (x86_linux_read_description): Add MPX case.
12482 (initialize_low_arch): Initialize MPX targets.
12483
124842013-11-18 Tom Tromey <tromey@redhat.com>
12485
12486 * configure: Rebuild.
12487 * configure.ac: Don't check for stdlib.h.
12488 * gdbreplay.c: Unconditionally include stdlib.h.
12489
124902013-11-18 Tom Tromey <tromey@redhat.com>
12491
12492 * config.in: Rebuild.
12493 * configure: Rebuild.
12494 * configure.ac: Don't use AC_HEADER_DIRENT.
12495
124962013-11-18 Tom Tromey <tromey@redhat.com>
12497
12498 * server.h: Don't check HAVE_STRING_H.
12499 * gdbreplay.c: Don't check HAVE_STRING_H.
12500 * configure: Rebuild.
12501
125022013-11-18 Tom Tromey <tromey@redhat.com>
12503
12504 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12505 LIBGNU.
12506
125072013-11-08 Tom Tromey <tromey@redhat.com>
12508
12509 * configure, config.in: Rebuild.
12510 * configure.ac: Remove unused configury.
12511
125122013-11-08 Tom Tromey <tromey@redhat.com>
12513
12514 * acinclude.m4: Include common.m4, codeset.m4.
12515 * configure, config.in: Rebuild.
12516 * configure.ac: Use GDB_AC_COMMON.
12517
125182013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12519
12520 * linux-s390-low.c (HWCAP_S390_TE): New define.
12521 (s390_arch_setup): Consider the TE field in the HWCAP for
12522 determining 'have_regset_tdb'.
12523
125242013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12525
12526 PR gdb/16014
12527 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12528 call to sizeof.
12529
125302013-10-02 Pedro Alves <palves@redhat.com>
12531
12532 * server.c (process_serial_event): Don't output "GDBserver
12533 exiting" if GDB is connected through stdio.
12534 * target.c (mywait): Likewise, be silent if GDB is connected
12535 through stdio.
12536
125372013-10-01 Joel Brobecker <brobecker@adacore.com>
12538
12539 * lynx-low.c (lynx_add_threads_after_attach): New function.
12540 (lynx_attach): Remove call to add_thread. Add call to
12541 lynx_add_threads_after_attach instead.
12542
125432013-09-28 Mike Frysinger <vapier@gentoo.org>
12544
12545 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12546 * config.in, configure: Regenerated.
12547
125482013-09-18 Yao Qi <yao@codesourcery.com>
12549
12550 PR server/15959
12551 * server.c (start_inferior): Clear 'resume_info'.
12552
125532013-09-16 Jiong Wang <jiwang@tilera.com>
12554
12555 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12556 for each register.
12557
125582013-09-16 Jiong Wang <jiwang@tilera.com>
12559
12560 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12561 linux-tile-low.o to srv_tgtobj.
12562
125632013-09-16 Will Newton <will.newton@linaro.org>
12564
12565 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12566 out regs.
12567
125682013-09-06 Pedro Alves <palves@redhat.com>
12569
12570 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12571 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12572 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12573 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12574 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12575 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12576
125772013-09-06 Pedro Alves <palves@redhat.com>
12578
12579 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12580 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12581
125822013-09-06 Pedro Alves <palves@redhat.com>
12583
12584 * linux-amd64-ipa.c: Include tracepoint.h.
12585 * linux-i386-ipa.c: Include tracepoint.h.
12586
125872013-09-06 Ricard Wanderlof <ricardw@axis.com>
12588
12589 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12590 (ps_get_thread_area): New function.
12591
125922013-09-06 Ricard Wanderlof <ricardw@axis.com>
12593
12594 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12595 (initialize_low_arch): Call init_registers_crisv32 rather than
12596 init_register_crisv32.
12597
125982013-09-05 Pedro Alves <palves@redhat.com>
12599
12600 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12601 to ...
12602 * hostio.h: ... this new file.
12603 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12604 win32-low.c: Include hostio.h.
12605
126062013-09-05 Pedro Alves <palves@redhat.com>
12607
12608 * server.h (gdb_client_data, handler_func, callback_handler_func)
12609 (delete_file_handler, add_file_handler, append_callback_event)
12610 (delete_callback_event, start_event_loop, initialize_event_loop):
12611 Move to event-loop.h and include it.
12612 * event-loop.h: New file.
12613
126142013-09-05 Pedro Alves <palves@redhat.com>
12615
12616 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12617 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12618 (loaded_dll, unloaded_dll): Move to ...
12619 * dll.h: ... this new file.
12620 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12621
126222013-09-05 Pedro Alves <palves@redhat.com>
12623
12624 * server.h (current_process, get_thread_process, all_processes)
12625 (add_inferior_to_list, for_each_inferior, current_inferior)
12626 (remove_inferior, add_process, remove_process, find_process_pid)
12627 (have_started_inferiors_p, have_attached_inferiors_p)
12628 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12629 (clear_inferiors, find_inferior, find_inferior_id)
12630 (inferior_target_data, set_inferior_target_data)
12631 (inferior_regcache_data, set_inferior_regcache_data): Move to
12632 inferiors.h, and include it.
12633 * inferiors.h: New file.
12634
126352013-09-05 Pedro Alves <palves@redhat.com>
12636
12637 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12638 Move ...
12639 * ax.h: ... here.
12640
126412013-09-05 Pedro Alves <palves@redhat.com>
12642
12643 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12644 tracepoint.h.
12645 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12646 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12647 (handle_tracepoint_general_set, handle_tracepoint_query)
12648 (tracepoint_finished_step, tracepoint_was_hit)
12649 (release_while_stepping_state_list, current_traceframe)
12650 (in_readonly_region, traceframe_read_mem)
12651 (fetch_traceframe_registers, traceframe_read_sdata)
12652 (traceframe_read_info, struct fast_tpoint_collect_status)
12653 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12654 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12655 (supply_fast_tracepoint_registers)
12656 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12657 (ipa_tdesc, claim_trampoline_space)
12658 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12659 (agent_mem_read, agent_get_trace_state_variable_value)
12660 (agent_set_trace_state_variable_value, agent_tsv_read)
12661 (agent_mem_read_string, get_raw_reg_func_addr)
12662 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12663 * tracepoint.h: ... this new file.
12664
126652013-09-05 Pedro Alves <palves@redhat.com>
12666
12667 * server.h (perror_with_name, error, fatal, warning, paddress)
12668 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12669 include it.
12670 * utils.h: New file.
12671
126722013-09-05 Pedro Alves <palves@redhat.com>
12673
12674 * server.h (remote_debug, noack_mode, transport_is_reliable)
12675 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12676 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12677 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12678 (write_enn, initialize_async_io, enable_async_io)
12679 (disable_async_io, check_remote_input_interrupt_request)
12680 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12681 (dead_thread_notify, prepare_resume_reply)
12682 (decode_address_to_semicolon, decode_address, decode_m_packet)
12683 (decode_M_packet, decode_X_packet, decode_xfer_write)
12684 (decode_search_memory_packet, unhexify, hexify)
12685 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12686 (look_up_one_symbol, relocate_instruction)
12687 (monitor_output): Move to remote-utils.h, and include it.
12688 * remote-utils.h: New file.
12689
126902013-09-05 Pedro Alves <palves@redhat.com>
12691
12692 * server.h (_): Delete.
12693
126942013-09-02 Pedro Alves <palves@redhat.com>
12695
12696 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12697 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12698 allocated.
12699 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12700
127012013-09-02 Pierre Muller <muller@sourceware.org>
12702
12703 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12704 or WriteProcessMemory complete successfully and handle
12705 ERROR_PARTIAL_COPY error.
12706
127072013-09-02 Pedro Alves <palves@redhat.com>
12708
12709 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12710 error instead of EIO.
12711
127122013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12713
12714 PR server/15604
12715 * linux-low.c: Include filestuff.h.
12716 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12717 * lynx-low.c: Include filestuff.h.
12718 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12719 * server.c: Include filestuff.h.
12720 (main): Call notice_open_fds.
12721 * spu-low.c: Include filestuff.h.
12722 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12723
127242013-08-22 Luis Machado <lgustavo@codesourcery.com>
12725
12726 * Makefile.in: Explain why ../target and ../nat are not
12727 listed as include file search paths.
12728 (linux-waitpid.o): New object file rule.
12729 * configure.srv (srv_native_linux_obj): New variable.
12730 Replace all occurrences of linux native object files with
12731 $srv_native_linux_obj.
12732 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12733 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12734 (linux_enable_event_reporting): Remove declaration.
12735 (my_waitpid): Moved to common/linux-waitpid.c.
12736 (linux_wait_for_event): Pass ptid when calling
12737 linux_enable_event_reporting.
12738 (linux_supports_tracefork_flag): Remove.
12739 (linux_enable_event_reporting): Likewise.
12740 (linux_tracefork_grandchild): Remove.
12741 (STACK_SIZE): Moved to common/linux-ptrace.c.
12742 (linux_tracefork_child): Remove.
12743 (linux_test_for_tracefork): Remove.
12744 (linux_look_up_symbols): Call linux_supports_traceclone.
12745 (initialize_low): Remove call to linux_test_for_tracefork.
12746 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12747 common/linux-ptrace.h.
12748 (PTRACE_TYPE_ARG4): Likewise.
12749 Include linux-ptrace.h.
12750
127512013-08-21 Pedro Alves <palves@redhat.com>
12752
12753 * config.in: Renegerate.
12754
127552013-08-19 Luis Machado <lgustavo@codesourcery.com>
12756
12757 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12758 (SFILES): Remove $(srcdir)/common/target-common.c and
12759 add $(srcdir)/target/waitstatus.c.
12760 (OBS): Remove target-common.o and add waitstatus.o.
12761 (server_h): Remove $(srcdir)/../common/target-common.h and
12762 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12763 and $(srcdir)/../target/waitstatus.h.
12764 (target-common.o): Remove.
12765 (waitstatus.o): New target object file.
12766 * target.h: Do not include target-common.h and
12767 include target/resume.h, target/wait.h and
12768 target/waitstatus.h.
12769
127702013-08-13 Luis Machado <lgustavo@codesourcery.com>
12771
12772 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12773 to PTRACE_TYPE_ARG3.
12774 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12775 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12776 PTRACE_TYPE_ARG4.
12777 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12778 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12779
127802013-07-27 Jie Zhang <jie@codesourcery.com>
12781 Daniel Jacobowitz <dan@codesourcery.com>
12782 Yao Qi <yao@codesourcery.com>
12783
12784 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12785 (mips-linux-watch.o): New rule.
12786 (mips_linux_watch_h): New variable.
12787 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
12788 srv_tgtobj.
12789 * linux-mips-low.c: Include mips-linux-watch.h.
12790 (struct arch_process_info, struct arch_lwp_info): New.
12791 (update_watch_registers_callback): New function.
12792 (mips_linux_new_process, mips_linux_new_thread) New functions.
12793 (mips_linux_prepare_to_resume, mips_insert_point): New
12794 functions.
12795 (mips_remove_point, mips_stopped_by_watchpoint): New
12796 functions.
12797 (rsp_bp_type_to_target_hw_bp_type): New function.
12798 (mips_stopped_data_address): New function.
12799 (the_low_target): Add watchpoint support functions.
12800
128012013-07-27 Yao Qi <yao@codesourcery.com>
12802
12803 * i386-low.c: Include break-common.h.
12804 (enum target_hw_bp_type): Remove.
12805
128062013-07-24 Luis Machado <lgustavo@codesourcery.com>
12807
12808 * Makefile.in (SFILES): /common/target-common.c.
12809 (OBS): Add target-common.o.
12810 (server_h): Add $(srcdir)/../common/target-common.h.
12811 (target-common.o): New target.
12812 * server.c (queue_stop_reply_callback): Free
12813 status string after use.
12814 * target.c (target_waitstatus_to_string): Remove.
12815 * target.h: Include target-common.h.
12816 (resume_kind): Likewise.
12817 (target_waitkind): Likewise.
12818 (target_waitstatus): Likewise.
12819 (TARGET_WNOHANG): Likewise.
12820
128212013-07-04 Yao Qi <yao@codesourcery.com>
12822
12823 * Makefile.in (host_alias): Use @host_noncanonical@.
12824 (target_alias): Use @target_noncanonical@.
12825 * configure.ac: Use ACX_NONCANONICAL_TARGET and
12826 ACX_NONCANONICAL_HOST.
12827 * configure: Regenerated.
12828
12829 Revert:
12830 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12831
12832 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12833 * configure: Rebuild.
12834 * Makefile.in (version_host, version_target): Get from configure.
12835 (version.c): Use $(version_host) and $(version_target).
12836
128372013-07-03 Pedro Alves <palves@redhat.com>
12838
12839 * Makefile.in (config.status): Depend on development.sh.
12840 * acinclude.m4: Include libmcheck.m4.
12841 * configure: Regenerate.
12842
128432013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12844
12845 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
12846 attribute inside the parentheses.
12847 (winapi_DebugSetProcessKillOnExit): Ditto.
12848 (winapi_DebugBreakProcess): Ditto.
12849 (winapi_GenerateConsoleCtrlEvent): Ditto.
12850
128512013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12852
12853 * notif.h (notif_event): Add a dummy member to avoid compiler
12854 errors.
12855
128562013-07-01 Pedro Alves <palves@redhat.com>
12857
12858 * hostio.c (HOSTIO_PATH_MAX): Define.
12859 (require_filename, handle_open, handle_unlink, handle_readlink):
12860 Use it.
12861
128622013-07-01 Pedro Alves <palves@redhat.com>
12863
12864 * server.h: Include "pathmax.h".
12865 * linux-low.c: Don't include sys/param.h.
12866 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
12867 MAXPATHLEN.
12868 * win32-low.c: Don't include sys/param.h.
12869 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
12870
128712013-07-01 Pedro Alves <palves@redhat.com>
12872
12873 * event-loop.c: Don't check HAVE_UNISTD_H before including
12874 <unistd.h>.
12875 * gdbreplay.c: Likewise.
12876 * remote-utils.c: Likewise.
12877 * server.c: Likewise.
12878 * configure.ac: Don't check for unistd.h.
12879 * configure: Regenerate.
12880
128812013-06-28 Tom Tromey <tromey@redhat.com>
12882
12883 * Makefile.in (version.c): Use version.in, not
12884 common/version.in.
12885
128862013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12887
12888 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12889 * configure: Rebuild.
12890 * Makefile.in (version_host, version_target): Get from configure.
12891 (version.c): Use $(version_host) and $(version_target).
12892
128932013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12894
12895 Fix trace-status to output user name without trailing colon.
12896 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
12897
128982013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12899
12900 Fix trace-status to output proper start-time and stop-time.
12901 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
12902 output start time and stop time in hex as gdb expects.
12903
129042013-06-26 Pedro Alves <pedro@codesourcery.com>
12905
12906 * tracepoint.c (build_traceframe_info_xml): Output trace state
12907 variables present in the trace buffer.
12908
129092013-06-24 Tom Tromey <tromey@redhat.com>
12910
12911 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
12912 create-version.sh.
12913 (version.o): Remove.
12914 * gdbreplay.c: Include version.h.
12915 (version, host_name): Don't declare.
12916 * server.h: Include version.h.
12917 (version, host_name): Don't declare.
12918
129192013-06-12 Pedro Alves <palves@redhat.com>
12920
12921 * linux-x86-low.c (linux_is_elf64): Delete global.
12922 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
12923 with local linux_pid_exe_is_elf_64_file use.
12924
129252013-06-11 Pedro Alves <palves@redhat.com>
12926
12927 * linux-low.c (regset_disabled, disable_regset): New functions.
12928 (regsets_fetch_inferior_registers)
12929 (regsets_store_inferior_registers): Use them.
12930 (initialize_regsets_info); Don't allocate the disabled_regsets
12931 array here.
12932 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
12933 comment.
12934
129352013-06-11 Pedro Alves <palves@redhat.com>
12936
12937 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
12938 xmalloc.
12939
129402013-06-11 Pedro Alves <palves@redhat.com>
12941
12942 * linux-x86-low.c (initialize_low_arch): Call
12943 init_registers_x32_avx_linux.
12944
129452013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
12946
12947 Fix compatibility with Android Bionic.
12948 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
12949 it is not empty.
12950
129512013-06-07 Pedro Alves <palves@redhat.com>
12952
12953 PR server/14823
12954 * Makefile.in (OBS): Add tdesc.o.
12955 (IPA_OBJS): Add tdesc-ipa.o.
12956 (tdesc-ipa.o): New rule.
12957 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
12958 interface.
12959 * linux-low.c (new_inferior): Delete.
12960 (disabled_regsets, num_regsets): Delete.
12961 (linux_add_process): Adjust to set the new per-process
12962 new_inferior flag.
12963 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
12964 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
12965 was a stop. When calling arch_setup, switch the current inferior
12966 to the thread that got an event.
12967 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
12968 (regsets_fetch_inferior_registers)
12969 (regsets_store_inferior_registers): New regsets_info parameter.
12970 Adjust to use it.
12971 (linux_register_in_regsets): New regs_info parameter. Adjust to
12972 use it.
12973 (register_addr, fetch_register, store_register): New usrregs_info
12974 parameter. Adjust to use it.
12975 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
12976 parameter regs_info. Adjust to use it.
12977 (linux_fetch_registers): Get the current inferior's regs_info, and
12978 adjust to use it.
12979 (linux_store_registers): Ditto.
12980 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
12981 (initialize_low): Don't initialize the target_regsets here. Call
12982 initialize_low_arch.
12983 * linux-low.h (target_regsets): Delete declaration.
12984 (struct regsets_info): New.
12985 (struct usrregs_info): New.
12986 (struct regs_info): New.
12987 (struct process_info_private) <new_inferior>: New field.
12988 (struct linux_target_ops): Delete the num_regs, regmap, and
12989 regset_bitmap fields. New field regs_info.
12990 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
12991 * i387-fp.c (num_xmm_registers): Delete.
12992 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
12993 calls to new interface.
12994 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
12995 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
12996 Infer the number of xmm registers from the regcache's target
12997 description.
12998 * i387-fp.h (num_xmm_registers): Delete.
12999 * inferiors.c (add_thread): Don't install the thread's regcache
13000 here.
13001 * proc-service.c (gregset_info): Fetch the current inferior's
13002 regs_info. Adjust to use it.
13003 * regcache.c: Include tdesc.h.
13004 (register_bytes, reg_defs, num_registers)
13005 (gdbserver_expedite_regs): Delete.
13006 (get_thread_regcache): If the thread doesn't have a regcache yet,
13007 create one, instead of aborting gdbserver.
13008 (regcache_invalidate_one): Rename to ...
13009 (regcache_invalidate_thread): ... this.
13010 (regcache_invalidate_one): New.
13011 (regcache_invalidate): Only invalidate registers of the current
13012 process.
13013 (init_register_cache): Add target_desc parameter, and use it.
13014 (new_register_cache): Ditto. Assert the target description has a
13015 non zero registers_size.
13016 (regcache_cpy): Add assertions. Adjust.
13017 (realloc_register_cache, set_register_cache): Delete.
13018 (registers_to_string, registers_from_string): Adjust.
13019 (find_register_by_name, find_regno, find_register_by_number)
13020 (register_cache_size): Add target_desc parameter, and use it.
13021 (free_register_cache_thread, free_register_cache_thread_one)
13022 (regcache_release, register_cache_size): New.
13023 (register_size): Add target_desc parameter, and use it.
13024 (register_data, supply_register, supply_register_zeroed)
13025 (supply_regblock, supply_register_by_name, collect_register)
13026 (collect_register_as_string, collect_register_by_name): Adjust.
13027 * regcache.h (struct target_desc): Forward declare.
13028 (struct regcache) <tdesc>: New field.
13029 (init_register_cache, new_register_cache): Add target_desc
13030 parameter.
13031 (regcache_invalidate_thread): Declare.
13032 (regcache_invalidate_one): Delete declaration.
13033 (regcache_release): Declare.
13034 (find_register_by_number, register_cache_size, register_size)
13035 (find_regno): Add target_desc parameter.
13036 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13037 declarations.
13038 * remote-utils.c: Include tdesc.h.
13039 (outreg, prepare_resume_reply): Adjust.
13040 * server.c: Include tdesc.h.
13041 (gdbserver_xmltarget): Delete declaration.
13042 (get_features_xml, process_serial_event): Adjust.
13043 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13044 declare.
13045 (struct process_info) <tdesc>: New field.
13046 (ipa_tdesc): Declare.
13047 * tdesc.c: New file.
13048 * tdesc.h: New file.
13049 * tracepoint.c: Include tdesc.h.
13050 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13051 (get_context_regcache): Adjust to pass ipa_tdesc down.
13052 (do_action_at_tracepoint): Adjust to get the register cache size
13053 from the context regcache's description.
13054 (traceframe_walk_blocks): Adjust to get the register cache size
13055 from the current trace frame's description.
13056 (traceframe_get_pc): Adjust to get current trace frame's
13057 description and pass it down.
13058 (gdb_collect): Adjust to get the register cache size from the
13059 IPA's description.
13060 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13061 (gdbserver_xmltarget): Delete.
13062 (initialize_low_tracepoint): Set the ipa's target description.
13063 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13064 (initialize_low_tracepoint): Set the ipa's target description.
13065 * linux-x86-low.c: Include tdesc.h.
13066 [__x86_64__] (is_64bit_tdesc): New.
13067 (ps_get_thread_area, x86_get_thread_area): Use it.
13068 (i386_cannot_store_register): Rename to ...
13069 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13070 (i386_cannot_fetch_register): Rename to ...
13071 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13072 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13073 to new interface.
13074 (target_regsets): Rename to ...
13075 (x86_regsets): ... this.
13076 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13077 interface.
13078 (x86_siginfo_fixup): Use is_64bit_tdesc.
13079 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13080 (tdesc_x32_avx_linux, tdesc_x32_linux)
13081 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13082 Declare.
13083 (x86_linux_update_xmltarget): Delete.
13084 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13085 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13086 (AMD64_LINUX_USER64_CS): New.
13087 (x86_linux_read_description): New, based on
13088 x86_linux_update_xmltarget.
13089 (same_process_callback): New.
13090 (x86_arch_setup_process_callback): New.
13091 (x86_linux_update_xmltarget): New.
13092 (x86_regsets_info): New.
13093 (amd64_linux_regs_info): New.
13094 (i386_linux_usrregs_info): New.
13095 (i386_linux_regs_info): New.
13096 (x86_linux_regs_info): New.
13097 (x86_arch_setup): Reimplement.
13098 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13099 (x86_emit_ops): Ditto.
13100 (the_low_target): Adjust. Install x86_linux_regs_info,
13101 x86_cannot_fetch_register, and x86_cannot_store_register.
13102 (initialize_low_arch): New.
13103 * linux-ia64-low.c (tdesc_ia64): Declare.
13104 (ia64_fetch_register): Adjust.
13105 (ia64_usrregs_info, regs_info): New globals.
13106 (ia64_regs_info): New function.
13107 (the_low_target): Adjust.
13108 (initialize_low_arch): New function.
13109 * linux-sparc-low.c (tdesc_sparc64): Declare.
13110 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13111 Adjust.
13112 (sparc_arch_setup): New function.
13113 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13114 (the_low_target): Adjust.
13115 (initialize_low_arch): New function.
13116 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13117 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13118 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13119 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13120 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13121 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13122 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13123 (tdesc_powerpc_isa205_vsx64l): Declare.
13124 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13125 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13126 (ppc_set_pc, ppc_get_hwcap): Adjust.
13127 (ppc_usrregs_info): Forward declare.
13128 (!__powerpc64__) ppc_regmap_adjusted: New global.
13129 (ppc_arch_setup): Adjust to the current process'es target
13130 description.
13131 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13132 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13133 (ppc_store_evrregset): Adjust.
13134 (target_regsets): Rename to ...
13135 (ppc_regsets): ... this, and make static.
13136 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13137 (ppc_regs_info): New function.
13138 (the_low_target): Adjust.
13139 (initialize_low_arch): New function.
13140 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13141 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13142 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13143 (tdesc_s390x_linux64v2): Declare.
13144 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13145 (s390_fill_gregset, s390_store_last_break): Adjust.
13146 (target_regsets): Rename to ...
13147 (s390_regsets): ... this, and make static.
13148 (s390_get_pc, s390_set_pc): Adjust.
13149 (s390_get_hwcap): New target_desc parameter, and use it.
13150 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13151 (s390_arch_setup): Adjust to set the current process'es target
13152 description. Don't adjust the regmap.
13153 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13154 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13155 (regs_info_3264): New globals.
13156 (s390_regs_info): New function.
13157 (the_low_target): Adjust.
13158 (initialize_low_arch): New function.
13159 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13160 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13161 [__mips64] (init_registers_mips_linux)
13162 (init_registers_mips_dsp_linux): Delete defines.
13163 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13164 (have_dsp): New global.
13165 (mips_read_description): New, based on mips_arch_setup.
13166 (mips_arch_setup): Reimplement.
13167 (get_usrregs_info): New function.
13168 (mips_cannot_fetch_register, mips_cannot_store_register)
13169 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13170 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13171 (target_regsets): Rename to ...
13172 (mips_regsets): ... this, and make static.
13173 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13174 (dsp_regs_info, regs_info): New globals.
13175 (mips_regs_info): New function.
13176 (the_low_target): Adjust.
13177 (initialize_low_arch): New function.
13178 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13179 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13180 Declare.
13181 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13182 (arm_read_description): New, with bits factored from
13183 arm_arch_setup.
13184 (arm_arch_setup): Reimplement.
13185 (target_regsets): Rename to ...
13186 (arm_regsets): ... this, and make static.
13187 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13188 (arm_regs_info): New function.
13189 (the_low_target): Adjust.
13190 (initialize_low_arch): New function.
13191 * linux-m68k-low.c (tdesc_m68k): Declare.
13192 (target_regsets): Rename to ...
13193 (m68k_regsets): ... this, and make static.
13194 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13195 (m68k_regs_info): New function.
13196 (m68k_arch_setup): New function.
13197 (the_low_target): Adjust.
13198 (initialize_low_arch): New function.
13199 * linux-sh-low.c (tdesc_sharch): Declare.
13200 (target_regsets): Rename to ...
13201 (sh_regsets): ... this, and make static.
13202 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13203 (sh_regs_info, sh_arch_setup): New functions.
13204 (the_low_target): Adjust.
13205 (initialize_low_arch): New function.
13206 * linux-bfin-low.c (tdesc_bfin): Declare.
13207 (bfin_arch_setup): New function.
13208 (bfin_usrregs_info, regs_info): New globals.
13209 (bfin_regs_info): New function.
13210 (the_low_target): Adjust.
13211 (initialize_low_arch): New function.
13212 * linux-cris-low.c (tdesc_cris): Declare.
13213 (cris_arch_setup): New function.
13214 (cris_usrregs_info, regs_info): New globals.
13215 (cris_regs_info): New function.
13216 (the_low_target): Adjust.
13217 (initialize_low_arch): New function.
13218 * linux-cris-low.c (tdesc_crisv32): Declare.
13219 (cris_arch_setup): New function.
13220 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13221 (cris_regs_info): New function.
13222 (the_low_target): Adjust.
13223 (initialize_low_arch): New function.
13224 * linux-m32r-low.c (tdesc_m32r): Declare.
13225 (m32r_arch_setup): New function.
13226 (m32r_usrregs_info, regs_info): New globals.
13227 (m32r_regs_info): Adjust.
13228 (initialize_low_arch): New function.
13229 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13230 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13231 (tic6x_usrregs_info): Forward declare.
13232 (tic6x_read_description): New function, based on ...
13233 (tic6x_arch_setup): ... this. Reimplement.
13234 (target_regsets): Rename to ...
13235 (tic6x_regsets): ... this, and make static.
13236 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13237 (tic6x_regs_info): New function.
13238 (the_low_target): Adjust.
13239 (initialize_low_arch): New function.
13240 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13241 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13242 (target_regsets): Rename to ...
13243 (xtensa_regsets): ... this, and make static.
13244 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13245 globals.
13246 (xtensa_arch_setup, xtensa_regs_info): New functions.
13247 (the_low_target): Adjust.
13248 (initialize_low_arch): New function.
13249 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13250 (nios2_arch_setup): Set the current process'es tdesc.
13251 (target_regsets): Rename to ...
13252 (nios2_regsets): ... this.
13253 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13254 (nios2_regs_info): New function.
13255 (the_low_target): Adjust.
13256 (initialize_low_arch): New function.
13257 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13258 (aarch64_arch_setup): Set the current process'es tdesc.
13259 (target_regsets): Rename to ...
13260 (aarch64_regsets): ... this.
13261 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13262 (aarch64_regs_info): New function.
13263 (the_low_target): Adjust.
13264 (initialize_low_arch): New function.
13265 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13266 globals.
13267 (target_regsets): Rename to ...
13268 (tile_regsets): ... this.
13269 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13270 (tile_regs_info): New function.
13271 (tile_arch_setup): Set the current process'es tdesc.
13272 (the_low_target): Adjust.
13273 (initialize_low_arch): New function.
13274 * spu-low.c (tdesc_spu): Declare.
13275 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13276 * win32-arm-low.c (tdesc_arm): Declare.
13277 (arm_arch_setup): New function.
13278 (the_low_target): Install arm_arch_setup instead of
13279 init_registers_arm.
13280 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13281 (init_windows_x86): Rename to ...
13282 (i386_arch_setup): ... this. Set `win32_tdesc'.
13283 (the_low_target): Adjust.
13284 * win32-low.c (win32_tdesc): New global.
13285 (child_add_thread): Don't create the thread cache here.
13286 (do_initial_child_stuff): Set the new process'es tdesc.
13287 * win32-low.h (struct target_desc): Forward declare.
13288 (win32_tdesc): Declare.
13289 * lynx-i386-low.c (tdesc_i386): Declare global.
13290 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13291 * lynx-low.c (lynx_tdesc): New global.
13292 (lynx_add_process): Set the new process'es tdesc.
13293 * lynx-low.h (struct target_desc): Forward declare.
13294 (lynx_tdesc): Declare global.
13295 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13296 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13297 * nto-low.c (nto_tdesc): New global.
13298 (do_attach): Set the new process'es tdesc.
13299 * nto-low.h (struct target_desc): Forward declare.
13300 (nto_tdesc): Declare.
13301 * nto-x86-low.c (tdesc_i386): Declare.
13302 (nto_x86_arch_setup): Set `nto_tdesc'.
13303
133042013-06-04 Gary Benson <gbenson@redhat.com>
13305
13306 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13307 to qSupported response when appropriate.
13308 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13309 with nonzero-length annex.
13310 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13311 arguments supplied in annex.
13312
133132013-05-31 Doug Evans <dje@google.com>
13314
13315 PR server/15594
13316 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13317 64 bits in 64-cross-32 environment.
13318
133192013-05-28 Pedro Alves <palves@redhat.com>
13320
13321 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13322 (aarch64-without-fpu.c): Delete rule.
13323 * configure.srv (aarch64*-*-linux*): Remove references to
13324 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13325 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13326 declaration.
13327
133282013-05-24 Pedro Alves <palves@redhat.com>
13329
13330 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13331 instead of strchr/decode_address. Error if the range isn't split
13332 with a ','. Don't assume there's be a ':' in the action.
13333
133342013-05-23 Yao Qi <yao@codesourcery.com>
13335 Pedro Alves <palves@redhat.com>
13336
13337 * linux-low.c (lwp_in_step_range): New function.
13338 (linux_wait_1): If the thread was range stepping and stopped
13339 outside the stepping range, report the stop to GDB. Otherwise,
13340 continue stepping. Add range stepping debug output.
13341 (linux_set_resume_request): Copy the step range from the resume
13342 request to the lwp.
13343 (linux_supports_range_stepping): New.
13344 (linux_target_ops) <supports_range_stepping>: Set to
13345 linux_supports_range_stepping.
13346 * linux-low.h (struct linux_target_ops)
13347 <supports_range_stepping>: New field.
13348 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13349 * linux-x86-low.c (x86_supports_range_stepping): New.
13350 (the_low_target) <supports_range_stepping>: Set to
13351 x86_supports_range_stepping.
13352 * server.c (handle_v_cont): Handle 'r' action.
13353 (handle_v_requests): Append ";r" if the target supports range
13354 stepping.
13355 * target.h (struct thread_resume) <step_range_start,
13356 step_range_end>: New fields.
13357 (struct target_ops) <supports_range_stepping>:
13358 New field.
13359 (target_supports_range_stepping): New macro.
13360
133612013-05-17 Joel Brobecker <brobecker@adacore.com>
13362
13363 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13364 confusion in comment.
13365
133662013-05-17 Joel Brobecker <brobecker@adacore.com>
13367
13368 * lynx-low.c (struct process_info_private): New type.
13369 (lynx_add_process): New function.
13370 (lynx_create_inferior, lynx_attach): Replace calls to
13371 add_process by calls to lynx_add_process.
13372 (lynx_resume): If PTID is null, then try using
13373 current_process()->private->last_wait_event_ptid.
13374 Add comments.
13375 (lynx_clear_inferiors): Delete. The contents of that function
13376 has been inlined in lynx_mourn;
13377 (lynx_wait_1): Save the ptid in the process's private data.
13378 (lynx_mourn): Free the process' private data. Replace call
13379 to lynx_clear_inferiors by call to clear_inferiors.
13380
133812013-05-17 Yao Qi <yao@codesourcery.com>
13382
13383 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13384 the right place.
13385
133862013-05-16 Luis Machado <lgustavo@codesourcery.com>
13387
13388 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13389 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13390 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13391 PT_TEXT_END_ADDR guards. Update comments.
13392 (linux_target_op) <read_offsets>: Conditionally define to
13393 linux_read_offsets if the target is UCLIBC and if it defines
13394 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13395
133962013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13397 Andrew Jenner <andrew@codesourcery.com>
13398
13399 * Makefile.in (SFILES): Add linux-nios2-low.c.
13400 (clean): Add action to delete nios2-linux.c.
13401 (nios2-linux.c): New rule.
13402 * configure.srv: Add nios2*-*-linux*.
13403 * linux-nios2-low.c: New.
13404
134052013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13406
13407 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13408
134092013-04-25 Hui Zhu <hui@codesourcery.com>
13410
13411 PR gdb/15186
13412 * ax.c (ax_printf): Add fflush.
13413
134142013-04-22 Tom Tromey <tromey@redhat.com>
13415
13416 * Makefile.in (SFILES): Add filestuff.c.
13417 (OBS): Add filestuff.o.
13418 (filestuff.o): New target.
13419 * config.in, configure: Rebuild.
13420 * configure.ac: Check for fdwalk, pipe2.
13421
134222013-04-17 Pedro Alves <palves@redhat.com>
13423
13424 * configure.ac (USE_THREAD_DB): Delete variable.
13425 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13426 Don't AC_SUBST USE_THREAD_DB.
13427 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13428 * config.in, configure: Regenerate.
13429
134302013-04-16 Pedro Alves <palves@redhat.com>
13431
13432 * linux-low.h (struct lwp_info) <thread_known>: Move under
13433 the USE_THREAD_DB #ifdef.
13434
134352013-04-16 Pedro Alves <palves@redhat.com>
13436
13437 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13438 (linux-low.o): Delete rule.
13439 * linux-low.h: Always include "gdb_thread_db.h" instead of
13440 conditionally including thread_db.h.
13441 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13442 HAVE_THREAD_DB_H.
13443
134442013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13445
13446 * Makefile.in (install-only): Fix make install regression.
13447
134482013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13449
13450 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13451 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13452 installation.
13453 * gdbserver.1: Remove.
13454
134552013-03-22 Pedro Alves <palves@redhat.com>
13456
13457 * linux-low.c (handle_extended_wait): Don't call
13458 linux_enable_event_reporting.
13459
134602013-03-15 Tony Theodore <tonyt@logyst.com>
13461
13462 PR build/9098:
13463 * Makefile.in (SHELL): Use @SHELL@.
13464
134652013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13466
13467 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13468 compiler warning.
13469
134702013-03-13 Joel Brobecker <brobecker@adacore.com>
13471
13472 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13473 Remove extraneous NULL element.
13474
134752013-03-13 Yao Qi <yao@codesourcery.com>
13476
13477 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13478 'V' block in trace frame.
13479
134802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13481
13482 * target.h (struct target_ops): Add btrace ops.
13483 (target_supports_btrace): New macro.
13484 (target_enable_btrace): New macro.
13485 (target_disable_btrace): New macro.
13486 (target_read_btrace): New macro.
13487 * gdbthread.h (struct thread_info): Add btrace field.
13488 * server.c: Include btrace-common.h.
13489 (handle_btrace_general_set): New function.
13490 (handle_btrace_enable): New function.
13491 (handle_btrace_disable): New function.
13492 (handle_general_set): Call handle_btrace_general_set.
13493 (handle_qxfer_btrace): New function.
13494 (struct qxfer qxfer_packets[]): Add btrace entry.
13495 * inferiors.c (remove_thread): Disable btrace.
13496 * linux-low: Include linux-btrace.h.
13497 (linux_low_enable_btrace): New function.
13498 (linux_low_read_btrace): New function.
13499 (linux_target_ops): Add btrace ops.
13500 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13501 Add srv_linux_btrace=yes.
13502 (x86_64-*-linux*): Add linux-btrace.o.
13503 Add srv_linux_btrace=yes.
13504 * configure.ac: Define HAVE_LINUX_BTRACE.
13505 * config.in: Regenerated.
13506 * configure: Regenerated.
13507
135082013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13509
13510 * server.c (handle_qxfer): Preserve error message if -3 is
13511 returned.
13512 (qxfer): Document the -3 return value.
13513
135142013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13515
13516 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13517 (linux_btrace_h): New variable.
13518 (linux-btrace.o): New rule.
13519
135202013-03-08 Stan Shebs <stan@codesourcery.com>
13521 Hafiz Abid Qadeer <abidh@codesourcery.com>
13522
13523 * tracepoint.c (trace_buffer_size): New global.
13524 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13525 (init_trace_buffer): Change to one-argument function. Allocate
13526 trace buffer memory.
13527 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13528 handle QTBuffer:size packet.
13529 (cmd_bigqtbuffer_size): New function.
13530 (initialize_tracepoint): Call init_trace_buffer with
13531 DEFAULT_TRACE_BUFFER_SIZE.
13532 * server.c (handle_query): Add QTBuffer:size in the
13533 supported packets.
13534
135352013-03-07 Yao Qi <yao@codesourcery.com>
13536
13537 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13538 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13539 of -1.
13540 (cmd_qtsp): Adjust condition. Do post increment.
13541 Set cur_action and cur_step_action back to 0.
13542
135432013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13544
13545 PR server/15236
13546 * linux-low.c (linux_write_memory): Return early success if LEN is
13547 zero.
13548
135492013-03-05 Corinna Vinschen <vinschen@redhat.de>
13550
13551 * configure.srv: Add x86_64-*-cygwin* as target.
13552
135532013-02-28 Tom Tromey <tromey@redhat.com>
13554
13555 * configure.ac: Invoke AC_SYS_LARGEFILE.
13556 * configure, config.in: Rebuild.
13557
135582013-02-28 Corinna Vinschen <vinschen@redhat.com>
13559
13560 * win32-low.c: Throughout, fix format strings and casts of
13561 printf-like functions to avoid type related warnings on all
13562 platforms.
13563 (get_child_debug_event): Print dwDebugEventCode as hex since
13564 that's how it's usually documented.
13565
135662013-02-28 Yao Qi <yao@codesourcery.com>
13567
13568 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13569 pulongest.
13570
135712013-02-27 Jiong Wang <jiwang@tilera.com>
13572
13573 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13574 (reg-tilegx32.c): New rule.
13575 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13576 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13577 different register info initializer according to elf class.
13578 (init_registers_tilgx32): New function. The tilegx32 register info
13579 initializer.
13580 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13581 (tile_store_gregset): Likewise.
13582
135832013-02-27 Yao Qi <yao@codesourcery.com>
13584
13585 * server.c (process_point_options): Print debug message when
13586 debug_threads is true.
13587
135882013-02-26 Yao Qi <yao@codesourcery.com>
13589
13590 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13591
135922013-02-19 Pedro Alves <palves@redhat.com>
13593 Kai Tietz <ktietz@redhat.com>
13594
13595 PR gdb/15161
13596
13597 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13598 instead of strtoul to extract address from packet.
13599 (process_serial_event) <'z'>: Likewise.
13600
136012013-02-18 Yao Qi <yao@codesourcery.com>
13602
13603 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13604
136052013-02-14 Pedro Alves <palves@redhat.com>
13606
13607 Plug memory leak.
13608
13609 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13610 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13611
136122013-02-14 Pedro Alves <palves@redhat.com>
13613
13614 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13615
136162013-02-14 Pedro Alves <palves@redhat.com>
13617
13618 * tracepoint.c (save_string): Delete.
13619 (add_tracepoint_action): Use savestring instead of save_string.
13620
136212013-02-12 Pedro Alves <palves@redhat.com>
13622
13623 * linux-xtensa-low.c: Ditto.
13624 * xtensa-xtregs.c: Ditto.
13625
136262013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13627
13628 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13629 thread_db.
13630
136312013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13632
13633 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13634 aarch64_num_wp_regs and aarch64_num_bp_regs to
13635 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13636
136372013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13638
13639 * linux-aarch64-low.c (ps_get_thread_area): Replace
13640 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13641
136422013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13643 Marcus Shawcroft <marcus.shawcroft@arm.com>
13644 Nigel Stephens <nigel.stephens@arm.com>
13645 Yufeng Zhang <yufeng.zhang@arm.com>
13646
13647 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13648 (aarch64.c, aarch64-without-fpu.c): New targets.
13649 * configure.srv (aarch64*-*-linux*): New.
13650 * linux-aarch64-low.c: New file.
13651
136522013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13653
13654 * linux-low.c (handle_extended_wait, linux_create_inferior)
13655 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13656 (dequeue_one_deferred_signal, linux_resume_one_thread)
13657 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13658 (linux_tracefork_grandchild, linux_test_for_tracefork)
13659 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13660 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13661 where the argument is 0.
13662
136632013-01-25 Yao Qi <yao@codesourcery.com>
13664
13665 * event-loop.c: Include "queue.h".
13666 (gdb_event_p): New typedef.
13667 (struct gdb_event) <next_event>: Remove.
13668 (event_queue): Change to QUEUE(gdb_event_p).
13669 (async_queue_event): Remove.
13670 (gdb_event_xfree): New.
13671 (initialize_event_loop): New.
13672 (process_event): Use API from QUEUE.
13673 (wait_for_event): Likewise.
13674 * server.c (main): Call initialize_event_loop.
13675 * server.h (initialize_event_loop): Declare.
13676
136772013-01-18 Yao Qi <yao@codesourcery.com>
13678
13679 * ax.h (struct eval_agent_expr_context): New.
13680 (gdb_eval_agent_expr): Update declaration.
13681 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13682 TFRAME. Add new argument CTX.
13683 * server.h (struct eval_agent_expr_context): Declare.
13684 (agent_mem_read, agent_tsv_read): Update declaration.
13685 (agent_mem_read_string): Likewise.
13686 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13687 (add_traceframe_block): Add new argument TPOINT.
13688 Increase TPOINT->traceframe_usage.
13689 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13690 eval_tracepoint_agent_expr.
13691 (condition_true_at_tracepoint): Likewise.
13692 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13693 (agent_mem_read_string, agent_tsv_read): Likewise.
13694
136952013-01-16 Yao Qi <yao@codesourcery.com>
13696
13697 * linux-low.c (linux_resume_one_lwp): Don't check
13698 'lwp->bp_reinsert != 0'.
13699
137002013-01-07 Joel Brobecker <brobecker@adacore.com>
13701 Pedro Alves <palves@redhat.com>
13702
13703 * lynx-low.c (ptrace_request_to_str): Define a temporary
13704 macro and use it to simplify this function's implementation.
13705
137062013-01-07 Joel Brobecker <brobecker@adacore.com>
13707
13708 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13709 sets errno.
13710
137112013-01-07 Joel Brobecker <brobecker@adacore.com>
13712
13713 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13714
137152013-01-07 Joel Brobecker <brobecker@adacore.com>
13716
13717 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13718
137192013-01-07 Joel Brobecker <brobecker@adacore.com>
13720
13721 * lynx-low.c (lynx_resume): Use the resume_info parameter
13722 to determine the ptid for the lynx_ptrace call, unless
13723 it is equal to minus_one_ptid, in which case we use the
13724 ptid of the current_inferior.
13725 (lynx_wait_1): After having received a thread create/exit
13726 event, resume the inferior's execution using the signaling
13727 thread's ptid, rather than the old ptid.
13728
137292013-01-07 Joel Brobecker <brobecker@adacore.com>
13730
13731 * lynx-low.c (lynx_resume): Delete variable ret.
13732
137332013-01-01 Joel Brobecker <brobecker@adacore.com>
13734
13735 * gdbreplay.c (gdbreplay_version): Update copyright year.
13736 * server.c (gdbserver_version): Likewise.
13737
137382012-12-17 Joel Brobecker <brobecker@adacore.com>
13739
13740 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13741 new thread.
13742
137432012-12-17 Joel Brobecker <brobecker@adacore.com>
13744
13745 * lynx-low.c (ptrace_request_to_str): Add handling for
13746 PTRACE_GETTRACESIG.
13747
137482012-12-17 Joel Brobecker <brobecker@adacore.com>
13749
13750 * lynx-low.c (lynx_attach): Delete variable new_process.
13751
137522012-12-17 Joel Brobecker <brobecker@adacore.com>
13753
13754 * lynx-low.c (lynx_create_inferior): Delete variable
13755 new_process.
13756
137572012-12-17 Joel Brobecker <brobecker@adacore.com>
13758
13759 * lynx-low.c (ptrace_request_to_str): Do not handle
13760 PTRACE_GETTHREADLIST if this macro does not exist.
13761
137622012-12-15 Yao Qi <yao@codesourcery.com>
13763
13764 * Makefile.in (OBS): Add notif.o.
13765 * notif.c, notif.h: New.
13766 * server.c: Include "notif.h".
13767 (struct vstop_notif) <next>: Remove.
13768 <base>: New field.
13769 (queue_stop_reply): Update.
13770 (push_event, send_next_stop_reply): Remove.
13771 (discard_queued_stop_replies): Update.
13772 (notif_stop): New variable.
13773 (handle_v_stopped): Remove.
13774 (handle_v_requests): Don't call handle_v_stopped. Call
13775 handle_ack_notif instead.
13776 (queue_stop_reply_callback): Call notif_event_enque instead
13777 of queue_stop_reply.
13778 (handle_status): Don't call send_next_stop_reply, call
13779 notif_write_event instead.
13780 (kill_inferior_callback): Likewise.
13781 (detach_or_kill_inferior_callback): Likewise.
13782 (main): Call initialize_notif.
13783 (process_serial_event): Call QUEUE_is_empty.
13784 (handle_target_event): Call notif_push instead of push event.
13785 * server.h (push_event): Remove declaration.
13786
137872012-12-10 Tom Tromey <tromey@redhat.com>
13788
13789 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
13790 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
13791 macros.
13792 (.c.o): Rewrite.
13793 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
13794 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
13795 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
13796 (amd64-linux-ipa.o, ax.o): Rewrite.
13797 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
13798 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
13799 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
13800 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
13801 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
13802 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
13803 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
13804 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
13805 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
13806 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
13807 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
13808 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
13809 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
13810 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
13811 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
13812 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
13813 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
13814 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
13815 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
13816 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
13817 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
13818 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
13819 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
13820 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
13821 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
13822 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
13823 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
13824 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
13825 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
13826 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
13827 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
13828 (reg-tilegx.o): Remove.
13829 (all_object_files): New macro.
13830 Include .deps files.
13831 * aclocal.m4, configure: Rebuild.
13832 * acinclude.m4: Include depstand.m4, lead-dot.m4.
13833 * configure.ac: Invoke ZW_CREATE_DEPDIR,
13834 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
13835
138362012-12-05 Tom Tromey <tromey@redhat.com>
13837
13838 PR gdb/14917:
13839 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
13840
138412012-11-28 Markus Metzger <markus.t.metzger@intel.com>
13842
13843 * configure.ac: Check for linux/perf_event.h.
13844 * config.in: Regenerated.
13845 * configure: Regenerated.
13846
138472012-11-26 Maxime Villard <rustyBSD@gmx.fr>
13848
13849 * hostio.c (handle_readlink): Decrease buffer size
13850 parameter passed to readlink by one byte.
13851
138522012-11-26 Yao Qi <yao@codesourcery.com>
13853
13854 * configure.ac (build_warnings): Append '-Wempty-body'.
13855 * configure: Regenerated.
13856 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
13857 body.
13858
138592012-11-15 Pierre Muller <muller@sourceware.org>
13860
13861 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
13862 * config.in: Regenerate.
13863 * configure: Regenerate.
13864 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
13865 Use "gdb_wait.h" header instead of <sys/wait.h> header.
13866 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13867 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
13868 header.
13869 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
13870 instead of <sys/wait.h> header.
13871 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13872
138732012-11-13 Markus Metzger <markus.t.metzger@intel.com>
13874
13875 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
13876 (various make rules): Remove -DGDBSERVER
13877
138782012-11-09 Yao Qi <yao@codesourcery.com>
13879
13880 * spu-low.c (current_ptid): Move it to ..
13881 * gdbthread.h: ... here. New.
13882 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
13883 * server.c (myresume, process_serial_event): Likewise.
13884 * thread-db.c (thread_db_find_new_threads): Likewise.
13885 * tracepoint.c (run_inferior_command): Likewise.
13886
138872012-10-01 Andrew Burgess <aburgess@broadcom.com>
13888
13889 * server.c (handle_search_memory_1): Include access length in
13890 warning message.
13891
138922012-09-05 Michael Brandt <michael.brandt@axis.com>
13893
13894 * linux-crisv32-low.c: Fix compile errors.
13895
138962012-09-04 Yao Qi <yao@codesourcery.com>
13897
13898 * tracepoint.c (cmd_qtsv): Adjust debug message.
13899 Don't check CUR_TPOINT.
13900
139012012-08-28 Yao Qi <yao@codesourcery.com>
13902
13903 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
13904 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
13905 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
13906 Remove declarations of xmalloc, xreallloc, xstrdup and
13907 freeargv.
13908 * Makefile.in (libiberty_h): New.
13909 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
13910 (linux-bfin-low.o): Append dependency 'libiberty.h'.
13911
139122012-08-23 Yao Qi <yao@codesourcery.com>
13913
13914 * server.h: Remove declaration of 'xsnprintf'.
13915
139162012-08-22 Keith Seitz <keiths@redhat.com>
13917
13918 * server.h: Include build-gnulib-gbserver/config.h.
13919 * gdbreplay.c: Likewise.
13920
139212012-08-08 Doug Evans <dje@google.com>
13922
13923 * Makefile.in (SFILES): Add gdb_vecs.c.
13924 (OBS): Add gdb_vecs.o.
13925 (gdb_vecs_h, host_defs_h): New variables.
13926 (thread-db.o): Add $(gdb_vecs_h) dependency.
13927 (gdb_vecs.o): New rule.
13928 * thread-db.c: #include "gdb_vecs.h".
13929 (thread_db_load_search): Use a vector to iterate over path elements.
13930 Handle text appearing after "$pdir".
13931
13932 * configure.ac: Add check for strstr.
13933 * config.in: Regenerate.
13934 * configure: Regenerate.
13935
139362012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
13937
13938 * hostio.c (handle_pread): If pread fails, fall back to attempting
13939 lseek/read.
13940 (handle_pwrite): Likewise for pwrite.
13941
139422012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
13943
13944 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
13945 between unsupported TYPE and unimplementable ADDR/LEN combination.
13946 (arm_insert_point): Act on new return value.
13947
139482012-07-31 Pedro Alves <palves@redhat.com>
13949
13950 * server.c (process_point_options): Only skip tokens if we find
13951 one that is unrecognized. Don't treat 'X' specially while
13952 skipping unrecognized tokens.
13953
139542012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
13955
13956 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
13957 to 4-byte-align HW breakpoint addresses for Thumb.
13958
139592012-07-27 Yao Qi <yao@codesourcery.com>
13960
13961 PR remote/14161.
13962
13963 * server.h: Declare gdb_agent_about_to_close.
13964 * target.c (kill_inferior): Include "agent.h".
13965 New. Send command 'kill'.
13966 * target.h (kill_inferior): Removed macro.
13967 * tracepoint.c (gdb_agent_about_to_close): New.
13968 (gdb_agent_helper_thread): Handle command 'close'.
13969 Wait endlessly until the inferior stops.
13970 Install gdb_agent_remove_socket to atexit hook.
13971 (agent_socket_name): New static variable.
13972 (gdb_agent_socket_init): Replace local variable 'name' with
13973 'agent_socket_name'.
13974 (gdb_agent_remove_socket): New.
13975
139762012-07-27 Yao Qi <yao@codesourcery.com>
13977
13978 * server.c (process_point_options): Stop at 'X' when parsing.
13979
139802012-07-19 Michael Eager <eager@eagercon.com>
13981
13982 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
13983 to hw_execute.
13984 * linux-x86-low.c (x86_insert_point, x86_remove_point):
13985 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
13986 hardware breakpoint.
13987
139882012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13989
13990 * gdbserver/linux-low.c (initialize_low): Call
13991 linux_ptrace_init_warnings.
13992
139932012-07-02 Doug Evans <dje@google.com>
13994
13995 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
13996 pointer to int.
13997
139982012-07-02 Stan Shebs <stan@codesourcery.com>
13999
14000 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14001 (ax.o): Add it to build rule.
14002 (ax-ipa.o): Ditto.
14003 (OBS): Add format.o.
14004 (IPA_OBS): Add format.o.
14005 * server.c (handle_query): Claim support for breakpoint commands.
14006 (process_point_options): Add command case.
14007 (process_serial_event): Leave running if there are printfs in
14008 effect.
14009 * mem-break.h (any_persistent_commands): Declare.
14010 (add_breakpoint_commands): Declare.
14011 (gdb_no_commands_at_breakpoint): Declare.
14012 (run_breakpoint_commands): Declare.
14013 * mem-break.c (struct point_command_list): New struct.
14014 (struct breakpoint): New field command_list.
14015 (any_persistent_commands): New function.
14016 (add_commands_to_breakpoint): New function.
14017 (add_breakpoint_commands): New function.
14018 (gdb_no_commands_at_breakpoint): New function.
14019 (run_breakpoint_commands): New function.
14020 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14021 locally.
14022 * ax.c: Include format.h.
14023 (ax_printf): New function.
14024 (gdb_eval_agent_expr): Add printf opcode.
14025
140262012-06-13 Yao Qi <yao@codesourcery.com>
14027
14028 * server.c (start_inferior): Remove duplicated writes to fields
14029 'last_resume_kind' and 'last_status' of 'current_inferior'.
14030
140312012-06-12 Yao Qi <yao@codesourcery.com>
14032 Pedro Alves <palves@redhat.com>
14033
14034 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14035 comment.
14036 * server.c (handle_v_cont): Extend comment.
14037
140382012-06-11 Yao Qi <yao@codesourcery.com>
14039
14040 * linux-low.c (linux_attach): Add 'static'.
14041
140422012-06-06 Yao Qi <yao@codesourcery.com>
14043
14044 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14045
140462012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14047
14048 Fix gcc -flto compilation warning.
14049 * server.c (main): Make variable multi_mode and attach volatile.
14050
140512012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14052
14053 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14054 if the platform doesn't know about it.
14055
140562012-05-30 Jeff Kenton <jkenton@tilera.com>
14057
14058 * Makefile.in (SFILES): Add linux-tile-low.c.
14059 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14060 * configure.srv: Handle tilegx-*-linux*.
14061 * linux-tile-low.c: New file.
14062
140632012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14064
14065 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14066
140672012-05-24 Pedro Alves <palves@redhat.com>
14068
14069 PR gdb/7205
14070
14071 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14072
140732012-05-24 Pedro Alves <palves@redhat.com>
14074
14075 PR gdb/7205
14076
14077 Replace target_signal with gdb_signal throughout.
14078
140792012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14080
14081 * linux-low.c (linux_store_registers): Avoid the copying sequence
14082 when no data has been retrieved by ptrace.
14083
140842012-05-22 Will Deacon <will.deacon@arm.com>
14085
14086 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14087 Include asm/ptrace.h.
14088 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14089 already defined.
14090
140912012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14092
14093 * linux-low.c (linux_store_registers): Don't re-retrieve data
14094 with ptrace that has already been obtained from /proc. Always
14095 copy any data retrieved with ptrace to the buffer supplied.
14096
140972012-05-11 Yao Qi <yao@codesourcery.com>
14098 Pedro Alves <palves@redhat.com>
14099
14100 * linux-low.c (enum stopping_threads_kind): New.
14101 (stopping_threads): Change type to `enum stopping_threads_kind'.
14102 (handle_extended_wait): If stopping and suspending threads, leave
14103 the new_lwp suspended too.
14104 (linux_wait_for_event): Adjust.
14105 (stop_all_lwps): Set `stopping_threads' to
14106 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14107 whether we're suspending threads or just stopping them. Assert no
14108 recursion happens.
14109
141102012-04-29 Yao Qi <yao@codesourcery.com>
14111
14112 * server.h: Move some code to ...
14113 * gdbthread.h: ... here. New.
14114 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14115 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14116 (nto-low.o, win32-low.o): Likewise.
14117 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14118 * regcache.c, remote-utils.c, server.c: Likewise.
14119 * target.c, tracepoint.c, win32-low.c: Likewise.
14120
141212012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14122
14123 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14124 (PTRACE_ARG4_TYPE): Likewise.
14125 (PTRACE_XFER_TYPE): Likewise.
14126 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14127 ptrace to PTRACE_ARG3_TYPE.
14128 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14129 (PTRACE_ARG4_TYPE): Likewise.
14130 (PTRACE_XFER_TYPE): Likewise.
14131 (linux_detach_one_lwp): Cast fourth argument of
14132 ptrace to long then PTRACE_ARG4_TYPE.
14133 (regsets_fetch_inferior_registers): Cast third argument of
14134 ptrace to long then PTRACE_ARG3_TYPE.
14135 (regsets_store_inferior_registers): Likewise.
14136
141372012-04-20 Pedro Alves <palves@redhat.com>
14138
14139 * configure: Regenerate.
14140
141412012-04-19 Pedro Alves <palves@redhat.com>
14142
14143 * Makefile.in (GNULIB_BUILDDIR): New.
14144 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14145 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14146 (all, install-only, uninstall, clean-info, all-lib, clean): No
14147 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14148 (maintainer-clean realclean distclean): Use subdir_do.
14149 (subdir_do): New.
14150 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14151 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14152 * acinclude.m4: Include acx_configure_dir.m4.
14153 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14154 calls. Call AC_PROG_RANLIB. Configure gnulib using
14155 ACX_CONFIGURE_DIR.
14156 (GNULIB): New.
14157 (GNULIB_STDINT_H): Adjust.
14158 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14159 * gdbreplay.c: Include build-gnulib/config.h.
14160 * server.h: Likewise.
14161 * aclocal.m4: Regenerate.
14162 * config.in: Regenerate.
14163 * configure: Regenerate.
14164
141652012-04-19 Pedro Alves <palves@redhat.com>
14166
14167 * Makefile.in (LIBGNU, INCGNU): Adjust.
14168 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14169 (all, install-only, uninstall, clean-info, all-lib, clean)
14170 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14171 * configure.ac: Adjust AC_OUTPUT output.
14172 * aclocal.m4: Regenerate.
14173 * configure: Regenerate.
14174
141752012-04-19 Pedro Alves <palves@redhat.com>
14176
14177 * Makefile.in (generated_files): New.
14178 (server_h): Remove the explicit dependency on config.h, and depend
14179 on $generated_files.
14180
141812012-04-19 Pedro Alves <palves@redhat.com>
14182
14183 * Makefile.in (INCGNU): Add -Ignulib.
14184
141852012-04-19 Pedro Alves <palves@redhat.com>
14186
14187 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14188 (INCGNU): ... this, and spell out -I here.
14189 (GNULIB_LIB): Rename to ...
14190 (LIBGNU): ... this.
14191 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14192
141932012-04-19 Pedro Alves <palves@redhat.com>
14194
14195 * config.in: Regenerate.
14196
141972012-04-19 Pedro Alves <palves@redhat.com>
14198
14199 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14200 * server.h (memmem): Remove declaration.
14201 * config.in: Regenerate.
14202 * configure: Regenerate.
14203
142042012-04-19 Yao Qi <yao@codesourcery.com>
14205
14206 * Makefile.in (SFILES): Add common/vec.c.
14207 (OBS): Add vec.o.
14208 (vec.o): New rule.
14209
142102012-04-19 Yao Qi <yao@codesourcery.com>
14211
14212 * remote-utils.c (prepare_resume_reply): Replace with macro
14213 target_core_of_thread.
14214 * server.c (handle_qxfer_threads_proper): Likewise.
14215 * target.h (traget_core_of_thread): New macro.
14216
142172012-04-18 Pedro Alves <palves@redhat.com>
14218
14219 * aclocal.m4: Regenerate.
14220 * configure: Regenerate.
14221
142222012-04-16 Yao Qi <yao@codesourcery.com>
14223
14224 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14225 duplicated on address.
14226
142272012-04-16 Yao Qi <yao@codesourcery.com>
14228
14229 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14230 (struct tracepoint_action_ops) <send>: New field.
14231 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14232 (agent_expr_send, x_tracepoint_action_send): New.
14233 (l_tracepoint_action_send): New.
14234 (cmd_qtdp): Download and install tracepoint
14235 according to `use_agent'.
14236 (run_inferior_command): Add one more parameter `len'.
14237 Update callers.
14238 (tracepoint_send_agent): New.
14239 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14240
142412012-04-16 Yao Qi <yao@codesourcery.com>
14242
14243 * tracepoint.c (download_tracepoints): Moved to ...
14244 (cmd_qtstart): ... here.
14245
142462012-04-14 Yao Qi <yao@codesourcery.com>
14247
14248 * tracepoint.c: Include inttypes.h.
14249 (struct collect_memory_action): Use sized types.
14250 (struct tracepoint): Likewise.
14251 (cmd_qtdp, stop_tracing): Update print specifiers.
14252 (cmd_qtp, response_tracepoint): Likewise.
14253 (collect_data_at_tracepoint): Likewise.
14254 (collect_data_at_step): Likewise.
14255
142562012-04-14 Yao Qi <yao@codesourcery.com>
14257
14258 Import gnulib module inttypes.
14259 * aclocal.m4, config.in, configure: Regenerated.
14260
142612012-04-14 Yao Qi <yao@codesourcery.com>
14262
14263 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14264 Makefile and config.status at last.
14265
142662012-04-13 Yao Qi <yao@codesourcery.com>
14267
14268 * tracepoint.c: Include stdint.h unconditionally.
14269
142702012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14271
14272 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14273 on BFD_HAVE_SYS_PROCFS_TYPE.
14274 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14275 * configure: Regenerate.
14276 * config.in: Likewise.
14277
142782012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14279
14280 * Makefile.in (clean): Also remove x32.c x32-linux.c
14281 x32-avx.c x32-avx-linux.c.
14282 (x32.o): New target.
14283 (x32.c): Likewise.
14284 (x32-linux.o): Likewise.
14285 (x32-linux.c): Likewise.
14286 (x32-avx.o): Likewise.
14287 (x32-avx.c): Likewise.
14288 (x32-avx-linux.o): Likewise.
14289 (x32-avx-linux.c): Likewise.
14290
14291 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14292 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14293 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14294 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14295 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14296 i386/x32-avx-linux.xml.
14297
14298 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14299 (init_registers_x32_avx_linux): Likwise.
14300 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14301 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14302
143032012-04-13 Pedro Alves <palves@redhat.com>
14304
14305 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14306 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14307 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14308 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14309 the sub-make.
14310
143112012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14312
14313 * linux-x86-low.c (compat_x32_clock_t): New.
14314 (compat_x32_siginfo_t): Likewise.
14315 (compat_x32_siginfo_from_siginfo): Likewise.
14316 (siginfo_from_compat_x32_siginfo): Likewise.
14317 (linux_is_elf64): Likewise.
14318 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14319 and siginfo_from_compat_x32_siginfo for x32.
14320 (x86_arch_setup): Set linux_is_elf64.
14321
143222012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14323
14324 PR gdb/13969
14325 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14326 e_machine field.
14327 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14328 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14329 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14330 compatible with process.
14331
143322012-04-12 Yao Qi <yao@codesourcery.com>
14333
14334 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14335 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14336 (install-only, install-info, clean): Handle sub dir gnulib.
14337 (all-lib, am--refresh): New targets.
14338 (memmem.o): Remove target.
14339 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14340 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14341 (AC_REPLACE_FUNCS): Remove memmem.
14342 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14343 (AC_OUTPUT): Generate Makefile in gnulib/.
14344 * aclocal.m4, config.in, configure: Regenerated.
14345
143462012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14347
14348 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14349
143502012-04-05 Pedro Alves <palves@redhat.com>
14351
14352 -Werror=strict-aliasing
14353
14354 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14355 pointer.
14356
143572012-04-04 Pedro Alves <palves@redhat.com>
14358
14359 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14360 (sparc_store_gregset_from_stack, sparc_store_gregset)
14361 (sparc_breakpoint_at): Fix formatting.
14362
143632012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14364
14365 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14366 are available.
14367 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14368 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14369 * config.in: Regenerate.
14370 * configure: Likewise.
14371
143722012-03-29 Pedro Alves <palves@redhat.com>
14373
14374 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14375 Correct ptrace arguments.
14376
143772012-03-28 Pedro Alves <palves@redhat.com>
14378
14379 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14380 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14381 (IA64_FR1_REGNUM): New defines.
14382 (ia64_fetch_register): New.
14383 (the_low_target): Install it.
14384 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14385 field.
14386 * linux-low.c (linux_fetch_registers): Try the
14387 the_low_target.fetch_register hook first.
14388
14389 * linux-arm-low.c (the_low_target): Adjust.
14390 * linux-bfin-low.c (the_low_target): Adjust.
14391 * linux-cris-low.c (the_low_target): Adjust.
14392 * linux-crisv32-low.c (the_low_target): Adjust.
14393 * linux-m32r-low.c (the_low_target): Adjust.
14394 * linux-m68k-low.c (the_low_target): Adjust.
14395 * linux-mips-low.c (the_low_target): Adjust.
14396 * linux-ppc-low.c (the_low_target): Adjust.
14397 * linux-s390-low.c (the_low_target): Adjust.
14398 * linux-sh-low.c (the_low_target): Adjust.
14399 * linux-sparc-low.c (the_low_target): Adjust.
14400 * linux-tic6x-low.c (the_low_target): Adjust.
14401 * linux-x86-low.c (the_low_target): Adjust.
14402 * linux-xtensa-low.c (the_low_target): Adjust.
14403
144042012-03-26 Pedro Alves <palves@redhat.com>
14405
14406 * server.c (handle_qxfer_libraries): Don't bail early if
14407 the_target->qxfer_libraries_svr4 is not NULL.
14408
144092012-03-26 Pedro Alves <palves@redhat.com>
14410
14411 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14412
144132012-03-23 Pedro Alves <palves@redhat.com>
14414
14415 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14416 "library-list-svr4" element's start tag when the the DSO list is
14417 empty.
14418
144192012-03-23 Pedro Alves <palves@redhat.com>
14420
14421 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14422 a variable whose type size is the same as the inferior's pointer
14423 size.
14424
144252012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14426
14427 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14428 struct siginfo.
14429 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14430 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14431 * linux-low.h: Include <signal.h>.
14432 (struct siginfo): Remove forward declaration.
14433 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14434 struct siginfo.
14435
144362012-03-21 Mike Frysinger <vapier@gentoo.org>
14437
14438 * .gitignore: Ignore more files.
14439
144402012-03-19 Pedro Alves <palves@redhat.com>
14441 Jan Kratochvil <jan.kratochvil@redhat.com>
14442
14443 * server.c (cont_thread, general_thread): Add describing comments.
14444 (start_inferior): Clear `cont_thread'.
14445 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14446 of a process.
14447
144482012-03-15 Yao Qi <yao@codesourcery.com>
14449
14450 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14451 handling to ...
14452 (cmd_qtdp): ... here.
14453
144542012-03-15 Yao Qi <yao@codesourcery.com>
14455
14456 * tracepoint.c (struct tracepoint_action_ops): New.
14457 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14458 (m_tracepoint_action_download): New.
14459 (r_tracepoint_action_download): New.
14460 (x_tracepoint_action_download): New.
14461 (l_tracepoint_action_download): New.
14462 (add_tracepoint_action): Install `action->ops' according type.
14463 (download_tracepoint_1): Move code `download' function pointer
14464 of various tracepoint_action_ops.
14465
144662012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14467
14468 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14469 linux_ptrace_attach_warnings.
14470
144712012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14472
14473 * Makefile.in (linux-ptrace.o): New.
14474 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14475 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14476 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14477 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14478 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14479 of these targets.
14480 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14481
144822012-03-08 Yao Qi <yao@codesourcery.com>
14483 Pedro Alves <palves@redhat.com>
14484
14485 Fix PR server/13392.
14486 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14487 offset of JMP insn.
14488 * tracepoint.c (remove_tracepoint): New.
14489 (cmd_qtdp): Call remove_tracepoint when failed to install.
14490
144912012-03-07 Pedro Alves <palves@redhat.com>
14492
14493 * linux-low.c (get_detach_signal): New.
14494 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14495 Pass on pending signals to PTRACE_DETACH. Check the result of the
14496 ptrace call.
14497 * server.c (program_signals, program_signals_p): New.
14498 (handle_general_set): Handle QProgramSignals.
14499 * server.h (program_signals, program_signals_p): Declare.
14500
145012012-03-05 Pedro Alves <palves@redhat.com>
14502 Jan Kratochvil <jan.kratochvil@redhat.com>
14503
14504 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14505 New comment why.
14506
145072012-03-03 Yao Qi <yao@codesourcery.com>
14508
14509 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14510 agent_look_up_symbols.
14511
145122012-03-03 Yao Qi <yao@codesourcery.com>
14513
14514 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14515 (linux-x86-low.o): Likewise.
14516 * server.h: Remove in_process_agent_loaded.
14517 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14518 common/agent.c.
14519 Update callers.
14520
145212012-03-03 Yao Qi <yao@codesourcery.com>
14522
14523 * tracepoint.c (gdb_agent_capability): New global.
14524 (in_process_agent_loaded_ust): Renamed to
14525 `in_process_agent_supports_ust'.
14526 Update callers.
14527 (in_process_agent_supports_ust): Call agent_capability_check.
14528 (clear_installed_tracepoints): Assert that agent supports
14529 agent.
14530
145312012-03-03 Yao Qi <yao@codesourcery.com>
14532
14533 * linux-low.c (linux_supports_agent): New.
14534 (linux_target_ops): Initialize field `supports_agent' with
14535 linux_supports_agent.
14536 * target.h (struct target_ops) <supports_agent>: New.
14537 (target_supports_agent): New macro.
14538 * server.c (handle_general_set): Handle packet 'QAgent'.
14539 (handle_query): Send `QAgent+'.
14540 * Makefile.in (server.o): Depends on agent.h.
14541
145422012-03-03 Yao Qi <yao@codesourcery.com>
14543
14544 * Makefile.in (OBS): Add agent.o.
14545 Add new rule for agent.o.
14546 Track dependence of tracepoint.c on agent.h.
14547 * tracepoint.c (run_inferior_command_1):
14548 (run_inferior_command): Call agent_run_command.
14549 (gdb_ust_connect_sync_socket): Deleted. Move it to
14550 common/agent.c.
14551 (resume_thread, stop_thread): Likewise.
14552 (gdb_ust_socket_init): Renamed to ...
14553 (gdb_agent_socket_init): ... New.
14554 (gdb_ust_thread): Renamed to ...
14555 (gdb_agent_helper_thread): ... New.
14556 (gdb_ust_init): Move some code to ...
14557 (gdb_agent_init): ... here. New.
14558 [HAVE_UST]: Call gdb_ust_init.
14559 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14560 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14561 * config.in, configure: Regenerated.
14562
145632012-03-02 Pedro Alves <palves@redhat.com>
14564
14565 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14566 * linux-low.c (struct simple_pid_list): New.
14567 (stopped_pids): New a struct simple_pid_list pointer.
14568 (add_to_pid_list, pull_pid_from_list): New.
14569 (handle_extended_wait): Don't assume the first signal new children
14570 report is SIGSTOP. Adjust call to pull_pid_from_list.
14571 (linux_wait_for_lwp): Adjust.
14572
145732012-03-02 Yao Qi <yao@codesourcery.com>
14574
14575 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14576 debug log.
14577
145782012-03-02 Yao Qi <yao@codesourcery.com>
14579
14580 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14581 `stop_pc' and `tpoint'. Update caller.
14582
145832012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14584
14585 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14586 * linux-low.c (use_linux_regsets): New macro.
14587 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14588 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14589 (linux_register_in_regsets): New function.
14590 (usr_fetch_inferior_registers): Skip registers covered by
14591 regsets.
14592 (usr_store_inferior_registers): Likewise.
14593 (usr_fetch_inferior_registers): New macro.
14594 (usr_store_inferior_registers): Likewise.
14595 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14596 (linux_store_registers): Likewise.
14597 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14598 prototype.
14599 (init_registers_mips64_dsp_linux): Likewise.
14600 (init_registers_mips_linux): New macro.
14601 (init_registers_mips_dsp_linux): Likewise.
14602 (mips_dsp_num_regs): Likewise.
14603 (DSP_BASE, DSP_CONTROL): New fallback macros.
14604 (mips_base_regs): New macro.
14605 (mips_regmap): Use it. Fix the size.
14606 (mips_dsp_regmap): New variable.
14607 (mips_dsp_regset_bitmap): Likewise.
14608 (mips_arch_setup): New function.
14609 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14610 than mips_regmap.
14611 (mips_cannot_store_register): Likewise.
14612 (the_low_target): Update .arch_setup, .num_regs and .regmap
14613 initializers. Add .regset_bitmap initializer.
14614 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14615 initializer.
14616 * linux-bfin-low.c (the_low_target): Likewise.
14617 * linux-cris-low.c (the_low_target): Likewise.
14618 * linux-crisv32-low.c (the_low_target): Likewise.
14619 * linux-ia64-low.c (the_low_target): Likewise.
14620 * linux-m32r-low.c (the_low_target): Likewise.
14621 * linux-m68k-low.c (the_low_target): Likewise.
14622 * linux-ppc-low.c (the_low_target): Likewise.
14623 * linux-s390-low.c (the_low_target): Likewise.
14624 * linux-sh-low.c (the_low_target): Likewise.
14625 * linux-sparc-low.c (the_low_target): Likewise.
14626 * linux-tic6x-low.c (the_low_target): Likewise.
14627 * linux-x86-low.c (the_low_target): Likewise.
14628 * linux-xtensa-low.c (the_low_target): Likewise.
14629 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14630 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14631 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14632 srv_xmlfiles.
14633 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14634 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14635
146362012-02-29 Yao Qi <yao@codesourcery.com>
14637 Pedro Alves <palves@redhat.com>
14638
14639 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14640 `step_over_finished' is true.
14641
146422012-02-27 Pedro Alves <palves@redhat.com>
14643
14644 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14645 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14646
146472012-02-27 Pedro Alves <palves@redhat.com>
14648
14649 PR server/9684
14650 * linux-low.c (pid_is_stopped): New.
14651 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14652
146532012-02-25 Luis Machado <lgustavo@codesourcery.com>
14654
14655 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14656 of conditions.
14657
146582012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14659
14660 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14661
146622012-02-24 Luis Machado <lgustavo@codesourcery>
14663
14664 * server.c (handle_query): Advertise support for target-side
14665 breakpoint condition evaluation.
14666 (process_point_options): New function.
14667 (process_serial_event): When inserting a breakpoint, check for
14668 a target-side condition that should be evaluated.
14669
14670 * mem-break.c: Include regcache.h and ax.h.
14671 (point_cond_list_t): New data structure.
14672 (breakpoint) <cond_list>: New field.
14673 (find_gdb_breakpoint_at): Make non-static.
14674 (delete_gdb_breakpoint_at): Clear any target-side
14675 conditions.
14676 (clear_gdb_breakpoint_conditions): New function.
14677 (add_condition_to_breakpoint): Likewise.
14678 (add_breakpoint_condition): Likewise.
14679 (gdb_condition_true_at_breakpoint): Likewise.
14680 (gdb_breakpoint_here): Return result directly instead
14681 of going through a local variable.
14682
14683 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14684 (clear_gdb_breakpoint_conditions): Likewise.
14685 (add_breakpoint_condition): Likewise.
14686 (gdb_condition_true_at_breakpoint): Likewise.
14687
14688 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14689 (need_step_over_p): Take target-side breakpoint condition into
14690 consideration.
14691
146922012-02-24 Luis Machado <lgustavo@codesourcery>
14693
14694 * server.h: Include tracepoint.h.
14695 (agent_mem_read, agent_get_trace_state_variable_value,
14696 agent_set_trace_state_variable_value,
14697 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14698 get_set_tsv_func_addr): New prototypes.
14699
14700 * ax.h: New include file.
14701 * ax.c: New source file.
14702
14703 * tracepoint.c: Include ax.h.
14704 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14705 agent_expr, eval_result_type): Move to ax.h.
14706 (parse_agent_expr): Rename to ...
14707 (gdb_parse_agent_expr): ... this, make it non-static and move
14708 to ax.h.
14709 (unparse_agent_expr) Rename to ...
14710 (gdb_unparse_agent_expr): ... this, make it non-static and move
14711 to ax.h.
14712 (eval_agent_expr): Rename to ...
14713 (eval_tracepoint_agent_expr): ... this.
14714 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14715 forward declarations.
14716 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14717 (agent_get_trace_state_variable_value): New function.
14718 (agent_set_trace_state_variable_value): New function.
14719 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14720 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14721 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14722 (condition_true_at_tracepoint): Likewise.
14723 (parse_agent_expr): Rename to ...
14724 (gdb_parse_agent_expr): ... this and move to ax.c.
14725 (unparse_agent_expr): Rename to ...
14726 (gdb_unparse_agent_expr): ... this and move to ax.c.
14727 (gdb_agent_op_name): Move to ax.c.
14728 (eval_agent_expr): Rename to ...
14729 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14730 and move to ax.c.
14731 (eval_tracepoint_agent_expr): New function.
14732 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14733 non-static.
14734 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14735 ax.c.
14736 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14737 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14738 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14739 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14740 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14741 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14742 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14743 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14744 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14745 (compile_bytecodes): Remove forward declaration.
14746 (is_goto_target): Move to ax.c.
14747 (compile_bytecodes): Move to ax.c and call
14748 agent_get_trace_state_variable_value (...) and
14749 agent_set_trace_state_variable_value (...).
14750
14751 * Makefile.in: Update ax.c and IPA dependencies.
14752
147532012-02-24 Pedro Alves <palves@redhat.com>
14754
14755 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14756 (cmd_bigqtbuffer_circular): ... this. Only handle
14757 'QTBuffer:circular:'.
14758 (handle_tracepoint_general_set): Adjust.
14759
147602012-02-16 Yao Qi <yao@codesourcery.com>
14761
14762 * inferiors.c: Move code to ...
14763 * dll.c: .... here. New.
14764 * server.h: Declare clear_dlls.
14765 * Makefile.in (SFILES): Add dll.c.
14766 (OBS): Add dll.o
14767 (dll.o): New rule.
14768
147692012-02-11 Yao Qi <yao@codesourcery.com>
14770
14771 * server.c: (handle_monitor_command): Add a new parameter
14772 `own_buf'.
14773 (handle_query): Update caller.
14774
147752012-02-09 Joel Brobecker <brobecker@adacore.com>
14776
14777 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14778 * configure, config.in: Regenerate.
14779 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14780 is not defined.
14781
147822012-02-02 Pedro Alves <palves@redhat.com>
14783
14784 Try SIGKILL first, then PTRACE_KILL.
14785 * linux-low.c (linux_kill_one_lwp): New.
14786 (linux_kill_one_lwp): Rename to ...
14787 (kill_one_lwp_callback): ... this. Use the new
14788 linux_kill_one_lwp.
14789
147902012-02-02 Pedro Alves <palves@redhat.com>
14791
14792 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
14793 inferior.
14794
147952012-01-27 Pedro Alves <palves@redhat.com>
14796
14797 * linux-low.c (linux_child_pid_to_exec_file): Delete.
14798 (elf_64_file_p): Make static.
14799 (linux_pid_exe_is_elf_64_file): New.
14800 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
14801 Delete declarations.
14802 (linux_pid_exe_is_elf_64_file): Declare.
14803 * linux-x86-low.c (x86_arch_setup): Use
14804 linux_pid_exe_is_elf_64_file.
14805
148062012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14807
14808 * linux-low.c (linux_wait_for_event_1): Rename to ...
14809 (linux_wait_for_event): ... here and merge it with former
14810 linux_wait_for_event - new variable wait_ptid, use it.
14811 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
14812
148132012-01-23 Pedro Alves <palves@redhat.com>
14814
14815 * server.c (main): Avoid yet another case of infinite loop while
14816 detaching/killing after a longjmp.
14817
148182012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14819
14820 Code cleanup.
14821 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
14822
148232012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
14824
14825 * hostio.c (handle_readlink): New function.
14826 (handle_vFile): Call it to handle "vFile:readlink" packets.
14827
148282012-01-20 Pedro Alves <palves@redhat.com>
14829 Ulrich Weigand <ulrich.weigand@linaro.org>
14830
14831 * server.c (handle_v_requests): Only support vAttach and vRun to
14832 start multiple processes when in extended protocol mode.
14833
148342012-01-17 Pedro Alves <palves@redhat.com>
14835
14836 * tracepoint.c (initialize_tracepoint): Use mmap instead of
14837 memalign plus mprotect to allocate the scratch buffer.
14838
148392012-01-13 Pedro Alves <palves@redhat.com>
14840
14841 * server.c (attach_inferior): Clear `cont_thread'.
14842
148432012-01-13 Pedro Alves <palves@redhat.com>
14844
14845 * server.c (main): Avoid infinite loop while detaching/killing
14846 after a longjmp.
14847
148482012-01-09 Doug Evans <dje@google.com>
14849
14850 * server.c (start_inferior): Set last_ptid in --wrapper case.
14851
148522012-01-06 Yao Qi <yao@codesourcery.com>
14853
14854 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
14855 defined.
14856 [IN_PROCESS_AGENT] (debug_agent): New global variable.
14857
148582012-01-04 Yao Qi <yao@codesourcery.com>
14859
14860 * tracepoint.c (cmd_qtdp): Print debug message
14861 for static tracepoint.
14862
148632012-01-04 Yao Qi <yao@codesourcery.com>
14864
14865 * tracepoint.c (trace_vdebug): Differentiate debug message
14866 between gdbserver and IPA.
14867
148682012-01-03 Yao Qi <yao@codesourcery.com>
14869
14870 * tracepoint.c (tracepoint_was_hit): Don't collect for
14871 static tracepoint.
14872
148732012-01-02 Joel Brobecker <brobecker@adacore.com>
14874
14875 * terminal.h: Reformat copyright header.
14876
148772012-01-02 Joel Brobecker <brobecker@adacore.com>
14878
14879 * server.c (gdbserver_version): Update copyright year.
14880 * gdbreplay.c (gdbreplay_version): Likewise.
14881
148822011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
14883
14884 * linux-low.c (linux_create_inferior): Put empty if clause for write.
14885
14886 Revert:
14887 2011-12-18 Hui Zhu <teawater@gmail.com>
14888 * linux-low.c (linux_create_inferior): Save return value to ret.
14889
148902011-12-18 Hui Zhu <teawater@gmail.com>
14891
14892 * linux-low.c (linux_create_inferior): Save return value to ret.
14893
148942011-12-16 Doug Evans <dje@google.com>
14895
14896 * linux-low.c (linux_create_inferior): If stdio connection,
14897 redirect stdin from /dev/null, stdout to stderr.
14898 * remote-utils.c (remote_is_stdio): New static global.
14899 (remote_connection_is_stdio): New function.
14900 (remote_prepare): Handle stdio connection.
14901 (remote_open): Ditto.
14902 (remote_close): Don't close stdin for stdio connections.
14903 (read_prim,write_prim): New functions. Replace all calls to
14904 read/write to these.
14905 * server.c (main): Watch for "-" argument. Move call to
14906 remote_prepare before start_inferior.
14907 * server.h (STDIO_CONNECTION_NAME): New macro.
14908 (remote_connection_is_stdio): Declare.
14909
14910 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
14911 in debugging output.
14912
149132011-12-15 Yao Qi <yao@codesourcery.com>
14914
14915 * tracepoint.c: Include sys/syscall.h.
14916 (gdb_ust_thread): Remove preprocessor conditional.
14917
149182011-12-14 Pedro Alves <pedro@codesourcery.com>
14919
14920 * linux-low.c (linux_detach_one_lwp): Call
14921 the_low_target.prepare_to_resume before detaching.
14922
149232011-12-14 Yao Qi <yao@codesourcery.com>
14924
14925 * tracepoint.c (gdb_ust_thread): Don't ignore return value
14926 of write.
14927
149282011-12-14 Yao Qi <yao@codesourcery.com>
14929
14930 * i386-low.c (i386_low_stopped_data_address): Initialize local
14931 variable `control'.
14932
149332011-12-13 Pedro Alves <pedro@codesourcery.com>
14934
14935 PR remote/13492
14936
14937 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
14938 DR_CONTROL unless necessary. Extend comments.
14939 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
14940 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
14941
149422011-12-13 Yao Qi <yao@codesourcery.com>
14943
14944 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
14945 macros.
14946 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
14947
149482011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
14949
14950 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
14951 Print new debug message for such case.
14952
149532011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14954
14955 Fix overlapping memcpy.
14956 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
14957 the read_inferior_memory transfer.
14958 (delete_fast_tracepoint_jump): New variable buf. Use it for the
14959 write_inferior_memory transfer.
14960 (set_fast_tracepoint_jump): New variable buf. Use it for the
14961 read_inferior_memory and write_inferior_memory transfers.
14962 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
14963 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
14964 Use it for the write_inferior_memory transfer.
14965 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
14966 buffers.
14967
149682011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14969
14970 * linux-low.c (fetch_register, store_register): Make code
14971 consistent, fix formatting.
14972
149732011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14974
14975 * linux-low.c (usr_store_inferior_registers): Factor out code
14976 to handle individual registers into...
14977 (store_register): ... this new function.
14978
149792011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
14980
14981 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
14982 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
14983 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
14984 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
14985 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
14986 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
14987 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
14988 (srv_xmlfiles): Add new XML files.
14989
14990 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
14991 and <sys/uio.h>.
14992 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
14993 (init_registers_s390_linux32v1): Add prototype.
14994 (init_registers_s390_linux32v2): Likewise.
14995 (init_registers_s390_linux64v1): Likewise.
14996 (init_registers_s390_linux64v2): Likewise.
14997 (init_registers_s390x_linux64v1): Likewise.
14998 (init_registers_s390x_linux64v2): Likewise.
14999 (s390_num_regs): Increment to 52.
15000 (s390_regmap): Add orig_r2 register.
15001 (s390_num_regs_3264): Increment to 68.
15002 (s390_regmap_3264): Add orig_r2 register.
15003 (s390_collect_ptrace_register): Handle orig_r2 register.
15004 (s390_supply_ptrace_register): Likewise.
15005 (s390_fill_last_break): New function.
15006 (s390_store_last_break): Likewise.
15007 (s390_fill_system_call): New function.
15008 (s390_store_system_call): Likewise.
15009 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15010 register sets.
15011 (s390_check_regset): New function.
15012 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15013 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15014 Update target_regsets for available register sets.
15015
150162011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15017 Jan Kratochvil <jan.kratochvil@redhat.com>
15018
15019 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15020 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15021 New.
15022 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15023 * linux-low.h (struct process_info_private): New member r_debug.
15024 * server.c (handle_qxfer_libraries): Call
15025 the_target->qxfer_libraries_svr4.
15026 (handle_qxfer_libraries_svr4): New function.
15027 (qxfer_packets): New entry "libraries-svr4".
15028 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15029 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15030 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15031 PACKET_qXfer_libraries_svr4.
15032
150332011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15034
15035 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15036 PSW address/mask between 8-byte and 16-byte formats.
15037 (s390_supply_ptrace_register): Likewise.
15038 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15039 basic addressing mode bit.
15040
150412011-11-24 Stan Shebs <stan@codesourcery.com>
15042
15043 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15044
150452011-11-17 Stan Shebs <stan@codesourcery.com>
15046
15047 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15048 (tracing_start_time): New global.
15049 (tracing_stop_time): New global.
15050 (tracing_user_name): New global.
15051 (tracing_notes): New global.
15052 (tracing_stop_note): New global.
15053 (cmd_qtstart): Set traceframe_usage, start_time.
15054 (stop_tracing): Set stop_time.
15055 (cmd_qtstatus): Report additional status.
15056 (cmd_qtp): New function.
15057 (handle_tracepoint_query): Call it.
15058 (cmd_qtnotes): New function.
15059 (handle_tracepoint_general_set): Call it.
15060 (get_timestamp): Rename from tsv_get_timestamp.
15061
150622011-11-14 Stan Shebs <stan@codesourcery.com>
15063 Kwok Cheung Yeung <kcy@codesourcery.com>
15064
15065 * linux-x86-low.c (small_jump_insn): New.
15066 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15067 trampoline and error message, build a trampoline and issue a small
15068 jump instruction to it.
15069 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15070 trampoline and error message.
15071 (x86_get_min_fast_tracepoint_insn_len): New.
15072 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15073 * linux-low.h (struct linux_target_ops): Add arguments to
15074 install_fast_tracepoint_jump_pad operation, add new operation.
15075 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15076 arguments.
15077 (linux_get_min_fast_tracepoint_insn_len): New function.
15078 (linux_target_op): Add new operation.
15079 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15080 (gdb_trampoline_buffer_end): Ditto.
15081 (gdb_trampoline_buffer_error): Ditto.
15082 (struct ipa_sym_addresses): Add fields for new IPA variables.
15083 (symbol_list): Add entries for new IPA variables.
15084 (struct tracepoint): Add fields to hold the address range of the
15085 trampoline used by the tracepoint.
15086 (trampoline_buffer_head): New static variable.
15087 (trampoline_buffer_tail): Ditto.
15088 (claim_trampoline_space): New function.
15089 (have_fast_tracepoint_trampoline_buffer): New function.
15090 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15091 structure.
15092 (install_fast_tracepoint): Ditto, also add error buffer argument.
15093 (cmd_qtminftpilen): New function.
15094 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15095 (fast_tracepoint_from_trampoline_address): New function.
15096 (fast_tracepoint_collecting): Handle trampoline as part of jump
15097 pad space.
15098 (set_trampoline_buffer_space): New function.
15099 (initialize_tracepoint): Initialize new IPA variables.
15100 * target.h (struct target_ops): Add arguments to
15101 install_fast_tracepoint_jump_pad operation, add new
15102 get_min_fast_tracepoint_insn_len operation.
15103 (target_get_min_fast_tracepoint_insn_len): New.
15104 (install_fast_tracepoint_jump_pad): Add arguments.
15105 * server.h (IPA_BUFSIZ): Define.
15106 * linux-i386-ipa.c: Include extra header files.
15107 (initialize_fast_tracepoint_trampoline_buffer): New function.
15108 (initialize_low_tracepoint): Call it.
15109 * server.h (set_trampoline_buffer_space): Declare.
15110 (claim_trampoline_space): Ditto.
15111 (have_fast_tracepoint_trampoline_buffer): Ditto.
15112
151132011-11-14 Yao Qi <yao@codesourcery.com>
15114
15115 * server.c (handle_query): Handle InstallInTrace for qSupported.
15116 * tracepoint.c (add_tracepoint): Sort list.
15117 (install_tracepoint, download_tracepoint): New.
15118 (cmd_qtdp): Call them to install and download tracepoints.
15119 (sort_tracepoints): Removed.
15120 (cmd_qtstart): Update.
15121
151222011-11-14 Yao Qi <yao@codesourcery.com>
15123
15124 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15125 * mem-break.h: Declare.
15126 * tracepoint.c (cmd_qtstart): Move some code to ...
15127 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15128 New.
15129 (download_tracepoints): Move some code to ...
15130 (download_tracepoint_1): ... here. New.
15131
151322011-11-08 Yao Qi <yao@codesourcery.com>
15133
15134 * remote-utils.c (relocate_instruction): A comment fix.
15135
151362011-11-07 Joel Brobecker <brobecker@adacore.com>
15137
15138 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15139 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15140 dr_status_mirror and dr_control_mirror from debug_reg_state.
15141 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15142 (i386_initial_stuff): Remove use of deleted globals.
15143 (i386_get_thread_context, i386_set_thread_context,
15144 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15145 from debug_reg_state.
15146
151472011-11-05 Yao Qi <yao@codesourcery.com>
15148
15149 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15150 address as TPOINT's.
15151
151522011-11-02 Stan Shebs <stan@codesourcery.com>
15153
15154 * tracepoint.c (agent_mem_read_string): New function.
15155 (eval_agent_expr): Call it for tracenz.
15156 * server.c (handle_query): Report support for tracenz.
15157
151582011-11-02 Yao Qi <yao@codesourcery.com>
15159
15160 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15161
151622011-11-02 Yao Qi <yao@codesourcery.com>
15163
15164 * target.h: Fix a typo in comment.
15165
151662011-10-31 Pedro Alves <pedro@codesourcery.com>
15167
15168 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15169 clobber the breakpoints' shadows with fast tracepoint jumps.
15170 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15171 * target.c (write_inferior_memory): Also pass MYADDR down to
15172 check_mem_write.
15173
151742011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15175
15176 * configure.ac: Check support for personality routine.
15177 * configure: Regenerate.
15178 * config.in: Likewise.
15179 * linux-low.c: Include <sys/personality.h>.
15180 Define ADDR_NO_RANDOMIZE if necessary.
15181 (linux_create_inferior): Disable address space randomization when
15182 forking inferior, if requested.
15183 (linux_supports_disable_randomization): New function.
15184 (linux_target_ops): Install it.
15185 * server.h (disable_randomization): Declare.
15186 * server.c (disable_randomization): New global variable.
15187 (handle_general_set): Handle QDisableRandomization.
15188 (handle_query): Likewise for qSupported.
15189 (main): Support --disable-randomization and --no-disable-randomization
15190 command line arguments.
15191 * target.h (struct target_ops): Add supports_disable_randomization.
15192 (target_supports_disable_randomization): New macro.
15193
151942011-09-29 Mike Frysinger <vapier@gentoo.org>
15195
15196 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15197 ifdef check.
15198 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15199 [!PT_GETDSBT] (target_loadmap): New definition.
15200 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15201 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15202 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15203 and PT_GETDSBT to LINUX_LOADMAP.
15204 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15205 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15206
152072011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15208
15209 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15210 (arm_linux_hwbp_cap): New static variable.
15211 (arm_linux_get_hwbp_cap): Replace by ...
15212 (arm_linux_init_hwbp_cap): ... this new function.
15213 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15214 (arm_linux_get_hw_watchpoint_count): Likewise.
15215 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15216 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15217 (arm_prepare_to_resume): Use perror_with_name instead of error.
15218
152192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15220
15221 * linux-arm-low.c: Include <signal.h>.
15222 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15223 (struct arm_linux_hwbp_cap): New data type.
15224 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15225 (struct arm_linux_hw_breakpoint): New data type.
15226 (MAX_BPTS, MAX_WPTS): Define.
15227 (struct arch_process_info, struct arch_lwp_info): New data types.
15228 (arm_linux_get_hwbp_cap): New function.
15229 (arm_linux_get_hw_breakpoint_count): Likewise.
15230 (arm_linux_get_hw_watchpoint_count): Likewise.
15231 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15232 (arm_hwbp_control_initialize): Likewise.
15233 (arm_hwbp_control_is_enabled): Likewise.
15234 (arm_hwbp_control_is_initialized): Likewise.
15235 (arm_hwbp_control_disable): Likewise.
15236 (arm_linux_hw_breakpoint_equal): Likewise.
15237 (arm_linux_hw_point_initialize): Likewise.
15238 (struct update_registers_data): New data structure.
15239 (update_registers_callback: New function.
15240 (arm_insert_point): Likewise.
15241 (arm_remove_point): Likewise.
15242 (arm_stopped_by_watchpoint): Likewise.
15243 (arm_stopped_data_address): Likewise.
15244 (arm_new_process): Likewise.
15245 (arm_new_thread): Likewise.
15246 (arm_prepare_to_resume): Likewise.
15247 (the_low_target): Register arm_insert_point, arm_remove_point,
15248 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15249 arm_new_thread, and arm_prepare_to_resume.
15250
152512011-09-15 Stan Shebs <stan@codesourcery.com>
15252
15253 * server.h (struct emit_ops): Add compare-goto fields.
15254 * tracepoint.c (gdb_agent_op_sizes): New table.
15255 (emit_eq_goto): New function.
15256 (emit_ne_goto): New function.
15257 (emit_lt_goto): New function.
15258 (emit_le_goto): New function.
15259 (emit_gt_goto): New function.
15260 (emit_ge_goto): New function.
15261 (is_goto_target): New function.
15262 (compile_bytecodes): Recognize special cases of compare-goto
15263 combinations and call specialized emitters for them.
15264 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15265 (amd64_emit_ne_goto): New function.
15266 (amd64_emit_lt_goto): New function.
15267 (amd64_emit_le_goto): New function.
15268 (amd64_emit_gt_goto): New function.
15269 (amd64_emit_ge_goto): New function.
15270 (amd64_emit_ops): Add the new functions.
15271 (i386_emit_eq_goto): New function.
15272 (i386_emit_ne_goto): New function.
15273 (i386_emit_lt_goto): New function.
15274 (i386_emit_le_goto): New function.
15275 (i386_emit_gt_goto): New function.
15276 (i386_emit_ge_goto): New function.
15277 (i386_emit_ops): Add the new functions.
15278
152792011-09-08 Stan Shebs <stan@codesourcery.com>
15280
15281 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15282 (i386_emit_epilogue): Restore %ebx.
15283
152842011-08-31 Jie Zhang <jzhang918@gmail.com>
15285
15286 * server.c (step_thread): Remove definition.
15287 (process_serial_event): Don't handle Hs.
15288 * server.h (step_thread): Remove declaration.
15289 * target.c (set_desired_inferior): Remove use of step_thread.
15290
152912011-08-24 Luis Machado <lgustavo@codesourcery.com>
15292
15293 * linux-low.c: Include linux-procfs.h.
15294 (linux_attach_lwp_1): Update comments.
15295 (linux_attach): Scan for existing threads when attaching to a
15296 process that is the tgid.
15297 * Makefile.in: Update dependencies.
15298
152992011-08-24 Luis Machado <lgustavo@codesourcery.com>
15300
15301 * configure.srv: Add linux-procfs.o dependencies.
15302
153032011-08-14 Yao Qi <yao@codesourcery.com>
15304
15305 * target.h (struct target_ops): Fix indent.
15306 * win32-low.c (win32_target_ops): Fix comment.
15307
153082011-08-14 Andrew Jenner <andrew@codesourcery.com>
15309 Yao Qi <yao@codesourcery.com>
15310
15311 * Makefile.in (clean): Remove tic6x-*.c files.
15312 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15313 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15314 (tic6x-c64xp-linux.c): Likewise.
15315 * configure.srv: Add support for tic6x-*-uclinux.
15316 * linux-tic6x-low.c: New.
15317 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15318
153192011-08-14 Andrew Stubbs <ams@codesourcery.com>
15320 Yao Qi <yao@codesourcery.com>
15321
15322 * target.h (struct target_ops): Add read_loadmap.
15323 * linux-low.c (struct target_loadseg): New type.
15324 (struct target_loadmap): New type.
15325 (linux_read_loadmap): New function.
15326 (linux_target_ops): Add linux_read_loadmap.
15327 * server.c (handle_query): Support qXfer:fdpic:read packet.
15328 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15329 to NULL.
15330
153312011-08-05 Eli Zaretskii <eliz@gnu.org>
15332
15333 * win32-low.c: Include <stdint.h>.
15334
153352011-07-22 Pedro Alves <pedro@codesourcery.com>
15336
15337 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15338 to the inferior here.
15339 (i386_remove_aligned_watchpoint): Ditto.
15340 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15341 fit part of the watchpoint in the debug registers.
15342 (i386_update_inferior_debug_regs): New.
15343 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15344 registers, and only update the inferior on success.
15345 (i386_low_remove_watchpoint): Ditto.
15346
153472011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15348
15349 * linux-low.c (compare_ints, unique, list_threads, show_process,
15350 linux_core_of_thread): Delete.
15351 (linux_target_ops): Change linux_core_of_thread to
15352 linux_common_core_of_thread.
15353 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15354 * utils.c (malloc_failure): Change type of argument.
15355 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15356 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15357 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15358 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15359 (IPA_OBJS): Add common-utils-ipa.o.
15360 (ptid_h, linux_osdata_h): New macros.
15361 (server_h): Add common/common-utils.h, common/xml-utils.h,
15362 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15363 common/ptid.h.
15364 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15365 ptid.o, buffer.o): New rules.
15366 (linux-low.o): Add common/linux-osdata.h as a dependency.
15367 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15368 * configure.ac: Add AC_HEADER_DIRENT check.
15369 * config.in: Regenerate.
15370 * configure: Regenerate.
15371 * remote-utils.c (xml_escape_text): Delete.
15372 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15373 buffer_xml_printf): Move to common/buffer.c.
15374 * server.c (main): Remove call to initialize_inferiors.
15375 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15376 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15377 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15378 internal_error, gdb_assert, gdb_assert_fail): Delete.
15379 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15380 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15381 common/buffer.h.
15382 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15383 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15384 initialize_inferiors): Delete.
15385
153862011-07-20 Pedro Alves <pedro@codesourcery.com>
15387
15388 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15389 symbol error.
15390
153912011-05-31 Pedro Alves <pedro@codesourcery.com>
15392
15393 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15394 assertion.
15395 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15396
153972011-05-26 Yao Qi <yao@codesourcery.com>
15398
15399 * Makefile.in (thread-db.o): Track dependence to
15400 common/gdb_thread_db.h.
15401 * thread-db.c: include gdb_thread_db.h from right place.
15402
154032011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15404
15405 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15406 __FILE__ and __LINE__ to internal_error.
15407
154082011-05-13 Doug Evans <dje@google.com>
15409
15410 * thread-db.c (try_thread_db_load_from_sdir): New function.
15411 (try_thread_db_load_from_dir): New function.
15412 (thread_db_load_search): Handle $sdir, ignore $pdir.
15413 Remove trying of system directories if search of
15414 libthread-db-search-path fails, that is now done via $sdir.
15415
154162011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15417
15418 * server.c (handle_query): Add EnableDisableTracepoints to the list
15419 of supported features.
15420 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15421 tracepoints.
15422 (cmd_qtenable_disable): New.
15423 (cmd_qtstart): Install tracepoints even if disabled.
15424 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15425 receiving a QTEnable or QTDisable packet.
15426 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15427 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15428 tracepoints.
15429 (gdb_probe): Skip data collection if static tracepoint is disabled.
15430
154312011-05-10 Doug Evans <dje@google.com>
15432
15433 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15434
154352011-05-04 Doug Evans <dje@google.com>
15436
15437 * linux-low.c (linux_join): Skip process lookup.
15438 * spu-low.c (spu_join): Ditto.
15439 * server.c (join_inferiors_callback): Delete.
15440 (process_serial_event): For 'D' packet (detach) call join_inferior
15441 directly.
15442
154432011-05-04 Joseph Myers <joseph@codesourcery.com>
15444
15445 * README: Don't mention xscale*-*-linux*.
15446 * configure.srv (xscale*-*-linux*): Don't handle target.
15447
154482011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15449
15450 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15451 casting pointers.
15452 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15453 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15454 (i386_emit_void_call_2): Likewise.
15455
154562011-04-26 Yao Qi <yao@codesourcery.com>
15457
15458 * linux-low.c: Move common macros to linux-ptrace.h.
15459 Include linux-ptrace.h.
15460 * Makefile.in (linux_ptrace_h): New.
15461 (linux-low.o): Depends on linux-ptrace.h.
15462
154632011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15464
15465 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15466 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15467 (remote_prepare): New function with most of the TCP code from ...
15468 (remote_open): ... here. Detect PORT here unconditionally. Move also
15469 setting transport_is_reliable.
15470 * server.c (run_once): New variable.
15471 (gdbserver_usage): Document it.
15472 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15473 the first run if RUN_ONCE.
15474 * server.h (run_once, remote_prepare): New declarations.
15475
154762011-04-19 Tom Tromey <tromey@redhat.com>
15477
15478 * win32-low.c (handle_load_dll): Remove duplicate "the".
15479
154802011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15481
15482 Remove support for old Cygwin 1.5 versions.
15483 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15484 function to avoid warning.
15485 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15486 warning.
15487
154882011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15489
15490 * gdbserver/server.h (Macro _): Define it if not available.
15491
154922011-03-14 Michael Snyder <msnyder@vmware.com>
15493
15494 * hostio.c (handle_close): Remove unnecessary null test.
15495
154962011-03-10 Joel Brobecker <brobecker@adacore.com>
15497
15498 * Makefile.in (maintainer-clean realclean distclean): Remove
15499 "make ... subdir_do" command.
15500
155012011-03-10 Michael Snyder <msnyder@vmware.com>
15502
15503 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15504
15505 * server.c (handle_v_run): Free alloced buffer on early return.
15506
155072011-03-09 Yao Qi <yao@codesourcery.com>
15508
15509 Revert:
15510 2011-03-04 Yao Qi <yao@codesourcery.com>
15511
15512 * Makefile.in: Remove GNU make feature --directory.
15513
15514 2011-03-05 Yao Qi <yao@codesourcery.com>
15515
15516 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15517 (subdir_do): New make target. Copied from gdb/Makefile.
15518 (maintainer-clean, realclean, distclean, clean): Call corresponding
15519 make targets in common/Makefile.
15520
15521 2011-02-11 Yao Qi <yao@codesourcery.com>
15522
15523 * configure.ac: Call AC_PROG_RANLIB.
15524 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15525 * configure: Regenerate.
15526
155272011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15528
15529 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15530
155312011-03-06 Yao Qi <yao@codesourcery.com>
15532
15533 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15534
155352011-03-05 Yao Qi <yao@codesourcery.com>
15536
15537 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15538 (subdir_do): New make target. Copied from gdb/Makefile.
15539 (maintainer-clean, realclean, distclean, clean): Call corresponding
15540 make targets in common/Makefile.
15541
155422011-03-04 Yao Qi <yao@codesourcery.com>
15543
15544 * Makefile.in: Remove GNU make feature --directory.
15545
155462011-03-04 Michael Snyder <msnyder@vmware.com>
15547
15548 * server.c (queue_stop_reply): Call xmalloc not malloc.
15549
155502011-03-02 Michael Snyder <msnyder@vmware.com>
15551
15552 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15553
155542011-02-28 Michael Snyder <msnyder@vmware.com>
15555
15556 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15557 (cmd_qtframe): Ditto.
15558 (cmd_qtbuffer): Ditto.
15559 (cmd_bigqtbuffer): Ditto.
15560
15561 * utils.c (decimal2str): Initialize 'width' to nine, then
15562 don't mess with it.
15563
155642011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15565
15566 * hostio.c (require_data): Free *data, not data.
15567
155682011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15569
15570 * hostio.c (require_data): Use free, not xfree.
15571
155722011-02-27 Michael Snyder <msnyder@vmware.com>
15573
15574 * server.c (handle_query): Discard unused value.
15575
15576 * hostio.c (require_data): Free malloc memory before returning
15577 error.
15578
155792011-02-26 Michael Snyder <msnyder@vmware.com>
15580
15581 * linux-low.c (list_threads): Call closedir for dirent.
15582
155832011-02-27 Michael Snyder <msnyder@vmware.com>
15584
15585 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15586 a case statement falls through.
15587
15588 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15589
15590 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15591 in comparison.
15592
155932011-02-26 Michael Snyder <msnyder@vmware.com>
15594
15595 * utils.c (decimal2str): Eliminate dead code and dead param.
15596 (pulongest): Drop dead param from call to decimal2str.
15597 (plongest): Ditto.
15598
155992011-02-24 Joel Brobecker <brobecker@adacore.com>
15600
15601 Revert the following patch (not approved yet):
15602 2011-02-21 Hui Zhu <teawater@gmail.com>
15603 * tracepoint.c (tp_printf): New function.
15604 (eval_agent_expr): Handle gdb_agent_op_printf.
15605
156062011-02-21 Hui Zhu <teawater@gmail.com>
15607
15608 * tracepoint.c (tp_printf): New function.
15609 (eval_agent_expr): Handle gdb_agent_op_printf.
15610
156112011-02-18 Tom Tromey <tromey@redhat.com>
15612
15613 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15614 (tracepoint.o): Likewise.
15615 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15616 (gdb_agent_op_names): Likewise.
15617
156182011-02-18 Tom Tromey <tromey@redhat.com>
15619
15620 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15621 gdb_agent_op_rot>: New constants.
15622 (gdb_agent_op_names): Add pick and roll.
15623 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15624 cases.
15625
156262011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15627
15628 * aclocal.m4: Regenerated with aclocal-1.11.1.
15629
156302011-02-14 Pedro Alves <pedro@codesourcery.com>
15631
15632 * server.c (handle_qxfer_traceframe_info): New.
15633 (qxfer_packets): Register "traceframe-info".
15634 (handle_query): Report support for qXfer:traceframe-info:read+.
15635 * tracepoint.c (match_blocktype): New.
15636 (traceframe_find_block_type): Rename to ...
15637 (traceframe_walk_blocks): ... this. Add callback filter argument,
15638 and use it.
15639 (traceframe_find_block_type): New, reimplemented on top of
15640 traceframe_walk_blocks.
15641 (build_traceframe_info_xml): New.
15642 (traceframe_read_info): New.
15643 * server.h (traceframe_read_info): Declare.
15644
156452011-02-11 Yao Qi <yao@codesourcery.com>
15646
15647 * configure.ac: Call AC_PROG_RANLIB.
15648 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15649 * configure: Regenerate.
15650
156512011-02-07 Pedro Alves <pedro@codesourcery.com>
15652
15653 * server.c (gdb_read_memory): Change return semantics to allow
15654 partial transfers.
15655 (handle_search_memory_1): Adjust.
15656 (process_serial_event) <'m' packet>: Handle partial transfers.
15657 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15658
156592011-01-28 Pedro Alves <pedro@codesourcery.com>
15660
15661 * regcache.c (init_register_cache): Initialize
15662 regcache->register_status.
15663 (free_register_cache): Release regcache->register_status.
15664 (regcache_cpy): Copy register_status.
15665 (registers_to_string): Print 'x's for unavailable registers.
15666 (supply_register): Mark the register's status valid or
15667 unavailable, depending on whether a buffer was passed in or not.
15668 (supply_register_zeroed): New.
15669 (supply_regblock): Mark the registers' status valid or
15670 unavailable, depending on whether a buffer was passed in or not.
15671 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15672 (struct regcache): New `register_status' field.
15673 (supply_register_zeroed): Declare.
15674 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15675 supply_register_zeroed, rather than passing a NULL buffer to
15676 supply_register.
15677 * tracepoint.c (fetch_traceframe_registers): Update comment.
15678
156792011-01-28 Pedro Alves <pedro@codesourcery.com>
15680
15681 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15682 buffer explicit.
15683
156842011-01-25 Pedro Alves <pedro@codesourcery.com>
15685
15686 * server.h (decode_xfer_write): Change prototype.
15687 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15688 and don't extract the annex here.
15689 * server.c (decode_xfer_read): Remove `annex' parameter,
15690 and don't extract the annex here.
15691 (decode_xfer): New.
15692 (struct qxfer): New.
15693 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15694 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15695 (handle_qxfer_statictrace): New functions, abstracted out from
15696 handle_query, and made to use the struct qxfer interface.
15697 (handle_threads_qxfer_proper): Rename to ...
15698 (handle_qxfer_threads_proper): ... this.
15699 (handle_threads_qxfer): Rename to ...
15700 (handle_qxfer_threads): ... this. Adjust.
15701 (qxfer_packets): New array.
15702 (handle_qxfer): New function.
15703 (handle_query): Use handle_qxfer.
15704
157052011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15706
15707 * gdbreplay.c: Shorten lines of >= 80 columns.
15708 * linux-low.c: Ditto.
15709 * linux-ppc-low.c: Ditto.
15710 * linux-s390-low.c: Ditto.
15711 * linux-sparc-low.c: Ditto.
15712 * linux-x86-low.c: Ditto.
15713 * linux-xtensa-low.c: Ditto.
15714 * mem-break.c: Ditto.
15715 * nto-low.c: Ditto.
15716 * regcache.h: Ditto.
15717 * remote-utils.c: Ditto.
15718 * server.c: Ditto.
15719 * server.h: Ditto.
15720 * thread-db.c: Ditto.
15721 * tracepoint.c: Ditto.
15722 * utils.c: Ditto.
15723 * win32-low.h: Ditto.
15724
157252011-01-05 Joel Brobecker <brobecker@adacore.com>
15726
15727 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15728 update.
15729
157302011-01-01 Joel Brobecker <brobecker@adacore.com>
15731
15732 * server.c (gdbserver_version): Update copyright year in version
15733 output.
15734 * gdbreplay.c (gdbreplay_version): Ditto.
15735
157362010-12-29 Jie Zhang <jie.zhang@analog.com>
15737
15738 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15739 * linux-bfin-low.c: New file.
15740 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15741 PT_DATA_ADDR for BFIN targets.
15742 * Makefile.in (SFILES): Add linux-bfin-low.c.
15743 (clean): Remove reg-bfin.c.
15744 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15745 * README: Mention supported Blackfin targets.
15746
157472010-12-23 Mike Frysinger <vapier@gentoo.org>
15748
15749 * .gitignore: New file.
15750
157512010-11-16 Mike Frysinger <vapier@gentoo.org>
15752
15753 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15754
157552010-10-22 Jie Zhang <jie@codesourcery.com>
15756
15757 * Makefile.in: Add FLAGS_TO_PASS variable.
15758 (install): Remove dependency of install-only and recursively
15759 invoke make for install-only.
15760
157612010-10-04 Doug Evans <dje@google.com>
15762
15763 * Makefile.in (uninstall): Use $(DESTDIR).
15764
157652010-09-24 Pedro Alves <pedro@codesourcery.com>
15766
15767 PR gdb/11842
15768
15769 * linux-x86-low.c (compat_siginfo_from_siginfo)
15770 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15771 si_code is < 0. Check for si_code == SI_TIMER before checking for
15772 si_code < 0.
15773
157742010-09-13 Joel Brobecker <brobecker@adacore.com>
15775
15776 * lynx-i386-low.c: New file.
15777 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15778
157792010-09-13 Joel Brobecker <brobecker@adacore.com>
15780
15781 * lynx-low.c (ptrace_request_to_str): Remove handling for
15782 request values that have been removed in LynxOS 5.x.
15783
157842010-09-13 Joel Brobecker <brobecker@adacore.com>
15785
15786 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15787 <ptrace.h>
15788
157892010-09-09 Nathan Sidwell <nathan@codesourcery.com>
15790
15791 * configure.ac: Add --enable-inprocess-agent option.
15792 * configure: Rebuilt.
15793
157942010-09-06 Yao Qi <yao@codesourcery.com>
15795
15796 * linux-low.c (linux_kill): Remove unused variable.
15797 (linux_stabilize_threads): Likewise.
15798 * server.c (start_inferior): Likewise.
15799 (queue_stop_reply_callback): Likewise.
15800 * tracepoint.c (do_action_at_tracepoint): Likewise.
15801
158022010-09-06 Yao Qi <yao@codesourcery.com>
15803
15804 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
15805 on return.
15806
158072010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15808
15809 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
15810
158112010-09-06 Pedro Alves <pedro@codesourcery.com>
15812
15813 * Makefile.in (install-only): Replace $IPA_DEPFILES with
15814 "$(IPA_DEPFILES)".
15815
158162010-09-01 Joel Brobecker <brobecker@adacore.com>
15817
15818 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
15819 gdbserver/lynx-ppc-low.c: New files.
15820 * Makefile.in (lynx_low_h): New variable.
15821 (lynx-low.o, lynx-ppc-low.o): New rules.
15822 * configure.ac: On LynxOS, link with -lnetinet.
15823 * configure.srv: Add handling of powerpc-*-lynxos* targets.
15824 * configure: regenerate.
15825
158262010-09-01 Joel Brobecker <brobecker@adacore.com>
15827
15828 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
15829 * configure.ac: Add check for vasprintf and vsnprintf.
15830 * configure, config.in: Regenerate.
15831 * server.h (vasprintf, vsnprintf): Add conditional declarations.
15832
158332010-09-01 Joel Brobecker <brobecker@adacore.com>
15834
15835 * gdbreplay.c: Move include of alloca.h up, next to include of
15836 malloc.h.
15837 * server.h: Add include of malloc.h.
15838 * mem-break.c: Remove include of malloc.h.
15839 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
15840
158412010-09-01 Joel Brobecker <brobecker@adacore.com>
15842
15843 * Makefile.in (memmem.o): Build with -Wno-error.
15844
158452010-09-01 Joel Brobecker <brobecker@adacore.com>
15846
15847 * utils.c (xsnprintf): Make non-static.
15848 * server.h: Add xsnprintf declaration.
15849 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
15850 replace calls to snprintf by calls to xsnprintf throughout.
15851
158522010-09-01 Joel Brobecker <brobecker@adacore.com>
15853
15854 * configure.ac: Add configure check for alloca.
15855 * configure, config.in: Regenerate.
15856 * server.h: Include alloca.h if it exists.
15857 * gdbreplay.c: Include alloca.h if it exists.
15858
158592010-08-28 Pedro Alves <pedro@codesourcery.com>
15860
15861 * linux-low.c (__SIGRTMIN): Define if not already defined.
15862 (linux_create_inferior): Check for __ANDROID__ rather than
15863 __SIGRTMIN.
15864 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
15865 are already deferred.
15866 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
15867 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
15868 stopped and already has a pending signal to report.
15869 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
15870 a pending signal to report or is moving out of a jump pad.
15871 (linux_init_signals): Check for __ANDROID__ rather than
15872 __SIGRTMIN.
15873
158742010-08-28 Pedro Alves <pedro@codesourcery.com>
15875
15876 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
15877 debug_threads check. Avoid a linear search when not doing debug
15878 output.
15879
158802010-08-27 Pedro Alves <pedro@codesourcery.com>
15881
15882 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
15883 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
15884 (struct file_handler) <fd>: Change type to gdb_fildes_t.
15885 (process_event): Change local fd's type to gdb_fildes_t.
15886 (create_file_handler): Adjust prototype.
15887 (delete_file_handler): Adjust prototype.
15888 (handle_file_event): Adjust prototype. Use pfildes.
15889 (create_file_event): Adjsut prototype.
15890 * remote-utils.c (remote_desc, listen_desc): Change type to
15891 gdb_fildes_t.
15892 * server.h: New gdb_fildes_t typedef.
15893 [USE_WIN32API]: Include winsock2.h.
15894 (delete_file_handler, add_file_handler): Adjust prototypes.
15895 (pfildes): Declare.
15896 * utils.c (pfildes): New.
15897
158982010-08-27 Pedro Alves <pedro@codesourcery.com>
15899
15900 * configure.ac (build_warnings): Add -Wno-char-subscripts.
15901 * configure: Regenerate.
15902
159032010-08-27 Pedro Alves <pedro@codesourcery.com>
15904
15905 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
15906 (linux_done_accessing_memory): ... this.
15907 (linux_target_ops): Adjust.
15908 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
15909 * nto-low.c (nto_target_ops): Adjust comment.
15910 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
15911 * spu-low.c (spu_target_ops): Adjust comment.
15912 * target.h (target_ops): Rename unprepare_to_access_memory field
15913 to done_accessing_memory.
15914 (unprepare_to_access_memory): Rename to ...
15915 (done_accessing_memory): ... this.
15916
159172010-08-26 Pedro Alves <pedro@codesourcery.com>
15918
15919 * linux-low.c (linux_prepare_to_access_memory): New.
15920 (linux_unprepare_to_access_memory): New.
15921 (linux_target_ops): Install them.
15922 * server.c (read_memory): Rename to ...
15923 (gdb_read_memory): ... this. Use
15924 prepare_to_access_memory/prepare_to_access_memory.
15925 (write_memory): Rename to ...
15926 (gdb_write_memory): ... this. Use
15927 prepare_to_access_memory/prepare_to_access_memory.
15928 (handle_search_memory_1): Adjust.
15929 (process_serial_event): Adjust.
15930 * target.h (struct target_ops): New fields
15931 prepare_to_access_memory and unprepare_to_access_memory.
15932 (prepare_to_access_memory, unprepare_to_access_memory): New.
15933 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
15934 prepare_to_access_memory/prepare_to_access_memory.
15935 * nto-low.c (nto_target_ops): Adjust.
15936 * spu-low.c (spu_target_ops): Adjust.
15937 * win32-low.c (win32_target_ops): Adjust.
15938
159392010-08-26 Pedro Alves <pedro@codesourcery.com>
15940
15941 * Makefile.in (WARN_CFLAGS): Get it from configure.
15942 (WERROR_CFLAGS): New.
15943 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
15944 * configure.ac: Introduce --enable-werror, which adds -Werror to
15945 the compiler command line. Enabled by default. Disable with
15946 --disable-werror. Add -Wdeclaration-after-statement
15947 Wpointer-arith and -Wformat-nonliteral to warning flags.
15948 * configure: Regenerate.
15949
159502010-08-26 Pedro Alves <pedro@codesourcery.com>
15951
15952 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
15953
159542010-08-26 Pedro Alves <pedro@codesourcery.com>
15955
15956 * gdbreplay.c (remote_error): New.
15957 (gdbchar): New.
15958 (expect): Use gdbchar. Check for error reading from GDB.
15959 Clarify sync error output.
15960 (play): Check for errors writing to GDB.
15961 * linux-low.c (sigchld_handler): Really ignore `write' errors.
15962 * remote-utils.c (getpkt): Check for errors writing to the remote
15963 descriptor.
15964
159652010-08-25 Pedro Alves <pedro@codesourcery.com>
15966
15967 * linux-low.c (linux_wait_1): Move non-debugging code out of
15968 `debug_threads' control.
15969
159702010-08-25 Pedro Alves <pedro@codesourcery.com>
15971
15972 * linux-low.c (linux_wait_1): Don't set last_status here.
15973 * server.c (push_event, queue_stop_reply_callback): Assert we're
15974 not pushing a TARGET_WAITKIND_IGNORE event.
15975 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
15976 (myresume, handle_target_event): Set the thread's last_resume_kind
15977 and last_status from the target returned status.
15978
159792010-08-25 Pedro Alves <pedro@codesourcery.com>
15980
15981 PR threads/10729
15982
15983 * linux-x86-low.c (update_debug_registers_callback): New.
15984 (i386_dr_low_set_addr): Use it.
15985 (i386_dr_low_get_addr): New.
15986 (i386_dr_low_set_control): Use update_debug_registers_callback.
15987 (i386_dr_low_get_control): New.
15988 (i386_dr_low_get_status): Adjust.
15989 * linux-low.c (linux_stop_lwp): New.
15990 * linux-low.h (linux_stop_lwp): Declare.
15991
15992 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
15993 argument instead of a i386_debug_reg_state.
15994 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
15995 a i386_debug_reg_state.
15996 (i386_insert_aligned_watchpoint): Adjust.
15997 (i386_remove_aligned_watchpoint): Adjust.
15998 (i386_low_stopped_data_address): Read the debug registers from the
15999 inferior instead of from the mirrors.
16000 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16001 (i386_dr_low_get_addr): Declare.
16002 (i386_dr_low_get_control): Declare.
16003 (i386_dr_low_get_status): Change prototype.
16004
16005 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16006 (i386_dr_low_get_addr): New.
16007 (i386_dr_low_get_control): New.
16008 (i386_dr_low_get_status): Adjust prototype. Return
16009 dr_status_mirror.
16010 (i386_initial_stuff): Clear dr_status_mirror and
16011 dr_control_mirror.
16012 (i386_get_thread_context): Adjust.
16013 (i386_set_thread_context): Adjust.
16014 (i386_thread_added): Adjust.
16015
160162010-08-24 Pedro Alves <pedro@codesourcery.com>
16017
16018 * linux-low.h (linux_thread_area): Delete declaration.
16019
160202010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16021
16022 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16023 after its termination.
16024
160252010-08-09 Pedro Alves <pedro@codesourcery.com>
16026
16027 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16028 (gdb_wants_all_stopped): Delete.
16029 (linux_wait_1): Don't call them.
16030 * server.c (handle_v_cont): Tag all threads as want-stopped.
16031 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16032 stopped as "client-wants-stopped".
16033
160342010-07-31 Pedro Alves <pedro@codesourcery.com>
16035
16036 * Makefile.in (signals_h): New.
16037 (server_h): Depend on it.
16038 (server.o): Don't depend on $(signals_def).
16039 (signals.o): Depend on $(signals_def).
16040
160412010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16042
16043 * Makefile.in (signals_def): New.
16044 (server_h): Append include/gdb/signals.h and signals_def.
16045 (server.o): Append signals_def.
16046
160472010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16048
16049 * server.c (handle_target_event): Use target_signal_to_host for
16050 resume_info.sig initialization.
16051 * target.h (struct thread_resume) <sig>: New comment.
16052
160532010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16054
16055 * server.c (handle_query): strcpy() the returned string from paddress()
16056 instead of sprintf().
16057 * utils.c (paddress): Return phex_nz().
16058
160592010-07-07 Joel Brobecker <brobecker@adacore.com>
16060
16061 * server.c (handle_v_cont): Call mourn_inferior if process
16062 just exited.
16063 (myresume): Likewise.
16064
160652010-07-01 Pedro Alves <pedro@codesourcery.com>
16066
16067 Static tracepoints, and integration with UST.
16068
16069 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16070 * mem-break.c (uninsert_all_breakpoints)
16071 (reinsert_all_breakpoints): New.
16072 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16073 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16074 (gdb_agent_ust_loaded, helper_thread_id)
16075 (gdb_agent_helper_thread_id): New macros.
16076 (struct ipa_sym_addresses): Add addr_ust_loaded,
16077 addr_helper_thread_id, addr_cmd_buf.
16078 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16079 (in_process_agent_loaded_ust): New.
16080 (write_e_ust_not_loaded): New.
16081 (maybe_write_ipa_ust_not_loaded): New.
16082 (struct collect_static_trace_data_action): New.
16083 (enum tracepoint_type) <static_tracepoint>: New.
16084 (struct tracepoint) <handle>: Mention static tracepoints.
16085 (struct static_tracepoint_ctx): New.
16086 (CMD_BUF_SIZE): New.
16087 (add_tracepoint_action): Handle static tracepoint actions.
16088 (unprobe_marker_at): New.
16089 (clear_installed_tracepoints): Handle static tracepoints.
16090 (cmd_qtdp): Handle static tracepoints.
16091 (probe_marker_at): New.
16092 (cmd_qtstart): Handle static tracepoints.
16093 (response_tracepoint): Handle static tracepoints.
16094 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16095 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16096 (get_context_regcache): Handle static tracepoints.
16097 (do_action_at_tracepoint): Handle static tracepoint actions.
16098 (traceframe_find_block_type): Handle static trace data blocks.
16099 (traceframe_read_sdata): New.
16100 (download_tracepoints): Download static tracepoint actions.
16101 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16102 (GDB_PROBE_NAME): New.
16103 (ust_ops): New.
16104 (GET_UST_SYM): New.
16105 (USTF): New.
16106 (dlsym_ust): New.
16107 (ust_marker_to_static_tracepoint): New.
16108 (gdb_probe): New.
16109 (collect_ust_data_at_tracepoint): New.
16110 (gdb_ust_probe): New.
16111 (UNIX_PATH_MAX, SOCK_DIR): New.
16112 (gdb_ust_connect_sync_socket): New.
16113 (resume_thread, stop_thread): New.
16114 (run_inferior_command): New.
16115 (init_named_socket): New.
16116 (gdb_ust_socket_init): New.
16117 (cstr_to_hexstr): New.
16118 (next_st): New.
16119 (first_marker, next_marker): New.
16120 (response_ust_marker): New.
16121 (cmd_qtfstm, cmd_qtsstm): New.
16122 (unprobe_marker_at, probe_marker_at): New.
16123 (cmd_qtstmat, gdb_ust_thread): New.
16124 (gdb_ust_init): New.
16125 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16126 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16127 (ST_REGENTRY): New.
16128 (x86_64_st_collect_regmap): New.
16129 (X86_64_NUM_ST_COLLECT_GREGS): New.
16130 (AMD64_RIP_REGNUM): New.
16131 (supply_static_tracepoint_registers): New.
16132 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16133 (ST_REGENTRY): New.
16134 (i386_st_collect_regmap): New.
16135 (i386_NUM_ST_COLLECT_GREGS): New.
16136 (supply_static_tracepoint_registers): New.
16137 * server.c (handle_query): Handle qXfer:statictrace:read.
16138 <qSupported>: Report support for StaticTracepoints, and
16139 qXfer:statictrace:read features.
16140 * server.h (traceframe_read_sdata)
16141 (supply_static_tracepoint_registers): Declare.
16142 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16143 (unpack_varlen_hex): Include in IPA build.
16144 * Makefile.in (ustlibs, ustinc): New.
16145 (IPA_OBJS): Add remote-utils-ipa.o.
16146 ($(IPA_LIB)): Link -ldl and -lpthread.
16147 (UST_CFLAGS): New.
16148 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16149 * config.in, configure: Regenerate.
16150
161512010-06-20 Ian Lance Taylor <iant@google.com>
16152 Pedro Alves <pedro@codesourcery.com>
16153
16154 * linux-x86-low.c (always_true): Delete.
16155 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16156 trying to fool the compiler with always_true.
16157
161582010-06-20 Pedro Alves <pedro@codesourcery.com>
16159
16160 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16161 conditions in gdbserver.
16162
161632010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16164
16165 * spu-low.c (spu_read_memory): Wrap around local store limit.
16166 (spu_write_memory): Likewise.
16167
161682010-06-15 Pedro Alves <pedro@codesourcery.com>
16169
16170 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16171 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16172 LONGEST uses.
16173 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16174 uses.
16175 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16176 uses with LONGEST uses.
16177
161782010-06-14 Stan Shebs <stan@codesourcery.com>
16179 Pedro Alves <pedro@codesourcery.com>
16180
16181 Bytecode compiler.
16182
16183 * linux-x86-low.c: Include limits.h.
16184 (add_insns): New.
16185 (always_true): New.
16186 (EMIT_ASM): New.
16187 (EMIT_ASM32): New.
16188 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16189 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16190 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16191 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16192 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16193 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16194 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16195 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16196 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16197 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16198 (amd64_emit_void_call_2): New.
16199 (amd64_emit_ops): New.
16200 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16201 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16202 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16203 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16204 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16205 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16206 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16207 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16208 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16209 (i386_emit_stack_adjust, i386_emit_int_call_1)
16210 (i386_emit_void_call_2): New.
16211 (i386_emit_ops): New.
16212 (x86_emit_ops): New.
16213 (the_low_target): Install x86_emit_ops.
16214 * server.h (struct emit_ops): New.
16215 (get_raw_reg_func_addr): Declare.
16216 (current_insn_ptr, emit_error): Declare.
16217 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16218 (set_trace_state_variable_value): New defines.
16219 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16220 addr_get_trace_state_variable_value and
16221 addr_set_trace_state_variable_value.
16222 (symbol_list): New fields for get_raw_reg,
16223 get_trace_state_variable_value and set_trace_state_variable_value.
16224 (condfn): New typedef.
16225 (struct tracepoint): New field `compiled_cond'.
16226 (do_action_at_tracepoint): Clear compiled_cond.
16227 (get_trace_state_variable_value, set_trace_state_variable_value):
16228 Export in the IPA.
16229 (condition_true_at_tracepoint): If there's a compiled condition,
16230 run that.
16231 (current_insn_ptr, emit_error): New globals.
16232 (struct bytecode_address): New.
16233 (get_raw_reg_func_addr): New.
16234 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16235 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16236 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16237 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16238 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16239 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16240 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16241 (compile_tracepoint_condition, compile_bytecodes): New.
16242 * target.h (emit_ops): Forward declare.
16243 (struct target_ops): New field emit_ops.
16244 (target_emit_ops): New.
16245 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16246 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16247 * linux-low.c (linux_emit_ops): New.
16248 (linux_target_ops): Install it.
16249 * linux-low.h (struct linux_target_ops): New field emit_ops.
16250
162512010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16252
16253 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16254 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16255
162562010-06-01 Pedro Alves <pedro@codesourcery.com>
16257 Stan Shebs <stan@codesourcery.com>
16258
16259 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16260 (all): Depend on $(extra_libraries).
16261 (install-only): Install the IPA.
16262 (IPA_OBJS, IPA_LIB): New.
16263 (clean): Remove the IPA lib.
16264 (IPAGENT_CFLAGS): New.
16265 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16266 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16267 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16268 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16269 * configure.ac: Check for atomic builtins support in the compiler.
16270 (IPA_DEPFILES, extra_libraries): Define.
16271 * configure.srv (ipa_obj): Add description.
16272 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16273 (i[34567]86-*-linux*): Set ipa_obj.
16274 (x86_64-*-linux*): Set ipa_obj.
16275 * linux-low.c (stabilizing_threads): New.
16276 (supports_fast_tracepoints): New.
16277 (linux_detach): Stabilize threads before detaching.
16278 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16279 the lwp is either not stabilizing, or is moving out of a jump pad.
16280 (linux_fast_tracepoint_collecting): New.
16281 (maybe_move_out_of_jump_pad): New.
16282 (enqueue_one_deferred_signal): New.
16283 (dequeue_one_deferred_signal): New.
16284 (linux_wait_for_event_1): If moving out of a jump pad, defer
16285 pending signals to later.
16286 (linux_stabilize_threads): New.
16287 (linux_wait_1): Check if threads need moving out of jump pads, and
16288 do it if so.
16289 (stuck_in_jump_pad_callback): New.
16290 (move_out_of_jump_pad_callback): New.
16291 (lwp_running): New.
16292 (linux_resume_one_lwp): Handle moving out of jump pads.
16293 (linux_set_resume_request): Dequeue deferred signals.
16294 (need_step_over_p): Also step over fast tracepoint jumps.
16295 (start_step_over): Also uninsert fast tracepoint jumps.
16296 (finish_step_over): Also reinsert fast tracepoint jumps.
16297 (linux_install_fast_tracepoint_jump): New.
16298 (linux_target_ops): Install linux_stabilize_threads and
16299 linux_install_fast_tracepoint_jump_pad.
16300 * linux-low.h (linux_target_ops) <get_thread_area,
16301 install_fast_tracepoint_jump_pad>: New fields.
16302 (struct lwp_info) <collecting_fast_tracepoint,
16303 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16304 (linux_get_thread_area): Declare.
16305 * linux-x86-low.c (jump_insn): New.
16306 (x86_get_thread_area): New.
16307 (append_insns): New.
16308 (push_opcode): New.
16309 (amd64_install_fast_tracepoint_jump_pad): New.
16310 (i386_install_fast_tracepoint_jump_pad): New.
16311 (x86_install_fast_tracepoint_jump_pad): New.
16312 (the_low_target): Install x86_get_thread_area and
16313 x86_install_fast_tracepoint_jump_pad.
16314 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16315 (struct fast_tracepoint_jump): New.
16316 (fast_tracepoint_jump_insn): New.
16317 (fast_tracepoint_jump_shadow): New.
16318 (find_fast_tracepoint_jump_at): New.
16319 (fast_tracepoint_jump_here): New.
16320 (delete_fast_tracepoint_jump): New.
16321 (set_fast_tracepoint_jump): New.
16322 (uninsert_fast_tracepoint_jumps_at): New.
16323 (reinsert_fast_tracepoint_jumps_at): New.
16324 (set_breakpoint_at): Use write_inferior_memory.
16325 (uninsert_raw_breakpoint): Use write_inferior_memory.
16326 (check_mem_read): Mask out fast tracepoint jumps.
16327 (check_mem_write): Mask out fast tracepoint jumps.
16328 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16329 (set_fast_tracepoint_jump): Declare.
16330 (delete_fast_tracepoint_jump)
16331 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16332 (reinsert_fast_tracepoint_jumps_at): Declare.
16333 * regcache.c: Don't compile many functions when building the
16334 in-process agent library.
16335 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16336 the register buffer in the heap.
16337 (free_register_cache): If the register buffer isn't owned by the
16338 regcache, don't free it.
16339 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16340 pre-existing register caches.
16341 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16342 type.
16343 (convert_ascii_to_int): : Constify `from' parameter type.
16344 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16345 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16346 the needed buffer in-place.
16347 (relocate_instruction): New.
16348 * server.c (handle_query) <qSymbols>: If the target supports
16349 tracepoints, give it a chance of looking up symbols. Report
16350 support for fast tracepoints.
16351 (handle_status): Stabilize threads.
16352 (process_serial_event): Adjust.
16353 * server.h (struct fast_tracepoint_jump): Forward declare.
16354 (struct process_info) <fast_tracepoint_jumps>: New field.
16355 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16356 (decode_X_packet, decode_M_packet): Adjust.
16357 (relocate_instruction): Declare.
16358 (in_process_agent_loaded): Declare.
16359 (tracepoint_look_up_symbols): Declare.
16360 (struct fast_tpoint_collect_status): Declare.
16361 (fast_tracepoint_collecting): Declare.
16362 (force_unlock_trace_buffer): Declare.
16363 (handle_tracepoint_bkpts): Declare.
16364 (initialize_low_tracepoint)
16365 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16366 * target.h (struct target_ops) <stabilize_threads,
16367 install_fast_tracepoint_jump_pad>: New fields.
16368 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16369 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16370 [HAVE_STDINT_H]: Include stdint.h.
16371 (trace_debug_1): Rename to ...
16372 (trace_vdebug): ... this.
16373 (trace_debug): Rename to ...
16374 (trace_debug_1): ... this. Add `level' parameter.
16375 (trace_debug): New.
16376 (ATTR_USED, ATTR_NOINLINE): New.
16377 (IP_AGENT_EXPORT): New.
16378 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16379 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16380 (about_to_request_buffer_space, trace_buffer_is_full)
16381 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16382 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16383 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16384 (traceframe_write_count, traceframes_created)
16385 (trace_state_variables)
16386 New renaming defines.
16387 (struct ipa_sym_addresses): New.
16388 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16389 (symbol_list): New.
16390 (ipa_sym_addrs): New.
16391 (all_tracepoint_symbols_looked_up): New.
16392 (in_process_agent_loaded): New.
16393 (write_e_ipa_not_loaded): New.
16394 (maybe_write_ipa_not_loaded): New.
16395 (tracepoint_look_up_symbols): New.
16396 (debug_threads) [IN_PROCESS_AGENT]: New.
16397 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16398 (UNKNOWN_SIDE_EFFECTS): New.
16399 (stop_tracing): New.
16400 (flush_trace_buffer): New.
16401 (stop_tracing_bkpt): New.
16402 (flush_trace_buffer_bkpt): New.
16403 (read_inferior_integer): New.
16404 (read_inferior_uinteger): New.
16405 (read_inferior_data_pointer): New.
16406 (write_inferior_data_pointer): New.
16407 (write_inferior_integer): New.
16408 (write_inferior_uinteger): New.
16409 (struct collect_static_trace_data_action): Delete.
16410 (enum tracepoint_type): New.
16411 (struct tracepoint) <type>: New field `type'.
16412 <actions_str, step_actions, step_actions_str>: Only include in
16413 GDBserver.
16414 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16415 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16416 (tracepoints): Use IP_AGENT_EXPORT.
16417 (last_tracepoint): Don't include in the IPA.
16418 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16419 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16420 (alloced_trace_state_variables): New.
16421 (trace_state_variables): Use IP_AGENT_EXPORT.
16422 (traceframe_t): Delete unused variable.
16423 (circular_trace_buffer): Don't include in the IPA.
16424 (trace_buffer_start): Delete.
16425 (struct trace_buffer_control): New.
16426 (trace_buffer_free): Delete.
16427 (struct ipa_trace_buffer_control): New.
16428 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16429 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16430 New.
16431 (trace_buffer_ctrl): New.
16432 (TRACE_BUFFER_CTRL_CURR): New.
16433 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16434 Reimplement as macros.
16435 (trace_buffer_wrap): Delete.
16436 (traceframe_write_count, traceframe_read_count)
16437 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16438 (struct tracepoint_hit_ctx) <type>: New field.
16439 (struct fast_tracepoint_ctx): New.
16440 (memory_barrier): New.
16441 (cmpxchg): New.
16442 (record_tracepoint_error): Update atomically in the IPA.
16443 (clear_inferior_trace_buffer): New.
16444 (about_to_request_buffer_space): New.
16445 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16446 updating the same buffer.
16447 (add_tracepoint): Default the tracepoint's type to trap
16448 tracepoint, and orig_size to -1.
16449 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16450 internal variables.
16451 (create_trace_state_variable): New parameter `gdb'. Handle it.
16452 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16453 (cmd_qtdp): Handle fast tracepoints.
16454 (cmd_qtdv): Adjust.
16455 (max_jump_pad_size): New.
16456 (gdb_jump_pad_head): New.
16457 (get_jump_space_head): New.
16458 (claim_jump_space): New.
16459 (sort_tracepoints): New.
16460 (MAX_JUMP_SIZE): New.
16461 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16462 IPA.
16463 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16464 support. Upload fast traceframes, and delete internal IPA
16465 breakpoints.
16466 (stop_tracing_handler): New.
16467 (flush_trace_buffer_handler): New.
16468 (cmd_qtstop): Upload fast tracepoints.
16469 (response_tracepoint): Handle fast tracepoints.
16470 (tracepoint_finished_step): Upload fast traceframes. Set the
16471 tracepoint hit context's tracepoint type.
16472 (handle_tracepoint_bkpts): New.
16473 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16474 type. Add comment about fast tracepoints.
16475 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16476 non-existing action_str field.
16477 (get_context_regcache): Handle fast tracepoints.
16478 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16479 to the regcache.
16480 (fast_tracepoint_from_jump_pad_address): New.
16481 (fast_tracepoint_from_ipa_tpoint_address): New.
16482 (collecting_t): New.
16483 (force_unlock_trace_buffer): New.
16484 (fast_tracepoint_collecting): New.
16485 (collecting): New.
16486 (gdb_collect): New.
16487 (write_inferior_data_ptr): New.
16488 (target_tp_heap): New.
16489 (target_malloc): New.
16490 (download_agent_expr): New.
16491 (UALIGN): New.
16492 (download_tracepoints): New.
16493 (download_trace_state_variables): New.
16494 (upload_fast_traceframes): New.
16495 (IPA_FIRST_TRACEFRAME): New.
16496 (IPA_NEXT_TRACEFRAME_1): New.
16497 (IPA_NEXT_TRACEFRAME): New.
16498 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16499 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16500 (gdb_jump_pad_buffer_end): New.
16501 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16502 (initialize_tracepoint): Adjust.
16503 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16504 buffer. Initialize the low module.
16505 * utils.c (PREFIX, TOOLNAME): New.
16506 (malloc_failure): Use PREFIX.
16507 (error): In the IPA, an error causes an exit.
16508 (fatal, warning): Use PREFIX.
16509 (internal_error): Use TOOLNAME.
16510 (NUMCELLS): Increase to 10.
16511 * configure, config.in: Regenerate.
16512
165132010-06-01 Pedro Alves <pedro@codesourcery.com>
16514
16515 * server.c (handle_query) <qSupported>: Do two passes over the
16516 qSupported string to avoid nesting strtok.
16517
165182010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16519
16520 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16521 (CDEPS): New.
16522 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16523 -Wl,--dynamic-list.
16524 * configure: Regenerate.
16525 * proc-service.list: New.
16526
165272010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16528
16529 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16530 New comment.
16531
165322010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16533
16534 * gdbreplay.c (remote_open): Check error return from socket() call by
16535 its equality to -1 not by it being negative.
16536 * remote-utils.c (remote_open): Likewise.
16537
165382010-05-23 Pedro Alves <pedro@codesourcery.com>
16539
16540 * config.h: Regenerate.
16541
165422010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16543
16544 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16545 doesn't provide PTRACE_GET_THREAD_AREA.
16546
165472010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16548
16549 * linux-m68k-low.c: Include <asm/ptrace.h>
16550 (ps_get_thread_area): Implement.
16551
165522010-05-03 Doug Evans <dje@google.com>
16553
16554 * event-loop.c (struct callback_event): New struct.
16555 (callback_list): New global.
16556 (append_callback_event, delete_callback_event): New functions.
16557 (process_callback): New function.
16558 (start_event_loop): Call it.
16559 * remote-utils.c (NOT_SCHEDULED): Define.
16560 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16561 moved out of readchar.
16562 (readchar): Rewrite. Call reschedule before returning.
16563 (reset_readchar): New function.
16564 (remote_close): Call it.
16565 (process_remaining, reschedule): New functions.
16566 * server.h (callback_handler_func): New typedef.
16567 (append_callback_event, delete_callback_event): Declare.
16568
165692010-05-03 Pedro Alves <pedro@codesourcery.com>
16570
16571 * proc-service.c (ps_pglobal_lookup): Use
16572 thread_db_look_up_one_symbol.
16573 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16574 parameter. Use it instead of all_symbols_looked_up.
16575 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16576 field.
16577 (all_symbols_looked_up): Don't declare.
16578 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16579 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16580 field.
16581 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16582 Set all_symbols_looked_up here.
16583 (thread_db_look_up_one_symbol): New.
16584 (thread_db_get_tls_address): Adjust.
16585 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16586 thread_db object on the heap, and tentatively set it in the
16587 process structure.
16588 (thread_db_init): Don't set all_symbols_looked_up here.
16589 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16590
165912010-05-03 Pedro Alves <pedro@codesourcery.com>
16592
16593 * linux-low.c (linux_kill, linux_detach): Adjust.
16594 (status_pending_p_callback): Remove redundant statement. Check
16595 for !TARGET_WAITIKIND_IGNORE, instead of
16596 TARGET_WAITKIND_STOPPED.
16597 (handle_tracepoints): Make sure LWP is locked. Adjust.
16598 (linux_wait_for_event_1): Adjust.
16599 (linux_cancel_breakpoints): New.
16600 (unsuspend_one_lwp): New.
16601 (unsuspend_all_lwps): New.
16602 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16603 (send_sigstop_callback): Change return type to int, add new
16604 `except' parameter and handle it.
16605 (suspend_and_send_sigstop_callback): New.
16606 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16607 pass them down. If SUSPEND, also increment the lwp's suspend
16608 count.
16609 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16610 (need_step_over_p): Don't consider suspended LWPs.
16611 (start_step_over): Adjust.
16612 (proceed_one_lwp): Change return type to int, add new `except'
16613 parameter and handle it.
16614 (unsuspend_and_proceed_one_lwp): New.
16615 (proceed_all_lwps): Use find_inferior instead of
16616 for_each_inferior.
16617 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16618 also decrement the suspend count of LWPs. Pass `except' down,
16619 instead of hacking its suspend count.
16620 (linux_pause_all): Add `freeze' parameter. Adjust.
16621 (linux_unpause_all): New.
16622 (linux_target_ops): Install linux_unpause_all.
16623 * server.c (handle_status): Adjust.
16624 * target.h (struct target_ops): New fields `unpause_all' and
16625 `cancel_breakpoints'. Add new parameter to `pause_all'.
16626 (pause_all): Add new `freeze' parameter.
16627 (unpause_all): New.
16628 (cancel_breakpoints): New.
16629 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16630 cancel breakpoints.
16631 (cmd_qtstart): Pause threads.
16632 (stop_tracing): Pause threads, and cancel breakpoints.
16633 * win32-low.c (win32_target_ops): Adjust.
16634
166352010-05-03 Pedro Alves <pedro@codesourcery.com>
16636
16637 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16638 the inferior right away from here...
16639 (linux_wait_1): ... to here, and adjust to check the thread's
16640 last_resume_kind instead of the lwp's step or stop_expected flags.
16641
166422010-05-02 Pedro Alves <pedro@codesourcery.com>
16643
16644 * README: Use consistent `GDB' and `GDBserver' spellings.
16645
166462010-05-02 Pedro Alves <pedro@codesourcery.com>
16647
16648 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16649 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16650 (linux_detach_one_lwp): Assume the lwp is stopped.
16651 (any_thread_of): Delete.
16652 (linux_detach): Stop all lwps here. Don't blindly delete all
16653 breakpoints.
16654 (delete_lwp_callback): New.
16655 (linux_mourn): Delete all lwps of the process that is gone.
16656 (linux_wait_1): Don't delete the last lwp of the process here.
16657 * mem-break.h (mark_breakpoints_out): Declare.
16658 * mem-break.c (mark_breakpoints_out): New.
16659 (free_all_breakpoints): Use it.
16660 * server.c (handle_target_event): If the process is gone, mark
16661 breakpoints out.
16662 * thread-db.c (struct thread_db) <create_bp>: New field.
16663 (thread_db_enable_reporting): Fix prototype. Store a thread event
16664 breakpoint reference in the thread_db struct.
16665 (thread_db_load_search): Clear the thread_db object.
16666 (try_thread_db_load_1): Ditto.
16667 (switch_to_process): New.
16668 (disable_thread_event_reporting): Use it.
16669 (remove_thread_event_breakpoints): New.
16670 (thread_db_detach, thread_db_mourn): Use it.
16671
166722010-05-01 Pedro Alves <pedro@codesourcery.com>
16673
16674 * linux-low.c (linux_enable_event_reporting): New.
16675 (linux_wait_for_event_1, handle_extended_wait): Use it.
16676
166772010-04-30 Pedro Alves <pedro@codesourcery.com>
16678
16679 * linux-low.c (linux_kill_one_lwp, linux_kill)
16680 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16681 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16682 SIGSTOP even if the LWP is stopped.
16683 (send_sigstop_callback): New.
16684 (stop_all_lwps): Use send_sigstop_callback instead.
16685 (linux_resume_one_thread): Adjust.
16686 (proceed_one_lwp): Still proceed an LWP that the client has
16687 requested to stop, if we haven't reported it as stopped yet. Make
16688 sure that LWPs the client want stopped, have a pending SIGSTOP.
16689
166902010-04-26 Doug Evans <dje@google.com>
16691
16692 * server.c (handle_general_set): Make static.
16693
16694 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16695 Print received char after testing for error/eof instead of before.
16696 (input_interrupt): Tweak comment.
16697
166982010-04-23 Doug Evans <dje@google.com>
16699
16700 * server.c (start_inferior): Print inferior argv if --debug.
16701
167022010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16703
16704 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16705 * nto-x86-low.c: Include server.h
16706
167072010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16708
16709 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16710 be consistent with other sources of this directory.
16711 (init_registers_amd64): Correct name of source file of this function
16712 in the comment.
16713
167142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16715
16716 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16717 64-bit executables.
16718
167192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16720
16721 * win32-i386-low.c: Add 64-bit support.
16722 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16723 (init_registers_amd64): Declare.
16724 (mappings): Add 64-bit version of array.
16725 (init_windows_x86): New function.
16726 (the_low_target): Change init_arch field to init_windows_x86.
16727
167282010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16729
16730 * win32-low.c: Adapt to support also 64-bit architecture.
16731 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16732 (get_image_name): Use SIZE_T type for local variable `done'.
16733 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16734 (toolhelp_get_dll_name): Idem.
16735 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16736 Use uintptr_t typecast to avoid warning.
16737 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16738 (handle_exception): Use phex_nz to avoid warning.
16739 (win32_wait): Remove unused local variable `process'.
16740
167412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16742
16743 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16744 `amd64-avx.o'.
16745
167462010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16747
16748 * configure.ac: Use `ws2_32' library for srv_mingw.
16749 * configure: Regenerate.
16750 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16751 * remote-utils.c: Likewise.
16752
167532010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16754
16755 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16756 if __x86_64__ is defined.
16757
167582010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16759
16760 * configure: Regenerate.
16761
167622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16763
16764 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16765 * target.h (target_ops): New get_tib_address field.
16766 * win32-low.h (win32_thread_info): Add thread_local_base field.
16767 * win32-low.c (child_add_thread): Add tlb argument.
16768 Set thread_local_base field to TLB.
16769 (get_child_debug_event): Adapt to child_add_thread change.
16770 (win32_get_tib_address): New function.
16771 (win32_target_ops): Set get_tib_address field to
16772 win32_get_tib_address.
16773 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16774
167752010-04-12 Pedro Alves <pedro@codesourcery.com>
16776
16777 * linux-low.c (linux_mourn): Also remove the process.
16778 * server.c (handle_target_event): Don't remove the process here.
16779 * nto-low.c (nto_mourn): New.
16780 (nto_target_ops): Install it.
16781 * spu-low.c (spu_mourn): New.
16782 (spu_target_ops): Install it.
16783 * win32-low.c (win32_mourn): New.
16784 (win32_target_ops): Install it.
16785
167862010-04-12 Pedro Alves <pedro@codesourcery.com>
16787
16788 * server.h (buffer_xml_printf): Remove redundant `;'.
16789
167902010-04-12 Pedro Alves <pedro@codesourcery.com>
16791
16792 * regcache.c (set_register_cache): Invalidate regcaches before
16793 changing the register cache layout.
16794 (regcache_invalidate_one): Allow a NULL regcache.
16795 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
16796 regcaches before changing the register cache layout or the target
16797 regsets.
16798
167992010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16800
16801 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
16802 variable warning on Linux/x86-64.
16803
168042010-04-11 Pedro Alves <pedro@codesourcery.com>
16805
16806 GDBserver disconnected tracing support.
16807
16808 * linux-low.c (linux_remove_process): Delete.
16809 (add_lwp): Don't set last_resume_kind here.
16810 (linux_kill): Use `mourn'.
16811 (linux_detach): Use `thread_db_detach', and `mourn'.
16812 (linux_mourn): New.
16813 (linux_attach_lwp_1): Adjust comment.
16814 (linux_attach): last_resume_kind moved the thread_info; adjust.
16815 (status_pending_p_callback): Adjust.
16816 (linux_wait_for_event_1): Adjust.
16817 (count_events_callback, select_singlestep_lwp_callback)
16818 (select_event_lwp_callback, cancel_breakpoints_callback)
16819 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
16820 (proceed_one_lwp): Adjust.
16821 (linux_async): Add debug output.
16822 (linux_thread_stopped): New.
16823 (linux_pause_all): New.
16824 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
16825 linux_pause_all.
16826 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
16827 (thread_db_free): Delete declaration.
16828 (thread_db_detach, thread_db_mourn): Declare.
16829 * thread-db.c (thread_db_init): Use thread_db_mourn.
16830 (thread_db_free): Delete, split in two.
16831 (disable_thread_event_reporting): New.
16832 (thread_db_detach): New.
16833 (thread_db_mourn): New.
16834
16835 * server.h (struct thread_info) <last_resume_kind>: New field.
16836 <attached>: Add comment.
16837 <gdb_detached>: New field.
16838 (handler_func): Change return type to int.
16839 (handle_serial_event, handle_target_event): Ditto.
16840 (gdb_connected): Declare.
16841 (tracing): Delete.
16842 (disconnected_tracing): Declare.
16843 (stop_tracing): Declare.
16844
16845 * server.c (handle_query) <qSupported>: Report support for
16846 disconnected tracing.
16847 (queue_stop_reply_callback): Account for running threads.
16848 (gdb_wants_thread_stopped): New.
16849 (gdb_wants_all_threads_stopped): New.
16850 (gdb_reattached_process): New.
16851 (handle_status): Clear the `gdb_detached' flag of all processes.
16852 In all-stop, stop all threads.
16853 (main): Be sure to leave tfind mode. Handle disconnected tracing.
16854 (process_serial_event): If the remote connection breaks, or if an
16855 exit was forced with "monitor exit", force an event loop exit.
16856 Handle disconnected tracing on detach.
16857 (handle_serial_event): Adjust.
16858 (handle_target_event): If GDB isn't connected, forward events back
16859 to the inferior, unless the last process exited, in which case,
16860 exit gdbserver. Adjust interface.
16861
16862 * remote-utils.c (remote_open): Don't block in accept. Instead
16863 register an event loop source on the listen socket file
16864 descriptor. Refactor bits into ...
16865 (listen_desc): ... this new global.
16866 (gdb_connected): ... this new function.
16867 (enable_async_notification): ... this new function.
16868 (handle_accept_event): ... this new function.
16869 (remote_close): Clear remote_desc.
16870
16871 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
16872
16873 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
16874 New fields.
16875 (mourn_inferior): Define.
16876 (target_process_qsupported): Avoid the dangling else problem.
16877 (thread_stopped): Define.
16878 (pause_all): Define.
16879 (target_waitstatus_to_string): Declare.
16880 * target.c (target_waitstatus_to_string): New.
16881
16882 * tracepoint.c (tracing): Make extern.
16883 (disconnected_tracing): New.
16884 (stop_tracing): Make extern. Handle tracing stops due to GDB
16885 disconnecting.
16886 (cmd_qtdisconnected): New.
16887 (cmd_qtstatus): Report disconnected tracing status in trace reply.
16888 (handle_tracepoint_general_set): Handle QTDisconnected.
16889
16890 * event-loop.c (event_handler_func): Change return type to int.
16891 (process_event): Bail out if the event handler wants the event
16892 loop to stop.
16893 (handle_file_event): Ditto.
16894 (start_event_loop): Bail out if the event handler wants the event
16895 loop to stop.
16896
16897 * nto-low.c (nto_target_ops): Adjust.
16898 * spu-low.c (spu_wait): Don't remove the process here.
16899 (spu_target_ops): Adjust.
16900 * win32-low.c (win32_wait): Don't remove the process here.
16901 (win32_target_ops): Adjust.
16902
169032010-04-11 Pedro Alves <pedro@codesourcery.com>
16904
16905 * regcache.c (realloc_register_cache): Invalidate inferior's
16906 regcache before recreating it.
16907
169082010-04-09 Pedro Alves <pedro@codesourcery.com>
16909
16910 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
16911
169122010-04-09 Stan Shebs <stan@codesourcery.com>
16913 Pedro Alves <pedro@codesourcery.com>
16914
16915 * server.h (LONGEST): New.
16916 (struct thread_info) <while_stepping>: New field.
16917 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
16918 Declare.
16919 (initialize_tracepoint, handle_tracepoint_general_set)
16920 (handle_tracepoint_query, tracepoint_finished_step)
16921 (tracepoint_was_hit, release_while_stepping_state_list):
16922 (current_traceframe): Declare.
16923 * server.c (handle_general_set): Handle tracepoint packets.
16924 (read_memory): New.
16925 (write_memory): New.
16926 (handle_search_memory_1): Use read_memory.
16927 (handle_query): Report support for conditional tracepoints, trace
16928 state variables, and tracepoint sources. Handle tracepoint
16929 queries.
16930 (main): Initialize the tracepoints module.
16931 (process_serial_event): Handle traceframe reads/writes.
16932
16933 * linux-low.c (handle_tracepoints): New.
16934 (linux_wait_1): Call it.
16935 (linux_resume_one_lwp): Handle while-stepping.
16936 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
16937 (linux_target_ops): Install them.
16938 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
16939 New field.
16940 * linux-x86-low.c (x86_supports_tracepoints): New.
16941 (the_low_target). Install it.
16942
16943 * mem-break.h (delete_breakpoint): Declare.
16944 * mem-break.c (delete_breakpoint): Make external.
16945
16946 * target.h (struct target_ops): Add `supports_tracepoints',
16947 `read_pc', and `write_pc' fields.
16948 (target_supports_tracepoints): Define.
16949 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
16950 (phex_nz): New.
16951
16952 * regcache.h (struct regcache) <registers_owned>: New field.
16953 (init_register_cache, regcache_cpy): Declare.
16954 (regcache_read_pc, regcache_write_pc): Declare.
16955 (register_cache_size): Declare.
16956 (supply_regblock): Declare.
16957 * regcache.c (init_register_cache): New.
16958 (new_register_cache): Use it.
16959 (regcache_cpy): New.
16960 (register_cache_size): New.
16961 (supply_regblock): New.
16962 (regcache_read_pc, regcache_write_pc): New.
16963
16964 * tracepoint.c: New.
16965
16966 * Makefile.in (OBS): Add tracepoint.o.
16967 (tracepoint.o): New rule.
16968
169692010-04-08 H.J. Lu <hongjiu.lu@intel.com>
16970
16971 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
16972 (i386-mmx.o): New.
16973 (i386-mmx.c): Likewise.
16974 (i386-mmx-linux.o): Likewise.
16975 (i386-mmx-linux.c): Likewise.
16976
16977 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
16978 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
16979 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
16980 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
16981
16982 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
16983 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
16984 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
16985
169862010-04-07 H.J. Lu <hongjiu.lu@intel.com>
16987
16988 * Makefile.in (clean): Updated.
16989 (i386-avx.o): New.
16990 (i386-avx.c): Likewise.
16991 (i386-avx-linux.o): Likewise.
16992 (i386-avx-linux.c): Likewise.
16993 (amd64-avx.o): Likewise.
16994 (amd64-avx.c): Likewise.
16995 (amd64-avx-linux.o): Likewise.
16996 (amd64-avx-linux.c): Likewise.
16997
16998 * configure.srv (srv_i386_regobj): Add i386-avx.o.
16999 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17000 (srv_amd64_regobj): Add amd64-avx.o.
17001 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17002 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17003 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17004 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17005 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17006 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17007 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17008
17009 * i387-fp.c: Include "i386-xstate.h".
17010 (i387_xsave): New.
17011 (i387_cache_to_xsave): Likewise.
17012 (i387_xsave_to_cache): Likewise.
17013 (x86_xcr0): Likewise.
17014
17015 * i387-fp.h (i387_cache_to_xsave): Likewise.
17016 (i387_xsave_to_cache): Likewise.
17017 (x86_xcr0): Likewise.
17018
17019 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17020 * linux-crisv32-low.c (target_regsets): Likewise.
17021 * linux-m68k-low.c (target_regsets): Likewise.
17022 * linux-mips-low.c (target_regsets): Likewise.
17023 * linux-ppc-low.c (target_regsets): Likewise.
17024 * linux-s390-low.c (target_regsets): Likewise.
17025 * linux-sh-low.c (target_regsets): Likewise.
17026 * linux-sparc-low.c (target_regsets): Likewise.
17027 * linux-xtensa-low.c (target_regsets): Likewise.
17028
17029 * linux-low.c: Include <sys/uio.h>.
17030 (regsets_fetch_inferior_registers): Support nt_type.
17031 (regsets_store_inferior_registers): Likewise.
17032 (linux_process_qsupported): New.
17033 (linux_target_ops): Add linux_process_qsupported.
17034
17035 * linux-low.h (regset_info): Add nt_type.
17036 (linux_target_ops): Add process_qsupported.
17037
17038 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17039 and <sys/uio.h>.
17040 (init_registers_i386_avx_linux): New.
17041 (init_registers_amd64_avx_linux): Likewise.
17042 (xmltarget_i386_linux_no_xml): Likewise.
17043 (xmltarget_amd64_linux_no_xml): Likewise.
17044 (PTRACE_GETREGSET): Likewise.
17045 (PTRACE_SETREGSET): Likewise.
17046 (x86_fill_xstateregset): Likewise.
17047 (x86_store_xstateregset): Likewise.
17048 (use_xml): Likewise.
17049 (x86_linux_update_xmltarget): Likewise.
17050 (x86_linux_process_qsupported): Likewise.
17051 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17052 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17053 init_registers_i386_linux here. Call
17054 x86_linux_update_xmltarget.
17055 (the_low_target): Add x86_linux_process_qsupported.
17056
17057 * server.c (handle_query): Call target_process_qsupported.
17058
17059 * target.h (target_ops): Add process_qsupported.
17060 (target_process_qsupported): New.
17061
170622010-04-03 Pedro Alves <pedro@codesourcery.com>
17063
17064 * inferiors.c (add_thread): Set last_status kind to
17065 TARGET_WAITKIND_IGNORE.
17066 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17067 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17068 (linux_wait_1): Move `thread' local definition to block that uses
17069 it. Don't NULL initialize `event_child'.
17070 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17071 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17072 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17073
170742010-04-01 Pedro Alves <pedro@codesourcery.com>
17075
17076 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17077 an extended waitstatus, or by a watchpoint.
17078 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17079 thread was stepping or has been stopped by a watchpoint.
17080
170812010-04-01 Pedro Alves <pedro@codesourcery.com>
17082
17083 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17084 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17085 of another, then delete the previous, and validate all
17086 breakpoints.
17087 (validate_inserted_breakpoint): New.
17088 (delete_disabled_breakpoints): New.
17089 (validate_breakpoints): New.
17090 (check_mem_read): Validate breakpoints before trusting their
17091 shadow. Delete disabled breakpoints.
17092 (check_mem_write): Validate breakpoints before trusting they
17093 should be inserted. Delete disabled breakpoints.
17094 * mem-break.h (validate_breakpoints):
17095 * server.c (handle_query): Validate breakpoints when we see a
17096 qSymbol query.
17097
170982010-04-01 Pedro Alves <pedro@codesourcery.com>
17099
17100 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17101 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17102 if we could tell there's a GDB breakpoint at stop_pc.
17103 (need_step_over_p): Don't do a step over if we find a GDB
17104 breakpoint at the resume PC.
17105
17106 * mem-break.c (struct raw_breakpoint): New.
17107 (enum bkpt_type): New type `gdb_breakpoint'.
17108 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17109 fields. New field `raw'.
17110 (find_raw_breakpoint_at): New.
17111 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17112 breakpoint instead.
17113 (set_breakpoint_at): Adjust.
17114 (delete_raw_breakpoint): New.
17115 (release_breakpoint): New.
17116 (delete_breakpoint): Rename to...
17117 (delete_breakpoint_1): ... this. Add proc parameter. Use
17118 release_breakpoint. Return ENOENT.
17119 (delete_breakpoint): Reimplement.
17120 (find_breakpoint_at): Delete.
17121 (find_gdb_breakpoint_at): New.
17122 (delete_breakpoint_at): Delete.
17123 (set_gdb_breakpoint_at): New.
17124 (delete_gdb_breakpoint_at): New.
17125 (gdb_breakpoint_here): New.
17126 (set_reinsert_breakpoint): Use release_breakpoint.
17127 (uninsert_breakpoint): Rename to ...
17128 (uninsert_raw_breakpoint): ... this.
17129 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17130 (reinsert_raw_breakpoint): Change parameter type to
17131 raw_breakpoint.
17132 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17133 instead.
17134 (check_breakpoints): Adjust. Use release_breakpoint.
17135 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17136 (breakpoint_inserted_here): Ditto.
17137 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17138 Don't trust the breakpoint's shadow if it is not inserted.
17139 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17140 (delete_all_breakpoints): Adjust.
17141 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17142 use delete_breakpoint_1.
17143
17144 * mem-break.h (breakpoints_supported): Delete declaration.
17145 (set_gdb_breakpoint_at): Declare.
17146 (gdb_breakpoint_here): Declare.
17147 (delete_breakpoint_at): Delete.
17148 (delete_gdb_breakpoint_at): Declare.
17149
17150 * server.h (struct raw_breakpoint): Forward declare.
17151 (struct process_info): New field `raw_breakpoints'.
17152
17153 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17154 breakpoints.
17155
171562010-03-24 Pedro Alves <pedro@codesourcery.com>
17157
17158 * linux-low.c (status_pending_p_callback): Fix comment.
17159 (linux_wait_for_event_1): Move most of the internal breakpoint
17160 handling from here...
17161 (linux_wait_1): ... to here.
17162 (count_events_callback): New.
17163 (select_singlestep_lwp_callback): New.
17164 (select_event_lwp_callback): New.
17165 (cancel_breakpoints_callback): New.
17166 (select_event_lwp): New.
17167 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17168 priority to all LWPs that have had events that should be reported
17169 to the client. Cancel breakpoints when about to reporting the
17170 event to the client, not while stopping lwps. No longer cancel
17171 finished single-steps here.
17172 (cancel_finished_single_step): Delete.
17173 (cancel_finished_single_steps): Delete.
17174
171752010-03-24 Pedro Alves <pedro@codesourcery.com>
17176
17177 * mem-break.c (enum bkpt_type): New.
17178 (struct breakpoint): New field `type'.
17179 (set_breakpoint_at): Change return type to struct breakpoint
17180 pointer. Set type to `other_breakpoint' by default.
17181 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17182 in the breakpoint list.
17183 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17184 (reinsert_breakpoint): Rename to ...
17185 (reinsert_raw_breakpoint): ... this.
17186 (reinsert_breakpoints_at): Adjust.
17187 * mem-break.h (struct breakpoint): Declare.
17188 (set_breakpoint_at): Change return type to struct breakpoint
17189 pointer.
17190
171912010-03-24 Pedro Alves <pedro@codesourcery.com>
17192
17193 * server.c (handle_query): Assign, not compare.
17194
171952010-03-24 Pedro Alves <pedro@codesourcery.com>
17196
17197 Teach linux gdbserver to step-over-breakpoints.
17198
17199 * linux-low.c (can_hardware_single_step): New.
17200 (supports_breakpoints): New.
17201 (handle_extended_wait): If stopping threads, read the stop pc of
17202 the new cloned LWP.
17203 (get_pc): New.
17204 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17205 low target doesn't support retrieving the PC.
17206 (add_lwp): Set last_resume_kind to resume_continue.
17207 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17208 (linux_attach): Don't clear stop_expected. Set the lwp's
17209 last_resume_kind to resume_stop.
17210 (linux_detach_one_lwp): Don't check for removed breakpoints.
17211 (check_removed_breakpoint): Delete.
17212 (status_pending_p): Rename to ...
17213 (status_pending_p_callback): ... this. Don't check for removed
17214 breakpoints. Don't consider threads that are stopped from GDB's
17215 perspective.
17216 (linux_wait_for_lwp): Always read the stop_pc here.
17217 (cancel_breakpoint): New.
17218 (step_over_bkpt): New global.
17219 (linux_wait_for_event_1): Implement stepping over breakpoints.
17220 (gdb_wants_lwp_stopped): New.
17221 (gdb_wants_all_stopped): New.
17222 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17223 single-step traps here. Store the thread's last reported target
17224 wait status.
17225 (send_sigstop): Don't clear stop_expected. Always set it,
17226 instead.
17227 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17228 (cancel_finished_single_step): New.
17229 (cancel_finished_single_steps): New.
17230 (wait_for_sigstop): Don't cancel finished single-step traps here.
17231 (linux_resume_one_lwp): Don't check for removed breakpoints.
17232 Don't set `step' on non-hardware step archs.
17233 (linux_set_resume_request): Ignore resume_stop requests if already
17234 stopping or stopped. Set the lwp's last_resume_kind.
17235 (resume_status_pending_p): Don't check for removed breakpoints.
17236 (need_step_over_p): New.
17237 (start_step_over): New.
17238 (finish_step_over): New.
17239 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17240 requests. Clear the thread's last reported target waitstatus.
17241 Don't use the `suspended' flag. Don't consider pending breakpoints.
17242 (linux_resume): Start a step-over if necessary.
17243 (proceed_one_lwp): New.
17244 (proceed_all_lwps): New.
17245 (unstop_all_lwps): New.
17246 * linux-low.h (struct lwp_info): Rewrite comment for the
17247 `suspended' flag. Add the `stop_pc' field. Delete the
17248 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17249 Add `'last_resume_kind' and `need_step_over' fields.
17250 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17251 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17252 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17253 (set_raw_breakpoint_at): New.
17254 (set_breakpoint_at): Rewrite to use it.
17255 (reinsert_breakpoint_handler): Delete.
17256 (set_reinsert_breakpoint): New.
17257 (reinsert_breakpoint_by_bp): Delete.
17258 (delete_reinsert_breakpoints): New.
17259 (uninsert_breakpoint): Rewrite.
17260 (uninsert_breakpoints_at): New.
17261 (reinsert_breakpoint): Rewrite.
17262 (reinsert_breakpoints_at): New.
17263 (check_breakpoints): Rewrite.
17264 (breakpoint_here): New.
17265 (breakpoint_inserted_here): New.
17266 (check_mem_read): Adjust.
17267 * mem-break.h (breakpoints_supported, breakpoint_here)
17268 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17269 (reinsert_breakpoint_by_bp): Delete declaration.
17270 (delete_reinsert_breakpoints): Declare.
17271 (reinsert_breakpoint): Delete declaration.
17272 (reinsert_breakpoints_at): Declare.
17273 (uninsert_breakpoint): Delete declaration.
17274 (uninsert_breakpoints_at): Declare.
17275 (check_breakpoints): Adjust prototype.
17276 * server.h: Adjust include order.
17277 (struct thread_info): Declare here. Add a `last_status' field.
17278
172792010-03-23 Michael Snyder <msnyder@vmware.com>
17280
17281 * server.c (crc32): New function.
17282 (handle_query): Add handling for 'qCRC:' request.
17283
172842010-03-23 Pedro Alves <pedro@codesourcery.com>
17285
17286 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17287 lwp had been stopped by a watchpoint.
17288
172892010-03-16 Pedro Alves <pedro@codesourcery.com>
17290
17291 * server.h (internal_error): Declare.
17292 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17293 * utils.c (internal_error): New function.
17294
172952010-03-15 Andreas Schwab <schwab@redhat.com>
17296
17297 * configure.srv: Fix typo setting srv_regobj.
17298
172992010-03-15 Pedro Alves <pedro@codesourcery.com>
17300
17301 * linux-low.c (fetch_register): Avoid passing a non string literal
17302 format to `error'.
17303 (usr_store_inferior_registers): Ditto.
17304
173052010-03-14 Pedro Alves <pedro@codesourcery.com>
17306
17307 * linux-low.c (linux_write_memory): Bail out early if peeking
17308 memory failed.
17309
173102010-03-14 Pedro Alves <pedro@codesourcery.com>
17311
17312 * linux-low.h (struct lwp_info): New fields
17313 `stopped_by_watchpoint' and `stopped_data_address'.
17314 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17315 here, and cache them in the lwp object.
17316 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17317 directly.
17318 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17319 field.
17320 (linux_stopped_by_watchpoint): Rewrite.
17321 (linux_stopped_data_address): Rewrite.
17322
173232010-03-06 Simo Melenius <simo.melenius@iki.fi>
17324
17325 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17326 switching the current inferior, not before.
17327
173282010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17329
17330 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17331 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17332 i386-linux.c and amd64-linux.c.
17333 (reg-i386.o): Removed.
17334 (reg-i386.c): Likewise.
17335 (reg-i386-linux.o): Likewise.
17336 (reg-i386-linux.c): Likewise.
17337 (reg-x86-64.o): Likewise.
17338 (reg-x86-64.c): Likewise.
17339 (reg-x86-64-linux.o): Likewise.
17340 (reg-x86-64-linux.c): Likewise.
17341 (i386.o): New.
17342 (i386.c): Likewise.
17343 (i386-linux.o): Likewise.
17344 (i386-linux.c): Likewise.
17345 (amd64.o): Likewise.
17346 (amd64.c): Likewise.
17347 (amd64-linux.o): Likewise.
17348 (amd64-linux.c): Likewise.
17349
17350 * configure.srv (srv_i386_regobj): New.
17351 (srv_i386_linux_regobj): Likewise.
17352 (srv_amd64_regobj): Likewise.
17353 (srv_amd64_linux_regobj): Likewise.
17354 (srv_i386_32bit_xmlfiles): Likewise.
17355 (srv_i386_64bit_xmlfiles): Likewise.
17356 (srv_i386_xmlfiles): Likewise.
17357 (srv_amd64_xmlfiles): Likewise.
17358 (srv_i386_linux_xmlfiles): Likewise.
17359 (srv_amd64_linux_xmlfiles): Likewise.
17360 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17361 srv_xmlfiles to $srv_i386_xmlfiles.
17362 (i[34567]86-*-mingw32ce*): Likewise.
17363 (i[34567]86-*-mingw*): Likewise.
17364 (i[34567]86-*-nto*): Likewise.
17365 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17366 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17367 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17368 (x86_64-*-linux*): Likewise.
17369
17370 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17371 (init_registers_amd64_linux): New.
17372 (x86_arch_setup): Replace init_registers_x86_64_linux with
17373 init_registers_amd64_linux.
17374
173752010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17376
17377 * configure.ac: Check for libdl. If it is not available link against
17378 static libthread_db.
17379 * configure: Regenerate.
17380
173812010-02-22 Pedro Alves <pedro@codesourcery.com>
17382
17383 PR9605
17384
17385 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17386 handing a read watchpoint.
17387 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17388
173892010-02-12 Doug Evans <dje@google.com>
17390
17391 * linux-low.c (linux_supports_tracefork_flag): Document.
17392 (linux_look_up_symbols): Add comment.
17393
173942010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17395
17396 * regcache.c (supply_register): Clear regcache if buf is NULL.
17397
173982010-02-02 Nicolas Roche <roche@sourceware.org>
17399 Joel Brobecker <brobecker@adacore.com>
17400
17401 * inferiors.c (find_inferior): Add function documentation.
17402 (unloaded_dll): Handle the case where the unloaded dll has not
17403 been previously registered in the dll list.
17404
174052010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17406
17407 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17408 (thumb2_breakpoint): New.
17409 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17410
174112010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17412
17413 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17414 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17415 breakpoints.
17416
174172010-01-21 Pedro Alves <pedro@codesourcery.com>
17418
17419 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17420
174212010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17422
17423 * linux-s390-low.c (s390_collect_ptrace_register)
17424 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17425
174262010-01-21 Doug Evans <dje@google.com>
17427
17428 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17429 (PTRACE_ARG4_TYPE): New macro.
17430 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17431 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17432 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17433 (usr_store_inferior_registers): Ditto.
17434 (linux_read_memory, linux_write_memory): Ditto.
17435 (linux_test_for_tracefork): Ditto.
17436
17437 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17438 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17439
174402010-01-21 Pedro Alves <pedro@codesourcery.com>
17441
17442 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17443 target.
17444
174452010-01-21 Pedro Alves <pedro@codesourcery.com>
17446
17447 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17448 prototype to take a regcache. Adjust.
17449
174502010-01-20 Pedro Alves <pedro@codesourcery.com>
17451
17452 * regcache.h (struct thread_info): Forward declare.
17453 (struct regcache): New.
17454 (new_register_cache): Adjust prototype.
17455 (get_thread_regcache): Declare.
17456 (free_register_cache): Adjust prototype.
17457 (registers_to_string, registers_from_string): Ditto.
17458 (supply_register, supply_register_by_name, collect_register)
17459 (collect_register_as_string, collect_register_by_name): Ditto.
17460 * regcache.c (struct inferior_regcache_data): Delete.
17461 (get_regcache): Rename to ...
17462 (get_thread_regcache): ... this. Adjust. Switch inferior before
17463 fetching registers.
17464 (regcache_invalidate_one): Adjust.
17465 (regcache_invalidate): Fix prototype.
17466 (new_register_cache): Return the new register cache.
17467 (free_register_cache): Change prototype.
17468 (realloc_register_cache): Adjust.
17469 (registers_to_string): Change prototype to take a regcache. Adjust.
17470 (registers_from_string): Ditto.
17471 (register_data): Ditto.
17472 (supply_register): Ditto.
17473 (supply_register_by_name): Ditto.
17474 (collect_register): Ditto.
17475 (collect_register_as_string): Ditto.
17476 (collect_register_by_name): Ditto.
17477 * server.c (process_serial_event): Adjust.
17478 * linux-low.h (regset_fill_func, regset_store_func): Change
17479 prototype.
17480 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17481 Change prototype.
17482 * linux-low.c (get_stop_pc): Adjust.
17483 (check_removed_breakpoint): Adjust.
17484 (linux_wait_for_event): Adjust.
17485 (linux_resume_one_lwp): Adjust.
17486 (fetch_register): Add regcache parameter. Adjust.
17487 (usr_store_inferior_registers): Ditto.
17488 (regsets_fetch_inferior_registers): Ditto.
17489 (regsets_store_inferior_registers): Ditto.
17490 (linux_fetch_registers, linux_store_registers): Ditto.
17491 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17492 regcache. Adjust.
17493 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17494 Ditto.
17495 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17496 prototype to take a regcache.
17497 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17498 * remote-utils.c (convert_ascii_to_int, outreg)
17499 (prepare_resume_reply): Change prototype to take a regcache.
17500 Adjust.
17501 * target.h (struct target_ops) <fetch_registers, store_registers>:
17502 Change prototype to take a regcache.
17503 (fetch_inferior_registers, store_inferior_registers): Change
17504 prototype to take a regcache. Adjust.
17505 * proc-service.c (ps_lgetregs): Adjust.
17506 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17507 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17508 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17509 take a regcache. Adjust.
17510 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17511 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17512 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17513 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17514 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17515 (cris_cannot_fetch_register):
17516 (cris_breakpoint_at): Change prototype to take a regcache.
17517 Adjust.
17518 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17519 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17520 to take a regcache. Adjust.
17521 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17522 Adjust.
17523 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17524 take a regcache. Adjust.
17525 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17526 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17527 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17528 * linux-mips-low.c (mips_get_pc):
17529 (mips_set_pc): Change prototype to take a regcache. Adjust.
17530 (mips_reinsert_addr): Adjust.
17531 (mips_collect_register): Change prototype to take a regcache.
17532 Adjust.
17533 (mips_supply_register):
17534 (mips_collect_register_32bit, mips_supply_register_32bit)
17535 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17536 (mips_store_fpregset): Ditto.
17537 * linux-ppc-low.c (ppc_supply_ptrace_register)
17538 (ppc_supply_ptrace_register): Ditto.
17539 (parse_spufs_run): Adjust.
17540 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17541 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17542 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17543 take a regcache. Adjust.
17544 * linux-s390-low.c (s390_collect_ptrace_register)
17545 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17546 (s390_set_pc): Change prototype to take a regcache. Adjust.
17547 (s390_arch_setup): Adjust.
17548 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17549 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17550 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17551 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17552 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17553 regcache. Adjust.
17554 (sparc_breakpoint_at): Adjust.
17555 * linux-xtensa-low.c (xtensa_fill_gregset):
17556 (xtensa_store_gregset):
17557 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17558 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17559 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17560 prototype to take a regcache. Adjust.
17561 * win32-arm-low.c (arm_fetch_inferior_register)
17562 (arm_store_inferior_register): Change prototype to take a
17563 regcache. Adjust.
17564 * win32-i386-low.c (i386_fetch_inferior_register)
17565 (i386_store_inferior_register): Change prototype to take a
17566 regcache. Adjust.
17567 * win32-low.c (child_fetch_inferior_registers)
17568 (child_store_inferior_registers): Change prototype to take a
17569 regcache. Adjust.
17570 (win32_wait): Adjust.
17571 (win32_fetch_inferior_registers): Change prototype to take a
17572 regcache. Adjust.
17573 (win32_store_inferior_registers): Adjust.
17574 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17575 store_inferior_register>: Change prototype to take a regcache.
17576
175772010-01-20 Doug Evans <dje@google.com>
17578
17579 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17580 #ifdef.
17581 (linux_wait_for_event1, linux_init_signals): Ditto.
17582 (W_STOPCODE): Provide definition if missing.
17583
175842010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17585
17586 * linux-low.c (linux_core_of_thread): New.
17587 (compare_ints, show_process, list_threads): New.
17588 (linux_qxfer_osdata): Report threads and cores.
17589 (linux_target_op): Register linux_core_of_thread.
17590 * remote-utils.c (prepare_resume_reply): Report the core.
17591 (buffer_xml_printf): Support %d specifier.
17592 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17593 New.
17594 (handle_query): Handle qXfer:threads. Announce availability
17595 thereof.
17596 * target.h (struct target_ops): New field core_of_thread.
17597
175982010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17599
17600 * Makefile.in (clean): Remove new generated files.
17601 (reg-s390.o, reg-s390.c): Remove rules.
17602 (reg-s390x.o, reg-s390x.c): Likewise.
17603 (s390-linux32.o, s390-linux32.c): Add rules.
17604 (s390-linux64.o, s390-linux64.c): Likewise.
17605 (s390x-linux64.o, s390x-linux64.c): Likewise.
17606 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17607 * linux-s390-low.c: Include <elf.h>.
17608 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17609 (init_registers_s390): Remove prototype.
17610 (init_registers_s390x): Likewise.
17611 (init_registers_s390_linux32): Add prototype.
17612 (init_registers_s390_linux64): Likewise.
17613 (init_registers_s390x_linux64): Likewise.
17614 (s390_num_regs_3264): New define.
17615 (s390_regmap_3264): New global variable.
17616 (s390_cannot_fetch_register): Remove obsolete check.
17617 (s390_cannot_store_register): Likewise.
17618 (s390_collect_ptrace_register): Handle upper/lower register halves.
17619 (s390_supply_ptrace_register): Likewise.
17620 (s390_fill_gregset): Update to register number changes.
17621 (s390_get_hwcap): New routine.
17622 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17623 Install appropriate regmap and register set.
17624
176252010-01-01 Joel Brobecker <brobecker@adacore.com>
17626
17627 * server.c (gdbserver_version): Update copyright year to 2010.
17628 * gdbreplay.c (gdbreplay_version): Likewise.
17629
176302009-12-28 Doug Evans <dje@google.com>
17631
17632 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17633 elf/external.h. Include <elf.h> instead but only if necessary.
17634
176352009-12-28 Pedro Alves <pedro@codesourcery.com>
17636
17637 * linux-low.c (linux_remove_process): Remove `detaching'
17638 parameter. Don't release/detach from thread_db here.
17639 (linux_kill): Release/detach from thread_db here, ...
17640 (linux_detach): ... and here, before actually detaching.
17641 (linux_wait_1): ... and here, when a process exits.
17642 * thread-db.c (any_thread_of): New.
17643 (thread_db_free): Switch the current inferior to a thread of the
17644 passed in process.
17645
176462009-12-21 Doug Evans <dje@google.com>
17647
17648 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17649
17650 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17651 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17652 warning ifndef __NR_tkill. Move setting of errno there too.
17653 Delete unnecessary resetting of errno after syscall.
17654 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17655
17656 * configure.ac: Check for dladdr.
17657 * config.in: Regenerate.
17658 * configure: Regenerate.
17659 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17660 (try_thread_db_load): Update.
17661
17662 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17663
176642009-12-18 Doug Evans <dje@google.com>
17665
17666 * event-loop.c: Include unistd.h if it exists.
17667
17668 * linux-low.c (my_waitpid): Move definition away from being in
17669 between linux_tracefork_child/linux_test_for_tracefork.
17670
17671 * gdb_proc_service.h (psaddr_t): Fix type.
17672 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17673 signature to match glibc.
17674
176752009-12-16 Doug Evans <dje@google.com>
17676
17677 * linux-low.c (linux_read_memory): Fix argument to read.
17678
176792009-11-26 Pedro Alves <pedro@codesourcery.com>
17680
17681 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17682 events, don't leave current_inferior pointing at null.
17683
176842009-11-26 Pedro Alves <pedro@codesourcery.com>
17685
17686 * win32-low.c (LOG): Delete.
17687 (OUTMSG): Output to stderr.
17688 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17689 on compile time LOG macro.
17690 (win32_wait): Fix debug output.
17691
176922009-11-26 Pedro Alves <pedro@codesourcery.com>
17693
17694 * win32-low.c (win32_add_one_solib): If the dll name is
17695 "ntdll.dll", prepend the system directory to the dll path.
17696
176972009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17698
17699 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17700
177012009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17702 Vladimir Prus <vladimir@codesourcery.com>
17703
17704 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17705 * configure.ac: Check for __mcoldfire__ and set
17706 gdb_cv_m68k_is_coldfire.
17707 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17708 reg-cf.o and reg-m68k.o.
17709 * configure: Regenerated.
17710
177112009-11-16 Pedro Alves <pedro@codesourcery.com>
17712
17713 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17714 Pass it to thread_db_free.
17715 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17716 proper `detaching' argument to linux_remove_process.
17717 * linux-low.h (thread_db_free): Add `detaching' parameter.
17718 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17719 to thread_db_free.
17720 (thread_db_free): Add `detaching' parameter. Only
17721 call td_ta_clear_event if detaching from process.
17722
177232009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17724
17725 * thread-db.c (thread_db_free): Fix typo.
17726
177272009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17728
17729 PR gdb/10838
17730 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17731
177322009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17733
17734 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17735 with an i686 compiler.
17736 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17737 needed.
17738 * configure: Rebuilt.
17739
177402009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17741
17742 PR gdb/10783
17743
17744 * server.c (handle_search_memory_1): Correct read_addr initialization
17745 in loop for searching subsequent chunks.
17746
177472009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17748
17749 * configure.ac: New --with-libthread-db option.
17750 * thread-db.c: Allow direct dependence on libthread_db.
17751 (thread_db_free): Adjust.
17752 * config.in: Regenerate.
17753 * configure: Likewise.
17754
177552009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17756
17757 PR gdb/10757
17758 * thread-db.c (attach_thread): New function.
17759 (maybe_attach_thread): Return success/failure.
17760 (find_new_threads_callback): Adjust.
17761 (thread_db_find_new_threads): Loop until no new threads.
17762
177632009-10-13 Pedro Alves <pedro@codesourcery.com>
17764
17765 * proc-service.c (ps_lgetregs): Formatting.
17766
177672009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17768
17769 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17770 * configure.ac: Adjust.
17771 * linux-low.h (struct process_info_private): Move members to struct
17772 thread_db.
17773 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17774 * linux-low.c (linux_remove_process): Adjust.
17775 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17776 * server.c (handle_query): Move code ...
17777 (handle_monitor_command): ... here. New function.
17778 * target.h (struct target_ops): New member.
17779 * thread-db.c (struct thread_db): New.
17780 (libthread_db_search_path): New variable.
17781 (thread_db_create_event, thread_db_enable_reporting)
17782 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17783 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17784 (try_thread_db_load_1, dladdr_to_soname): New functions.
17785 (try_thread_db_load, thread_db_load_search): New functions.
17786 (thread_db_init): Search for libthread_db.
17787 (thread_db_free): New function.
17788 (thread_db_handle_monitor_command): Likewise.
17789 * config.in: Regenerate.
17790 * configure: Regenerate.
17791
177922009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17793
17794 * spu-low.c (spu_kill): Wait for inferior to terminate.
17795 Call clear_inferiors.
17796 (spu_detach): Call clear_inferiors.
17797
177982009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17799
17800 * aclocal.m4: Regenerate.
17801 * config.in: Likewise.
17802 * configure: Likewise.
17803
178042009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17805
17806 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
17807 (parse_spufs_run): New function.
17808 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
17809 (ppc_breakpoint_at): Handle SPU breakpoints.
17810
178112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17812
17813 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
17814 (SPUFS_MAGIC): Define.
17815 (spu_enumerate_spu_ids): New function.
17816 (linux_qxfer_spu): New function.
17817 (linux_target_ops): Install linux_qxfer_spu.
17818
178192009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17820
17821 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
17822 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
17823 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
17824 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
17825 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
17826 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
17827 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
17828 (init_registers_powerpc_cell32l): Add prototype.
17829 (init_registers_powerpc_cell64l): Likewise.
17830 (ppc_arch_setup): Detect Cell/B.E. architecture.
17831
178322009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17833
17834 * Makefile.in (datarootdir): New variable.
17835
178362009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17837
17838 * linux-low.c (linux_write_memory): Update debugging output.
17839 * Makefile.in (clean): Add new descriptions.
17840 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
17841 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
17842 * configure.srv: Add new files for arm*-*-linux*.
17843 * linux-arm-low.c: Add new declarations.
17844 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
17845 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
17846 (HWCAP_VFPv3D16): New.
17847 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
17848 instead of __IWMMXT__.
17849 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
17850 (arm_arch_setup): New.
17851 (target_regsets): Remove #ifdef. Add VFP regset.
17852 (the_low_target): Use arm_arch_setup.
17853
178542009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17855
17856 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
17857 the main thread again.
17858
178592009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
17860
17861 Adding Neutrino gdbserver.
17862 * configure: Regenerated.
17863 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
17864 * configure.srv (i[34567]86-*-nto*): New target.
17865 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
17866 * remote-utils.c [__QNX__]: Include sys/iomgr.h
17867 (nto_comctrl) [__QNX__]: New function.
17868 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
17869
178702009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
17871
17872 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
17873 srv_tgtobj.
17874
178752009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
17876 Pedro Alves <pedro@codesourcery.com>
17877
17878 * win32-i386-low.c (i386_get_thread_context): Handle systems that
17879 don't support CONTEXT_EXTENDED_REGISTERS.
17880 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
17881 (the_low_target): Install them.
17882 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
17883 failing with ERROR_PIPE_NOT_CONNECTED.
17884
178852009-06-30 Doug Evans <dje@google.com>
17886 Pierre Muller <muller@ics.u-strasbg.fr>
17887
17888 Add h/w watchpoint support to x86-linux, win32-i386.
17889 * Makefile.in (SFILES): Add i386-low.c
17890 (i386_low_h): Define.
17891 (i386-low.o): Add dependencies.
17892 (linux-x86-low.o): Add i386-low.h dependency.
17893 (win32-i386-low.o): Ditto.
17894 * i386-low.c: New file.
17895 * i386-low.h: New file.
17896 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
17897 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
17898 * linux-low.c (linux_add_process): Initialize arch_private.
17899 (linux_remove_process): Free arch_private.
17900 (add_lwp): Initialize arch_private.
17901 (delete_lwp): Free arch_private.
17902 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
17903 provided.
17904 * linux-low.h (process_info_private): New member arch_private.
17905 (lwp_info): New member arch_private.
17906 (linux_target_ops): New members new_process, new_thread,
17907 prepare_to_resume.
17908 (ptid_of): New macro.
17909 * linux-x86-low.c: Include stddef.h, i386-low.h.
17910 (arch_process_info): New struct.
17911 (arch_lwp_info): New struct.
17912 (x86_linux_dr_get, x86_linux_dr_set): New functions.
17913 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17914 (i386_dr_low_get_status): New function.
17915 (x86_insert_point, x86_remove_point): New functions.
17916 (x86_stopped_by_watchpoint): New function.
17917 (x86_stopped_data_address): New function.
17918 (x86_linux_new_process, x86_linux_new_thread): New functions.
17919 (x86_linux_prepare_to_resume): New function.
17920 (the_low_target): Add entries for insert_point, remove_point,
17921 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
17922 prepare_to_resume.
17923 * server.c (debug_hw_points): New global.
17924 (monitor_show_help): Document set debug-hw-points.
17925 (handle_query): Process "set debug-hw-points".
17926 * server.h (debug_hw_points): Declare.
17927 (paddress): Declare.
17928 * utils.c (NUMCELLS, CELLSIZE): New macros.
17929 (get_sell, xsnprintf, paddress): New functions.
17930 * win32-arm-low.c (the_low_target): Add entries for insert_point,
17931 remove_point, stopped_by_watchpoint, stopped_data_address.
17932 * win32-i386-low.c: Include i386-low.h.
17933 (debug_reg_state): Replaces dr.
17934 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17935 (i386_dr_low_get_status): New function.
17936 (i386_insert_point, i386_remove_point): New functions.
17937 (i386_stopped_by_watchpoint): New function.
17938 (i386_stopped_data_address): New function.
17939 (i386_initial_stuff): Update.
17940 (get_thread_context,set_thread_context,i386_thread_added): Update.
17941 (the_low_target): Add entries for insert_point,
17942 remove_point, stopped_by_watchpoint, stopped_data_address.
17943 * win32-low.c (win32_insert_watchpoint): New function.
17944 (win32_remove_watchpoint): New function.
17945 (win32_stopped_by_watchpoint): New function.
17946 (win32_stopped_data_address): New function.
17947 (win32_target_ops): Add entries for insert_watchpoint,
17948 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
17949 * win32-low.h (win32_target_ops): New members insert_point,
17950 remove_point, stopped_by_watchpoint, stopped_data_address.
17951
179522009-06-25 Pedro Alves <pedro@codesourcery.com>
17953
17954 * server.c (process_serial_event): Re-return unsupported, not
17955 error, if the type isn't recognized. Re-allow supporting only
17956 insert or remove packets. Also call require_running for
17957 breakpoints. Add missing break statement to default case. Tidy.
17958 * target.h (struct target_ops): Rename insert_watchpoint to
17959 insert_point, and remove_watchpoint to remove_point.
17960
17961 * linux-low.h (struct linux_target_ops): Likewise.
17962 * linux-low.c (linux_insert_watchpoint): Rename to ...
17963 (linux_insert_point): ... this. Adjust.
17964 (linux_remove_watchpoint): Rename to ...
17965 (linux_remove_point): ... this. Adjust.
17966 (linux_target_ops): Adjust.
17967 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
17968 (cris_insert_point): ... this.
17969 (cris_remove_watchpoint): Rename to ...
17970 (cris_remove_point): ... this.
17971 (the_low_target): Adjust.
17972
179732009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
17974
17975 * server.c (handle_v_kill): Pass signal_pid to
17976 kill_inferior if multi_process is zero.
17977
179782009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
17979
17980 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
17981 * target.h (target_ops): Comment for *_watchpoint to make it clear
17982 the functions can get types '0' and '1'.
17983
179842009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
17985
17986 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
17987 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
17988 * regcache.c (get_regcache): Likewise.
17989 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
17990 * win32-low.c (child_fetch_inferior_registers): Remove check for
17991 regno 0.
17992
179932009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
17994 Pedro Alves <pedro@codesourcery.com>
17995
17996 * target.h (struct target_ops) <supports_multi_process>: New
17997 callback.
17998 (target_supports_multi_process): New.
17999 * server.c (handle_query): Even if GDB reports support, only
18000 enable multi-process if the target also supports it. Report
18001 multi-process support only if the target backend supports it.
18002 * linux-low.c (linux_supports_multi_process): New function.
18003 (linux_target_ops): Install it as target_supports_multi_process
18004 callback.
18005
180062009-05-24 Doug Evans <dje@google.com>
18007
18008 Global renaming of find_thread_pid to find_thread_ptid.
18009 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18010 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18011 All callers updated.
18012
18013 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18014 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18015 directly.
18016
18017 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18018 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18019 (linux_resume_one_lwp): Ditto.
18020
180212009-05-23 Doug Evans <dje@google.com>
18022
18023 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18024 from struct inferior_list_entry * to struct lwp_info *.
18025 All callers updated.
18026
180272009-05-13 Doug Evans <dje@google.com>
18028
18029 * linux-x86-low.c: Don't include assert.h.
18030 (x86_siginfo_fixup): Use fatal, not assert.
18031 (x86_arch_setup): Fix comment.
18032
180332009-05-12 Doug Evans <dje@google.com>
18034
18035 Biarch support for i386/amd64 gdbserver.
18036 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18037 Add linux-x86-low.c.
18038 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18039 (linux-x86-low.o): Add.
18040 * linux-x86-64-low.c: Delete.
18041 * linux-i386-low.c: Delete.
18042 * linux-x86-low.c: New file.
18043 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18044 linux-x86-low.o.
18045 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18046 linux-x86-low.o.
18047 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18048 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18049 (linux_child_pid_to_exec_file): New function.
18050 (elf_64_header_p, elf_64_file_p): New functions.
18051 (siginfo_fixup): New function.
18052 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18053 give target a chance to convert layout.
18054 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18055 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18056
180572009-05-07 Doug Evans <dje@google.com>
18058
18059 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18060 (regsets_store_inferior_registers): Ditto.
18061
180622009-05-06 Pedro Alves <pedro@codesourcery.com>
18063
18064 PR server/10048
18065
18066 * linux-low.c (must_set_ptrace_flags): Delete.
18067 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18068 of the global.
18069 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18070 `lwp->must_set_ptrace_flags' instead.
18071 (linux_wait_for_event_1): Set ptrace options here.
18072 (linux_wait_1): ... not here.
18073
180742009-04-30 Doug Evans <dje@google.com>
18075
18076 * inferiors.c (started_inferior_callback): New function.
18077 (attached_inferior_callback): New function.
18078 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18079 * server.c (print_started_pid, print_attached_pid): New functions.
18080 (detach_or_kill_for_exit): New function.
18081 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18082 * server.h (have_started_inferiors_p): Declare.
18083 (have_attached_inferiors_p): Declare.
18084
18085 * inferiors.c (remove_process): Fix memory leak, free process.
18086 * linux-low.c (linux_remove_process): New function.
18087 (linux_kill): Call it instead of remove_process.
18088 (linux_detach, linux_wait_1): Ditto.
18089
180902009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18091
18092 * configure.srv: Add x86 Windows CE target.
18093
180942009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18095
18096 * inferiors.c (get_thread_process): Make global.
18097 * server.h (get_thread_process): Add prototype.
18098 * thread-db.c (find_one_thread): Use get_thread_process
18099 instead of current_process.
18100 (thread_db_get_tls_address): Do not crash if called when
18101 thread layer is not yet initialized.
18102
181032009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18104
18105 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18106 * spu-low.c (current_tid): Rename to ...
18107 (current_ptid): ... this.
18108 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18109 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18110 ptid_get_lwp (current_ptid) instead of current_tid.
18111 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18112 instead of current_tid. Use find_process_pid to verify pid
18113 argument is valid. Pass proper argument to remove_process.
18114 (spu_thread_alive): Compare current_ptid instead of current_tid.
18115 (spu_resume): Likewise.
18116
181172009-04-02 Pedro Alves <pedro@codesourcery.com>
18118
18119 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18120 variable.
18121
181222009-04-01 Pedro Alves <pedro@codesourcery.com>
18123
18124 Implement the multiprocess extensions, and add linux multiprocess
18125 support.
18126
18127 * server.h (ULONGEST): Declare.
18128 (struct ptid, ptid_t): New.
18129 (minus_one_ptid, null_ptid): Declare.
18130 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18131 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18132 (struct inferior_list_entry): Change `id' type from unsigned from
18133 to ptid_t.
18134 (struct sym_cache, struct breakpoint, struct
18135 process_info_private): Forward declare.
18136 (struct process_info): Declare.
18137 (current_process): Declare.
18138 (all_processes): Declare.
18139 (initialize_inferiors): Declare.
18140 (add_thread): Adjust to use ptid_t.
18141 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18142 (add_process, remove_process, find_thread_pid): Declare.
18143 (find_inferior_id): Adjust to use ptid_t.
18144 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18145 (multi_process): Declare.
18146 (push_event): Adjust to use ptid_t.
18147 (read_ptid, write_ptid): Declare.
18148 (prepare_resume_reply): Adjust to use ptid_t.
18149 (clear_symbol_cache): Declare.
18150 * inferiors.c (all_processes): New.
18151 (null_ptid, minus_one_ptid): New.
18152 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18153 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18154 (add_thread): Change unsigned long to ptid. Remove gdb_id
18155 parameter. Adjust.
18156 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18157 (gdb_id_to_thread): Rename to ...
18158 (find_thread_pid): ... this. Change unsigned long to ptid.
18159 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18160 (loaded_dll, pull_pid_from_list): Adjust.
18161 (add_process, remove_process, find_process_pid)
18162 (get_thread_process, current_process, initialize_inferiors): New.
18163 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18164 (struct target_waitstatus) <related_pid>: Ditto.
18165 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18166 return type to int.
18167 (struct target_ops) <join>: Add `pid' argument.
18168 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18169 (struct target_ops) <wait>: Add `ptid' field. Change return type
18170 to ptid.
18171 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18172 (mywait): Add `ptid' argument. Change return type to ptid_t.
18173 (target_pid_to_str): Declare.
18174 * target.c (set_desired_inferior): Adjust to use ptids.
18175 (mywait): Add new `ptid' argument. Adjust.
18176 (target_pid_to_str): New.
18177 * mem-break.h (free_all_breakpoints): Declare.
18178 * mem-break.c (breakpoints): Delelete.
18179 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18180 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18181 to use per-process breakpoint list.
18182 (free_all_breakpoints): New.
18183 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18184 (symbol_cache, all_symbols_looked_up): Delete.
18185 (hexchars): New.
18186 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18187 read_ptid): New.
18188 (prepare_resume_reply): Change ptid argument's type from unsigned
18189 long to ptid_t. Adjust. Implement W;process and X;process.
18190 (free_sym_cache, clear_symbol_cache): New.
18191 (look_up_one_symbol): Adjust to per-process symbol cache. *
18192 * server.c (cont_thread, general_thread, step_thread): Change type
18193 to ptid_t.
18194 (attached): Delete.
18195 (multi_process): New.
18196 (last_ptid): Change type to ptid_t.
18197 (struct vstop_notif) <ptid>: Change type to ptid_t.
18198 (queue_stop_reply, push_event): Change `ptid' argument's type to
18199 ptid_t.
18200 (discard_queued_stop_replies): Add `pid' argument.
18201 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18202 changes. Don't reference the `attached' global.
18203 (attach_inferior): Adjust to mywait interface changes.
18204 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18205 features. Handle and report "multiprocess+". Handle
18206 "qAttached:PID".
18207 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18208 changes.
18209 (handle_v_kill): New.
18210 (handle_v_stopped): Adjust to use target_pid_to_str.
18211 (handle_v_requests): Allow multiple attaches and runs when
18212 multiprocess extensions are in effect. Handle "vKill".
18213 (myresume): Adjust to use ptids.
18214 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18215 (handle_status): Adjust to discard_queued_stop_replies interface
18216 change.
18217 (first_thread_of, kill_inferior_callback)
18218 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18219 (main): Call initialize_inferiors. Adjust to use ptids, killing
18220 and detaching from all inferiors. Handle multiprocess packet
18221 variants.
18222 * linux-low.h: Include gdb_proc_service.h.
18223 (struct process_info_private): New.
18224 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18225 <lwpid_of>: Use ptid_get_lwp.
18226 (get_lwp_thread): Adjust.
18227 (struct lwp_info): Add `dead' member.
18228 (find_lwp_pid): Declare.
18229 * linux-low.c (thread_db_active): Delete.
18230 (new_inferior): Adjust comment.
18231 (inferior_pid): Delete.
18232 (linux_add_process): New.
18233 (handle_extended_wait): Adjust.
18234 (add_lwp): Change unsigned long to ptid.
18235 (linux_create_inferior): Add process to processes table. Adjust
18236 to use ptids. Don't set new_inferior here.
18237 (linux_attach_lwp): Rename to ...
18238 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18239 it. Adjust to use ptids.
18240 (linux_attach_lwp): New.
18241 (linux_attach): Add process to processes table. Don't set
18242 new_inferior here.
18243 (struct counter): New.
18244 (second_thread_of_pid_p, last_thread_of_process_p): New.
18245 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18246 multiple processes.
18247 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18248 processes. Remove process from process table.
18249 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18250 to multiple processes.
18251 (any_thread_of): New.
18252 (linux_detach): Add `pid' argument, and handle it. Remove process
18253 from processes table.
18254 (linux_join): Add `pid' argument. Handle it.
18255 (linux_thread_alive): Change unsighed long argument to ptid_t.
18256 Consider dead lwps as not being alive.
18257 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18258 threads we're not interested in.
18259 (same_lwp, find_lwp_pid): New.
18260 (linux_wait_for_lwp): Change `pid' argument's type from int to
18261 ptid_t. Adjust.
18262 (linux_wait_for_event): Rename to ...
18263 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18264 from int to ptid_t. Adjust.
18265 (linux_wait_for_event): New.
18266 (linux_wait_1): Add `ptid' argument. Change return type to
18267 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18268 that exit from the process table.
18269 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18270 Adjust.
18271 (mark_lwp_dead): New.
18272 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18273 stopping all threads, mark its main lwp as dead.
18274 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18275 ptids.
18276 (fetch_register, usr_store_inferior_registers)
18277 (regsets_fetch_inferior_registers)
18278 (regsets_store_inferior_registers, linux_read_memory)
18279 (linux_write_memory): Inline `inferior_pid'.
18280 (linux_look_up_symbols): Adjust to use per-process
18281 `thread_db_active'.
18282 (linux_request_interrupt): Adjust to use ptids.
18283 (linux_read_auxv): Inline `inferior_pid'.
18284 (initialize_low): Don't reference thread_db_active.
18285 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18286 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18287 (ps_getpid): Return the pid of the current inferior.
18288 * thread-db.c (proc_handle, thread_agent): Delete.
18289 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18290 per-process data.
18291 (find_one_thread): Change argument type to ptid_t. Adjust to
18292 per-process data.
18293 (maybe_attach_thread): Adjust to per-process data and ptids.
18294 (thread_db_find_new_threads): Ditto.
18295 (thread_db_init): Ditto.
18296 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18297 processes table. Adjust to use ptids.
18298 (spu_kill, spu_detach): Adjust interface. Remove process from
18299 processes table.
18300 (spu_join, spu_thread_alive): Adjust interface.
18301 (spu_wait): Adjust interface. Remove process from processes
18302 table. Adjust to use ptids.
18303 * win32-low.c (current_inferior_tid): Delete.
18304 (current_inferior_ptid): New.
18305 (debug_event_ptid): New.
18306 (thread_rec): Take a ptid. Adjust.
18307 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18308 (child_delete_thread): Ditto.
18309 (do_initial_child_stuff): Add `attached' argument. Add process to
18310 processes table.
18311 (child_fetch_inferior_registers, child_store_inferior_registers):
18312 Adjust.
18313 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18314 (win32_attach): Pass 1 to do_initial_child_stuff.
18315 (win32_kill): Adjust interface. Remove process from processes
18316 table.
18317 (win32_detach): Ditto.
18318 (win32_join): Adjust interface.
18319 (win32_thread_alive): Take a ptid.
18320 (win32_resume): Adjust to use ptids.
18321 (get_child_debug_event): Ditto.
18322 (win32_wait): Adjust interface. Remove exiting process from
18323 processes table.
18324
183252009-04-01 Pedro Alves <pedro@codesourcery.com>
18326
18327 Non-stop mode support.
18328
18329 * server.h (non_stop): Declare.
18330 (gdb_client_data, handler_func): Declare.
18331 (delete_file_handler, add_file_handler, start_event_loop):
18332 Declare.
18333 (handle_serial_event, handle_target_event, push_event)
18334 (putpkt_notif): Declare.
18335 * target.h (enum resume_kind): New.
18336 (struct thread_resume): Replace `step' field by `kind' field.
18337 (TARGET_WNOHANG): Define.
18338 (struct target_ops) <wait>: Add `options' argument.
18339 <supports_non_stop, async, start_non_stop>: New fields.
18340 (target_supports_non_stop, target_async): New.
18341 (start_non_stop): Declare.
18342 (mywait): Add `options' argument.
18343 * target.c (mywait): Add `options' argument. Print child exit
18344 notifications here.
18345 (start_non_stop): New.
18346 * server.c (non_stop, own_buf, mem_buf): New globals.
18347 (struct vstop_notif): New.
18348 (notif_queue): New global.
18349 (queue_stop_reply, push_event, discard_queued_stop_replies)
18350 (send_next_stop_reply): New.
18351 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18352 interface changes.
18353 (attach_inferior): In non-stop mode, don't wait for the target
18354 here.
18355 (handle_general_set): Handle QNonStop.
18356 (handle_query): When handling qC, return the current general
18357 thread, instead of the first thread of the list.
18358 (handle_query): If the backend supports non-stop mode, include
18359 QNonStop+ in the qSupported query response.
18360 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18361 and non-stop mode.
18362 (handle_v_attach, handle_v_run): Handle non-stop mode.
18363 (handle_v_stopped): New.
18364 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18365 (myresume): Adjust to use resume_kind. Handle non-stop.
18366 (queue_stop_reply_callback): New.
18367 (handle_status): Handle non-stop mode.
18368 (main): Clear non_stop flag on reconnection. Use the event-loop.
18369 Refactor serial protocol handling from here ...
18370 (process_serial_event): ... to this new function. When GDB
18371 selects any thread, select one here. In non-stop mode, wait until
18372 GDB acks all pending events before exiting.
18373 (handle_serial_event, handle_target_event): New.
18374 * remote-utils.c (remote_open): Install remote_desc in the event
18375 loop.
18376 (remote_close): Remove remote_desc from the event loop.
18377 (putpkt_binary): Rename to...
18378 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18379 (putpkt_binary): New as wrapper around putpkt_binary_1.
18380 (putpkt_notif): New.
18381 (prepare_resume_reply): In non-stop mode, don't change the
18382 general_thread.
18383 * event-loop.c: New.
18384 * Makefile.in (OBJ): Add event-loop.o.
18385 (event-loop.o): New rule.
18386
18387 * linux-low.h (pid_of): Moved here.
18388 (lwpid_of): New.
18389 (get_lwp_thread): Use lwpid_of.
18390 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18391 * linux-low.c (pid_of): Delete.
18392 (inferior_pid): Use lwpid_of.
18393 (linux_event_pipe): New.
18394 (target_is_async_p): New.
18395 (delete_lwp): New.
18396 (handle_extended_wait): Use lwpid_of.
18397 (add_lwp): Don't set lwpid field.
18398 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18399 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18400 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18401 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18402 first. Adjust to linux_wait_for_event interface changes. Use
18403 lwpid_of.
18404 (linux_detach): Don't delete the main lwp here.
18405 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18406 (status_pending_p): Don't consider explicitly suspended lwps.
18407 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18408 pointer. Add OPTIONS argument. Change return type to int. Use
18409 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18410 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18411 pointer. Add status pointer argument. Return a pid instead of a
18412 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18413 changes. In non-stop mode, don't switch to a random thread.
18414 (linux_wait): Rename to...
18415 (linux_wait_1): ... this. Add target_options argument, and handle
18416 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18417 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18418 clean exit and signal exit code. Don't stop all threads in
18419 non-stop mode. In all-stop mode, only stop all threads when
18420 reporting a stop to GDB. Handle explicit thread stop requests.
18421 (async_file_flush, async_file_mark): New.
18422 (linux_wait): New.
18423 (send_sigstop): Use lwpid_of.
18424 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18425 interface changes. In non-stop mode, don't switch to a random
18426 thread.
18427 (linux_resume_one_lwp): Use lwpid_of.
18428 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18429 (linux_resume_one_thread): ... this. Handle resume_stop. In
18430 non-stop mode, don't look for pending flag in all threads.
18431 (resume_status_pending_p): Don't consider explicitly suspended
18432 threads.
18433 (my_waitpid): Reimplement. Emulate __WALL.
18434 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18435 Use lwpid_of.
18436 (sigchld_handler, linux_supports_non_stop, linux_async)
18437 (linux_start_non_stop): New.
18438 (linux_target_ops): Register linux_supports_non_stop, linux_async
18439 and linux_start_non_stop.
18440 (initialize_low): Install SIGCHLD handler.
18441 * thread-db.c (thread_db_create_event, find_one_thread)
18442 (thread_db_get_tls_address): Use lwpid_of.
18443 * win32-low.c (win32_detach): Adjust to use resume_kind.
18444 (win32_wait): Add `options' argument.
18445 * spu-low.c (spu_resume): Adjust to use resume_kind.
18446 (spu_wait): Add `options' argument.
18447
184482009-04-01 Pedro Alves <pedro@codesourcery.com>
18449
18450 Decouple target code from remote protocol.
18451
18452 * target.h (enum target_waitkind): New.
18453 (struct target_waitstatus): New.
18454 (struct target_ops) <wait>: Return an unsigned long. Take a
18455 target_waitstatus pointer instead of a char pointer.
18456 (mywait): Likewise.
18457 * target.c (mywait): Change prototype to return an unsigned long.
18458 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18459 * server.h (thread_from_wait, old_thread_from_wait): Delete
18460 declarations.
18461 (prepare_resume_reply): Change prototype to take a
18462 target_waitstatus.
18463 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18464 (last_status, last_ptid): New.
18465 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18466 pid instead of a signal.
18467 (attach_inferior): Remove "status" and "signal" parameters.
18468 Adjust.
18469 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18470 not as an address.
18471 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18472 (handle_v_requests, myresume): Remove "status" and "signal"
18473 parameters. Adjust.
18474 (handle_status): New.
18475 (main): Delete local `status'. Adjust.
18476 * remote-utils.c: Include target.h.
18477 (prepare_resume_reply): Change prototype to take a
18478 target_waitstatus. Adjust.
18479
18480 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18481 interface.
18482 * spu-low.c (spu_wait): Adjust.
18483 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18484 Delete.
18485 (win32_wait): Adjust.
18486
184872009-04-01 Pedro Alves <pedro@codesourcery.com>
18488
18489 * target.h (struct thread_resume): Delete leave_stopped member.
18490 (struct target_ops): Add a `n' argument to the `resume' callback.
18491 * server.c (start_inferior): Adjust.
18492 (handle_v_cont, myresume): Adjust.
18493 * linux-low.c (check_removed_breakpoint): Adjust to resume
18494 interface change, and to removed leave_stopped field.
18495 (resume_ptr): Delete.
18496 (struct thread_resume_array): New.
18497 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18498 resume interface change.
18499 (linux_continue_one_thread, linux_queue_one_thread)
18500 (resume_status_pending_p): Check if the resume field is NULL
18501 instead of checking the leave_stopped member.
18502 (linux_resume): Adjust to the target resume interface change.
18503 * spu-low.c (spu_resume): Adjust to the target resume interface
18504 change.
18505 * win32-low.c (win32_detach, win32_resume): Ditto.
18506
185072009-04-01 Pedro Alves <pedro@codesourcery.com>
18508
18509 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18510 flag.
18511 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18512 pending.
18513 (linux_continue_one_thread): Only preserve the stepping flag if
18514 there's a pending breakpoint.
18515
185162009-03-31 Pedro Alves <pedro@codesourcery.com>
18517
18518 * server.c (main): After the inferior having exited, call
18519 remote_close before exiting gdbserver.
18520
185212009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18522
18523 Fix size of FPSCR in Power 7 processors.
18524 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18525 (PPC_FEATURE_HAS_DFP): New #define.
18526 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18527 size of the FPSCR.
18528
185292009-03-23 Pedro Alves <pedro@codesourcery.com>
18530
18531 * server.c (handle_query) Whitespace and formatting.
18532
185332009-03-22 Pedro Alves <pedro@codesourcery.com>
18534
18535 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18536 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18537 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18538 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18539 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18540 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18541 Makefile.in, configure.ac: Fix whitespace throughout.
18542 * configure: Regenerate.
18543
185442009-03-22 Pedro Alves <pedro@codesourcery.com>
18545
18546 * inferiors.c (find_inferior): Make it safe for the callback
18547 function to delete the currently iterated inferior.
18548
185492009-03-22 Pedro Alves <pedro@codesourcery.com>
18550
18551 * Makefile.in (linuw_low_h): Move higher.
18552 (thread-db.o): Depend on $(linux_low_h).
18553
185542009-03-17 Pedro Alves <pedro@codesourcery.com>
18555
18556 Rename "process" to "lwp" throughout.
18557
18558 * linux-low.c (all_processes): Rename to...
18559 (all_lwps): ... this.
18560 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18561 (add_process): Rename to ...
18562 (add_lwp): ... this. Adjust.
18563 (linux_create_inferior): Adjust.
18564 (linux_attach_lwp): Adjust.
18565 (linux_attach): Adjust.
18566 (linux_kill_one_process): Rename to ...
18567 (linux_kill_one_lwp): ... this. Adjust.
18568 (linux_kill): Adjust.
18569 (linux_detach_one_process): Rename to ...
18570 (linux_detach_one_lwp): ... this. Adjust.
18571 (linux_detach): Adjust.
18572 (check_removed_breakpoint): Adjust.
18573 (status_pending_p): Adjust.
18574 (linux_wait_for_process): Rename to ...
18575 (linux_wait_for_lwp): ... this. Adjust.
18576 (linux_wait_for_event): Adjust.
18577 (send_sigstop): Adjust.
18578 (wait_for_sigstop): Adjust.
18579 (stop_all_processes): Rename to ...
18580 (stop_all_lwps): ... this.
18581 (linux_resume_one_process): Rename to ...
18582 (linux_resume_one_lwp): ... this. Adjust.
18583 (linux_set_resume_request, linux_continue_one_thread)
18584 (linux_queue_one_thread, resume_status_pending_p)
18585 (usr_store_inferior_registers, regsets_store_inferior_registers)
18586 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18587 Adjust.
18588 * linux-low.h (get_process): Rename to ...
18589 (get_lwp): ... this. Adjust.
18590 (get_thread_process): Rename to ...
18591 (get_thread_lwp): ... this. Adjust.
18592 (get_process_thread): Rename to ...
18593 (get_lwp_thread): ... this. Adjust.
18594 (struct process_info): Rename to ...
18595 (struct lwp_info): ... this.
18596 (all_processes): Rename to ...
18597 (all_lwps): ... this.
18598 * proc-service.c (ps_lgetregs): Adjust.
18599 * thread-db.c (thread_db_create_event, find_one_thread)
18600 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18601
186022009-03-14 Pedro Alves <pedro@codesourcery.com>
18603
18604 * server.c (handle_query): Handle "qAttached".
18605
186062009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18607
18608 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18609 GPLv3, update license URL.
18610
186112009-03-01 Doug Evans <dje@google.com>
18612
18613 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18614 (server_h): Add gdb_signals.h.
18615 (signals.o): Update.
18616 * server.h (target_signal_from_host,target_signal_to_host_p)
18617 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18618
186192009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18620
18621 * remote-utils.c (getpkt): Also generate remote-debug
18622 information if noack_mode is set.
18623
186242009-02-06 Pedro Alves <pedro@codesourcery.com>
18625
18626 * server.c (handle_query): Report qXfer:siginfo:read and
18627 qXfer:siginfo:write as supported and handle them.
18628 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18629 * linux-low.c (linux_xfer_siginfo): New.
18630 (linux_target_ops): Set it.
18631
186322009-01-26 Pedro Alves <pedro@codesourcery.com>
18633
18634 * server.c (gdbserver_usage): Mention --remote-debug.
18635 (main): Accept '--remote-debug' switch.
18636
186372009-01-18 Doug Evans <dje@google.com>
18638
18639 * regcache.c (new_register_cache): No need to check result of xcalloc.
18640 * server.c (handle_search_memory): Back out calls to xmalloc,
18641 result is checked and error is returned to user upon failure.
18642 (handle_query): Ditto. Add more checks for result of malloc.
18643 (handle_v_cont): Check result of malloc, report error back to
18644 user upon failure.
18645 (handle_v_run): Ditto. Call freeargv.
18646 * server.h (freeargv): Declare.
18647 * utils.c (freeargv): New fn.
18648
186492009-01-15 Doug Evans <dje@google.com>
18650
18651 * gdbreplay.c (perror_with_name): Make arg const char *.
18652 * server.h (target_signal_to_name): Make return type const char *.
18653 * thread-db.c (thread_db_err_str): Make return type const char *.
18654 * utils.c (perror_with_name): Make arg const char *.
18655
186562009-01-14 Pedro Alves <pedro@codesourcery.com>
18657
18658 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18659 when handling a EXIT_PROCESS_DEBUG_EVENT.
18660
186612009-01-06 Joel Brobecker <brobecker@adacore.com>
18662
18663 * gdbreplay.c (gdbreplay_version): Update copyright year.
18664 * server.c (gdbserver_version): Likewise.
18665
186662009-01-05 Doug Evans <dje@google.com>
18667
18668 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18669 (handle_extended_wait): Improve comment.
18670
186712008-12-13 Doug Evans <dje@google.com>
18672
18673 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18674 * server.h (ATTR_MALLOC): New macro.
18675 (xmalloc,xcalloc,xstrdup): Declare.
18676 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18677 * inferiors.c: Ditto.
18678 * linux-low.c: Ditto.
18679 * mem-break.c: Ditto.
18680 * regcache.c: Ditto.
18681 * remote-utils.c: Ditto.
18682 * server.c: Ditto.
18683 * target.c: Ditto.
18684 * win32-low.c: Ditto.
18685
186862008-12-12 Doug Evans <dje@google.com>
18687
18688 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18689 in debugging printf.
18690
18691 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18692
186932008-12-09 Doug Evans <dje@google.com>
18694
18695 * linux-low.h (struct process_info): Delete member tid, unused.
18696 * thread-db.c (find_one_thread): Update.
18697 (maybe_attach_thread): Update.
18698
186992008-12-02 Pedro Alves <pedro@codesourcery.com>
18700
18701 * target.h (struct target_ops): Add qxfer_osdata member.
18702 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18703 and dirent.h.
18704 (linux_qxfer_osdata): New functions.
18705 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18706 callback.
18707 * server.c (handle_query): Handle "qXfer:osdata:read:".
18708 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18709 (buffer_xml_printf): New functions.
18710 * server.h (struct buffer): New.
18711 (buffer_grow_str, buffer_grow_str0): New macros.
18712 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18713 (buffer_xml_printf): Declare.
18714
187152008-11-24 Doug Evans <dje@google.com>
18716
18717 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18718
187192008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18720
18721 * server.c (handle_v_run): Always use the supplied argument list.
18722
187232008-11-19 Bob Wilson <bob.wilson@acm.org>
18724
18725 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18726 (xtensa_regmap_table): Add entry for scompare1.
18727
187282008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18729
18730 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18731 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18732 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18733 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18734 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18735 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18736 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18737 XML target descriptions.
18738 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18739 when inferior is running on an ISA 2.05 or later processor. Add
18740 special case to return offset for full 64-bit slot of FPSCR when
18741 in 32-bits.
18742
187432008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18744
18745 * Makefile.in (SFILES, clean): Added sparc64 files.
18746 (reg-sparc64.o, reg-sparc64.c): New.
18747 * configure.srv (sparc*-*-linux*): New configuration.
18748 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18749 syscall arguments for SPARC.
18750 (regsets_store_inferior_registers): Likewise.
18751 * linux-sparc-low.c: New file.
18752
187532008-10-21 Doug Evans <dje@google.com>
18754
18755 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18756 (READLINE_DIR,READLINE_DEP): Delete.
18757 (INTERNAL_CFLAGS): Update.
18758 (LINTFLAGS): Update.
18759
187602008-10-10 Pedro Alves <pedro@codesourcery.com>
18761
18762 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18763 whole argv from the last run, not just argv[0].
18764
187652008-09-08 Pedro Alves <pedro@codesourcery.com>
18766
18767 * regcache.c (new_register_cache): Return NULL if the register
18768 cache size isn't known yet.
18769 (free_register_cache): Avoid dereferencing a NULL regcache.
18770
187712008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18772
18773 * configure.srv: Merge MIPS and MIPS64.
18774
187752008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18776
18777 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18778
187792008-08-18 Luis Machado <luisgpm@br.ibm.com>
18780
18781 * Makefile.in: Add required vsx dependencies.
18782
18783 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18784 Declare init_registers_powerpc_vsx32l.
18785 Declare init_registers_powerpc_vsx64l.
18786 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18787 (ppc_arch_setup): Check for VSX in hwcap.
18788 (ppc_fill_vsxregset): New function.
18789 (ppc_store_vsxregset): New function.
18790 Add new VSX entry in regset_info target_regsets.
18791
18792 * configure.srv: Add new VSX dependencies.
18793
187942008-08-12 Pedro Alves <pedro@codesourcery.com>
18795
18796 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
18797 (remote_open): Set or clear transport_is_reliable.
18798 (putpkt_binary): Don't expect acks in noack mode.
18799 (getpkt): Don't send ack/nac in noack mode.
18800 * server.c (handle_general_set): Handle QStartNoAckMode.
18801 (handle_query): If connected by tcp pass QStartNoAckMode+ in
18802 qSupported.
18803 (main): Reset noack_mode on every connection.
18804 * server.h (noack_mode): Declare.
18805
188062008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18807
18808 * Makefile.in (GDBREPLAY_OBS): New variable.
18809 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18810
188112008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
18812 Daniel Jacobowitz <dan@codesourcery.com>
18813
18814 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
18815 (usr_store_inferior_registers): Likewise.
18816 (regsets_store_inferior_registers): Likewise.
18817
188182008-07-31 Rolf Jansen <rj@surtec.com>
18819 Pedro Alves <pedro@codesourcery.com>
18820
18821 * configure.ac: Check for memmem declaration.
18822 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18823 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
18824 (disable_packet_qfThreadInfo): Unconditionally compile.
18825 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
18826 * configure, config.in: Regenerate.
18827
188282008-07-28 Doug Kwan <dougkwan@google.com>
18829
18830 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
18831 (linux_write_memory): Remove declaration of errno.
18832
188332008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
18834
18835 * linux-low.c (handle_extended_wait): Do not use "status"
18836 variable uninitialized.
18837
188382008-07-07 Pedro Alves <pedro@codesourcery.com>
18839
18840 * server.c (handle_v_attach): Inhibit reporting dll changes.
18841
188422008-06-27 Pedro Alves <pedro@codesourcery.com>
18843
18844 * remote-utils.c (prepare_resume_reply): If requested, don't
18845 output "thread:TID" in the T stop reply.
18846
18847 * server.c (disable_packet_vCont, disable_packet_Tthread)
18848 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
18849 (handle_query): If requested, disable support for qC, qfThreadInfo
18850 and qsThreadInfo.
18851 (handle_v_requests): If requested, disable support for vCont.
18852 (gdbserver_show_disableable): New.
18853 (main): Handle --disable-packet and --disable-packet=LIST.
18854
18855 * server.h (disable_packet_vCont, disable_packet_Tthread)
18856 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
18857
188582008-06-20 Carlos O'Donell <carlos@codesourcery.com>
18859
18860 * server.c (gdbserver_usage): Mention --version.
18861
188622008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
18863
18864 * Makefile.in (gdbreplay.o): New rule.
18865
188662008-06-06 Joseph Myers <joseph@codesourcery.com>
18867
18868 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
18869 message, not gdbserver.
18870
188712008-06-05 Vladimir Prus <vladimir@codesourcery.com>
18872 Nathan Sidwell <nathan@codesourcery.com>
18873 Joseph Myers <joseph@codesourcery.com>
18874
18875 * acinclude.m4: Include ../../config/acx.m4.
18876 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
18877 * configure, config.in: Regenerate.
18878 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
18879 * server.c (gdbserver_version): Print PKGVERSION.
18880 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
18881 (main): Adjust gdbserver_usage calls.
18882 * gdbreplay.c (version, host_name): Add declarations.
18883 (gdbreplay_version, gdbreplay_usage): New.
18884 (main): Accept --version and --help options.
18885
188862008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
18887
18888 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
18889 (arm_breakpoint_at): Handle Thumb.
18890 (the_low_target): Add comment.
18891
188922008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
18893
18894 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
18895
188962008-05-09 Doug Evans <dje@google.com>
18897
18898 * server.h (decode_search_memory_packet): Declare.
18899 * remote-utils.c (decode_search_memory_packet): New fn.
18900 * server.c (handle_search_memory_1): New fn.
18901 (handle_search_memory): New fn.
18902 (handle_query): Process qSearch:memory packets.
18903
189042008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
18905
18906 * regcache.c (registers_length): Remove.
18907 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
18908 full register packet.
18909 * regcache.h (registers_length): Remove prototype.
18910 * server.h (PBUFSIZ): Define to 16384.
18911
189122008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
18913
18914 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
18915 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
18916 powerpc-64l.o, and powerpc-altivec64l.o.
18917 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
18918 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
18919 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
18920 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
18921 rs6000/power-linux.xml, and rs6000/power64-linux.xml
18922 to srv_xmlfiles.
18923
18924 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
18925 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
18926 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
18927 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
18928 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
18929 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
18930 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
18931 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
18932 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
18933 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
18934 (clean): Update.
18935
18936 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
18937 (init_registers_powerpc_32l): ... this new prototype.
18938 (init_registers_powerpc_32): Remove, replace by ...
18939 (init_registers_powerpc_altivec32l): ... this new prototype.
18940 (init_registers_powerpc_e500): Remove, replace by ...
18941 (init_registers_powerpc_e500l): ... this new prototype.
18942 (init_registers_ppc64): Remove, replace by ...
18943 (init_registers_powerpc_64l): ... this new prototype.
18944 (init_registers_powerpc_64): Remove, replace by ...
18945 (init_registers_powerpc_altivec64l): ... this new prototype.
18946 (ppc_num_regs): Set to 73.
18947 (PT_ORIG_R3, PT_TRAP): Define if necessary.
18948 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
18949 (ppc_cannot_store_register): Handle orig_r3 and trap.
18950 (ppc_arch_setup): Update init_registers_... calls.
18951 (ppc_fill_gregset): Handle orig_r3 and trap.
18952
18953 * inferiors.c (clear_inferiors): Reset current_inferior.
18954
189552008-04-23 Paolo Bonzini <bonzini@gnu.org>
18956
18957 * acinclude.m4: Add override.m4.
18958 * configure: Regenerate.
18959
189602008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18961
18962 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
18963 initial call to init_register_ppc64.
18964
189652008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18966
18967 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
18968 single powerpc*-*-linux* case.
18969 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
18970
189712008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
18972
18973 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
18974 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
18975 from reg_xmlfiles.
18976 * linux-ppc-low.c: Include <elf.h>.
18977 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
18978 (ppc_hwcap): New global variable.
18979 (ppc_regmap): Remove __SPE__ #ifdef sections.
18980 (ppc_regmap_e500): New global variable.
18981 (ppc_cannot_store_register): Update __SPE__ special case.
18982 (ppc_get_hwcap): New function.
18983 (ppc_arch_setup): Use it to determine whether inferior supports
18984 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
18985 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
18986 Do not access registers if target does not support AltiVec.
18987 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
18988 Do not access registers if target does not support SPE.
18989 (target_regsets): Unconditionally include AltiVec and SPE regsets.
18990
189912008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
18992
18993 * linux-low.c (disabled_regsets, num_regsets): New.
18994 (use_regsets_p): Delete.
18995 (linux_wait_for_process): Clear disabled_regsets.
18996 (regsets_fetch_inferior_registers): Check and set it.
18997 (regsets_store_inferior_registers): Likewise.
18998 (linux_fetch_registers, linux_store_registers): Do not use
18999 use_regsets_p.
19000 (initialize_low): Allocate disabled_regsets.
19001
190022008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19003
19004 * Makefile.in (LIBOBJS): New.
19005 (OBS): Use LIBOBJS.
19006 (memmem.o): New rule.
19007 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19008 * configure: Regenerated.
19009
190102008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19011
19012 * server.c (handle_query): Never return "unsupported" for
19013 qXfer:features:read queries.
19014
190152008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19016
19017 * server.c (get_features_xml): Fix inverted condition.
19018 (handle_query): Always support qXfer:feature:read.
19019
190202008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19021
19022 * server.c (wrapper_argv): New.
19023 (start_inferior): Handle wrapper_argv. If set, expect an extra
19024 trap.
19025 (gdbserver_usage): Document --wrapper.
19026 (main): Parse --wrapper.
19027
190282008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19029
19030 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19031 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19032 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19033 (ppc_set_pc): Likewise.
19034 (ppc_arch_setup): New function.
19035 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19036 of collect_register.
19037 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19038
190392008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19040
19041 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19042 instead of linux-ppc64-low.o.
19043 * linux-ppc64-low.c: Remove file.
19044 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19045 (linux-ppc64-low.o): Remove rule.
19046
19047 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19048 (init_registers_powerpc_64): Likewise.
19049 (ppc_regmap): Conditionally define depending on __powerpc64__.
19050 (ppc_cannot_store_register): Do not special-case "fpscr" when
19051 compiled on __powerpc64__.
19052 (ppc_collect_ptrace_register): New function.
19053 (ppc_supply_ptrace_register): New function.
19054 (ppc_breakpoint): Change type to "unsigned int".
19055 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19056 (the_low_target): Conditionally provide initializers for the
19057 arch_setup member depending on __powerpc64__. Install
19058 collect_ptrace_register and supply_ptrace_register members.
19059
190602008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19061
19062 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19063 * server.c (gdbserver_xmltarget): Define.
19064 (get_features_xml): Use it to replace "target.xml" and arch_string.
19065
19066 * configure.srv: Remove srv_xmltarget. Add XML files that were
19067 mentioned there to srv_xmlfiles instead. Remove conditional tests
19068 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19069 srv_xmlfiles and srv_regobj to include all possible choices.
19070 * configure.ac (srv_xmltarget): Remove.
19071 (srv_xmlfiles): Do not add "target.xml".
19072 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19073 checks for supplementary target information.
19074 * configure: Regenerate.
19075 * Makefile.in (XML_TARGET): Remove.
19076 (target.xml): Remove rule.
19077 (clean): Do not clean up target.xml.
19078 (.PRECIOUS): Do not mention target.xml.
19079
19080 * target.h (struct target_ops): Remove arch_string member.
19081 * linux-low.c (linux_arch_string): Remove.
19082 (linux_target_ops): Remove arch_string initializer.
19083 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19084 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19085 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19086 * spu-low.c (spu_arch_string): Remove.
19087 (spu_target_ops): Remove arch_string initializer.
19088 * win32-low.c (win32_arch_string): Remove.
19089 (win32_target_ops): Remove arch_string initializer.
19090 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19091 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19092 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19093
190942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19095
19096 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19097 by collect_ptrace_register and supply_ptrace_register hooks.
19098 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19099 instead of checking for the_low_target.left_pad_xfer.
19100 (usr_store_inferior_registers): Use collect_ptrace_register callback
19101 instead of checking for the_low_target.left_pad_xfer.
19102
19103 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19104 (s390_supply_ptrace_register): Likewise.
19105 (s390_fill_gregset): Call s390_collect_ptrace_register.
19106 (the_low_target): Update.
19107
19108 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19109 (ppc_supply_ptrace_register): Likewise.
19110 (the_low_target): Update.
19111
19112 * linux-i386-low.c (the_low_target): Update.
19113 * linux-x86-64-low.c (the_low_target): Update.
19114
191152008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19116
19117 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19118 reg-s390.o and reg-s390x.o.
19119
19120 * linux-low.c (new_inferior): New global variable.
19121 (linux_create_inferior, linux_attach): Set it.
19122 (linux_wait_for_process): Call the_low_target.arch_setup after the
19123 target has stopped for the first time.
19124 (initialize_low): Do not call the_low_target.arch_setup.
19125
19126 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19127 (s390_set_pc): Likewise.
19128 (s390_arch_setup): New function.
19129 (the_low_target): Use s390_arch_setup as arch_setup routine.
19130
19131 * regcache.c (realloc_register_cache): New function.
19132 (set_register_cache): Call it for each existing regcache.
19133
191342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19135
19136 * server.h (init_registers): Remove prototype.
19137
19138 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19139 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19140 instead of init_registers ().
19141 * linux-arm-low.c (init_registers_arm): Add prototype.
19142 (init_registers_arm_with_iwmmxt): Likewise.
19143 (the_low_target): Add initializer for arch_setup field.
19144 * linux-cris-low.c (init_registers_cris): Add prototype.
19145 (the_low_target): Add initializer for arch_setup field.
19146 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19147 (the_low_target): Add initializer for arch_setup field.
19148 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19149 (the_low_target): Add initializer for arch_setup field.
19150 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19151 (the_low_target): Add initializer for arch_setup field.
19152 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19153 (the_low_target): Add initializer for arch_setup field.
19154 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19155 (the_low_target): Add initializer for arch_setup field.
19156 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19157 (init_registers_mips64_linux): Likewise.
19158 (the_low_target): Add initializer for arch_setup field.
19159 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19160 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19161 (the_low_target): Add initializer for arch_setup field.
19162 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19163 (init_registers_powerpc_64): Likewise.
19164 (the_low_target): Add initializer for arch_setup field.
19165 * linux-s390-low.c (init_registers_s390): Add prototype.
19166 (init_registers_s390x): Likewise.
19167 (the_low_target): Add initializer for arch_setup field.
19168 * linux-sh-low.c (init_registers_sh): Add prototype.
19169 (the_low_target): Add initializer for arch_setup field.
19170 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19171 (the_low_target): Add initializer for arch_setup field.
19172 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19173 (the_low_target): Add initializer for arch_setup field.
19174
19175 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19176 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19177 instead of init_registers ().
19178 * win32-arm-low.c (init_registers_arm): Add prototype.
19179 (the_low_target): Add initializer for arch_setup field.
19180 * win32-i386-low.c (init_registers_i386): Add prototype.
19181 (the_low_target): Add initializer for arch_setup field.
19182
19183 * spu-low.c (init_registers_spu): Add prototype.
19184 (initialize_low): Call initialie_registers_spu () instead of
19185 initialize_registers ().
19186
191872008-02-19 Pedro Alves <pedro@codesourcery.com>
19188
19189 * server.c (handle_v_requests): When handling the vRun and vAttach
19190 packets, if already debugging a process, don't kill it. Return an
19191 error instead.
19192
191932008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19194
19195 * server.c (handle_query): Correct length check.
19196
191972008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19198
19199 * win32-low.c (do_initial_child_stuff): Add process handle
19200 parameter. Set current_process_handle and current_process_id from the
19201 parameters. Clear globals.
19202 (win32_create_inferior): Don't set current_process_handle and
19203 current_process_id here. Instead pass them on the call to
19204 do_initial_child_stuff.
19205 (win32_attach): Likewise.
19206 (win32_clear_inferiors): New.
19207 (win32_kill): Don't close the current process handle or the
19208 current thread handle here. Instead call win32_clear_inferiors.
19209 (win32_detach): Don't open a new handle to the process. Call
19210 win32_clear_inferiors.
19211 (win32_join): Don't rely on current_process_handle; open a new
19212 handle using the process id.
19213 (win32_wait): Call win32_clear_inferiors when the inferior process
19214 has exited.
19215
192162008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19217
19218 * server.c (monitor_show_help): Add "exit".
19219
192202008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19221
19222 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19223 (clean): Add reg-xtensa.c.
19224 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19225 * configure.srv (xtensa*-*-linux*) New target.
19226 * linux-xtensa-low.c: New.
19227 * xtensa-xtregs.c: New.
19228
192292008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19230
19231 * hostio.c: Don't include errno.h.
19232 (errno_to_fileio_errno): Move to hostio-errno.
19233 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19234 error number outputting to the target->hostio_last_error callback.
19235 (hostio_packet_error): Use FILEIO_EINVAL directly.
19236 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19237 calls to hostio_error.
19238 * hostio-errno.c: New.
19239 * server.h (hostio_last_error_from_errno): Declare.
19240 * target.h (target_ops): Add hostio_last_error member.
19241 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19242 as hostio_last_error handler.
19243 * spu-low.c (spu_target_ops): Likewise.
19244 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19245 (wince_hostio_last_error): New functions.
19246 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19247 as hostio_last_error handler.
19248 (win32_target_ops) [!_WIN32_WCE]: Register
19249 hostio_last_error_from_errno as hostio_last_error handler.
19250 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19251 (hostio-errno.o): New rule.
19252 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19253 * configure.srv (srv_hostio_err_objs): New variable. Default to
19254 hostio-errno.o.
19255 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19256 * configure: Regenerate.
19257
192582008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19259
19260 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19261 (linux_kill, linux_detach): Clean up the process list.
19262 * remote-utils.c (remote_open): Improve port number parsing.
19263 (putpkt_binary, input_interrupt): Only send interrupts if the target
19264 is running.
19265 * server.c (extended_protocol): Make static.
19266 (attached): Define earlier.
19267 (exit_requested, response_needed, program_argv): New variables.
19268 (target_running): New.
19269 (start_inferior): Clear attached here.
19270 (attach_inferior): Set attached here.
19271 (require_running): Define.
19272 (handle_query): Use require_running and target_running. Implement
19273 "monitor exit".
19274 (handle_v_attach, handle_v_run): New.
19275 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19276 (gdbserver_usage): Update.
19277 (main): Redo argument parsing. Handle --debug and --multi. Handle
19278 --attach along with other options or after the port. Save
19279 program_argv. Support no initial program. Resynchronize
19280 communication with GDB after an error. Handle "monitor exit".
19281 Use require_running and target_running. Always allow the extended
19282 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19283 restart in extended mode.
19284 * README: Refer to the GDB manual. Update --attach usage.
19285
192862007-12-20 Andreas Schwab <schwab@suse.de>
19287
19288 * linux-low.c (STACK_SIZE): Define.
19289 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19290 (linux_test_for_tracefork): Likewise.
19291
192922007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19293
19294 * linux-low.c (linux_wait_for_event): Update messages. Do not
19295 reinsert auto-delete breakpoints.
19296 * mem-break.c (struct breakpoint): Change return type of handler to
19297 int.
19298 (set_breakpoint_at): Update handler type.
19299 (reinsert_breakpoint_handler): Return 1 instead of calling
19300 delete_breakpoint.
19301 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19302 setting a new one.
19303 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19304 * mem-break.h (set_breakpoint_at): Update handler type.
19305 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19306 * win32-low.c (auto_delete_breakpoint): New.
19307 (get_child_debug_event): Use it.
19308
193092007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19310
19311 * configure.ac: Check for pread and pwrite.
19312 * hostio.c (handle_pread): Fall back to lseek and read.
19313 (handle_pwrite): Fall back to lseek and write.
19314 * config.in, configure: Regenerated.
19315
193162007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19317
19318 * server.c (myresume): Add own_buf argument.
19319 (main): Update calls.
19320
193212007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19322
19323 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19324 * remote-utils.c (remote_open): Do not call disable_async_io.
19325 (block_async_io): Delete.
19326 (unblock_async_io): Make static.
19327 (initialize_async_io): New.
19328 * server.c (handle_v_cont): Handle async I/O here.
19329 (myresume): Likewise. Move other common resume tasks here...
19330 (main): ... from here. Call initialize_async_io. Disable async
19331 I/O before the main loop.
19332 * server.h (initialize_async_io): Declare.
19333 (block_async_io, unblock_async_io): Delete prototypes.
19334 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19335
193362007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19337
19338 * remote-utils.c (readchar): Allow binary data in received messages.
19339
193402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19341
19342 * win32-low.c (attaching): New global.
19343 (win32_create_inferior): Clear the `attaching' global.
19344 (win32_attach): Set the `attaching' global.
19345 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19346 attaching. Only set a breakpoint at the entry point if not
19347 attaching.
19348
193492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19350
19351 * server.c (main): Don't report dll events on the initial
19352 connection on attaches.
19353
193542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19355
19356 * server.c (main): Relax numerical bases supported for the pid of
19357 the --attach command line argument.
19358
193592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19360
19361 * win32-low.c (win32_attach): Call OpenProcess before
19362 DebugActiveProcess, not after. Add last error output to error
19363 call.
19364
193652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19366
19367 * win32-low.c (win32_get_thread_context)
19368 (win32_set_thread_context): New functions.
19369 (thread_rec): Use win32_get_thread_context.
19370 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19371 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19372 field.
19373
193742007-12-03 Leo Zayas
19375 Pedro Alves <pedro_alves@portugalmail.pt>
19376
19377 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19378 global variables.
19379 (child_add_thread): Minor cleanup.
19380 (child_continue): Resume artificially suspended threads before
19381 calling ContinueDebugEvent.
19382 (suspend_one_thread): New.
19383 (fake_breakpoint_event): New.
19384 (get_child_debug_event): Change return type to int. Check here if
19385 gdb sent an interrupt request. If a soft interrupt was requested,
19386 fake a breakpoint event. Return 0 if there is no event to handle,
19387 and 1 otherwise.
19388 (win32_wait): Don't check here if gdb sent an interrupt request.
19389 Ensure there is a valid event to handle.
19390 (win32_request_interrupt): Add soft interruption method as last
19391 resort.
19392
193932007-12-03 Leo Zayas
19394 Pedro Alves <pedro_alves@portugalmail.pt>
19395
19396 * win32-low.h (win32_thread_info): Add descriptions to the
19397 structure members. Replace `suspend_count' counter by a
19398 `suspended' flag.
19399 * win32-low.c (thread_rec): Update condition of when to get the
19400 context from the inferior. Rely on ContextFlags being set if it
19401 has already been retrieved. Only suspend the inferior thread if
19402 we haven't already. Warn if that fails.
19403 (continue_one_thread): s/suspend_count/suspended/. Only call
19404 ResumeThread once. Warn if that fails.
19405
194062007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19407
19408 * win32-low.c (win32_wait): Don't read from the inferior when it
19409 has already exited.
19410
194112007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19412
19413 * Makefile.in (win32_low_h): New variable.
19414 (win32-low.o): Add dependency on $(win32_low_h).
19415 (win32-arm-low.o, win32-i386-low.o): New rules.
19416
194172007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19418
19419 * hostio.c: Correct copyright year.
19420
194212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19422
19423 * Makefile.in (OBS): Add hostio.o.
19424 (hostio.o): New rule.
19425 * server.h (handle_vFile): Declare.
19426 * hostio.c: New file.
19427 * server.c (handle_v_requests): Take packet_len and new_packet_len
19428 for binary packets. Call handle_vFile.
19429 (main): Update call to handle_v_requests.
19430
194312007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19432
19433 * linux-low.c: Include <sched.h>.
19434
194352007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19436
19437 * linux-low.c (linux_tracefork_grandchild): New.
19438 (linux_tracefork_child): Use clone.
19439 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19440
194412007-10-31 Joel Brobecker <brobecker@adacore.com>
19442
19443 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19444
194452007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19446
19447 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19448
194492007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19450
19451 * inferiors.c (change_inferior_id): Delete.
19452 (add_pid_to_list, pull_pid_from_list): New.
19453 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19454 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19455 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19456 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19457 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19458 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19459 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19460 (using_threads): Always set to 1.
19461 (handle_extended_wait): New.
19462 (add_process): Do not set TID.
19463 (linux_create_inferior): Set must_set_ptrace_flags.
19464 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19465 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19466 (linux_thread_alive): Rename TID argument to LWPID.
19467 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19468 (linux_wait_for_event): Do not use TID or check using_threads. Update
19469 call to dead_thread_notify. Call handle_extended_wait.
19470 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19471 (send_sigstop): Delete sigstop_sent.
19472 (wait_for_sigstop): Avoid TID.
19473 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19474 (linux_test_for_tracefork): New.
19475 (linux_lookup_signals): Use thread_db_active and
19476 linux_supports_tracefork_flag.
19477 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19478 * linux-low.h (get_process_thread): Avoid TID.
19479 (struct process_ifo): Move thread_known and tid to the end. Remove
19480 sigstop_sent.
19481 (linux_attach_lwp, thread_db_init): Update prototypes.
19482 * server.h (change_inferior_id): Delete prototype.
19483 (add_pid_to_list, pull_pid_from_list): New prototypes.
19484 * thread-db.c (thread_db_use_events): New.
19485 (find_first_thread): Rename to...
19486 (find_one_thread): ...this. Update callers and messages. Do not
19487 call fatal. Check thread_db_use_events. Do not call
19488 change_inferior_id or new_thread_notify.
19489 (maybe_attach_thread): Update. Do not call new_thread_notify.
19490 (thread_db_init): Set thread_db_use_events. Check use_events.
19491 * utils.c (fatal, warning): Correct message prefix.
19492
194932007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19494
19495 * Makefile.in (clean): Remove new files.
19496 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19497 (powerpc-64.o, powerpc-64.c): New rules.
19498 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19499 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19500 with SPE.
19501 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19502 SPE targets.
19503 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19504 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19505 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19506 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19507 (target_regsets): Add AltiVec and SPE register sets.
19508 * configure.ac: Check for AltiVec and SPE.
19509 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19510 (ppc_fill_vrregset, ppc_store_vrregset): New.
19511 (target_regsets): Add AltiVec register set.
19512 * configure: Regenerated.
19513
195142007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19515
19516 * linux-low.c (O_LARGEFILE): Define.
19517 (linux_read_memory): Use /proc/PID/mem.
19518 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19519 * configure, config.in: Regenerated.
19520
195212007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19522
19523 * linux-low.c (linux_wait_for_event): Do not pass signals while
19524 single-stepping.
19525
195262007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19527
19528 * win32-low.c (create_process): New.
19529 (win32_create_inferior): Use create_process instead of
19530 CreateProcess. If create_process failed retry appending an ".exe"
19531 suffix. Store the GetLastError result immediatelly after
19532 create_process calls and use it on the call to error.
19533
195342007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19535
19536 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19537
195382007-08-23 Joel Brobecker <brobecker@adacore.com>
19539
19540 * configure.ac: Switch license to GPLv3.
19541
195422007-08-01 Michael Snyder <msnyder@access-company.com>
19543
19544 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19545
195462007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19547
19548 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19549 typedef.
19550 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19551 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19552 CloseToolhelp32Snapshot.
19553 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19554 CloseToolhelp32Snapshot.
19555
195562007-07-27 Michael Snyder <michael.snyder@access-company.com>
19557
19558 * server.c (main): Check for inferior exit before main loop.
19559
195602007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19561
19562 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19563 instead of on tmp_desc.
19564
195652007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19566 Daniel Jacobowitz <dan@codesourcery.com>
19567
19568 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19569 (add_thread): Minor cleanups.
19570 (clear_inferiors): Move lower in the file. Clear the DLL
19571 list.
19572 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19573 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19574 (xml_escape_text): New.
19575 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19576 for qSupported.
19577 (handle_v_cont): Report errors.
19578 (gdbserver_version): Update.
19579 (main): Correct size of own_buf. Do not report initial DLL events.
19580 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19581 (unloaded_dll, xml_escape_text): New.
19582 * win32-low.c (enum target_waitkind): Update comments.
19583 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19584 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19585 (win32_EnumProcessModules, win32_GetModuleInformation)
19586 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19587 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19588 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19589 (win32_Module32First, win32_Module32Next, load_toolhelp)
19590 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19591 (get_child_debug_event): Handle DLL events.
19592 (win32_wait): Likewise.
19593
195942007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19595
19596 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19597 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19598
195992007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19600
19601 * win32-low.c (handle_output_debug_string): Ignore event if not
19602 waiting.
19603
196042007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19605
19606 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19607
196082007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19609
19610 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19611
196122007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19613
19614 * inferiors.c (change_inferior_id): Add comment.
19615 * linux-low.c (check_removed_breakpoint): Add an early
19616 prototype. Improve debug output.
19617 (linux_attach): Doc update.
19618 (linux_detach_one_process, linux_detach): Clean up before releasing
19619 each process.
19620 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19621 * linux-low.h (struct process_info): Doc improvement.
19622 * mem-break.c (delete_all_breakpoints): New.
19623 * mem-break.h (delete_all_breakpoints): New prototype.
19624 * thread-db.c (find_first_thread): New.
19625 (thread_db_create_event): Call it instead of
19626 thread_db_find_new_threads. Clean up unused variables.
19627 (maybe_attach_thread): Remove first thread handling.
19628 (thread_db_find_new_threads): Use find_first_thread.
19629 (thread_db_get_tls_address): Likewise.
19630
196312007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19632
19633 * thread-db.c (thread_db_find_new_threads): Add prototype.
19634 (thread_db_create_event): Check for the main thread before adding
19635 a new thread.
19636 (maybe_attach_thread): Only enable event reporting if TID == 0.
19637 (thread_db_get_tls_address): Check for new threads.
19638
196392007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19640
19641 * linux-low.c (linux_create_inferior): Try execv before execvp.
19642 * spu-low.c (spu_create_inferior): Likewise.
19643
196442007-06-13 Mike Frysinger <vapier@gentoo.org>
19645
19646 * linux-low.c (linux_create_inferior): Change execv to execvp.
19647 * spu-low.c (spu_create_inferior): Likewies.
19648
196492007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19650
19651 * Makefile.in (clean): Clean new files instead of deleted ones.
19652 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19653 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19654 rules.
19655 * configure.srv: Specify XML files and new regformats for MIPS and
19656 MIPS64 GNU/Linux.
19657 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19658 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19659 an entry for the restart register.
19660 (mips_cannot_fetch_register, mips_cannot_store_register)
19661 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19662 register names to match the XML descriptions.
19663 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19664 restart register instead of $0.
19665
196662007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19667 Markus Deuling <deuling@de.ibm.com>
19668
19669 * remote-utils.c (decode_xfer_write): New function.
19670 * server.h (decode_xfer_write): Add prototype.
19671 * server.c (handle_query): Add PACKET_LEN argument. Support
19672 qXfer:spu:read and qXfer:spu:write packets.
19673 (main): Pass packet_len to handle_query.
19674 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19675 * target.h (target_ops): Add qxfer_spu.
19676
196772007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19678
19679 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19680 accessing non-seekable spufs files.
19681
196822007-05-16 Markus Deuling <deuling@de.ibm.com>
19683
19684 * server.c (handle_query): Add reply for qC packet.
19685
196862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19687 Leo Zayas <lerele@champenstudios@com>
19688
19689 * server.h (check_remote_input_interrupt_request): New function.
19690 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19691 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19692 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19693 (check_remote_input_interrupt_request): New function.
19694 * server.h (check_remote_input_interrupt_request): Declare.
19695 * win32-low.c (winapi_DebugBreakProcess,
19696 winapi_GenerateConsoleCtrlEvent): New typedefs.
19697 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19698 to 250 ms.
19699 (win32_wait): Check for remote interrupt request
19700 with check_remote_input_interrupt_request.
19701 (win32_request_interrupt): New function.
19702 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19703
197042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19705
19706 * win32-low.c (debug_registers_changed,
19707 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19708 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19709 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19710 (thread_rec): Get context using the low target.
19711 (child_add_thread): Call thread_added on the low target,
19712 which does the same thing.
19713 (regptr): Delete.
19714 (do_initial_child_stuff): Remove debug registers references.
19715 Set context using the low target. Resume threads after
19716 setting the contexts.
19717 (child_continue): Remove dead variable. Remove debug
19718 registers references.
19719 (child_fetch_inferior_registers): Go through the low target.
19720 (do_child_store_inferior_registers): Remove.
19721 (child_store_inferior_registers): Go through the low target.
19722 (win32_resume): Remove debug registers references.
19723 Set context using the low target.
19724 (handle_exception): Change return type to void. Don't record
19725 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19726 first chance exception.
19727 (get_child_debug_event): Change return type to void. Remove
19728 goto loop. Always return after waiting for debug event.
19729 (win32_wait): Convert to switch statement. Handle spurious
19730 events.
19731
19732 * win32-i386-low.c (debug_registers_changed,
19733 debug_registers_used): New.
19734 (initial_stuff): Rename to ...
19735 (i386_initial_stuff): ... this. Clear debug registers
19736 state variables.
19737 (store_debug_registers): Delete.
19738 (i386_get_thread_context): New.
19739 (load_debug_registers): Delete.
19740 (i386_set_thread_context): New.
19741 (i386_thread_added): New.
19742 (single_step): Rename to ...
19743 (i386_single_step): ... this.
19744 (do_fetch_inferior_registers): Rename to ...
19745 (i386_fetch_inferior_register): ... this.
19746 (i386_store_inferior_register): New.
19747 (the_low_target): Adapt to new interface.
19748
19749 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19750 (arm_get_thread_context): New.
19751 (arm_set_thread_context): New.
19752 (regptr): New.
19753 (do_fetch_inferior_registers): Rename to ...
19754 (arm_fetch_inferior_register): ... this.
19755 (arm_store_inferior_register): New.
19756 (arm_wince_breakpoint): Reimplement as unsigned long.
19757 (arm_wince_breakpoint_len): Define.
19758 (the_low_target): Adapt to new interface.
19759
19760 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19761 load_debug_registers. Add get_thread_context, set_thread_context,
19762 thread_added and store_inferior_register. Rename
19763 fetch_inferior_registers to fetch_inferior_register.
19764 (regptr): Remove declaration.
19765
197662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19767
19768 * linux-low.c (linux_detach): Change return type to int. Return 0.
19769 * spu-low.c (spu_detach): Likewise.
19770
197712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19772
19773 * target.h (target_ops): Change return type of detach to int.
19774 Add join.
19775 (join_inferior): New.
19776 * server.c (main): Don't skip detach support on mingw32.
19777 If the inferior doesn't support detaching return error.
19778 Call join_inferior instead of using waitpid.
19779 * linux-low.c (linux_join): New.
19780 (linux_target_op): Add linux_join.
19781 * spu-low.c (spu_join): New.
19782 (spu_target_ops): Add spu_join.
19783 * win32-low.c (win32_detach): Adapt to new interface.
19784 Reopen current_process_handle before detaching. Issue a child
19785 resume before detaching.
19786 (win32_join): New.
19787 (win32_target_op): Add win32_join.
19788
197892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19790
19791 * win32-low.c (win32-attach): Fix return value.
19792 * target.h (target_ops): Describe ATTACH return values.
19793
197942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19795
19796 * win32-low.c (GETPROCADDRESS): Define.
19797 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
19798 (winapi_DebugSetProcessKillOnExit): Likewise.
19799 (win32_create_inferior): Force usage of ansi CreateProcessA.
19800 (win32_attach): Use GETPROCADDRESS.
19801 (win32_detach): Likewise.
19802
198032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19804
19805 * win32-low.c (win32_wait): Don't use WSTOPSIG.
19806
198072007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
19808
19809 * win32-low.c: Commit leftover changes from 2007-03-29.
19810
198112007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19812
19813 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
19814 fields short instead of int. Add explicit padding.
19815 (i387_cache_to_fsave): Remove unnecessary casts.
19816 (i387_fsave_to_cache): Doc fix.
19817 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
19818
198192007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19820
19821 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
19822 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
19823
198242007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19825
19826 * configure.srv (arm*-*-mingw32ce*): Move near the other
19827 arm targets.
19828
198292007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19830
19831 * configure.ac: Add errno checking.
19832 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
19833 sys/file.h and malloc.h.
19834 (AC_CHECK_DECLS): Add perror.
19835 (srv_mingwce): Handle.
19836 * configure.srv (i[34567]86-*-cygwin*): Add
19837 win32-i386-low.o to srv_tgtobj.
19838 (i[34567]86-*-mingw*): Likewise.
19839 (arm*-*-mingw32ce*): Add case.
19840 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19841 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
19842 [__MINGW32CE__] (strerror): New function.
19843 [__MINGW32CE__] (errno): Define to GetLastError.
19844 [__MINGW32CE__] (COUNTOF): New macro.
19845 (remote_open): Remove extra close call.
19846 * mem-break.c (delete_breakpoint_at): New function.
19847 * mem-break.h (delete_breakpoint_at): Declare.
19848 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19849 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
19850 [USE_WIN32API] (read, write): Add char* casts.
19851 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
19852 * server.h: Include wincecompat.h on Windows CE.
19853 [HAVE_ERRNO_H]: Check.
19854 (perror): Declare if not declared.
19855 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
19856 (perror_with_name): Remove errno declaration.
19857 * wincecompat.h: New.
19858 * wincecompat.c: New.
19859 * win32-low.h: New.
19860 * win32-arm-low.c: New.
19861 * win32-i386-low.c: New.
19862 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
19863 (OUTMSG2): Make it safe.
19864 (_T): New macro.
19865 (COUNTOF): New macro.
19866 (NUM_REGS): Get it from the low target.
19867 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
19868 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
19869 (thread_rec): Let low target handle debug registers.
19870 (child_add_thread): Likewise.
19871 (child_init_thread_list): Likewise.
19872 (continue_one_thread): Likewise.
19873 (regptr): New.
19874 (do_child_fetch_inferior_registers): Move to ...
19875 * win32-i386-low.c: ... here, and rename to ...
19876 (do_fetch_inferior_registers): ... this.
19877 * win32-low.c (child_fetch_inferior_registers):
19878 Go through the low target.
19879 (do_child_store_inferior_registers): Use regptr.
19880 (strwinerror): New function.
19881 (win32_create_inferior): Handle Windows CE.
19882 Use strwinerror instead of strerror on Windows error
19883 codes. Add program to the error output.
19884 Don't close the main thread handle on Windows CE.
19885 (win32_attach): Use coredll.dll on Windows CE.
19886 (win32_kill): Close current process and current
19887 thread handles.
19888 (win32_detach): Use coredll.dll on Windows CE.
19889 (win32_resume): Let low target handle debug registers, and
19890 step request.
19891 (handle_exception): Add/Remove initial breakpoint. Avoid
19892 non-existant WSTOPSIG on Windows CE.
19893 (win32_read_inferior_memory): Cast to remove warning.
19894 (win32_arch_string): Go through the low target.
19895 (initialize_low): Call set_breakpoint_data with the low
19896 target's breakpoint.
19897 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
19898 FOP_REGNUM, mappings): Move to ...
19899 * win32-i386-low.c: ... here.
19900 * win32-low.c (win32_thread_info): Move to ...
19901 * win32-low.h: ... here.
19902 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
19903 win32-arm-low.c and wincecompat.c.
19904 (all:): Add $EXEEXT.
19905 (install-only:): Likewise.
19906 (gdbserver:): Likewise.
19907 (gdbreplay:): Likewise.
19908 * config.in: Regenerate.
19909 * configure: Regenerate.
19910
199112007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19912
19913 * win32-low.c: Rename typedef thread_info to
19914 win32_thread_info throughout.
19915
199162007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19917
19918 * win32-i386-low.c: Rename to ...
19919 * win32-low.c: ... this.
19920 * configure.srv: Replace win32-i386-low.o with win32-low.o.
19921 * Makefile.in: Likewise.
19922
199232007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
19924
19925 * remote-utils.c (monitor_output): Constify msg parameter.
19926 * server.h (monitor_output): Likewise.
19927 * win32-i386-low.c (handle_output_debug_string): New.
19928 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
19929 handle_output_debug_string.
19930 (get_child_debug_event): Likewise.
19931
199322007-03-27 Mat Hostetter <mat@lcs.mit.edu>
19933
19934 * server.c (main): Correct strtoul check.
19935
199362007-03-27 Jon Ringle <jon@ringle.org>
19937
19938 * linux-low.c: Check __ARCH_HAS_MMU__ also.
19939
199402007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
19941
19942 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
19943
199442007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
19945
19946 * terminal.h: Check HAVE_SGTTY_H.
19947
199482007-02-27 Mat Hostetter <mat@lcs.mit.edu>
19949
19950 * remote-utils.c (remote_open): Print out the assigned port number.
19951
199522007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
19953
19954 * remote-utils.c (monitor_output): New function.
19955 * server.c (debug_threads): Define here.
19956 (monitor_show_help): New function.
19957 (handle_query): Handle qRcmd.
19958 (main): Do not handle 'd' packet.
19959 * server.h (debug_threads, remote_debug, monitor_output): Declare.
19960 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
19961 of debug_threads.
19962
199632007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19964
19965 * Makefile.in (EXEEXT): New.
19966 (clean): Use $(EXEEXT).
19967
199682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19969
19970 * target.h (target_ops): Rename send_signal to request_interrupt,
19971 and remove enum target_signal parameter.
19972 * linux-low.c (linux_request_interrupt): Rename from
19973 linux_send_signal, and always send SIGINT.
19974 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
19975 and always send SIGINT.
19976 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
19977 of send_signal.
19978 (input_interrupt): Likewise.
19979
199802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19981
19982 * server.c (get_features_xml): Check if target implemented
19983 arch_string.
19984 * win32-i386-low.c (win32_arch_string): New.
19985 (win32_target_ops): Add win32_arch_string as arch_string member.
19986
199872007-02-22 Markus Deuling <deuling@de.ibm.com>
19988
19989 * spu-low.c (spu_arch_string): New.
19990 (spu_target_ops): Add spu_arch_string.
19991
199922007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
19993
19994 * remote-utils.c: Remove HAVE_TERMINAL_H check.
19995 * configure.ac: Do not check for terminal.h.
19996 * configure, config.in: Regenerated.
19997
199982007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19999
20000 * Makefile.in (OBS): Add $(XML_BUILTIN).
20001 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20002 (clean): Update.
20003 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20004 (arm-with-iwmmxt.c): New.
20005 * config.in, configure: Regenerate.
20006 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20007 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20008 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20009 (arm*-*-linux*): Add iWMMXt and regset support.
20010 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20011 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20012 (arm_store_wmmxregset, target_regsets): New.
20013 * server.c (get_features_xml): Take annex argument. Check builtin
20014 XML documents.
20015 (handle_query): Handle multiple annexes.
20016
200172007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20018
20019 * remote-utils.c [USE_WIN32API] (read, write): Define.
20020 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20021 write.
20022
200232007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20024
20025 * linux-i386-low.c (the_low_target): Set arch_string.
20026 * linux-x86-64-low.c (the_low_target): Likewise.
20027 * linux-low.c (linux_arch_string): New.
20028 (linux_target_ops): Add it.
20029 * linux-low.h (struct linux_target_ops): Add arch_string.
20030 * server.c (write_qxfer_response): Use const void * for DATA.
20031 (get_features_xml): New.
20032 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20033 * target.h (struct target_ops): Add arch_string method.
20034
200352007-01-03 Denis Pilat <denis.pilat@st.com>
20036 Daniel Jacobowitz <dan@codesourcery.com>
20037
20038 * linux-low.c (linux_kill): Handle being called with no threads.
20039 * win32-i386-low.c (win32_kill): Likewise.
20040 (get_child_debug_event): Clear current_process_handle.
20041
200422006-12-30 Denis PILAT <denis.pilat@st.com>
20043 Daniel Jacobowitz <dan@codesourcery.com>
20044
20045 * remote-utils.c (remote_open): Check the type of specified
20046 serial port devices before opening them.
20047 * server.c (main): Kill the inferior if an error occurs during
20048 the first remote_open.
20049
200502006-12-05 Markus Deuling <deuling@de.ibm.com>
20051
20052 * README: Update supported targets.
20053
200542006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20055
20056 * Makefile.in (clean): Remove reg-mips64.c.
20057 (reg-mips64.c, reg-mips64.o): New rules.
20058 * configure.srv: Handle mips64. Include regset support for mips.
20059 * linux-mips-low.c (union mips_register): New.
20060 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20061 (mips_breakpoint, mips_breakpoint_at): Use int.
20062 (mips_collect_register, mips_supply_register)
20063 (mips_collect_register_32bit, mips_supply_register_32bit)
20064 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20065 (mips_store_fpregset, target_regsets): New.
20066 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20067
200682006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20069
20070 * configure.srv: Add target "spu*-*-*".
20071 * Makefile.in (clean): Remove reg-spu.c.
20072 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20073 * spu-low.c: New file.
20074
200752006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20076
20077 * configure.ac: Correct td_thr_tls_get_addr test.
20078 * configure: Regenerated.
20079
200802006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20081
20082 * linux-low.c (linux_wait_for_event): Reformat. Use the
20083 pass_signals array.
20084 * remote-utils.c (decode_address_to_semicolon): New.
20085 * server.c (pass_signals, handle_general_set): New.
20086 (handle_query): Mention QPassSignals for qSupported.
20087 (main): Call handle_general_set.
20088 * server.h (pass_signals, decode_address_to_semicolon): New.
20089
200902006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20091
20092 * server.c (handle_query): Correct error handling for read_auxv.
20093
200942005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20095
20096 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20097 and srv_linux_thread_db to yes.
20098 * linux-s390-low.c (s390_fill_gregset): New function.
20099 (target_regsets): Define data structure.
20100
201012006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20102
20103 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20104 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20105 * config.in, configure: Regenerated.
20106 * inferiors.c (gdb_id_to_thread): New function.
20107 (gdb_id_to_thread_id): Use it.
20108 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20109 * linux-low.h (struct process_info): Add th member.
20110 (thread_db_get_tls_address): New prototype.
20111 * remote-utils.c (decode_address): Make non-static.
20112 * server.c (handle_query): Handle qGetTLSAddr.
20113 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20114 * target.h (struct target_ops): Add get_tls_address.
20115 * thread-db.c (maybe_attach_thread): Save the thread handle.
20116 (thread_db_get_tls_address): New.
20117
201182006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20119
20120 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20121 (linux_resume_one_process): Take a siginfo_t *. Update all
20122 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20123 (struct pending_signals): Add a siginfo_t.
20124 (linux_wait_for_process): Always set last_status.
20125 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20126 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20127 * linux-low.h (struct process_info): Add last_status.
20128
201292006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20130
20131 * remote-utils.c (try_rle): New function.
20132 (putpkt_binary): Use it.
20133
201342006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20135
20136 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20137 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20138 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20139 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20140 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20141 point registers.
20142
201432006-08-08 Richard Sandiford <richard@codesourcery.com>
20144
20145 * server.c (terminal_fd): New variable.
20146 (old_foreground_pgrp): Likewise.
20147 (restore_old_foreground_pgrp): New function.
20148 (start_inferior): Record the terminal file descriptor in terminal_fd
20149 and its original foreground group in old_foreground_pgrp. Register
20150 restore_old_foreground_pgrp with atexit().
20151
201522006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20153
20154 * server.c (handle_query): Correct qPart to qXfer.
20155
201562006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20157
20158 * configure.ac: Check for more headers which are missing on
20159 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20160 * configure.srv: Add Cygwin and mingw32.
20161 * remote-utils.c: Don't include headers unconditionally which
20162 are missing on mingw32. Include <winsock.h> for mingw32.
20163 (remote_open): Adjust for mingw32 support. Flush
20164 standard error after writing to it.
20165 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20166 (unblock_async_io, enable_async_io, disable_async_io)
20167 (readchar, getpkt): Update for Winsock support.
20168 (prepare_resume_reply): Expect a protocol signal number.
20169 * server.c: Disable <sys/wait.h> on mingw32.
20170 (start_inferior): Adjust for mingw32 support. Flush
20171 standard error after writing to it.
20172 (attach_inferior): Likewise. Use protocol signal
20173 numbers.
20174 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20175 and names.
20176 * win32-i386-low.c: New file.
20177 * Makefile.in (XM_CLIBS): Set.
20178 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20179 (win32-i386-low.o): New dependency rule.
20180 * linux-low.c (linux_wait): Use target signal numbers.
20181 * target.h (struct target_ops): Doc fix.
20182 * server.h (target_signal_to_name): New prototype.
20183 * gdbreplay.c: Don't include headers unconditionally which
20184 are missing on mingw32. Include <winsock.h> for mingw32.
20185 (remote_close, remote_open): Adjust for Winsock support.
20186 * configure, config.in: Regenerated.
20187
201882006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20189
20190 * server.c (decode_xfer_read, write_qxfer_response): New.
20191 (handle_query): Take a packet length argument. Handle
20192 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20193 the qSupported response.
20194 (main): Update call to handle_query.
20195
201962006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20197
20198 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20199 (putpkt_binary): Renamed from putpkt and adjusted for binary
20200 data.
20201 (putpkt): New wrapper for putpkt_binary.
20202 (readchar): Don't mask off the high bit.
20203 (decode_X_packet): New function.
20204 * server.c (main): Call putpkt_binary if a handler sets the packet
20205 length. Save the length of the incoming packet. Handle 'X'.
20206 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20207
202082006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20209
20210 * server.c (handle_query): Handle qSupported.
20211
202122006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20213
20214 * remote-utils.c (all_symbols_looked_up): New variable.
20215 (look_up_one_symbol): Check it.
20216 * server.h (look_up_one_symbol): New declaration.
20217 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20218
202192006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20220
20221 * Makefile.in (linux-arm-low.o): Update dependencies.
20222 * linux-arm-low.c: Include "gdb_proc_service.h".
20223 (PTRACE_GET_THREAD_AREA): Define.
20224 (ps_get_thread_area): New function.
20225
202262006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20227
20228 * configure.srv (m68k*-*-uclinux*): New target.
20229 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20230 (linux_resume_one_process): Remove extraneous cast.
20231 (linux_read_offsets): New.
20232 (linux_target_op): Add linux_read_offsets on mmuless systems.
20233 * server.c (handle_query): Add qOffsets logic.
20234 * target.h (struct target_ops): Add read_offsets.
20235
202362006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20237
20238 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20239 (PTRACE_GET_THREAD_AREA): Define.
20240 (ps_get_thread_area): New function.
20241 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20242 (linux-x86-64-low.o): Update.
20243
202442006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20245
20246 * configure.ac: Remove checks for prfpregset_t.
20247 * gdb_proc_service.h: New file.
20248 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20249 new "gdb_proc_service.h".
20250 * proc-service.c: Likewise.
20251 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20252 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20253 * Makefile.in (gdb_proc_service_h): Updated.
20254 * configure, config.in: Regenerated.
20255
202562006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20257
20258 * remote-utils.c (prepare_resume_reply): Move declaration
20259 of gdb_id_from_wait to the top of the block.
20260
202612006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20262
20263 * linux-low.c (regsets_store_inferior_registers): Read the regset
20264 from the target before filling it.
20265
202662006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20267
20268 * server.c (attach_inferior): Return SIGTRAP for a successful
20269 attach.
20270
202712006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20272
20273 * Makefile.in (OBS): Add version.o.
20274 (STAGESTUFF): Delete.
20275 (version.o): Add dependencies.
20276 (version.c): Replace rule.
20277 (clean): Remove version.c.
20278 * server.c (gdbserver_version): New.
20279 (gdbserver_usage): Use printf.
20280 (main): Handle --version and --help.
20281 * server.h (version, host_name): Add declarations.
20282
202832005-12-23 Eli Zaretskii <eliz@gnu.org>
20284
20285 * linux-arm-low.c:
20286 * linux-arm-low.c:
20287 * inferiors.c:
20288 * i387-fp.h:
20289 * i387-fp.c:
20290 * gdbreplay.c:
20291 * regcache.c:
20292 * proc-service.c:
20293 * mem-break.h:
20294 * mem-break.c:
20295 * linux-x86-64-low.c:
20296 * linux-sh-low.c:
20297 * linux-s390-low.c:
20298 * linux-ppc64-low.c:
20299 * linux-ppc-low.c:
20300 * linux-mips-low.c:
20301 * linux-m68k-low.c:
20302 * linux-m32r-low.c:
20303 * linux-low.h:
20304 * linux-low.c:
20305 * linux-ia64-low.c:
20306 * linux-i386-low.c:
20307 * linux-crisv32-low.c:
20308 * thread-db.c:
20309 * terminal.h:
20310 * target.h:
20311 * target.c:
20312 * server.h:
20313 * server.c:
20314 * remote-utils.c:
20315 * regcache.h:
20316 * utils.c:
20317 * Makefile.in:
20318 * configure.ac:
20319 * gdbserver.1: Add (C) after Copyright. Update the FSF
20320 address.
20321
203222005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20323
20324 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20325 (arm_breakpoint_at): Recognize both breakpoints.
20326 (the_low_target): Use the correct breakpoint instruction.
20327
203282005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20329
20330 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20331 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20332 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20333 (the_low_target): Update.
20334
203352005-10-25 Andreas Schwab <schwab@suse.de>
20336
20337 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20338
20339 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20340 (ia64_num_regs): Reduce to 462.
20341
203422005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20343
20344 * acinclude.m4: Correct quoting.
20345 * aclocal.m4: Regenerated.
20346
20347 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20348 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20349 (thread_db_init): Call thread_db_err_str.
20350 * configure.ac: Check for TD_VERSION.
20351 * config.in, configure: Regenerated.
20352
203532005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20354
20355 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20356
203572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20358
20359 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20360 is not available. Define HAVE_PTRACE_GETREGS if it is.
20361 * config.in, configure: Regenerated.
20362 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20363 * linux-i386-low.c, linux-m68k-low.c: Update to use
20364 HAVE_PTRACE_GETREGS.
20365 * linux-low.c (regsets_fetch_inferior_registers)
20366 (regsets_store_inferior_registers): Only return 0 if we processed
20367 GENERAL_REGS.
20368 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20369 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20370
203712005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20372
20373 * inferiors.c (struct thread_info): Add gdb_id.
20374 (add_thread): Add gdb_id argument.
20375 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20376 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20377 calls to add_thread.
20378 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20379 * server.c (handle_query): Use thread_to_gdb_id.
20380 (handle_v_cont, main): Use gdb_id_to_thread_id.
20381 * server.h (add_thread): Update prototype.
20382 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20383 prototypes.
20384
203852005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20386
20387 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20388 left-padded registers.
20389 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20390 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20391
203922005-07-01 Steve Ellcey <sje@cup.hp.com>
20393
20394 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20395 * configure: Regenerate.
20396 * config.in: Regenerate.
20397 * server.h (NEED_DECLARATION_STRERROR):
20398 Replace with !HAVE_DECL_STRERROR.
20399
204002005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20401
20402 * linux-low.c (linux_wait, linux_send_signal): Don't test
20403 an unsigned long variable for > 0 if it could be MAX_ULONG.
20404 * server.c (myresume): Likewise.
20405 * target.c (set_desired_inferior): Likewise.
20406
204072005-06-13 Mark Kettenis <kettenis@gnu.org>
20408
20409 * configure.ac: Simplify and improve check for socklen_t.
20410 * configure, config.in: Regenerate.
20411
204122005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20413
20414 * acconfig.h: Remove.
20415 * configure.ac: Add a test for socklen_t. Use three-argument
20416 AC_DEFINE throughout.
20417 * config.in: Regenerated using autoheader 2.59.
20418 * configure: Regenerated.
20419
20420 * gdbreplay.c (socklen_t): Provide a default.
20421 (remote_open): Use socklen_t.
20422 * remote-utils.c (socklen_t): Provide a default.
20423 (remote_open): Use socklen_t.
20424 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20425 unsigned char.
20426
20427 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20428 char for buffers.
20429 * linux-low.c (linux_read_memory, linux_write_memory)
20430 (linux_read_auxv): Likewise.
20431 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20432 (check_mem_write): Likewise.
20433 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20434 Likewise.
20435 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20436 (registers_from_string, register_data): Likewise.
20437 * server.c (handle_query, main): Likewise.
20438 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20439 (decode_M_packet): Likewise.
20440 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20441 * target.h (struct target_ops): Update read_memory, write_memory,
20442 and read_auxv.
20443 (read_inferior_memory, write_inferior_memory): Update.
20444 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20445 to unsigned char *.
20446 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20447 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20448 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20449 linux-s390-low.c, linux-sh-low.c: Update for changes in
20450 read_inferior_memory and the_low_target->breakpoint.
20451
204522005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20453
20454 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20455 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20456 * configure.srv: Add powerpc64-*-linux*.
20457 * linux-ppc64-low.c: New file.
20458
204592005-05-23 Orjan Friberg <orjanf@axis.com>
20460
20461 * linux-cris-low.c: New file with support for CRIS.
20462 * linux-crisv32-low.c: Ditto for CRISv32.
20463 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20464 (clean): Add reg-cris.c and reg-crisv32.c.
20465 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20466 reg-crisv32.o, and reg-crisv32.c to make rules.
20467 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20468 recognized targets.
20469
204702005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20471
20472 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20473 of sizeof (PTRACE_XFER_TYPE).
20474 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20475
204762005-05-12 Orjan Friberg <orjanf@axis.com>
20477
20478 * target.h (struct target_ops): Add insert_watchpoint,
20479 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20480 pointers for hardware watchpoint support.
20481 * linux-low.h (struct linux_target_ops): Ditto.
20482 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20483 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20484 to linux_target_ops.
20485 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20486 reply packet.
20487 * server.c (main): Recognize 'Z' and 'z' packets.
20488
204892005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20490
20491 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20492 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20493 (the_low_target): Add new members.
20494
204952005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20496
20497 * proc-service.c (ps_lgetregs): Search all_processes instead of
20498 all_threads.
20499
205002005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20501
20502 * server.c (start_inferior): Change return type to int.
20503 (attach_inferior): Change sigptr to int *.
20504 (handle_v_cont, handle_v_requests): Change signal to int *.
20505 (main): Change signal to int.
20506
205072005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20508
20509 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20510 * configure.srv: Add m32r*-*-linux*.
20511 * linux-m32r-low.c: New file.
20512
205132005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20514
20515 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20516
205172005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20518
20519 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20520 Take unsigned long arguments for PIDs.
20521 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20522 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20523 (wait_for_sigstop, linux_resume_one_process)
20524 (regsets_fetch_inferior_registers, linux_send_signal)
20525 (linux_read_auxv): Likewise. Update the types of variables holding
20526 PIDs. Update format string specifiers.
20527 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20528 * remote-utils.c (prepare_resume_reply): Likewise.
20529 * server.c (cont_thread, general_thread, step_thread)
20530 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20531 unsigned long.
20532 (handle_query): Update format specifiers.
20533 (handle_v_cont, main): Use strtoul for thread IDs.
20534 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20535 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20536 (general_thread, step_thread, thread_from_wait)
20537 (old_thread_from_wait): Update.
20538 * target.h (struct thread_resume): Use unsigned long for THREAD.
20539 (struct target_ops): Use unsigned long for arguments to attach and
20540 thread_alive.
20541
205422005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20543
20544 * acinclude.m4: Include bfd/bfd.m4 directly.
20545 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20546 <agriffis@toolchain.org>.
20547 * aclocal.m4, configure: Regenerated.
20548
205492005-01-07 Andrew Cagney <cagney@gnu.org>
20550
20551 * configure.ac: Rename configure.in, require autoconf 2.59.
20552 * configure: Re-generate.
20553
205542004-12-08 Daniel Jacobowitz <dan@debian.org>
20555
20556 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20557 LIBS when finished.
20558 * aclocal.m4: Regenerated.
20559 * configure: Regenerated.
20560
205612004-11-21 Andreas Schwab <schwab@suse.de>
20562
20563 * linux-m68k-low.c (m68k_num_gregs): Define.
20564 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20565 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20566 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20567 (m68k_breakpoint_at): New. Add to the_low_target.
20568
20569 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20570 srv_linux_thread_db to yes.
20571
205722004-10-20 Joel Brobecker <brobecker@gnat.com>
20573
20574 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20575 (ARCH_SET_FS): Likewise.
20576 (ARCH_GET_FS): Likewise.
20577 (ARCH_GET_GS): Likewise.
20578
205792004-10-16 Daniel Jacobowitz <dan@debian.org>
20580
20581 * linux-i386-low.c (ps_get_thread_area): New.
20582 * linux-x86-64-low.c (ps_get_thread_area): New.
20583 * linux-low.c: Include <sys/syscall.h>.
20584 (linux_kill_one_process): Don't kill the first thread here.
20585 (linux_kill): Kill the first thread here.
20586 (kill_lwp): New function.
20587 (send_sigstop, linux_send_signal): Use it.
20588 * proc-service.c: Clean up #ifdefs.
20589 (fpregset_info): Delete.
20590 (ps_lgetregs): Update and enable implementation.
20591 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20592 implementations.
20593 * remote-utils.c (struct sym_cache, symbol_cache): New.
20594 (input_interrupt): Print a clearer message.
20595 (async_io_enabled): New variable.
20596 (enable_async_io, disable_async_io): Use it. Update comments.
20597 (look_up_one_symbol): Use the symbol cache.
20598 * thread-db.c (thread_db_look_up_symbols): New function.
20599 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20600
206012004-10-16 Daniel Jacobowitz <dan@debian.org>
20602
20603 * configure.in: Test for -rdynamic.
20604 * configure: Regenerated.
20605 * Makefile (INTERNAL_LDFLAGS): New.
20606 (gdbserver, gdbreplay): Use it.
20607
206082004-09-02 Andrew Cagney <cagney@gnu.org>
20609
20610 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20611
206122004-03-23 Daniel Jacobowitz <drow@mvista.com>
20613
20614 * linux-low.c (linux_wait): Clear all_processes list also.
20615
206162004-03-12 Daniel Jacobowitz <drow@mvista.com>
20617
20618 * linux-low.c: Include <errno.h>. Remove extern declaration of
20619 errno.
20620
206212004-03-12 Daniel Jacobowitz <drow@mvista.com>
20622
20623 * gdbreplay.c, server.h, utils.c: Update copyright years.
20624
206252004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20626
20627 * server.c (main): Print child status or termination signal from
20628 variable 'signal', not 'sig'.
20629
206302004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20631
20632 * linux-low.c (linux_read_memory): Change return type to
20633 int. Check for and return error from ptrace().
20634 * target.c (read_inferior_memory): Change return type to int. Pass
20635 back return status from the_target->read_memory().
20636 * target.h (struct target_ops): Adapt *read_memory() prototype.
20637 Update comment.
20638 (read_inferior_memory): Adapt prototype.
20639 * server.c (main): Return an error packet if
20640 read_inferior_memory() returns an error.
20641
206422004-03-04 Daniel Jacobowitz <drow@mvista.com>
20643
20644 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20645 Unify with other clean targets.
20646
206472004-02-29 Daniel Jacobowitz <drow@mvista.com>
20648
20649 * server.c (handle_v_cont): Call set_desired_inferior.
20650
206512004-02-29 Daniel Jacobowitz <drow@mvista.com>
20652
20653 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20654
206552004-02-29 Daniel Jacobowitz <drow@mvista.com>
20656
20657 * linux-low.c (linux_wait): Unblock async I/O.
20658 (linux_resume): Block and enable async I/O.
20659 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20660 * server.h (block_async_io, unblock_async_io): Add prototypes.
20661
206622004-02-29 Daniel Jacobowitz <drow@mvista.com>
20663
20664 * remote-utils.c (remote_open): Print a status notice after
20665 opening a TCP port.
20666 * server.c (attach_inferior): Print a status notice after
20667 attaching.
20668
206692004-02-29 Daniel Jacobowitz <drow@mvista.com>
20670
20671 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20672
206732004-02-26 Daniel Jacobowitz <drow@mvista.com>
20674
20675 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20676 error packet.
20677 * server.c, target.h: Update copyright years.
20678
206792004-02-25 Roland McGrath <roland@redhat.com>
20680
20681 * target.h (struct target_ops): New member `read_auxv'.
20682 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20683 * linux-low.c (linux_read_auxv): New function.
20684 (linux_target_ops): Initialize `read_auxv' member to that.
20685
206862004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20687
20688 Committed by Jim Blandy <jimb@redhat.com>.
20689
20690 * linux-s390-low.c (s390_num_regs): Update.
20691 (s390_regmap): Remove control registers. Use __s390x__ predefine
20692 instead of GPR_SIZE to distiguish s390 and s390x targets.
20693
206942004-01-31 Daniel Jacobowitz <drow@mvista.com>
20695
20696 * linux-low.c: Update copyright year.
20697 (check_removed_breakpoint): Clear pending_is_breakpoint.
20698 (linux_set_resume_request, linux_queue_one_thread)
20699 (resume_status_pending_p): New functions.
20700 (linux_continue_one_thread): Use process->resume.
20701 (linux_resume): Only resume threads if there are no pending events.
20702 * linux-low.h (struct process_info): Add resume request
20703 pointer.
20704
207052004-01-30 Daniel Jacobowitz <drow@mvista.com>
20706
20707 * regcache.c (new_register_cache): Clear the allocated register
20708 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20709
207102003-10-13 Daniel Jacobowitz <drow@mvista.com>
20711
20712 * linux-low.c (linux_resume): Take a struct thread_resume *
20713 argument.
20714 (linux_wait): Update call.
20715 (resume_ptr): New static variable.
20716 (linux_continue_one_thread): Renamed from
20717 linux_continue_one_process. Use resume_ptr.
20718 (linux_resume): Use linux_continue_one_thread.
20719 * server.c (handle_v_cont, handle_v_requests): New functions.
20720 (myresume): New function.
20721 (main): Handle 'v' case.
20722 * target.h (struct thread_resume): New type.
20723 (struct target_ops): Change argument of "resume" to struct
20724 thread_resume *.
20725 (myresume): Delete macro.
20726
207272003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20728
20729 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20730 (uninstall): Support DESTDIR.
20731
20732Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20733
20734 * configure.srv: Add xscale*linux copy of arm*linux entry.
20735
207362003-07-24 Daniel Jacobowitz <drow@mvista.com>
20737
20738 * linux-arm-low.c (arm_reinsert_addr): New function.
20739 (the_low_target): Add arm_reinsert_addr.
20740
207412003-07-08 Mark Kettenis <kettenis@gnu.org>
20742
20743 * mem-break.c: Remove whitespace at end of file.
20744
207452003-06-28 Daniel Jacobowitz <drow@mvista.com>
20746
20747 * configure.in: Check whether we need to prototype strerror.
20748 * server.h: Optionally prototype strerror.
20749 * gdbreplay.c (perror_with_name): Use strerror.
20750 * linux-low.c (linux_attach_lwp): Use strerror.
20751 * utils.c (perror_with_name): Use strerror.
20752 * config.in, configure: Regenerated.
20753
207542003-06-28 Daniel Jacobowitz <drow@mvista.com>
20755
20756 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20757 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20758
207592003-06-20 Daniel Jacobowitz <drow@mvista.com>
20760
20761 * Makefile.in (SFILES): Update.
20762 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20763 low-sun3.c: Remove files.
20764
207652003-06-17 Daniel Jacobowitz <drow@mvista.com>
20766
20767 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20768 (linux_detach_one_process, linux_detach): New functions.
20769 (linux_target_ops): Add linux_detach.
20770 * server.c (main): Handle 'D' packet.
20771 * target.h (struct target_ops): Add "detach" member.
20772 (detach_inferior): Define.
20773
207742003-06-13 Mark Kettenis <kettenis@gnu.org>
20775
20776 From Kelley Cook <kelleycook@wideopenwest.com>:
20777 * configure.srv: Accept i[34567]86 variants.
20778
207792003-06-05 Daniel Jacobowitz <drow@mvista.com>
20780
20781 * linux-low.c (linux_wait_for_event): Correct comment typos.
20782 (linux_resume_one_process): Call check_removed_breakpoint.
20783 (linux_send_signal): New function.
20784 (linux_target_ops): Add linux_send_signal.
20785 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20786 of kill.
20787 * target.h (struct target_ops): Add send_signal.
20788
207892003-05-29 Jim Blandy <jimb@redhat.com>
20790
20791 * linux-low.c (usr_store_inferior_registers): Transfer buf in
20792 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
20793 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
20794 away part of the register's value.
20795
207962003-03-26 Daniel Jacobowitz <drow@mvista.com>
20797
20798 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
20799 (linux_wait_for_event, linux_init_signals): Likewise.
20800
208012003-03-17 Daniel Jacobowitz <drow@mvista.com>
20802
20803 * configure.in: Check for stdlib.h.
20804 * configure: Regenerated.
20805 * config.in: Regenerated.
20806
208072003-01-04 Andreas Schwab <schwab@suse.de>
20808
20809 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
20810
208112003-01-02 Andrew Cagney <ac131313@redhat.com>
20812
20813 * Makefile.in: Remove obsolete code.
20814
208152002-11-20 Daniel Jacobowitz <drow@mvista.com>
20816
20817 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
20818 defined(PT_FPR0_HI).
20819
208202002-11-17 Stuart Hughes <seh@zee2.com>
20821
20822 * linux-arm-low.c (arm_num_regs): Increase.
20823 (arm_regmap): Include status register.
20824
208252002-11-17 Daniel Jacobowitz <drow@mvista.com>
20826
20827 * linux-low.c (register_addr): Remove incorrect -1 check.
20828
208292002-08-29 Daniel Jacobowitz <drow@mvista.com>
20830
20831 * linux-low.c (linux_create_inferior): Call setpgid. Return
20832 the new PID.
20833 (unstopped_p, linux_signal_pid): Remove.
20834 (linux_target_ops): Remove linux_signal_pid.
20835 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
20836 global instead of target method.
20837 * target.h (struct target_ops): Remove signal_pid. Update comment
20838 for create_inferior.
20839 * server.c (signal_pid): New variable.
20840 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
20841 gdbserver. Set the child to be the foreground process group.
20842 (attach_inferior): Set signal_pid.
20843
208442002-08-23 Daniel Jacobowitz <drow@mvista.com>
20845
20846 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
20847
208482002-08-20 Jim Blandy <jimb@redhat.com>
20849
20850 * Makefile.in (LDFLAGS): Allow the configure script to establish a
20851 default for this.
20852
208532002-08-01 Andrew Cagney <cagney@redhat.com>
20854
20855 * Makefile.in: Make chill references obsolete.
20856
208572002-07-24 Kevin Buettner <kevinb@redhat.com>
20858
20859 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
20860 * configure: Regenerate.
20861 * config.in: Regenerate.
20862
208632002-07-09 David O'Brien <obrien@FreeBSD.org>
20864
20865 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
20866 (perror_with_name, remote_close, remote_open, expect, play): Static.
20867
208682002-07-04 Michal Ludvig <mludvig@suse.cz>
20869
20870 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
20871 byte offsets instead of an array of indexes.
20872 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
20873
208742002-06-13 Daniel Jacobowitz <drow@mvista.com>
20875
20876 * regcache.c: Add comment.
20877
208782002-06-11 Daniel Jacobowitz <drow@mvista.com>
20879
20880 * thread-db.c: New file.
20881 * proc-service.c: New file.
20882 * acinclude.m4: New file.
20883 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
20884 proc-service.o, and thread-db.o.
20885 (linux-low.o): Add USE_THREAD_DB.
20886 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
20887 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
20888 * aclocal.m4: Regenerated.
20889 * config.in: Regenerated.
20890 * configure: Regenerated.
20891 * configure.in: Check for proc_service.h, sys/procfs.h,
20892 thread_db.h, and linux/elf.h headrs.
20893 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
20894 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
20895 Check for -lthread_db and thread support.
20896 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
20897 PowerPC, and SuperH.
20898 * i387-fp.c: Constify arguments.
20899 * i387-fp.h: Likewise.
20900 * inferiors.c: (struct thread_info): Renamed from
20901 `struct inferior_info'. Remove PID member. Use generic inferior
20902 list header. All uses updated.
20903 (inferiors, signal_pid): Removed.
20904 (all_threads): New variable.
20905 (get_thread): Define.
20906 (add_inferior_to_list): New function.
20907 (for_each_inferior): New function.
20908 (change_inferior_id): New function.
20909 (add_inferior): Removed.
20910 (remove_inferior): New function.
20911 (add_thread): New function.
20912 (free_one_thread): New function.
20913 (remove_thread): New function.
20914 (clear_inferiors): Use for_each_inferior and free_one_thread.
20915 (find_inferior): New function.
20916 (find_inferior_id): New function.
20917 (inferior_target_data): Update argument type.
20918 (set_inferior_target_data): Likewise.
20919 (inferior_regcache_data): Likewise.
20920 (set_inferior_regcache_data): Likewise.
20921 * linux-low.c (linux_bp_reinsert): Remove.
20922 (all_processes, stopping_threads, using_thrads)
20923 (struct pending_signals, debug_threads, pid_of): New.
20924 (inferior_pid): Replace with macro.
20925 (struct inferior_linux_data): Remove.
20926 (get_stop_pc, add_process): New functions.
20927 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
20928 Use add_process and add_thread.
20929 (linux_attach_lwp): New function, based on old linux_attach. Use
20930 add_process and add_thread. Set stop_expected for new threads.
20931 (linux_attach): New function.
20932 (linux_kill_one_process): New function.
20933 (linux_kill): Kill all LWPs.
20934 (linux_thread_alive): Use find_inferior_id.
20935 (check_removed_breakpoints, status_pending_p): New functions.
20936 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
20937 Update. Use WNOHANG. Wait for cloned processes also. Update process
20938 struct for the found process.
20939 (linux_wait_for_event): New function.
20940 (linux_wait): Use it. Support LWPs.
20941 (send_sigstop, wait_for_sigstop, stop_all_processes)
20942 (linux_resume_one_process, linux_continue_one_process): New functions.
20943 (linux_resume): Support LWPs.
20944 (REGISTER_RAW_SIZE): Remove.
20945 (fetch_register): Use register_size instead. Call supply_register.
20946 (usr_store_inferior_registers): Likewise. Call collect_register.
20947 Fix recursive case.
20948 (regsets_fetch_inferior_registers): Improve error message.
20949 (regsets_store_inferior_registers): Add debugging.
20950 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
20951 (unstopped_p, linux_signal_pid): New functions.
20952 (linux_target_ops): Add linux_signal_pid.
20953 (linux_init_signals): New function.
20954 (initialize_low): Call it. Initialize using_threads.
20955 * regcache.c (inferior_regcache_data): Add valid
20956 flag.
20957 (get_regcache): Fetch registers lazily. Add fetch argument
20958 and update all callers.
20959 (regcache_invalidate_one, regcache_invalidate): New
20960 functions.
20961 (new_register_cache): Renamed from create_register_cache.
20962 Return the new regcache.
20963 (free_register_cache): Change argument to a void *.
20964 (registers_to_string, registers_from_string): Call get_regcache
20965 with fetch flag set.
20966 (register_data): Make static. Pass fetch flag to get_regcache.
20967 (supply_register): Call get_regcache with fetch flag clear.
20968 (collect_register): Call get_regcache with fetch flag set.
20969 (collect_register_as_string): New function.
20970 * regcache.h: Update.
20971 * remote-utils.c (putpkt): Flush after debug output and use
20972 stderr.
20973 Handle input interrupts while waiting for an ACK.
20974 (input_interrupt): Use signal_pid method.
20975 (getpkt): Flush after debug output and use stderr.
20976 (outreg): Use collect_register_as_string.
20977 (new_thread_notify, dead_thread_notify): New functions.
20978 (prepare_resume_reply): Check using_threads. Set thread_from_wait
20979 and general_thread.
20980 (look_up_one_symbol): Flush after debug output.
20981 * server.c (step_thread, server_waiting): New variables.
20982 (start_inferior): Don't use signal_pid. Update call to mywait.
20983 (attach_inferior): Update call to mywait.
20984 (handle_query): Handle qfThreadInfo and qsThreadInfo.
20985 (main): Don't fetch/store registers explicitly. Use
20986 set_desired_inferior. Support proposed ``Hs'' packet. Update
20987 calls to mywait.
20988 * server.h: Update.
20989 (struct inferior_list, struct_inferior_list_entry): New.
20990 * target.c (set_desired_inferior): New.
20991 (write_inferior_memory): Constify.
20992 (mywait): New function.
20993 * target.h: Update.
20994 (struct target_ops): New signal_pid method.
20995 (mywait): Removed macro, added prototype.
20996
20997 * linux-low.h (regset_func): Removed.
20998 (regset_fill_func, regset_store_func): New.
20999 (enum regset_type): New.
21000 (struct regset_info): Add type field. Use new operation types.
21001 (struct linux_target_ops): stop_pc renamed to get_pc.
21002 Add decr_pc_after_break and breakpoint_at.
21003 (get_process, get_thread_proess, get_process_thread)
21004 (strut process_info, all_processes, linux_attach_lwp)
21005 (thread_db_init): New.
21006
21007 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21008 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21009 (the_low_target): Add new members.
21010 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21011 (i386_store_fpxregset): Constify.
21012 (target_regsets): Add new kind identifier.
21013 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21014 (i386_set_pc): Add debugging.
21015 (i386_breakpoint_at): New function.
21016 (the_low_target): Add new members.
21017 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21018 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21019 (mips_breakpoint_at): New.
21020 (the_low_target): Add new members.
21021 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21022 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21023 (the_low_target): Add new members.
21024 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21025 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21026 (the_low_target): Add new members.
21027 * linux-x86-64-low.c (target_regsets): Add new kind
21028 identifier.
21029
210302002-05-15 Daniel Jacobowitz <drow@mvista.com>
21031
21032 From Martin Pool <mbp@samba.org>:
21033 * server.c (gdbserver_usage): New function.
21034 (main): Call it.
21035
210362002-05-14 Daniel Jacobowitz <drow@mvista.com>
21037
21038 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21039 stop_at -> stop_pc.
21040
210412002-05-04 Andrew Cagney <ac131313@redhat.com>
21042
21043 * Makefile.in: Remove obsolete code.
21044
210452002-04-24 Michal Ludvig <mludvig@suse.cz>
21046
21047 * linux-low.c (regsets_fetch_inferior_registers),
21048 (regsets_store_inferior_registers): Removed cast to int from
21049 ptrace() calls.
21050 * regcache.h: Added declaration of struct inferior_info.
21051
210522002-04-20 Daniel Jacobowitz <drow@mvista.com>
21053
21054 * inferiors.c (struct inferior_info): Add regcache_data.
21055 (add_inferior): Call create_register_cache.
21056 (clear_inferiors): Call free_register_cache.
21057 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21058 * regcache.c (struct inferior_regcache_data): New.
21059 (registers): Remove.
21060 (get_regcache): New function.
21061 (create_register_cache, free_register_cache): New functions.
21062 (set_register_cache): Don't initialize the register cache here.
21063 (registers_to_string, registers_from_string, register_data): Call
21064 get_regcache.
21065 * regcache.h: Add prototypes.
21066 * server.h: Likewise.
21067
210682002-04-20 Daniel Jacobowitz <drow@mvista.com>
21069
21070 * mem-break.c: New file.
21071 * mem-break.h: New file.
21072 * Makefile.in: Add mem-break.o rule; update server.h
21073 dependencies.
21074 * inferiors.c (struct inferior_info): Add target_data
21075 member.
21076 (clear_inferiors): Free target_data member if set.
21077 (inferior_target_data, set_inferior_target_data): New functions.
21078 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21079 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21080 * linux-low.c (linux_bp_reinsert): New variable.
21081 (struct inferior_linux_data): New.
21082 (linux_create_inferior): Use set_inferior_target_data.
21083 (linux_attach): Likewise. Call add_inferior.
21084 (linux_wait_for_one_inferior): New function.
21085 (linux_wait): Call it.
21086 (linux_write_memory): Add const.
21087 (initialize_low): Call set_breakpoint_data.
21088 * linux-low.h (struct linux_target_ops): Add breakpoint
21089 handling members.
21090 * server.c (attach_inferior): Remove extra add_inferior
21091 call.
21092 * server.h: Include mem-break.h. Update inferior.c
21093 prototypes.
21094 * target.c (read_inferior_memory)
21095 (write_inferior_memory): New functions.
21096 * target.h (read_inferior_memory)
21097 (write_inferior_memory): Change macros to prototypes.
21098 (struct target_ops): Update comments. Add const to write_memory
21099 definition.
21100
211012002-04-11 Daniel Jacobowitz <drow@mvista.com>
21102
21103 * linux-low.c (usr_store_inferior_registers): Support
21104 registers which are allowed to fail to store.
21105 * linux-low.h (linux_target_ops): Likewise.
21106 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21107 (ppc_cannot_store_register): FPSCR may not be storable.
21108
211092002-04-09 Daniel Jacobowitz <drow@mvista.com>
21110
21111 * server.h: Include <string.h> if HAVE_STRING_H.
21112 * ChangeLog: Correct paths in last ChangeLog entry.
21113
211142002-04-09 Daniel Jacobowitz <drow@mvista.com>
21115
21116 * linux-low.h: Remove obsolete prototypes.
21117 (struct linux_target_ops): New.
21118 (extern the_low_target): New.
21119 * linux-low.c (num_regs, regmap): Remove declarations.
21120 (register_addr): Use the_low_target explicitly.
21121 (fetch_register): Likewise.
21122 (usr_fetch_inferior_registers): Likewise.
21123 (usr_store_inferior_registers): Likewise.
21124 * linux-arm-low.c (num_regs): Remove.
21125 (arm_num_regs): Define.
21126 (arm_regmap): Renamed from regmap, made static.
21127 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21128 made static.
21129 (arm_cannot_store_register): Renamed from cannot_store_register,
21130 made static.
21131 (the_low_target): New.
21132 * linux-i386-low.c (num_regs): Remove.
21133 (i386_num_regs): Define.
21134 (i386_regmap): Renamed from regmap, made static.
21135 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21136 made static.
21137 (i386_cannot_store_register): Renamed from cannot_store_register,
21138 made static.
21139 (the_low_target): New.
21140 * linux-ia64-low.c (num_regs): Remove.
21141 (ia64_num_regs): Define.
21142 (ia64_regmap): Renamed from regmap, made static.
21143 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21144 made static.
21145 (ia64_cannot_store_register): Renamed from cannot_store_register,
21146 made static.
21147 (the_low_target): New.
21148 * linux-m68k-low.c (num_regs): Remove.
21149 (m68k_num_regs): Define.
21150 (m68k_regmap): Renamed from regmap, made static.
21151 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21152 made static.
21153 (m68k_cannot_store_register): Renamed from cannot_store_register,
21154 made static.
21155 (the_low_target): New.
21156 * linux-mips-low.c (num_regs): Remove.
21157 (mips_num_regs): Define.
21158 (mips_regmap): Renamed from regmap, made static.
21159 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21160 made static.
21161 (mips_cannot_store_register): Renamed from cannot_store_register,
21162 made static.
21163 (the_low_target): New.
21164 * linux-ppc-low.c (num_regs): Remove.
21165 (ppc_num_regs): Define.
21166 (ppc_regmap): Renamed from regmap, made static.
21167 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21168 made static.
21169 (ppc_cannot_store_register): Renamed from cannot_store_register,
21170 made static.
21171 (the_low_target): New.
21172 * linux-s390-low.c (num_regs): Remove.
21173 (s390_num_regs): Define.
21174 (s390_regmap): Renamed from regmap, made static.
21175 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21176 made static.
21177 (s390_cannot_store_register): Renamed from cannot_store_register,
21178 made static.
21179 (the_low_target): New.
21180 * linux-sh-low.c (num_regs): Remove.
21181 (sh_num_regs): Define.
21182 (sh_regmap): Renamed from regmap, made static.
21183 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21184 made static.
21185 (sh_cannot_store_register): Renamed from cannot_store_register,
21186 made static.
21187 (the_low_target): New.
21188 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21189 (the_low_target): New.
21190
211912002-04-09 Daniel Jacobowitz <drow@mvista.com>
21192
21193 * Makefile.in: Add stamp-h target.
21194 * configure.in: Create stamp-h.
21195 * configure: Regenerated.
21196
211972002-04-09 Daniel Jacobowitz <drow@mvista.com>
21198
21199 * inferiors.c: New file.
21200 * target.c: New file.
21201 * target.h: New file.
21202 * Makefile.in: Add target.o and inferiors.o. Update
21203 dependencies.
21204 * linux-low.c (inferior_pid): New static variable,
21205 moved from server.c.
21206 (linux_create_inferior): Renamed from create_inferior.
21207 Call add_inferior. Return 0 on success instead of a PID.
21208 (linux_attach): Renamed from myattach.
21209 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21210 (linux_thread_alive): Renamed from mythread_alive.
21211 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21212 child dies.
21213 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21214 (regsets_store_inferior_registers): Correct error message.
21215 Add missing ``return 0''.
21216 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21217 (linux_store_registers): Renamed from store_inferior_registers.
21218 (linux_read_memory): Renamed from read_inferior_memory.
21219 (linux_write_memory): Renamed from write_inferior_memory.
21220 (linux_target_ops): New structure.
21221 (initialize_low): Call set_target_ops ().
21222 * remote-utils.c (unhexify): New function.
21223 (hexify): New function.
21224 (input_interrupt): Send signals to ``signal_pid''.
21225 * server.c (inferior_pid): Remove.
21226 (start_inferior): Update create_inferior call.
21227 (attach_inferior): Call add_inferior.
21228 (handle_query): New function.
21229 (main): Call handle_query for `q' packets.
21230 * server.h: Include "target.h". Remove obsolete prototypes.
21231 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21232
212332002-04-09 Daniel Jacobowitz <drow@mvista.com>
21234
21235 * Makefile.in: Add WARN_CFLAGS. Update configury
21236 dependencies.
21237 * configure.in: Check for <string.h>
21238 * configure: Regenerate.
21239 * config.in: Regenerate.
21240 * gdbreplay.c: Include needed system headers.
21241 (remote_open): Remove strchr prototype.
21242 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21243 * regcache.c (supply_register): Change buf argument to const void *.
21244 (supply_register_by_name): Likewise.
21245 (collect_register): Change buf argument to void *.
21246 (collect_register_by_name): Likewise.
21247 * regcache.h: Add missing prototypes.
21248 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21249 * server.c (handle_query): New function.
21250 (attached): New static variable, moved out of main.
21251 (main): Quiet longjmp clobber warnings.
21252 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21253 * utils.c (error): Remove NORETURN.
21254 (fatal): Likewise.
This page took 0.105907 seconds and 4 git commands to generate.