]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: turn target op 'hostio_last_error' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
ea06bbaa
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's hostio_last_error op into a
4 method of process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 * target.cc: Add "hostio.h" to includes.
9 (process_target::hostio_last_error): Define.
10
11 Update the derived classes and callers below.
12
13 * hostio.cc (hostio_error): Update.
14 * linux-low.cc: Remove "hostio.h" from includes.
15 (linux_target_ops): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 * nto-low.cc (nto_target_ops): Update.
18 * win32-low.h (class win32_process_target): Update.
19 * win32-low.cc (win32_target_ops): Update.
20 (wince_hostio_last_error): Turn into ...
21 (win32_process_target::hostio_last_error): ... this.
22
6e3fd7e9
TBA
232020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
24
25 Turn process_stratum_target's get_tls_address op into a method of
26 process_target.
27
28 * target.h (struct process_stratum_target): Remove the target op.
29 (class process_target): Add the target op. Also add
30 'supports_get_tls_address'.
31 * target.cc (process_target::get_tls_address): Define.
32 (process_target::supports_get_tls_address): Define.
33
34 Update the derived classes and callers below.
35
36 * server.cc (handle_query): Update.
37 * linux-low.cc (linux_target_ops): Update.
38 (linux_process_target::supports_get_tls_address): Define.
39 (linux_process_target::get_tls_address): Define.
40 * linux-low.h (class linux_process_target): Update.
41 * lynx-low.cc (lynx_target_ops): Update.
42 * nto-low.cc (nto_target_ops): Update.
43 * win32-low.cc (win32_target_ops): Update.
44
5203ae1e
TBA
452020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
46
47 Turn process_stratum_target's read_offsets op into a method of
48 process_target.
49
50 * target.h (struct process_stratum_target): Remove the target op.
51 (class process_target): Add the target op. Also add
52 'supports_read_offsets'.
53 * target.cc (process_target::read_offsets): Define.
54 (process_target::supports_read_offsets): Define.
55
56 Update the derived classes and callers below.
57
58 * server.cc (handle_query): Update.
59 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
60 (linux_target_ops): Update.
61 (linux_process_target::supports_read_offsets): Define.
62 (linux_read_offsets): Turn into ...
63 (linux_process_target::read_offsets): ... this.
64 * linux-low.h (class linux_process_target): Update.
65 * lynx-low.cc (lynx_target_ops): Update.
66 * nto-low.cc (nto_target_ops): Update.
67 * win32-low.cc (win32_target_ops): Update.
68
6eeb5c55
TBA
692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
70
71 Turn process_stratum_target's stopped_by_watchpoint and
72 stopped_data_address ops into methods of process_target.
73
74 * target.h (struct process_stratum_target): Remove the target ops.
75 (class process_target): Add the target ops.
76 * target.cc (process_target::stopped_by_watchpoint): Define.
77 (process_target::stopped_data_address): Define.
78
79 Update the derived classes and callers below.
80
81 * remote-utils.cc (prepare_resume_reply): Update.
82 * linux-low.cc (linux_target_ops): Update.
83 (linux_stopped_by_watchpoint): Turn into ...
84 (linux_process_target::stopped_by_watchpoint): ... this.
85 (linux_stopped_data_address): Turn into ...
86 (linux_process_target::stopped_data_address): ... this.
87 * linux-low.h (class linux_process_target): Update.
88 * lynx-low.cc (lynx_target_ops): Update.
89 * nto-low.cc (nto_target_ops): Update.
90 (nto_stopped_by_watchpoint): Turn into ...
91 (nto_process_target::stopped_by_watchpoint): ... this.
92 (nto_stopped_data_address): Turn into ...
93 (nto_process_target::stopped_data_address): ... this.
94 * nto-low.h (class nto_process_target): Update.
95 * win32-low.cc (win32_target_ops): Update.
96 (win32_stopped_by_watchpoint): Turn into ...
97 (win32_process_target::stopped_by_watchpoint): ... this.
98 (win32_stopped_data_address): Turn into ...
99 (win32_process_target::stopped_data_address): ... this.
100 * win32-low.h (class win32_process_target): Update.
101
22aa6223
TBA
1022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
103
104 Turn process_stratum_target's supports_hardware_single_step op into
105 a method of process_target.
106
107 * target.h (struct process_stratum_target): Remove the target op.
108 (class process_target): Add the target op.
109 (target_supports_hardware_single_step): Update the macro.
110 (target_can_do_hardware_single_step): Remove declaration.
111 * target.cc (process_target::supports_hardware_single_step): Define.
112 (target_can_do_hardware_single_step): Remove.
113
114 Update the derived classes and callers below.
115
116 * linux-low.h (class linux_process_target): Update.
117 * linux-low.cc (linux_target_ops): Update.
118 (linux_supports_hardware_single_step): Turn into ...
119 (linux_process_target::supports_hardware_single_step): ... this.
120 * lynx-low.h (class lynx_process_target): Update.
121 * lynx-low.cc (lynx_target_ops): Update.
122 (lynx_process_target::supports_hardware_single_step): Define.
123 * nto-low.h (class nto_process_target): Update.
124 * nto-low.cc (nto_target_ops): Update.
125 (nto_process_target::supports_hardware_single_step): Define.
126 * win32-low.h (class win32_process_target): Update.
127 * win32-low.cc (win32_target_ops): Update.
128 (win32_process_target::supports_hardware_single_step): Define.
129
93fe88b2
TBA
1302020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
131
132 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
133 ops into methods of process_target.
134
135 * target.h (struct process_stratum_target): Remove the target ops.
136 (class process_target): Add the target ops.
137 (target_stopped_by_hw_breakpoint): Update the macro.
138 (target_supports_stopped_by_hw_breakpoint): Update the macro.
139 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
140 (process_target::supports_stopped_by_hw_breakpoint): Define.
141
142 Update the derived classes and callers below.
143
144 * linux-low.cc (linux_target_ops): Update.
145 (linux_stopped_by_hw_breakpoint): Turn into ...
146 (linux_process_target::stopped_by_hw_breakpoint): ... this.
147 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
148 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
149 * linux-low.h (class linux_process_target): Update.
150 * lynx-low.cc (lynx_target_ops): Update.
151 * nto-low.cc (nto_target_ops): Update.
152 * win32-low.cc (win32_target_ops): Update.
153
84320c4e
TBA
1542020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
155
156 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
157 ops into methods of process_target.
158
159 * target.h (struct process_stratum_target): Remove the target ops.
160 (class process_target): Add the target ops.
161 (target_stopped_by_sw_breakpoint): Update the macro.
162 (target_supports_stopped_by_sw_breakpoint): Update the macro.
163 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
164 (process_target::supports_stopped_by_sw_breakpoint): Define.
165
166 Update the derived classes and callers below.
167
168 * linux-low.cc (linux_target_ops): Update.
169 (linux_stopped_by_sw_breakpoint): Turn into ...
170 (linux_process_target::stopped_by_sw_breakpoint): ... this.
171 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
172 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
173 * linux-low.h (class linux_process_target): Update.
174 * lynx-low.cc (lynx_target_ops): Update.
175 * nto-low.cc (nto_target_ops): Update.
176 * win32-low.cc (win32_target_ops): Update.
177
7e0bde70
TBA
1782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
179
180 Turn process_stratum_target's insert_point and remove_point ops
181 into methods of process_target.
182
183 * target.h (struct process_stratum_target): Remove the target ops.
184 (class process_target): Add the target ops.
185 * target.cc (process_target::insert_point): Define.
186 (process_target::remove_point): Define.
187
188 Update the derived classes and callers below.
189
190 * mem-break.cc (set_raw_breakpoint_at): Update.
191 (delete_raw_breakpoint): Update.
192 (uninsert_raw_breakpoint): Update.
193 (reinsert_raw_breakpoint): Update.
194 * linux-low.cc (linux_target_ops): Update.
195 (linux_insert_point): Turn into ...
196 (linux_process_target::insert_point): ... this.
197 (linux_remove_point): Turn into ...
198 (linux_process_target::remove_point): ... this.
199 * linux-low.h (class linux_process_target): Update.
200 * lynx-low.cc (lynx_target_ops): Update.
201 * nto-low.cc (nto_target_ops): Update.
202 (nto_insert_point): Turn into ...
203 (nto_process_target::insert_point): ... this.
204 (nto_remove_point): Turn into ...
205 (nto_process_target::remove_point): ... this.
206 * nto-low.h (class nto_process_target): Update.
207 * win32-low.cc (win32_target_ops): Update.
208 (win32_insert_point): Turn into ...
209 (win32_process_target::insert_point): ... this.
210 (win32_remove_point): Turn into ...
211 (win32_process_target::remove_point): ... this.
212 * win32-low.h (class win32_process_target): Update.
213
a2b2297a
TBA
2142020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
215
216 Turn process_stratum_target's supports_z_point_type op into a
217 method of process_target.
218
219 * target.h (struct process_stratum_target): Remove the target op.
220 (class process_target): Add the target op.
221 * target.cc (process_target::supports_z_point_type): Define.
222
223 Update the derived classes and callers below.
224
225 * mem-break.cc (z_type_supported): Update.
226 * linux-low.cc (linux_target_ops): Update.
227 (linux_supports_z_point_type): Turn into ...
228 (linux_process_target::supports_z_point_type): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 * nto-low.cc (nto_target_ops): Update.
232 (nto_supports_z_point_type): Turn into ...
233 (nto_process_target::supports_z_point_type): ... this.
234 * nto-low.h (class nto_process_target): Update.
235 * win32-low.cc (win32_target_ops): Update.
236 (win32_supports_z_point_type): Turn into ...
237 (win32_process_target::supports_z_point_type): ... this.
238 * win32-low.h (class win32_process_target): Update.
239
eac215cc
TBA
2402020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
241
242 Turn process_stratum_target's read_auxv op into a method of
243 process_target.
244
245 * target.h (class process_stratum_target): Remove the target op.
246 (struct process_target): Add the target op. Also add
247 'supports_read_auxv'.
248 * target.cc (process_target::read_auxv): Define.
249 (process_target::supports_read_auxv): Define.
250
251 Update the derived classes and callers below.
252
253 * server.cc (handle_qxfer_auxv): Update.
254 (handle_query): Update.
255 * linux-low.cc (linux_target_ops): Update.
256 (linux_process_target::supports_read_auxv): Define.
257 (linux_read_auxv): Turn into ...
258 (linux_process_target::read_auxv): ... this.
259 * linux-low.h (class linux_process_target): Update.
260 * lynx-low.cc (lynx_target_ops): Update.
261 * nto-low.cc (nto_target_ops): Update.
262 (nto_process_target::supports_read_auxv): Define.
263 (nto_read_auxv): Turn into ...
264 (nto_process_target::read_auxv): ... this.
265 * nto-low.h (class nto_process_target): Update.
266 * win32-low.cc (win32_target_ops): Update.
267
eb497a2a
TBA
2682020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
269
270 Turn process_stratum_target's request_interrupt op into a method of
271 process_target.
272
273 * target.h (struct process_stratum_target): Remove the target op.
274 (class process_target): Add the target op.
275
276 Update the derived classes and callers below.
277
278 * remote-utils.cc (putpkt_binary_1): Update.
279 (input_interrupt): Update.
280 (getpkt): Update.
281 * server.cc (handle_v_requests): Update.
282 * linux-low.cc (linux_target_ops): Update.
283 (linux_request_interrupt): Turn into ...
284 (linux_process_target::request_interrupt): ... this.
285 * linux-low.h (class linux_process_target): Update.
286 * lynx-low.cc (lynx_target_ops): Update.
287 (lynx_request_interrupt): Turn into ...
288 (lynx_process_target::request_interrupt): ... this.
289 * lynx-low.h (class lynx_process_target): Update.
290 * nto-low.cc (nto_target_ops): Update.
291 (nto_request_interrupt): Turn into ...
292 (nto_process_target::request_interrupt): ... this.
293 * nto-low.h (class nto_process_target): Update.
294 * win32-low.cc (win32_target_ops): Update.
295 (win32_request_interrupt): Turn into ...
296 (win32_process_target::request_interrupt): ... this.
297 * win32-low.h (class win32_process_target): Update.
298
2a31c7aa
TBA
2992020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
300
301 Turn process_stratum_target's look_up_symbols op into a method of
302 process_target.
303
304 * target.h (struct process_stratum_target): Remove the target op.
305 (class process_target): Add the target op.
306 * target.cc (process_target::look_up_symbols): Define.
307
308 Update the derived classes and callers below.
309
310 * server.cc (handle_query): Update.
311 * linux-low.cc (linux_target_ops): Update.
312 (linux_look_up_symbols): Turn into ...
313 (linux_process_target::look_up_symbols): ... this.
314 * linux-low.h (class linux_process_target): Update.
315 * lynx-low.cc (lynx_target_ops): Update.
316 * nto-low.cc (nto_target_ops): Update.
317 * win32-low.cc (win32_target_ops): Update.
318
e2558df3
TBA
3192020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
320
321 Turn process_stratum_target's read_memory and write_memory
322 ops into methods of process_target.
323
324 * target.h (struct process_stratum_target): Remove the target ops.
325 (class process_target): Add the target ops.
326
327 Update the derived classes and callers below.
328
329 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
330 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
331 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
332 (arm_get_syscall_trapinfo): Update.
333 * linux-cris-low.cc (cris_breakpoint_at): Update.
334 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
335 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
336 * linux-mips-low.cc (mips_breakpoint_at): Update.
337 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
338 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
339 * linux-sh-low.cc (sh_breakpoint_at): Update.
340 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
341 (sparc_store_gregset_from_stack): Update.
342 (sparc_breakpoint_at): Update.
343 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
344 * linux-tile-low.cc (tile_breakpoint_at): Update.
345 * linux-x86-low.cc (x86_breakpoint_at): Update.
346 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
347 * mem-brea.cc (insert_memory_breakpoint): Update.
348 (validate_inserted_breakpoint): Update.
349 * target.cc (read_inferior_memory): Update.
350 (target_write_memory): Update.
351 * linux-low.cc (linux_target_ops): Update.
352 (linux_read_memory): Make a wrapper around the read_memory target
353 op call.
354 (linux_process_target::read_memory): Rename from linux_read_memory.
355 (linux_write_memory): Turn into ...
356 (linux_process_target::write_memory): ... this.
357 * linux-low.h (class linux_process_target): Update.
358 * lynx-low.cc (lynx_target_ops): Update.
359 (lynx_read_memory): Turn into ...
360 (lynx_process_target::read_memory): ... this.
361 (lynx_write_memory): Turn into ...
362 (lynx_process_target::write_memory): ... this.
363 * lynx-low.h (class lynx_process_target): Update.
364 * nto-low.cc (nto_target_ops): Update.
365 (nto_read_memory): Turn into ...
366 (nto_process_target::read_memory): ... this.
367 (nto_write_memory): Turn into ...
368 (nto_process_target::write_memory): ... this.
369 * nto-low.h (class nto_process_target): Update.
370 * win32-low.cc (win32_target_ops): Update.
371 (win32_read_inferior_memory): Turn into ...
372 (win32_process_target::read_memory): ... this.
373 (win32_write_inferior_memory): Turn into ...
374 (win32_process_target::write_memory): ... this.
375 * win32-low.h (class win32_process_target): Update.
376
79b44087
TBA
3772020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
378
379 Turn process_stratum_target's prepare_to_access_memory and
380 done_accessing_memory ops into methods of process_target.
381
382 * target.h (struct process_stratum_target): Remove the target ops.
383 (class process_target): Add the target ops.
384 * target.cc (process_target::prepare_to_access_memory): Define.
385 (process_target::done_accessing_memory): Define.
386 (prepare_to_access_memory): Update.
387 (done_accessing_memory): Update.
388
389 Update the derived classes and callers below.
390
391 * linux-low.cc (linux_target_ops): Update.
392 (linux_prepare_to_access_memory): Turn into ...
393 (linux_process_target::prepare_to_access_memory): ... this.
394 (linux_done_accessing_memory): Turn into ...
395 (linux_process_target::done_accessing_memory): ... this.
396 * linux-low.h (class linux_process_target): Update.
397 * lynx-low.cc (lynx_target_ops): Update.
398 * nto-low.cc (nto_target_ops): Update.
399 * win32-low.cc (win32_target_ops): Update.
400
a5a4d4cd
TBA
4012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
402
403 Turn process_stratum_target's fetch_registers and store_registers
404 ops into methods of process_target.
405
406 * target.h (struct process_stratum_target): Remove the target ops.
407 (class process_target): Add the target ops.
408 (fetch_inferior_registers): Update the macro.
409 (store_inferior_registers): Update the macro.
410
411 Update the derived classes and callers below.
412
413 * linux-low.cc (linux_target_ops): Update.
414 (linux_fetch_registers): Turn into ...
415 (linux_process_target::fetch_registers): ... this.
416 (linux_store_registers): Turn into ...
417 (linux_process_target::store_registers): ... this.
418 * linux-low.h (class linux_process_target): Update.
419 * lynx-low.cc (lynx_target_ops): Update.
420 (lynx_fetch_registers): Turn into ...
421 (lynx_process_target::fetch_registers): ... this.
422 (lynx_store_registers): Turn into ...
423 (lynx_process_target::store_registers): ... this.
424 * lynx-low.h (class lynx_process_target): Update.
425 * nto-low.cc (nto_target_ops): Update.
426 (nto_fetch_registers): Turn into ...
427 (nto_process_target::fetch_registers): ... this.
428 (nto_store_registers): Turn into ...
429 (nto_process_target::store_registers): ... this.
430 * nto-low.h (class nto_process_target): Update.
431 * win32-low.cc (win32_target_ops): Update.
432 (win32_fetch_inferior_registers): Turn into ...
433 (win32_process_target::fetch_registers): ... this.
434 (win32_store_inferior_registers): Turn into ...
435 (win32_process_target::store_registers): ... this.
436 * win32-low.h (class win32_process_target): Update.
437
6532e7e3
TBA
4382020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
439
440 Turn process_stratum_target's wait op into a method of
441 process_target.
442
443 * target.h (struct process_stratum_target): Remove the target op.
444 (class process_target): Add the target op.
445
446 Update the derived classes and callers below.
447
448 * target.cc (target_wait): Update.
449 * linux-low.cc (linux_target_ops): Update.
450 (linux_wait): Turn into ...
451 (linux_process_target::wait): ... this.
452 * linux-low.h (class linux_process_target): Update.
453 * lynx-low.cc (lynx_target_ops): Update.
454 (lynx_wait): Turn into ...
455 (lynx_process_target::wait): ... this.
456 * lynx-low.h (class lynx_process_target): Update.
457 * nto-low.cc (nto_target_ops): Update.
458 (nto_wait): Turn into ...
459 (nto_process_target::wait): ... this.
460 * nto-low.h (class nto_process_target): Update.
461 * win32-low.cc (win32_target_ops): Update.
462 (win32_wait): Turn into ...
463 (win32_process_target::wait): ... this.
464 (do_initial_child_stuff): Update.
465 * win32-low.h (class win32_process_target): Update.
466
0e4d7e35
TBA
4672020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
468
469 Turn process_stratum_target's resume op into a method of
470 process_target.
471
472 * target.h (struct process_stratum_target): Remove the target op.
473 (class process_target): Add the target op.
474
475 Update the derived classes and callers below.
476
477 * server.cc (resume): Update.
478 * target.cc (target_stop_and_wait): Update.
479 (target_continue_no_signal): Update.
480 (target_continue): Update.
481 * linux-low.cc (linux_target_ops): Update.
482 (linux_resume): Turn into ...
483 (linux_process_target::resume): ... this.
484 * linux-low.h (class linux_process_target): Update.
485 * lynx-low.cc (lynx_target_ops): Update.
486 (lynx_resume): Turn into ...
487 (lynx_process_target::resume): ... this.
488 * lynx-low.h (class lynx_process_target): Update.
489 * nto-low.cc (nto_target_ops): Update.
490 (nto_resume): Turn into ...
491 (nto_process_target::resume): ... this.
492 * nto-low.h (class nto_process_target): Update.
493 * win32-low.cc (win32_target_ops): Update.
494 (win32_resume): Turn into ...
495 (win32_process_target::resume): ... this.
496 (win32_process_target::detach): Update.
497 (do_initial_child_stuff): Update.
498 * win32-low.h (class win32_process_target): Update.
499
13d3d99b
TBA
5002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
501
502 Turn process_stratum_target's thread_alive op into a method of
503 process_target.
504
505 * target.h (struct process_stratum_target): Remove the target op.
506 (class process_target): Add the target op.
507 (mythread_alive): Update the macro.
508
509 Update the derived classes and callers below.
510
511 * linux-low.cc (linux_target_ops): Update.
512 (linux_thread_alive): Turn into ...
513 (linux_process_target::thread_alive): ... this.
514 (wait_for_sigstop): Update.
515 * linux-low.h (class linux_process_target): Update.
516 * lynx-low.cc (lynx_target_ops): Update.
517 (lynx_thread_alive): Turn into ...
518 (lynx_process_target::thread_alive): ... this.
519 * lynx-low.h (class lynx_process_target): Update.
520 * nto-low.cc (nto_target_ops): Update.
521 (nto_thread_alive): Turn into ...
522 (nto_process_target::thread_alive): ... this.
523 * nto-low.h (class nto_process_target): Update.
524 * win32-low.cc (win32_target_ops): Update.
525 (win32_thread_alive): Turn into ...
526 (win32_process_target::thread_alive): ... this.
527 * win32-low.h (class win32_process_target): Update.
528
95a49a39
TBA
5292020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
530
531 Turn process_stratum_target's join op into a method of
532 process_target.
533
534 * target.h (struct process_stratum_target): Remove the target op.
535 (class process_target): Add the target op.
536 (join_inferior): Update the macro.
537
538 Update the derived classes and callers below.
539
540 * linux-low.cc (linux_target_ops): Update.
541 (linux_join): Turn into ...
542 (linux_process_target::join): ... this.
543 * linux-low.h (class linux_process_target): Update.
544 * lynx-low.cc (lynx_target_ops): Update.
545 (lynx_join): Turn into ...
546 (lynx_process_target::join): ... this.
547 * lynx-low.h (class lynx_process_target): Update.
548 * nto-low.cc (nto_target_ops): Update.
549 (nto_process_target::join): Define.
550 * nto-low.h (class nto_process_target): Update.
551 * win32-low.cc (win32_target_ops): Update.
552 (win32_join): Turn into ...
553 (win32_process_target::join): ... this.
554 * win32-low.h (class win32_process_target): Update.
555
8adb37b9
TBA
5562020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
557
558 Turn process_stratum_target's mourn op into a method of
559 process_target.
560
561 * target.h (struct process_stratum_target): Remove the target op.
562 (class process_target): Add the target op.
563
564 Update the derived classes and callers below.
565
566 * target.cc (target_mourn_inferior): Update.
567 * linux-low.cc (linux_target_ops): Update.
568 (linux_mourn): Turn into ...
569 (linux_process_target::mourn): ... this.
570 (handle_extended_wait): Update.
571 (linux_process_target::kill): Update.
572 (linux_process_target::detach): Update.
573 * linux-low.h (class linux_process_target): Update.
574 * lynx-low.cc (lynx_target_ops): Update.
575 (lynx_mourn): Turn into ...
576 (lynx_process_target::mourn): ... this.
577 * lynx-low.h (class lynx_process_target): Update.
578 * nto-low.cc (nto_target_ops): Update.
579 (nto_mourn): Turn into ...
580 (nto_process_target::mourn): ... this.
581 * nto-low.h (class nto_process_target): Update.
582 * win32-low.cc (win32_target_ops): Update.
583 (win32_mourn): Turn into ...
584 (win32_process_target::mourn): ... this.
585 * win32-low.h (class win32_process_target): Update.
586
9061c9cf
TBA
5872020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
588
589 Turn process_stratum_target's detach op into a method of
590 process_target.
591
592 * target.h (struct process_stratum_target): Remove the target op.
593 (class process_target): Add the target op.
594 (detach_inferior): Update the macro.
595
596 Update the derived classes and callers below.
597
598 * linux-low.cc (linux_target_ops): Update.
599 (linux_detach): Turn into ...
600 (linux_process_target::detach): ... this.
601 * linux-low.h (class linux_process_target): Update.
602 * lynx-low.cc (lynx_target_ops): Update.
603 (lynx_detach): Turn into ...
604 (lynx_process_target::detach): ... this.
605 * lynx-low.h (class lynx_process_target): Update.
606 * nto-low.cc (nto_target_ops): Update.
607 (nto_detach): Turn into ...
608 (nto_process_target::detach): ... this.
609 * nto-low.h (class nto_process_target): Update.
610 * win32-low.cc (win32_target_ops): Update.
611 (win32_detach): Turn into ...
612 (win32_process_target::detach): ... this.
613 * win32-low.h (class win32_process_target): Update.
614
c6885a57
TBA
6152020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
616
617 Turn process_stratum_target's kill op into a method of
618 process_target.
619
620 * target.h (struct process_stratum_target): Remove the target op.
621 (class process_target): Add the target op.
622
623 Update the derived classes and callers below.
624
625 * target.cc (kill_inferior): Update.
626 * linux-low.cc (linux_target_ops): Update.
627 (linux_kill): Turn into ...
628 (linux_process_target::kill): ... this.
629 * linux-low.h (class linux_process_target): Update.
630 * lynx-low.cc (lynx_target_ops): Update.
631 (lynx_kill): Turn into ...
632 (lynx_process_target::kill): ... this.
633 * lynx-low.h (class lynx_process_target): Update.
634 * nto-low.cc (nto_target_ops): Update.
635 (nto_kill): Turn into ...
636 (nto_process_target::kill): ... this.
637 * nto-low.h (class nto_process_target): Update.
638 * win32-low.cc (win32_target_ops): Update.
639 (win32_kill): Turn into ...
640 (win32_process_target::kill): ... this.
641 * win32-low.h (class win32_process_target): Update.
642
ef03dad8
TBA
6432020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
644
645 Turn process_stratum_target's attach op into a method of
646 process_target.
647
648 * target.h (struct process_stratum_target): Remove the target op.
649 (class process_target): Add the target op.
650 (myattach): Update the macro.
651
652 Update the derived classes and callers below.
653
654 * linux-low.cc (linux_target_ops): Update.
655 (linux_attach): Turn into ...
656 (linux_process_target::attach): ... this.
657 * linux-low.h (class linux_process_target): Update.
658 * lynx-low.cc (lynx_target_ops): Update.
659 (lynx_attach): Turn into ...
660 (lynx_process_target::attach): ... this.
661 * lynx-low.h (class lynx_process_target): Update.
662 * nto-low.cc (nto_target_ops): Update.
663 (nto_attach): Turn into ...
664 (nto_process_target::attach): ... this.
665 * nto-low.h (class nto_process_target): Update.
666 * win32-low.cc (win32_target_ops): Update.
667 (win32_attach): Turn into ...
668 (win32_process_target::attach): ... this.
669 * win32-low.h (class win32_process_target): Update.
670
6dee9afb
TBA
6712020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
672
673 Turn process_stratum_target's post_create_inferior op into a method
674 of process_target.
675
676 * target.h (struct process_stratum_target): Remove the target op.
677 (class process_target): Add the target op.
678 (target_post_create_inferior): Update the macro.
679 * target.cc (process_target::post_create_inferior): Define.
680
681 Update the derived classes and callers below.
682
683 * linux-low.cc (linux_target_ops): Update.
684 (linux_post_create_inferior): Turn into ...
685 (linux_process_target::post_create_inferior): ... this.
686 * linux-low.h (class linux_process_target): Update.
687 * lynx-low.cc (lynx_target_ops): Update.
688 * nto-low.cc (nto_target_ops): Update.
689 * win32-low.cc (win32_target_ops): Update.
690
15295543
TBA
6912020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
692
693 Turn process_stratum_target's create_inferior op into a method of
694 process_target.
695
696 * target.h (struct process_stratum_target): Remove the target op.
697 (class process_target): Add the target op.
698 (create_inferior): Rename the macro to ...
699 (target_create_inferior): ... this.
700
701 Update the derived classes and callers below.
702
703 * server.cc (handle_v_run): Update.
704 (captured_main): Update.
705 (process_serial_event): Update.
706 * linux-low.cc (linux_target_ops): Update.
707 (linux_create_inferior): Turn into ...
708 (linux_process_target::create_inferior): ... this.
709 * linux-low.h (class linux_process_target): Update.
710 * lynx-low.cc (lynx_target_ops): Update.
711 (lynx_create_inferior): Turn into ...
712 (lynx_process_target::create_inferior): ... this.
713 * lynx-low.h (class lynx_process_target): Update.
714 * nto-low.cc (nto_target_ops): Update.
715 (nto_create_inferior): Turn into ...
716 (nto_process_target::create_inferior): ... this.
717 * nto-low.h (class nto_process_target): Update.
718 * win32-low.cc (win32_target_ops): Update.
719 (win32_create_inferior): Turn into ...
720 (win32_process_target::create_inferior): ... this.
721 * win32-low.h (class win32_process_target): Update.
722
5ef9273d
TBA
7232020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
724
725 * target.h (class process_target): New class definition.
726 (struct process_stratum_target) <pt>: New field with type
727 'process_target*'.
728 * linux-low.h (class linux_process_target): Define as a derived
729 class of 'process_target'.
730 * linux-low.cc (linux_target_ops): Add a linux_process_target*
731 as the 'pt' field.
732 * lynx-low.h (class lynx_process_target): Define as a derived
733 class of 'process_target'.
734 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
735 as the 'pt' field.
736 * nto-low.h (class nto_process_target): Define as a derived
737 class of 'process_target'.
738 * nto-low.cc (nto_target_ops): Add an nto_process_target*
739 as the 'pt' field.
740 * win32-low.h (class win32_process_target): Define as a derived
741 class of 'process_target'.
742 * win32-low.cc (win32_target_ops): Add a win32_process_target*
743 as the 'pt' field.
744
9f1528a1
AB
7452020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
746
747 * configure: Regenerate.
748
bf84f706
MR
7492020-02-19 Maciej W. Rozycki <macro@wdc.com>
750 Andrew Burgess <andrew.burgess@embecosm.com>
751
752 * linux-riscv-low.cc: New file.
753 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
754 and nat/riscv-linux-tdesc.c.
755 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
756 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
757 Define.
758
1a627e7e
TT
7592020-02-14 Tom Tromey <tom@tromey.com>
760
761 * acinclude.m4: Don't include acx_configure_dir.m4.
762 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
763 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
764 (all, install-only, uninstall, clean-info, clean)
765 (maintainer-clean): Don't recurse.
766 (subdir_do, all-lib): Remove.
767 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
768 (GNULIB_H): Remove.
769 (generated_files): Update.
770 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
771 * configure: Rebuild.
772 * configure.ac: Don't configure gnulib or libiberty.
773 (GNULIB): Update.
774
a9b34532
EZ
7752020-02-14 Eli Zaretskii <eliz@gnu.org>
776
777 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
778 preparing the command line for CreateProcess.
779 (win32_create_inferior): Reflect the program name in debugging
780 output that shows the process and its command line.
781
feacfcac
SM
7822020-02-13 Simon Marchi <simon.marchi@efficios.com>
783
784 * Makefile.in: Rename source files from .c to .cc.
785 * %.c: Rename to %.cc.
786 * configure.ac: Rename server.c to server.cc.
787 * configure: Re-generate.
788
06b3c5bd
SM
7892020-02-13 Simon Marchi <simon.marchi@efficios.com>
790
791 * Makefile.in: Rename gdbsupport source files from .c to .cc.
792
052793ad
HD
7932020-02-12 Hannes Domani <ssbssa@yahoo.de>
794
795 * win32-low.c (win32_create_inferior): Set signal_pid.
796
f20e3e82
MR
7972020-02-12 Maciej W. Rozycki <macro@wdc.com>
798 Pedro Alves <palves@redhat.com>
799
800 Skip building gdbserver in a cross-configuration.
801 * configure.srv: Set $gdbserver_host depending on whether $target
802 is $host. Use $gdbserver_host instead of $host.
803
8ddd8e0e
SM
8042020-02-11 Simon Marchi <simon.marchi@efficios.com>
805
806 * configure: Re-generate.
807
898e7f60
SM
8082020-02-11 Simon Marchi <simon.marchi@efficios.com>
809
810 * configure: Re-generate.
811
58df732b
SM
8122020-02-11 Simon Marchi <simon.marchi@efficios.com>
813
814 * acinclude.m4: Update warning.m4 path.
815
7928d571
HD
8162020-02-09 Hannes Domani <ssbssa@yahoo.de>
817
818 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
819 (handle_exception): Set siginfo_er.
820 (win32_xfer_siginfo): New function.
821
919adfe8
TT
8222020-02-07 Tom Tromey <tom@tromey.com>
823 Pedro Alves <palves@redhat.com>
824
825 * README: Update build documentation.
826 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
827 host, not target.
828 * configure.ac: Update paths.
829 * configure: Rebuild.
830 * acinclude.m4: Update paths.
831 * Makefile.in: Update include paths.
832 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
833 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
834 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
835 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
836 (%-generated.c): Update paths.
837 * Move entire directory from ../gdb/gdbserver.
838
287c844a
MR
8392020-01-29 Maciej W. Rozycki <macro@wdc.com>
840
841 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
842
548a204f
PFC
8432020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
844
845 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
846 assignment instead of srv_linux_obj.
847
a2236a08
HD
8482020-01-28 Hannes Domani <ssbssa@yahoo.de>
849
850 * server.c (handle_qxfer_libraries): Write segment-address with
851 paddress.
852
bdaed379
HD
8532020-01-24 Hannes Domani <ssbssa@yahoo.de>
854
855 * Makefile.in (install-strip): New target.
856 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
857 * aclocal.m4: Regenerate.
858 * configure: Regenerate.
859 * configure.ac: Add AM_PROG_INSTALL_STRIP.
860
42cd72aa
MR
8612020-01-24 Maciej W. Rozycki <macro@wdc.com>
862
863 * Makefile.in (SFILES): Adjust paths to point to real files.
864 (OBS): Move waitstatus.o to target/waitstatus.o.
865 (TAGS): Transform paths appropriately.
866 (%.o): Rename to...
867 (nat/%.o): ... this pattern rule.
868 (%.o): Rename to...
869 (target/%.o): ... this pattern rule.
870 * configure.srv: Adjust paths throughout to include nat/ prefix
871 with the revant files.
872 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
873 * configure: Regenerate.
874
42ba50ec
MR
8752020-01-24 Maciej W. Rozycki <macro@wdc.com>
876
877 * Makefile.in (TAGS): Remove config files from the recipe.
878
05ea2a05
TT
8792020-01-14 Tom Tromey <tom@tromey.com>
880
881 * configure: Rebuild.
882 * configure.ac: Remove any checks that were added to common.m4.
883 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
884 lib-link.m4.
885
01027315
TT
8862020-01-14 Tom Tromey <tom@tromey.com>
887
888 * server.h: Include config.h.
889 * gdbreplay.c: Include config.h.
890 * configure: Rebuild.
891 * configure.ac: Don't source common.host.
892 * acinclude.m4: Update path.
893 * Makefile.in (INCSUPPORT): New variable.
894 (INCLUDE_CFLAGS): Add INCSUPPORT.
895 (SFILES): Update paths.
896 (version-generated.c): Update path to create-version.sh.
897 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
898
b2ceabe8
TT
8992020-01-14 Tom Tromey <tom@tromey.com>
900
901 * configure.ac (LIBS): Use WIN32APILIBS.
902 (USE_WIN32API): Don't define.
903 * configure: Rebuild.
904
25c51f71
TT
9052020-01-14 Tom Tromey <tom@tromey.com>
906
907 * configure: Rebuild.
908
c0bd321d
SM
9092020-01-13 Simon Marchi <simon.marchi@efficios.com>
910
911 * Makefile.in (%-generated.c): Remove rule for files from
912 regformats/i386.
913
bb564c58
SM
9142020-01-13 Simon Marchi <simon.marchi@efficios.com>
915
916 * configure: Re-generate.
917
6e37c371
SM
9182020-01-13 Simon Marchi <simon.marchi@efficios.com>
919
920 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
921 Define to static.
922 * tracepoint.c (stop_tracing, flush_trace_buffer,
923 about_to_request_buffer_space, get_trace_state_variable_value,
924 set_trace_state_variable_value, gdb_collect): Add declaration.
925
df4a0200
SM
9262020-01-13 Simon Marchi <simon.marchi@efficios.com>
927
928 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
929 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
930 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
931 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
932 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
933 static.
934
89e94ec9
SM
9352020-01-13 Simon Marchi <simon.marchi@efficios.com>
936
937 * inferiors.c: Include gdbsupport/common-inferior.h.
938
2552728a
SM
9392020-01-13 Simon Marchi <simon.marchi@efficios.com>
940
941 * hostio-errno.c: Include hostio.h.
942
4025fa09
SM
9432020-01-13 Simon Marchi <simon.marchi@efficios.com>
944
945 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
946 prerequisite.
947
c0b0a142
SM
9482020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
949
950 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
951 * linux-arm-tdesc.h: Include arch/arm.h.
952
bb1183e2
SM
9532020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
954
955 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
956
f5df0b5f
SM
9572020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
958
959 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
960 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
961
5b6d1e4f
PA
9622020-01-10 Pedro Alves <palves@redhat.com>
963
964 * fork-child.c (post_fork_inferior): Pass target down to
965 startup_inferior.
966 * inferiors.c (switch_to_thread): Add process_stratum_target
967 parameter.
968 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
969 * nto-low.c (nto_target_ops): Now a process_stratum_target.
970 * linux-low.c (linux_target_ops): Now a process_stratum_target.
971 * remote-utils.c (prepare_resume_reply): Pass the target to
972 switch_to_thread.
973 * target.c (the_target): Now a process_stratum_target.
974 (done_accessing_memory): Pass the target to switch_to_thread.
975 (set_target_ops): Ajust to use process_stratum_target.
976 * target.h (struct target_ops): Rename to ...
977 (struct process_stratum_target): ... this.
978 (the_target, set_target_ops): Adjust.
979 (prepare_to_access_memory): Adjust comment.
980 * win32-low.c (child_xfer_memory): Adjust to use
981 process_stratum_target.
982 (win32_target_ops): Now a process_stratum_target.
983
559e7e50
EZ
9842020-01-06 Eli Zaretskii <eliz@gnu.org>
985 Pedro Alves <palves@redhat.com>
986
987 * win32-low.c (get_child_debug_event): Extract the fatal exception
988 from the exit status and convert to the equivalent Posix signal
989 number.
990 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
991 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
992
48189bec
HD
9932020-01-01 Hannes Domani <ssbssa@yahoo.de>
994
995 * Makefile.in: Use INSTALL_PROGRAM_ENV.
996
5dd8bf88
JB
9972020-01-01 Joel Brobecker <brobecker@adacore.com>
998
999 * server.c (gdbserver_version): Change copyright year to 2020.
1000 * gdbreplay.c (gdbreplay_version): Likewise.
1001
0ad6b8ee
CB
10022019-12-19 Christian Biesinger <cbiesinger@google.com>
1003
1004 * configure: Regenerate.
1005 * configure.ac: Quote variable arguments of test.
1006
1ee7b812
BE
10072019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1008
1009 * Makefile.in: Fix build with GNU Make 3.81
1010
d9fa87f4
TT
10112019-12-16 Tom Tromey <tromey@adacore.com>
1012
1013 * server.c (get_exec_file): Constify result.
1014
ab7d13f0
CB
10152019-12-10 Christian Biesinger <cbiesinger@google.com>
1016
1017 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1018 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1019 * config.in: Regenerate.
1020 * configure: Regenerate.
1021 * configure.ac: Don't check for strerror.
1022 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1023 Call safe_strerror instead of strerror.
1024 * server.h (strerror): Remove this now-unnecessary declaration.
1025 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1026 strerror.
1027 (gdb_agent_helper_thread): Likewise.
1028 * utils.c (perror_with_name): Likewise.
1029
4da8c3a8
TT
10302019-11-26 Tom Tromey <tom@tromey.com>
1031
1032 * configure, config.in: Rebuild.
1033
21987b9c
TT
10342019-11-26 Tom Tromey <tom@tromey.com>
1035
1036 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1037 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1038 gdb_sigmask.
1039 * configure, config.in: Rebuild.
1040
5e030278
TT
10412019-11-26 Tom Tromey <tom@tromey.com>
1042
1043 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1044 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1045 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1046 * acinclude.m4: Include ax_pthread.m4.
1047 * config.in, configure: Rebuild.
1048
6d91ce9a
CB
10492019-11-26 Christian Biesinger <cbiesinger@google.com>
1050
1051 * debug.c (debug_set_output): Call safe_strerror instead of
1052 strerror.
1053 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1054 (linux_kill_one_lwp): Likewise.
1055 (linux_detach_one_lwp): Likewise.
1056 (linux_wait_for_event_filtered): Likewise.
1057 (store_register): Likewise.
1058 * lynx-low.c (lynx_attach): Likewise.
1059 * mem-break.c (insert_memory_breakpoint): Likewise.
1060 (remove_memory_breakpoint): Likewise.
1061 (delete_fast_tracepoint_jump): Likewise.
1062 (set_fast_tracepoint_jump): Likewise.
1063 (uninsert_fast_tracepoint_jumps_at): Likewise.
1064 (reinsert_fast_tracepoint_jumps_at): Likewise.
1065 * nto-low.c (nto_xfer_memory): Likewise.
1066 (nto_resume): Likewise.
1067
6cdd651f
LM
10682019-11-20 Luis Machado <luis.machado@linaro.org>
1069
1070 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1071 instead of register count.
1072 * tdesc.c (tdesc_contains_feature): New function.
1073 * tdesc.h (tdesc_contains_feature): New prototype.
1074
cd850b40
CB
10752019-11-15 Christian Biesinger <cbiesinger@google.com>
1076
1077 * Makefile.in: Add safe-strerror.c.
1078 * configure: Regenerate.
1079 * configure.ac: Don't source common.host.
1080
5abebf3c
CB
10812019-11-15 Christian Biesinger <cbiesinger@google.com>
1082
1083 * config.in: Regenerate.
1084 * configure: Regenerate.
1085
e06f3d6e
AB
10862019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1087
1088 * ax.c (ax_printf): Handle size_t_arg.
1089
ca3a04f6
CB
10902019-11-06 Christian Biesinger <cbiesinger@google.com>
1091
1092 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1093 * mi/mi-main.c (output_cores): Likewise.
1094 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1095 (linux_xfer_osdata_modules): Likewise.
1096 * remote.c (register_remote_support_xml): Likewise.
1097 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1098 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1099
e48f6033
CB
11002019-11-01 Christian Biesinger <cbiesinger@google.com>
1101
1102 * configure: Regenerate.
1103 * configure.ac: Remove check for strerror_r.
1104
e7e97a2e
CB
11052019-10-31 Christian Biesinger <cbiesinger@google.com>
1106
1107 * config.in: Regenerate.
1108 * configure: Regenerate.
1109 * configure.ac: Also check for strerror_r.
1110
75cafaa6
CB
11112019-10-31 Christian Biesinger <cbiesinger@google.com>
1112
1113 * ax.h (debug_agent): Remove duplicate declaration.
1114
30baf67b
TV
11152019-10-26 Tom de Vries <tdevries@suse.de>
1116
1117 * linux-aarch64-low.c: Fix typos in comments.
1118 * linux-arm-low.c: Same.
1119 * linux-low.c: Same.
1120 * linux-ppc-low.c: Same.
1121 * proc-service.c: Same.
1122 * regcache.h: Same.
1123 * server.c: Same.
1124 * tracepoint.c: Same.
1125 * win32-low.c: Same.
1126
52c64cf7
TT
11272019-10-25 Tom Tromey <tromey@adacore.com>
1128
1129 * utils.c (xstrdup): Remove.
1130
c12d372d
TT
11312019-10-23 Tom Tromey <tom@tromey.com>
1132
1133 * configure, config.in: Rebuild.
1134
4d0b984b
TT
11352019-10-23 Tom Tromey <tom@tromey.com>
1136
1137 * configure: Rebuild.
1138 * acinclude.m4: Use m4_include, not sinclude.
1139
c5adaa19
TT
11402019-10-17 Tom Tromey <tromey@adacore.com>
1141
1142 * configure: Rebuild.
1143 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1144 in AC_CONFIG_FILES invocation.
1145 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1146 invocation.
1147
fec4e896
CB
11482019-10-16 Christian Biesinger <cbiesinger@google.com>
1149
1150 * server.c: Include xml-builtin.h.
1151 (get_xml_features): Don't declare xml_builtins here.
1152
00975ff6
AB
11532019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1154
1155 * Makefile.in: Remove references to vec-ipa.o.
1156
0dc32745
AB
11572019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1158
1159 * Makefile.in: Remove references to vec.c.
1160
3e6ec53a
CB
11612019-10-02 Christian Biesinger <cbiesinger@google.com>
1162
1163 * server.c (server_waiting): Change to bool.
1164 (extended_protocol): Likewise.
1165 (response_needed): Likewise.
1166 (exit_requested): Likewise.
1167 (run_once): Likewise.
1168 (report_no_resumed): Likewise.
1169 (non_stop): Likewise.
1170 (disable_packet_vCont): Likewise.
1171 (disable_packet_Tthread): Likewise.
1172 (disable_packet_qC): Likewise.
1173 (disable_packet_qfThreadInfo): Likewise.
1174 (handle_general_set): Update.
1175 (handle_detach): Update.
1176 (handle_monitor_command): Update.
1177 (handle_query): Update.
1178 (captured_main): Update.
1179 (process_serial_event): Update.
1180 * server.h (server_waiting): Change to bool.
1181 (disable_packet_vCont): Likewise.
1182 (disable_packet_Tthread): Likewise.
1183 (disable_packet_qC): Likewise.
1184 (disable_packet_qfThreadInfo): Likewise.
1185 (run_once): Likewise.
1186 (non_stop): Likewise.
1187 * target.c (target_stop_and_wait): Update.
1188
80fd2826
TT
11892019-10-02 Tom Tromey <tromey@adacore.com>
1190
1191 * Makefile.in (SFILES): Add common-inferior.c.
1192 (OBS): Add common-inferior.o.
1193 * server.c (startup_with_shell): Don't define.
1194
46f29a9a
AB
11952019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1196
1197 * linux-low.c (linux_low_read_btrace): Update for change to
1198 std::vector.
1199
f9d949fb
CB
12002019-09-20 Christian Biesinger <cbiesinger@google.com>
1201
1202 * debug.c (debug_threads): Remove comment in favor of the header.
1203 * debug.h (using_threads): Add declaration.
1204 (debug_threads): Add comment.
1205 * linux-aarch64-low.c: Include debug.h and remove declaration of
1206 debug_threads.
1207 * nto-low.c: Likewise.
1208 * remote-utils.c: Likewise.
1209 * thread-db.c: Likewise.
1210
abf516c6
UW
12112019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1212
1213 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1214 and powerpc-cell64l-ipa.o.
1215 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1216 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1217 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1218 (spu*-*-*): Remove.
1219
1220 * spu-low.c: Remove file.
1221
1222 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1223 (parse_spufs_run): Remove.
1224 (ppc_get_pc): Remove Cell/B.E. support.
1225 (ppc_set_pc): Likewise.
1226 (ppc_breakpoint_at): Likewise.
1227 (ppc_arch_setup): Likewise.
1228 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1229 tdesc_powerpc_cell32l.
1230 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1231 or init_registers_powerpc_cell32l.
1232 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1233 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1234 or init_registers_powerpc_cell32l.
1235 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1236 (init_registers_powerpc_cell32l): Remove prototype.
1237 (init_registers_powerpc_cell64l): Likewise.
1238
1239 * target.h (struct target_ops): Remove qxfer_spu member.
1240 * server.c (handle_qxfer_spu): Remove.
1241 (qxfer_packets): Remove entry for "spu".
1242 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1243 * linux-low.c (SPUFS_MAGIC): Remove.
1244 (spu_enumerate_spu_ids): Remove.
1245 (linux_qxfer_spu): Remove.
1246 (linux_target_ops): Remove qxfer_spu member.
1247 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1248 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1249 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1250
2d41fa11
SDJ
12512019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1252
1253 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1254 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1255 * config.in: Regenerate.
1256 * configure: Regenerate.
1257
d59b55f0
TT
12582019-08-15 Tom Tromey <tromey@adacore.com>
1259
1260 * target.c (target_write_memory): Use gdb::byte_vector.
1261
4196ab2a
TT
12622019-08-15 Tom Tromey <tromey@adacore.com>
1263
1264 * tracepoint.c (write_inferior_data_pointer)
1265 (write_inferior_integer, write_inferior_int8)
1266 (write_inferior_uinteger, m_tracepoint_action_download)
1267 (r_tracepoint_action_download, x_tracepoint_action_download)
1268 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1269 (download_agent_expr, download_tracepoint_1)
1270 (download_trace_state_variables, upload_fast_traceframes): Update.
1271 * server.c (gdb_write_memory): Update.
1272 * remote-utils.c (relocate_instruction): Update.
1273 * proc-service.c (ps_pdwrite): Update.
1274 * mem-break.c (remove_memory_breakpoint)
1275 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1276 (uninsert_fast_tracepoint_jumps_at)
1277 (reinsert_fast_tracepoint_jumps_at): Update.
1278 * linux-x86-low.c (append_insns)
1279 (i386_install_fast_tracepoint_jump_pad)
1280 (amd64_write_goto_address, i386_write_goto_address): Update.
1281 * linux-s390-low.c (append_insns, s390_write_goto_address):
1282 Update.
1283 * linux-ppc-low.c (ppc_relocate_instruction)
1284 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1285 (ppc_write_goto_address): Update.
1286 * linux-aarch64-low.c (append_insns): Update.
1287 * target.h (struct target_ops): Update.
1288 (write_inferior_memory): Don't declare.
1289 * target.c (target_write_memory): Rename from
1290 write_inferior_memory. Remove old target_write_memory.
1291
c6778d00
TT
12922019-08-15 Tom Tromey <tromey@adacore.com>
1293
1294 * target.c (write_inferior_memory): Use std::vector.
1295
404f2902
FCE
12962019-08-06 Frank Ch. Eigler <fche@redhat.com>
1297
1298 PR build/24886
1299 * configure.ac: Drop enable-libmcheck support.
1300 * configure, config.in: Rebuild.
1301 * acinclude.m4: Don't include it.
1302
4c5aa8e0
AH
13032019-07-19 Alan Hayward <alan.hayward@arm.com>
1304
1305 * configure.srv: Remove Arm xml files.
1306
7cc17433
AH
13072019-07-19 Alan Hayward <alan.hayward@arm.com>
1308
1309 * configure.srv: Add new files. Remove xml generated files.
1310 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1311 registers.
1312 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1313 * linux-aarch32-tdesc.c: New file.
1314 * linux-aarch32-tdesc.h: New file.
1315 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1316 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1317 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1318 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1319 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1320 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1321 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1322 (arm_read_description): Call arm_linux_read_description.
1323 (initialize_low_arch): Don't init registers.
1324 * linux-arm-tdesc.c: New file.
1325 * linux-arm-tdesc.h: New file.
1326
166a82be
AH
13272019-07-10 Alan Hayward <alan.hayward@arm.com>
1328
1329 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1330 Move counter inside for.
1331 (arm_read_description): Check ptrace earlier.
1332 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1333
268a13a5
TT
13342019-07-09 Tom Tromey <tom@tromey.com>
1335
1336 * configure: Rebuild.
1337 * configure.ac: Change common to gdbsupport.
1338 * acinclude.m4: Change common to gdbsupport.
1339 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1340 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1341 common to gdbsupport.
1342 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1343 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1344 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1345 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1346 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1347 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1348 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1349 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1350 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1351 common to gdbsupport.
1352
350fab54
AH
13532019-07-04 Alan Hayward <alan.hayward@arm.com>
1354
1355 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1356 defines.
1357 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1358
2b40fda7
AH
13592019-07-04 Alan Hayward <alan.hayward@arm.com>
1360
1361 * configure.srv: Remove legacy xml.
1362 * linux-aarch64-low.c (initialize_low_arch): Remove
1363 initialize_low_tdesc call.
1364 * linux-aarch64-tdesc-selftest.c: Remove file.
1365 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1366 * linux-x86-low.c (initialize_low_arch): Remove
1367 initialize_low_tdesc call.
1368 * linux-x86-tdesc-selftest.c: Remove file.
1369 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1370
7d10623d
TV
13712019-06-20 Tom de Vries <tdevries@suse.de>
1372
1373 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1374 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1375
8d6a48df
TV
13762019-06-19 Tom de Vries <tdevries@suse.de>
1377
1378 * debug.h (debug_write): Change return type to ssize_t.
1379 * debug.c (debug_write): Same.
1380
73cc7272
TT
13812019-06-14 Tom Tromey <tom@tromey.com>
1382
1383 * configure.ac: Use new path to gnulib.
1384 * configure: Rebuild.
1385 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1386 to gnulib.
1387
08f10e02
TT
13882019-06-11 Tom Tromey <tom@tromey.com>
1389
1390 * Makefile.in (SFILES): Add alloc.c.
1391 (OBS): Add alloc.o.
1392 (IPA_OBJS): Add alloc-ipa.o.
1393 (alloc-ipa.o): New target.
1394 (%.o: ../%.c): New pattern rule.
1395
422186a9
TT
13962019-06-10 Tom Tromey <tromey@adacore.com>
1397
1398 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1399 end warning with a newline.
1400 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1401 newline.
1402 * thread-db.c (attach_thread): Don't end warning with a newline.
1403 (thread_db_notice_clone): Likewise.
1404 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1405 newline.
1406 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1407 end warning with a newline.
1408
b02f78f9
PA
14092019-06-04 Pedro Alves <palves@redhat.com>
1410
1411 * server.c (captured_main): Use make_unique_xstrdup.
1412
88ed7edb
TT
14132019-06-02 Tom Tromey <tom@tromey.com>
1414
1415 * gdbreplay.c (fromhex): Remove.
1416 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1417
33a6bc35
TT
14182019-05-29 Tom Tromey <tromey@adacore.com>
1419
1420 * configure: Rebuild.
1421
e90a813d
KB
14222019-05-06 Kevin Buettner <kevinb@redhat.com>
1423
1424 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1425 sign extension code on 32-bit builds.
1426
353ea2d1
EZ
14272019-05-03 Eli Zaretskii <eliz@gnu.org>
1428
1429 * remote-utils.c:
1430 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1431
b494cdff
TT
14322019-04-19 Tom Tromey <tom@tromey.com>
1433
1434 * server.c (struct vstop_notif): Derive from notif_event.
1435 <base>: Remove.
1436 (queue_stop_reply): Update.
1437 (remove_all_on_match_ptid): Change type. Rewrite.
1438 (discard_queued_stop_replies): Rewrite.
1439 (in_queued_stop_replies_ptid): Change type.
1440 (in_queued_stop_replies): Rewrite.
1441 (notif_stop): Update.
1442 (queue_stop_reply_callback): Update.
1443 (captured_main): Don't call initialize_notif.
1444 (push_stop_notification): Update.
1445 * notif.c (notif_write_event, handle_notif_ack)
1446 (notif_event_enque, notif_push): Update.
1447 (notif_event_xfree, initialize_notif): Remove.
1448 * notif.h (struct notif_event): Include <list>, not
1449 "common/queue.h".
1450 (struct notif_server) <queue>: Now a std::list.
1451 (notif_event_p): Remove typedef.
1452 (initialize_notif): Don't declare.
1453 (struct notif_event): Add virtual destructor.
1454
a7e559cc
AH
14552019-04-17 Alan Hayward <alan.hayward@arm.com>
1456
1457 * ax.c (ax_vdebug): Call debug_printf.
1458 * debug.c (debug_write): New function.
1459 * debug.h (debug_write): New declaration.
1460 * linux-low.c (sigchld_handler): Call debug_write.
1461
aeb2e706
AH
14622019-04-17 Alan Hayward <alan.hayward@arm.com>
1463
1464 * debug.c (debug_set_output): New function.
1465 (debug_vprintf): Send output to debug_file.
1466 (debug_flush): Likewise.
1467 * debug.h (debug_set_output): New declaration.
1468 * server.c (handle_monitor_command): Add debug-file option.
1469 (captured_main): Likewise.
1470
c1bc0935
AH
14712019-04-17 Alan Hayward <alan.hayward@arm.com>
1472
1473 * debug.c (remote_debug): Add definition.
1474 * debug.h (remote_debug): Add declaration.
1475 * hostio.c (remote_debug): Remove declaration.
1476 * remote-utils.c (struct ui_file): Likewise.
1477 (remote_debug): Likewise.
1478 * remote-utils.h (remote_debug): Likewise,
1479 * server.c (remote_debug): Remove definition.
1480
3f52fdbc
KB
14812019-04-10 Kevin Buettner <kevinb@redhat.com>
1482
1483 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1484 when using a 64-bit gdbserver.
1485
b0319eaa
TT
14862019-04-09 Tom Tromey <tromey@adacore.com>
1487
1488 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1489
eedc3f4f
TT
14902019-04-08 Tom Tromey <tom@tromey.com>
1491
1492 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1493 throw.
1494 (linux_resume_one_lwp): Likewise.
1495
230d2906
TT
14962019-04-08 Tom Tromey <tom@tromey.com>
1497
1498 * gdbreplay.c: Update.
1499 * linux-low.c: Update.
1500 * server.c: Update.
1501
a70b8144
TT
15022019-04-08 Tom Tromey <tom@tromey.com>
1503
1504 * server.c: Use C++ exception handling.
1505 * linux-low.c: Use C++ exception handling.
1506 * gdbreplay.c: Use C++ exception handling.
1507
3d6e9d23
TT
15082019-04-08 Tom Tromey <tom@tromey.com>
1509
1510 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1511 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1512 (captured_main, main): Update.
1513 * gdbreplay.c (main): Update.
1514
0570503d
PFC
15152019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1516
1517 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1518 value in argument pointer, return 1 if the entry is found and 0
1519 otherwise. Move comment.
1520 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1521 * linux-low.h (linux_get_auxv): Declare.
1522 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1523
227a9e65
TT
15242019-04-05 Tom Tromey <tromey@adacore.com>
1525
1526 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1527 variables.
1528
69f4c9cc
AH
15292019-03-28 Alan Hayward <alan.hayward@arm.com>
1530
1531 * linux-low.c (AT_HWCAP2): Add define if not already included.
1532
974c89e0
AH
15332019-03-26 Alan Hayward <alan.hayward@arm.com>
1534
1535 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1536 (aarch64_arch_setup): Call linux_get_hwcap.
1537 * linux-arm-low.c (arm_get_hwcap): Remove function.
1538 (arm_read_description): Call linux_get_hwcap.
1539 * linux-low.c (linux_get_auxv): New function.
1540 (linux_get_hwcap): Likewise.
1541 (linux_get_hwcap2): Likewise.
1542 * linux-low.h (linux_get_hwcap): New declaration.
1543 (linux_get_hwcap2): Likewise.
1544 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1545 (ppc_arch_setup): Call linux_get_hwcap.
1546 * linux-s390-low.c (s390_get_hwcap): Remove function.
1547 (s390_arch_setup): Call linux_get_hwcap.
1548
1ef53e6b
AH
15492019-03-22 Alan Hayward <alan.hayward@arm.com>
1550 Jiong Wang <jiong.wang@arm.com>
1551
1552 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1553 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1554 to fail.
1555 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1556
ee4fbcfa
AH
15572019-03-22 Alan Hayward <alan.hayward@arm.com>
1558 Jiong Wang <jiong.wang@arm.com>
1559
1560 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1561 (aarch64_get_hwcap): New function.
1562 (aarch64_arch_setup): Read APIA hwcap.
1563
6dc0ebde
AH
15642019-03-22 Alan Hayward <alan.hayward@arm.com>
1565 Jiong Wang <jiong.wang@arm.com>
1566
1567 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1568 (initialize_low_tracepoint): Likewise.
1569 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1570 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1571 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1572 (aarch64_linux_read_description): Likewise.
1573 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1574
1163a4b7
JB
15752019-03-12 John Baldwin <jhb@FreeBSD.org>
1576
1577 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1578 i386_create_target_description for 'segments' parameter.
1579 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1580 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1581 * win32-i386-low.c (i386_arch_setup): Likewise.
1582
d3a70e03
TT
15832019-03-12 Tom Tromey <tromey@adacore.com>
1584
1585 * linux-low.c (iterate_over_lwps): Update.
1586
37991b4f
TT
15872019-03-06 Tom Tromey <tom@tromey.com>
1588
1589 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1590 (captured_main): Use SCOPE_EXIT.
1591
45950eb6
SDJ
15922019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1593
1594 * configure.srv: Use '$enable_unittest' instead of '$development'
1595 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1596 case.
1597
43ac54fc
TT
15982019-02-27 Tom Tromey <tromey@adacore.com>
1599
1600 * gdbreplay.c (logchar): Handle \r\n.
1601
df0da8a2
AH
16022019-02-07 Alan Hayward <alan.hayward@arm.com>
1603
1604 * linux-low.c (linux_attach): Add process before lwp.
1605 * server.c (attach_inferior): Check if already attached.
1606
1a5c2598
TT
16072019-02-07 Tom Tromey <tom@tromey.com>
1608
1609 * x86-tdesc.h: Rename include guard.
1610 * x86-low.h: Add include guard.
1611 * wincecompat.h: Rename include guard.
1612 * win32-low.h: Add include guard.
1613 * utils.h: Rename include guard.
1614 * tracepoint.h: Rename include guard.
1615 * tdesc.h: Rename include guard.
1616 * target.h: Rename include guard.
1617 * server.h: Rename include guard.
1618 * remote-utils.h: Rename include guard.
1619 * regcache.h: Rename include guard.
1620 * nto-low.h: Rename include guard.
1621 * notif.h: Add include guard.
1622 * mem-break.h: Rename include guard.
1623 * lynx-low.h: Add include guard.
1624 * linux-x86-tdesc.h: Add include guard.
1625 * linux-s390-tdesc.h: Add include guard.
1626 * linux-ppc-tdesc-init.h: Add include guard.
1627 * linux-low.h: Add include guard.
1628 * linux-aarch64-tdesc.h: Add include guard.
1629 * linux-aarch32-low.h: Add include guard.
1630 * inferiors.h: Rename include guard.
1631 * i387-fp.h: Rename include guard.
1632 * hostio.h: Rename include guard.
1633 * gdbthread.h: Rename include guard.
1634 * gdb_proc_service.h: Rename include guard.
1635 * event-loop.h: Rename include guard.
1636 * dll.h: Rename include guard.
1637 * debug.h: Rename include guard.
1638 * ax.h: Rename include guard.
1639
956cc47c
SN
16402018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1641
1642 PR gdb/23985
1643 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1644 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1645
a0707f3c
TT
16462019-01-25 Tom Tromey <tom@tromey.com>
1647
1648 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1649
0747795c
TT
16502019-01-25 Tom Tromey <tom@tromey.com>
1651
1652 * win32-low.c: Fix common/ includes.
1653 * win32-i386-low.c: Fix common/ includes.
1654 * tracepoint.c: Fix common/ includes.
1655 * thread-db.c: Fix common/ includes.
1656 * target.h: Fix common/ includes.
1657 * symbol.c: Fix common/ includes.
1658 * spu-low.c: Fix common/ includes.
1659 * server.h: Fix common/ includes.
1660 * server.c: Fix common/ includes.
1661 * remote-utils.c: Fix common/ includes.
1662 * regcache.h: Fix common/ includes.
1663 * regcache.c: Fix common/ includes.
1664 * nto-x86-low.c: Fix common/ includes.
1665 * notif.h: Fix common/ includes.
1666 * mem-break.h: Fix common/ includes.
1667 * lynx-low.c: Fix common/ includes.
1668 * lynx-i386-low.c: Fix common/ includes.
1669 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1670 * linux-x86-low.c: Fix common/ includes.
1671 * linux-low.c: Fix common/ includes.
1672 * inferiors.h: Fix common/ includes.
1673 * i387-fp.c: Fix common/ includes.
1674 * hostio.c: Fix common/ includes.
1675 * hostio-errno.c: Fix common/ includes.
1676 * gdbthread.h: Fix common/ includes.
1677 * gdbreplay.c: Fix common/ includes.
1678 * fork-child.c: Fix common/ includes.
1679 * event-loop.c: Fix common/ includes.
1680 * ax.c:
1681 (enum gdb_agent_op): Fix common/ includes.
1682
be6d4f74
TT
16832019-01-21 Tom Tromey <tom@tromey.com>
1684
1685 * tracepoint.c: Fix includes.
1686 * remote-utils.c: Fix includes.
1687 * linux-x86-low.c: Fix includes.
1688
66d91b39
JB
16892019-01-01 Joel Brobecker <brobecker@adacore.com>
1690
1691 * gdbreplay.c (gdbreplay_version): Update copyright year in
1692 version message.
1693 * server.c (gdbserver_version): Likewise.
1694
754e3168
AH
16952018-12-05 Alan Hayward <alan.hayward@arm.com>
1696
1697 * linux-low.c (add_lwp): Switch ordering.
1698
d105de22
TT
16992018-11-29 Tom Tromey <tom@tromey.com>
1700
1701 * win32-low.c (win32_join): Take pid, not process.
1702 * target.h (struct target_ops) <join>: Change argument type.
1703 (join_inferior): Change argument name.
1704 * spu-low.c (spu_join): Take pid, not process.
1705 * server.c (handle_detach): Preserve pid before destroying
1706 process.
1707 * lynx-low.c (lynx_join): Take pid, not process.
1708 * linux-low.c (linux_join): Take pid, not process.
1709
50138245
AH
17102018-11-23 Alan Hayward <alan.hayward@arm.com>
1711
1712 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1713 (aarch64_cannot_fetch_register): Likewise.
1714 (struct linux_target_ops): Update references.
1715
64f57f3d
PFC
17162018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1717
1718 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1719
8d619c01
EBM
17202018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1721
1722 * configure.srv (ipa_ppc_linux_regobj): Add
1723 powerpc-isa207-htm-vsx32l-ipa.o and
1724 powerpc-isa207-htm-vsx64l-ipa.o.
1725 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1726 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1727 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1728 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1729 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1730 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1731 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1732 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1733 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1734 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1735 (init_registers_powerpc_isa207_htm_vsx32l)
1736 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1737 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1738 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1739 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1740 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1741 (ppc_store_tm_ctarregset): New functions.
1742 (ppc_regsets): Add entries for HTM regsets.
1743 (ppc_arch_setup): Set htm in features struct when needed. Set
1744 sizes for the HTM regsets.
1745 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1746 (initialize_low_arch): Call
1747 init_registers_powerpc_isa207_htm_vsx32l and
1748 init_registers_powerpc_isa207_htm_vsx64l.
1749 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1750 PPC_TDESC_ISA207_HTM_VSX.
1751 (initialize_low_tracepoint): Call
1752 init_registers_powerpc_isa207_htm_vsx32l and
1753 init_registers_powerpc_isa207_htm_vsx64l.
1754
232bfb86
EBM
17552018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1756
1757 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1758 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1759 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1760 (ppc_store_pmuregset): New functions.
1761 (ppc_regsets): Add entries for ebb and pmu regsets.
1762 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1763 pmu regsets are available. Set sizes for these regsets.
1764
f2cf6173
EBM
17652018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1766
1767 * configure.srv (ipa_ppc_linux_regobj): Add
1768 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1769 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1770 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1771 rs6000/powerpc-isa207-vsx32l.xml, and
1772 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1773 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1774 <PPC_TDESC_ISA207_VSX>: New enum value.
1775 (init_registers_powerpc_isa207_vsx32l): Declare.
1776 (init_registers_powerpc_isa207_vsx64l): Declare.
1777 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1778 (ppc_store_tarregset): New function.
1779 (ppc_regsets): Add entry for the TAR regset.
1780 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1781 size for the TAR regsets.
1782 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1783 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1784 and init_registers_powerpc_isa207_vsx64l.
1785 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1786 (initialize_low_tracepoint): Call
1787 init_registers_powerpc_isa207_vsx32l and
1788 init_registers_powerpc_isa207_vsx64l.
1789
7ca18ed6
EBM
17902018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1791 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1792
1793 * configure.srv (ipa_ppc_linux_regobj): Add
1794 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1795 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1796 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1797 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1798 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1799 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1800 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1801 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1802 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1803 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1804 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1805 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1806 (ppc_hwcap): Add comment.
1807 (ppc_hwcap2): New global.
1808 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1809 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1810 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1811 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1812 when needed. Set sizes for the the DSCR and PPR regsets.
1813 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1814 (initialize_low_arch): Call
1815 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1816 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1817 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1818 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1819 (initialize_low_tracepoint): Call
1820 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1821 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1822
5c849b22
PFC
18232018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1824
1825 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1826
8ecfd7bd
SDJ
18272018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1828 Simon Marchi <simark@simark.ca>
1829
1830 * acinclude.m4: Include "../selftest.m4".
1831 * configure: Regenerate.
1832 * configure.ac: Use "GDB_AC_SELFTEST".
1833 * configure.srv: Use "$enable_unittests" instead of
1834 "$development" when checking whether unit tests have been
1835 enabled.
1836 * server.c (captured_main): Update message informing that
1837 selftests have been disabled.
1838
96643e35
TT
18392018-10-04 Tom Tromey <tom@tromey.com>
1840
1841 * configure: Rebuild.
1842
da4ae14a
TT
18432018-10-04 Tom Tromey <tom@tromey.com>
1844
1845 * server.c (handle_status): Rename inner "thread".
1846 (process_serial_event): Declare "res" in 'm' case.
1847 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1848 (iterate_over_lwps): Rename inner "thread".
1849 (linux_qxfer_libraries_svr4): Rename inner "len".
1850 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1851
7c619dbd
GB
18522018-10-01 Gary Benson <gbenson@redhat.com>
1853
1854 * gdb_proc_service.h: Moved common code to
1855 common/gdb_proc_service.h.
1856
3795e814
GB
18572018-10-01 Gary Benson <gbenson@redhat.com>
1858
1859 * gdb_proc_service.h: Synchronize comments and whitespace with
1860 GDB's version of this file.
1861
49b036f1
TT
18622018-09-25 Tom Tromey <tom@tromey.com>
1863
1864 * configure: Rebuild.
1865 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1866
8ff03f0b
SM
18672018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1868
1869 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1870 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1871 ($(IPA_LIB)): Sort IPA_OBJS.
1872
a1cd91dc
SM
18732018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1874
1875 * Makefile.in: Remove references to $(ADD_DEPS).
1876
752312ba
TT
18772018-09-16 Tom Tromey <tom@tromey.com>
1878
1879 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1880 variables.
1881 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1882 variables.
1883
f1628857
TT
18842018-09-05 Tom Tromey <tom@tromey.com>
1885
1886 * configure: Rebuild.
1887
ad202fcc
SM
18882018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 PR build/23399
1891 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1892
d3d8724a
TT
18932018-08-27 Tom Tromey <tom@tromey.com>
1894
1895 PR build/23087:
1896 * configure: Rebuild.
1897
b4f183d2
TT
18982018-08-27 Tom Tromey <tom@tromey.com>
1899
1900 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1901 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1902 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1903 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1904 (s390x_emit_stack_adjust): Add casts to unsigned char.
1905
4e2aa472
SM
19062018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 PR gdb/23374
1909 PR gdb/23375
1910 * server.h (struct client_state) <disable_randomization>:
1911 Initialize to 1.
1912
cf4088a9
SM
19132018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1914
1915 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1916 variable.
1917 (mips_supply_ptrace_register): Likewise.
1918
a0de763e
TT
19192018-07-22 Tom Tromey <tom@tromey.com>
1920
1921 * configure: Rebuild.
1922
b0a7723d
TT
19232018-07-22 Tom Tromey <tom@tromey.com>
1924
1925 * win32-low.c (win32_create_inferior): Remove unused variables.
1926 * gdbreplay.c (remote_open): Remove unused variable.
1927 * remote-utils.c (remote_prepare): Remove unused variable.
1928 * x86-tdesc.h (X86_TDESC_H): Define.
1929 (amd64_expedite_regs): Define conditionally.
1930 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1931 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1932 * remote-utils.c (readchar): Remove unused variable.
1933
a780ef4f
PA
19342018-07-13 Pedro Alves <palves@redhat.com>
1935
1936 * linux-low.c (linux_kill): Change parameter to process_info
1937 pointer instead of pid. Adjust.
1938 * lynx-low.c (lynx_kill): Likewise.
1939 * nto-low.c (nto_kill): Likewise.
1940 * spu-low.c (spu_kill): Likewise.
1941 * win32-low.c (win32_kill): Likewise.
1942 * server.c (handle_v_kill, kill_inferior_callback)
1943 (detach_or_kill_for_exit): Adjust.
1944 * target.c (kill_inferior): Change parameter to process_info
1945 pointer instead of pid. Adjust.
1946 * target.h (struct target_ops) <kill>: Change parameter to
1947 process_info pointer instead of pid. Adjust all implementations
1948 and callers.
1949 (kill_inferior): Likewise.
1950
ef2ddb33
PA
19512018-07-13 Pedro Alves <palves@redhat.com>
1952
1953 * linux-low.c (linux_detach, linux_join): Change parameter to
1954 process_info pointer instead of pid. Adjust.
1955 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1956 * nto-low.c (nto_detach): Likewise.
1957 * spu-low.c (spu_detach, spu_join): Likewise.
1958 * win32-low.c (win32_detach, win32_join): Likewise.
1959 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1960 * target.h (struct target_ops) <detach, join>: Change parameter to
1961 process_info pointer instead of pid. Adjust all implementations
1962 and callers.
1963 (detach_inferior, join_inferior): Rename 'pid' parameter to
1964 'proc'.
1965
c7ab0aef
SDJ
19662018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1967 Jan Kratochvil <jan.kratochvil@redhat.com>
1968 Paul Fertser <fercerpav@gmail.com>
1969 Tsutomu Seki <sekiriki@gmail.com>
1970
1971 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1972 (OBS): Add 'common/netstuff.o'.
1973 (GDBREPLAY_OBS): Likewise.
1974 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1975 (remote_open): Implement support for IPv6
1976 connections.
1977 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1978 and 'wspiapi.h'.
1979 (handle_accept_event): Accept connections from IPv6 sources.
1980 (remote_prepare): Handle IPv6-style hostnames; implement
1981 support for IPv6 connections.
1982 (remote_open): Implement support for printing connections from
1983 IPv6 sources.
1984
31445d10
PA
19852018-07-11 Pedro Alves <palves@redhat.com>
1986
1987 PR gdb/23377
1988 * mem-break.c (any_persistent_commands): Add process_info
1989 parameter and use it instead of relying on the current process.
1990 Change return type to bool.
1991 * mem-break.h (any_persistent_commands): Add process_info
1992 parameter and change return type to bool.
1993 * server.c (handle_detach): Remove require_running_or_return call.
1994 Look up the process_info for the process we're about to detach.
1995 If not found, return back error to GDB. Adjust
1996 any_persistent_commands call to pass down a process pointer.
1997
cb197132
PA
19982018-07-11 Pedro Alves <palves@redhat.com>
1999
2000 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2001 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2002 instead of collect_register_by_name.
2003 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2004 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2005
1b919490
VB
20062018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2007 Pedro Alves <palves@redhat.com>
2008
2009 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2010
d7e15655
TT
20112018-07-03 Tom Tromey <tom@tromey.com>
2012
2013 * linux-low.c: Update.
2014 * lynx-low.c: Update.
2015 * mem-break.c: Update.
2016 * nto-low.c: Update.
2017 * remote-utils.c: Update.
2018 * server.c: Update.
2019 * spu-low.c: Update.
2020 * target.c: Update.
2021 * win32-low.c: Update.
2022
26a57c92
TT
20232018-07-03 Tom Tromey <tom@tromey.com>
2024
2025 * server.c: Update.
2026
0e998d96
TT
20272018-07-03 Tom Tromey <tom@tromey.com>
2028
2029 * linux-low.c: Update.
2030
cc6bcb54
TT
20312018-07-03 Tom Tromey <tom@tromey.com>
2032
2033 * target.c: Update.
2034
e38504b3
TT
20352018-07-03 Tom Tromey <tom@tromey.com>
2036
2037 * linux-low.c: Update.
2038 * linux-mips-low.c: Update.
2039 * lynx-low.c: Update.
2040 * nto-low.c: Update.
2041 * remote-utils.c: Update.
2042 * server.c: Update.
2043 * spu-low.c: Update.
2044 * target.c: Update.
2045 * thread-db.c: Update.
2046
e99b03dc
TT
20472018-07-03 Tom Tromey <tom@tromey.com>
2048
2049 * linux-low.c: Update.
2050 * linux-mips-low.c: Update.
2051 * lynx-low.c: Update.
2052 * mem-break.c: Update.
2053 * nto-low.c: Update.
2054 * remote-utils.c: Update.
2055 * server.c: Update.
2056 * spu-low.c: Update.
2057 * target.c: Update.
2058 * tracepoint.c: Update.
2059
f2907e49
TT
20602018-07-03 Tom Tromey <tom@tromey.com>
2061
2062 * linux-low.c: Update.
2063 * linux-ppc-low.c: Update.
2064 * linux-x86-low.c: Update.
2065 * proc-service.c: Update.
2066 * server.c: Update.
2067 * spu-low.c: Update.
2068 * thread-db.c: Update.
2069 * win32-low.c: Update.
2070
fd79271b
TT
20712018-07-03 Tom Tromey <tom@tromey.com>
2072
2073 * linux-low.c: Update.
2074 * lynx-low.c: Update.
2075 * nto-low.c: Update.
2076 * remote-utils.c: Update.
2077 * spu-low.c: Update.
2078 * thread-db.c: Update.
2079 * win32-low.c: Update.
2080
c0867626
SDJ
20812018-06-29 Joel Brobecker <brobecker@adacore.com>
2082
2083 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2084 parameter in call to 'amd64_create_target_description'.
2085
2512d7ef
JK
20862018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2087
2088 * x86-tdesc.h: Remove executable permission flag.
2089
d0ac1c44
SM
20902018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2091
2092 * configure.ac: Remove AC_PREREQ, add missing quoting.
2093 * configure: Re-generate.
2094 * config.in: Re-generate.
2095 * aclocal.m4: Re-generate.
2096
c4eb05ff
SM
20972018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2098
2099 * tracepoint.h (current_traceframe): Remove declaration.
2100
02895270
AH
21012018-06-18 Alan Hayward <alan.hayward@arm.com>
2102
2103 * linux-aarch64-low.c (is_sve_tdesc): New function.
2104 (aarch64_sve_regs_copy_to_regcache): Likewise.
2105 (aarch64_sve_regs_copy_from_regcache): Likewise.
2106 (aarch64_regs_info): Add SVE checks.
2107 (initialize_low_arch): Initialize SVE.
2108
e9902bfc
AH
21092018-06-18 Alan Hayward <alan.hayward@arm.com>
2110
2111 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2112
fefa175e
AH
21132018-06-11 Alan Hayward <alan.hayward@arm.com>
2114
2115 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2116 (initialize_low_tracepoint): Likewise
2117 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2118 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2119 param.
2120 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2121 checks.
2122 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2123
b91ad3ff
AH
21242018-06-11 Alan Hayward <alan.hayward@arm.com>
2125
2126 * server.h (PBUFSIZ): Increase size
2127
f868386e
AH
21282018-06-11 Alan Hayward <alan.hayward@arm.com>
2129
2130 * regcache.c (regcache::raw_compare): New function.
2131 * regcache.h (regcache::raw_compare): New declaration.
2132
9c861883
AH
21332018-06-11 Alan Hayward <alan.hayward@arm.com>
2134
2135 * regcache.c (new_register_cache): Use new.
2136 (free_register_cache): Use delete.
2137 (register_data): Use const.
2138 (supply_register): Move body inside regcache.
2139 (regcache::raw_supply): New override function.
2140 (collect_register): Move body inside regcache.
2141 (regcache::raw_collect): New override function.
2142 (regcache::get_register_status): New override function.
2143 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2144
40591844
TT
21452018-06-09 Tom Tromey <tom@tromey.com>
2146
2147 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2148 declare queue.
2149 (event_queue): Use std::queue.
2150 (gdb_event_xfree): Remove.
2151 (initialize_event_loop, process_event, wait_for_event): Update.
2152
6341380d
SC
21532018-06-08 Stan Cox <scox@redhat.com>
2154
2155 * win32-low.c (win32_create_inferior): last_ptid and last_status
2156 moved to client_state.
2157
03349c93
PA
21582018-06-08 Pedro Alves <palves@redhat.com>
2159
2160 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2161 common/common-exceptions.o, common/common-utils.o,
2162 common/errors.o, common/print-utils.o and utils.o.
2163 * gdbreplay.c: Include "common-defs.h" instead of the two
2164 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2165 string.h or alloca.h.
2166 (perror_with_name): Delete.
2167 (remote_open): Use xstrdup instead of strdup.
2168 (main): Rename to ...
2169 (captured_main): ... this.
2170 (main): New.
2171
8dcc53b3
TT
21722018-06-08 Tom Tromey <tom@tromey.com>
2173
2174 * linux-low.c (linux_low_read_btrace): Update.
2175
c12a5089
SC
21762018-06-04 Stan Cox <scox@redhat.com>
2177
2178 * server.h (struct client_state): New.
2179 * server.c (cont_thread, general_thread, multi_process)
2180 (report_fork_events, report_vfork_events, report_exec_events)
2181 (report_thread_events, swbreak_feature, hwbreak_feature)
2182 (vCont_supported, disable_randomization, pass_signals)
2183 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2184 Moved to client_state.
2185 * remote-utils.c (remote_debug, noack_mode)
2186 (transport_is_reliable): Moved to client_state.
2187 * tracepoint.c (current_traceframe): Moved to client_state.
2188
2189 Update all callers.
2190 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2191 linux-low.c, remote-utils.h, target.c: Use client_state.
2192
122394f1
AH
21932018-05-31 Alan Hayward <alan.hayward@arm.com>
2194
2195 * configure.srv: Add new c/h file.
2196
95228a0d
AH
21972018-05-31 Alan Hayward <alan.hayward@arm.com>
2198
2199 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2200 null VQ.
2201
d8dab6c3
MR
22022018-05-25 Maciej W. Rozycki <macro@mips.com>
2203
2204 * gdb.arch/mips-fpregset-core.exp: New test.
2205 * gdb.arch/mips-fpregset-core.c: New test source.
2206
81e25b7c
EK
22072018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2208
2209 PR server/23198
2210 * hostio.c (require_int): Do not report overflow for integers
2211 between 0xfffffff and 0x7fffffff.
2212
7e947ad3
MR
22132018-05-22 Maciej W. Rozycki <macro@mips.com>
2214
2215 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2216 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2217 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2218 functions.
2219 (the_low_target): Wire them.
2220
1d75a658
PFC
22212018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2222
2223 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2224 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2225 mode. Call collect_register_by_name with vscr using
2226 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2227 (ppc_store_vrregset): Add and set vscr_offset variable as in
2228 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2229 vscr_offset.
2230
d078308a
PFC
22312018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2232
2233 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2234 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2235 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2236
7273b5fc
PFC
22372018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2238
2239 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2240 (ppc_store_vsxregset): Likewise.
2241 (ppc_fill_vrregset): Likewise.
2242 (ppc_store_vrregset): Likewise.
2243 (ppc_fill_evrregset): Likewise.
2244 (ppc_store_evrregset): Likewise.
2245 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2246 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2247 needed.
2248
2e077f5e
PFC
22492018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2250
2251 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2252 wordsize of the inferior. Call ppc_linux_target_wordsize.
2253
bd64614e
PFC
22542018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2255
2256 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2257 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2258 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2259 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2260 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2261 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2262 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2263 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2264 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2265 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2266 (tdesc_powerpc_e500l): Remove.
2267 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2268 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2269 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2270 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2271 linux-ppc-tdesc.h.
2272 (ppc_arch_setup): Remove target description matching code. Fill a
2273 ppc_linux_features struct and call ppc_linux_match_description
2274 with it.
2275
75d74cca
MR
22762018-05-22 Maciej W. Rozycki <macro@mips.com>
2277
2278 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2279 width of the requested register exceeds the width of the
2280 `ptrace' data type.
2281 (mips_cannot_store_register): Likewise.
2282
e4439e43
MR
22832018-05-21 Maciej W. Rozycki <macro@mips.com>
2284
2285 * linux-mips-low.c (mips_fetch_register): New function. Update
2286 preceding comment.
2287 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2288 (the_low_target): Wire `mips_fetch_register'.
2289
55271bf9
JB
22902018-05-10 Joel Brobecker <brobecker@adacore.com>
2291
2292 * lynx-i386-low.c (LYNXOS_178): New macro.
2293 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2294 the layout on LynxOS-178.
2295 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2296 handle floating point registers that are not supported by
2297 LynxOS-178.
2298
1a34f210
TT
22992018-05-10 Tom Tromey <tom@tromey.com>
2300
2301 * configure: Rebuild.
2302
190852c8
JB
23032018-05-10 Joel Brobecker <brobecker@adacore.com>
2304
2305 PR server/23158:
2306 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2307 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2308 Use it to set the expedite_regs field in the given tdesc.
2309 * x86-tdesc.h: New file.
2310 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2311 Adjust following the addition of the new expedite_regs parameter
2312 to init_target_desc.
2313 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2314 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2315 (i386_linux_read_description, amd64_linux_read_description):
2316 Adjust following the addition of the new expedite_regs parameter
2317 to init_target_desc.
2318 * lynx-i386-low.c: #include "x86-tdesc.h".
2319 (lynx_i386_arch_setup): Adjust following the addition of the new
2320 expedite_regs parameter to init_target_desc.
2321 * nto-x86-low.c: #include "x86-tdesc.h".
2322 (nto_x86_arch_setup): Adjust following the addition of the new
2323 expedite_regs parameter to init_target_desc.
2324 * win32-i386-low.c: #include "x86-tdesc.h".
2325 (i386_arch_setup): Adjust following the addition of the new
2326 expedite_regs parameter to init_target_desc.
2327
7dbac825
JB
23282018-05-10 Joel Brobecker <brobecker@adacore.com>
2329
2330 PR server/23158:
2331 * win32-low.c (win32_create_inferior): Add call to my_wait
2332 setting last_status global.
2333
906994d9
JB
23342018-05-10 Joel Brobecker <brobecker@adacore.com>
2335
2336 PR server/23158:
2337 * win32-low.c (create_process): Only call gdb_tilde_expand if
2338 inferior_cwd is not NULL.
2339
8ee22052
AB
23402018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2341
2342 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2343 registers to the cache if their values have changed.
2344 (i387_xsave_to_cache): Provide default values for x87 control
2345 registers when these features are available, but disabled.
2346 * regcache.c (supply_register_by_name_zeroed): New function.
2347 * regcache.h (supply_register_by_name_zeroed): Declare new
2348 function.
2349
aff689d3
TT
23502018-05-07 Tom Tromey <tom@tromey.com>
2351
2352 * configure: Rebuild.
2353
85e26832
TT
23542018-05-04 Tom Tromey <tom@tromey.com>
2355
2356 * configure: Rebuild.
2357
a3b60e45
JK
23582018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2359 Pedro Alves <palves@redhat.com>
2360
2361 * linux-aarch64-low.c (aarch64_stopped_data_address):
2362 Likewise.
2363
632e107b
TT
23642018-04-27 Tom Tromey <tom@tromey.com>
2365
2366 * configure: Rebuild.
2367
458412c3
TT
23682018-04-23 Tom Tromey <tom@tromey.com>
2369
2370 * configure: Rebuild.
2371
f31c089e
SM
23722018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * Makefile.in (depcomp): Add "..".
2375 (all_deps_files): New and use it.
2376
b319b098
AH
23772018-04-18 Alan Hayward <alan.hayward@arm.com>
2378
2379 * configure.srv (aarch64*-*-linux*): Don't include xml.
2380 (i[34567]86-*-cygwin*): Likewise.
2381 (i[34567]86-*-linux*): Likewise.
2382 (i[34567]86-*-lynxos*): Likewise.
2383 (i[34567]86-*-mingw32ce*): Likewise.
2384 (i[34567]86-*-mingw*): Likewise.
2385 (i[34567]86-*-nto*): Likewise.
2386 (tic6x-*-uclinux): Likewise.
2387 (x86_64-*-linux*): Likewise.
2388 (x86_64-*-mingw*): Likewise.
2389 (x86_64-*-cygwin*): Likewise.
2390
3b74854b
AH
23912018-04-18 Alan Hayward <alan.hayward@arm.com>
2392
2393 * tdesc.c: Remove xml parameter.
2394
e98577a9
AH
23952018-04-18 Alan Hayward <alan.hayward@arm.com>
2396
2397 * server.c (get_features_xml): Remove cast.
2398 * tdesc.c (void target_desc::accept): Fill in function.
2399 (tdesc_get_features_xml): Remove old xml creation.
2400 (print_xml_feature::visit_pre): Add xml vistor.
2401 * tdesc.h (struct target_desc): Make xmltarget mutable.
2402 (tdesc_get_features_xml): Remove declaration.
2403
d278f585
AH
24042018-04-18 Alan Hayward <alan.hayward@arm.com>
2405
2406 * tdesc.c (tdesc_architecture_name): Add new function.
2407 (tdesc_osabi_name): Likewise.
2408 (tdesc_get_features_xml): Use new functions.
2409
eee8a18d
AH
24102018-04-18 Alan Hayward <alan.hayward@arm.com>
2411
2412 * tdesc.c (tdesc_create_flags): Remove.
2413 (tdesc_add_flag): Likewise.
2414 (tdesc_named_type): Likewise.
2415 (tdesc_create_union): Likewise.
2416 (tdesc_create_struct): Likewise.
2417 (tdesc_create_vector): Likewise.
2418 (tdesc_add_bitfield): Likewise.
2419 (tdesc_add_field): Likewise.
2420 (tdesc_set_struct_size): Likewise.
2421
82ec9bc7
AH
24222018-04-18 Alan Hayward <alan.hayward@arm.com>
2423
2424 * tdesc.c (~target_desc): Remove implictly deleted items.
2425 (init_target_desc): Iterate all features.
2426 (tdesc_get_features_xml): Use vector.
2427 (tdesc_create_feature): Create feature.
2428 * tdesc.h (tdesc_feature) Remove
2429 (target_desc): Add features.
2430
ea3e7d71
AH
24312018-04-18 Alan Hayward <alan.hayward@arm.com>
2432
2433 * Makefile.in: Add common/tdesc.c
2434 * tdesc.c (init_target_desc): init all reg_defs from register
2435 vector.
2436 (tdesc_create_reg): Create tdesc_reg.
2437 * tdesc.h (tdesc_feature): Add register vector.
2438
17d08cd4
SM
24392018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2440
2441 * tdesc.h (struct target_desc) <features>: Change type to
2442 std::vector<std::string>.
2443 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2444 changes.
2445 (tdesc_get_features_xml): Likewise.
2446 (tdesc_create_feature): Likewise.
2447
5cd3e386
AH
24482018-03-26 Alan Hayward <alan.hayward@arm.com>
2449
2450 * regcache.c (find_register_by_number): Return a ref.
2451 (find_regno): Use references.
2452 (register_size): Likewise.
2453 (register_data): Likewise.
2454 * tdesc.c (target_desc::~target_desc): Remove free calls.
2455 (target_desc::operator==): Use std::vector compare.
2456 (init_target_desc): Use reference.
2457 (tdesc_create_reg): Use reg constructors.
2458 * tdesc.h (struct target_desc): Replace pointer with object.
2459
dff7492c
AH
24602018-03-23 Alan Hayward <alan.hayward@arm.com>
2461
2462 * regcache.c (find_register_by_number): Make static.
2463 (find_regno): Use find_register_by_number
2464 * regcache.h (struct reg): Remove declaration.
2465
d80e5242
AH
24662018-03-23 Alan Hayward <alan.hayward@arm.com>
2467
2468 * tdesc.c (target_desc::~target_desc): Move to here.
2469 (target_desc::operator==): Likewise.
2470 * tdesc.h (target_desc::~target_desc): Move from here.
2471 (target_desc::operator==): Likewise.
2472
f69c5afb
AA
24732018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2474
2475 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2476
ce29f843
AA
24772018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2478
2479 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2480 S390_TDESC_GS.
2481 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2482 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2483 and init_registers_s390_gs_linux64.
2484
c49bd90b
AA
24852018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2486
2487 * linux-s390-low.c (s390_fill_gs): Remove function.
2488 (s390_fill_gsbc): Remove function.
2489 (s390_regsets): Set fill functions for the guarded storage regsets
2490 to NULL.
2491
7edb9bd3
AA
24922018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2493
2494 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2495 the word size. Add comment.
2496 (s390_get_wordsize): New function.
2497 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2498 pswm with it. Instead, use s390_get_wordsize to determine the
2499 word size first and derive the correct tdesc from that directly.
2500
39be3c7e
SM
25012018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2502
2503 * Makefile.in: Include silent-rules.mk.
2504 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2505 (COMPILE): Add ECHO_CXX.
2506 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2507 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2508 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2509 (version-generated.c): Add ECHO_GEN.
2510 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2511 (IPAGENT_COMPILE): Add ECHO_CXX.
2512 (%-generated.c): Add ECHO_REGDAT.
2513
3ae9ce5d
TT
25142018-03-14 Tom Tromey <tom@tromey.com>
2515
2516 PR cli/14977:
2517 * ax.c (ax_printf): Special case for NULL.
2518
e6a58aa8
SM
25192018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2520
2521 * linux-low.c (linux_qxfer_libraries_svr4): Use
2522 xml_escape_text_append.
2523
f6e8a41e
SM
25242018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2525
2526 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2527
b9671caf
SM
25282018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2529
2530 * server.c (handle_general_set): Remove unnecessary xstrdup.
2531
e80aaf61
SM
25322018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2533
2534 * server.c (parse_debug_format_options): Adjust to
2535 delim_string_to_char_ptr_vec changes.
2536 * thread-db.c (thread_db_load_search): Adjust to
2537 dirnames_to_char_ptr_vec changes.
2538
b1223e78
MM
25392018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2540
2541 * target.h (target_enable_btrace, target_disable_btrace)
2542 (target_read_btrace, target_read_btrace_conf): Turn macro into
2543 inline function. Throw error if target method is not defined.
2544 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2545 check for btrace target method. Be prepared to handle exceptions
2546 from btrace target methods.
2547
81561546
SDJ
25482018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2549
2550 * server.c (captured_main): Change order of error message printed
2551 when the current working directory cannot be found.
2552
25e3c82c
SDJ
25532018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2554
2555 * server.c: Include "filenames.h" and "pathstuff.h".
2556 (program_name): Delete variable.
2557 (program_path): New anonymous class.
2558 (get_exec_wrapper): Use "program_path" instead of
2559 "program_name".
2560 (handle_v_run): Likewise.
2561 (captured_main): Likewise.
2562 (process_serial_event): Likewise.
2563
b4987c95
SDJ
25642018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2565
2566 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2567 (OBJS): Add "pathstuff.o".
2568 * server.c (current_directory): New global variable.
2569 (captured_main): Initialize "current_directory".
2570
f46cd62a
AH
25712018-02-26 Alan Hayward <alan.hayward@arm.com>
2572
2573 * tdesc.c: Use common/tdesc.h.
2574 * tdesc.h: Likewise.
2575
a543c5ca
AH
25762018-02-20 Alan Hayward <alan.hayward@arm.com>
2577 Simon Marchi <simon.marchi@ericsson.com>
2578
2579 * Makefile.in: Switch order of make rules.
2580
b5884fa7
AH
25812018-02-19 Alan Hayward <alan.hayward@arm.com>
2582
2583 * Makefile.in: Add common directory in build.
2584 * configure.ac: Add common reference.
2585 * configure: Regenerate.
2586
de6242d3
MM
25872018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2588
2589 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2590 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2591 * spu-low.c (spu_target_ops): Likewise.
2592 * win32-low.c (win32_target_ops): Likewise.
2593 * server.c (supported_btrace_packets): Report packets unconditionally.
2594 * target.h (target_ops) <supports_btrace>: Remove.
2595 (target_supports_btrace): Remove.
2596
9ee23a85
MM
25972018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2598
2599 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2600 (handle_btrace_disable): Change return type to void. Use exceptions
2601 to report errors.
2602 (handle_btrace_general_set): Catch exception and copy message to
2603 return message.
2604
8ce47547
TT
26052018-02-08 Tom Tromey <tom@tromey.com>
2606
2607 * linux-low.c (install_software_single_step_breakpoints): Use
2608 make_scoped_restore.
2609 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2610 (do_restore_current_thread_cleanup): Remove.
2611 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2612 declare.
2613
45dd3607
TT
26142018-02-08 Tom Tromey <tom@tromey.com>
2615
2616 * mem-break.c (set_raw_breakpoint_at): Use
2617 gdb::unique_xmalloc_ptr.
2618
e671cd59
PA
26192018-01-30 Pedro Alves <palves@redhat.com>
2620
2621 PR gdb/13211
2622 * target.c (target_terminal::terminal_state): Rename to ...
2623 (target_terminal::m_terminal_state): ... this.
2624
a0aad537
JC
26252018-01-19 James Clarke <jrtc27@jrtc27.com>
2626
2627 * linux-low.c (handle_extended_wait): Surround call to
2628 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2629
4d9b86e1
SM
26302018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2633 linux_ptrace_attach_fail_reason_string now returning an
2634 std::string.
2635 (linux_attach): Likewise.
2636 * thread-db.c (attach_thread): Likewise.
2637
f517c180
EA
26382018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2639
2640 PR gdb/21559
2641 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2642 checking for fs_base/gs_base fields in struct user_regs_struct.
2643 * configure: Regenerate.
2644
9a70f35c
YQ
26452018-01-16 Yao Qi <yao.qi@linaro.org>
2646
2647 PR gdb/18749
2648 * linux-low.c (fetch_register): Call supply_register instead of
2649 error.
2650
605fd3c6
YQ
26512018-01-08 Yao Qi <yao.qi@linaro.org>
2652 Simon Marchi <simon.marchi@ericsson.com>
2653
2654 * Makefile.in (OBS): Remove selftest.o.
2655 * configure.ac: Set srv_selftest_objs if $development is true.
2656 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2657 * configure: Re-generated.
2658 * server.c (captured_main): Wrap variable selftest_filter with
2659 GDB_SELF_TEST.
2660
2cc05030
SM
26612018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2662
2663 * server.c (parse_debug_format_options): Return std::string.
2664 (handle_monitor_command, captured_main): Adjust.
2665
e379cee6
PA
26662018-01-05 Pedro Alves <palves@redhat.com>
2667
2668 PR gdb/18653
2669 * server.c (captured_main): Pass quiet=false to
2670 save_original_signals_state.
2671
82e1e79a
JB
26722018-01-01 Joel Brobecker <brobecker@adacore.com>
2673
2674 * gdbreplay.c (gdbreplay_version): Update copyright year in
2675 version message.
2676 * server.c (gdbserver_version): Likewise.
2677
8e481c3b
TT
26782017-12-08 Tom Tromey <tom@tromey.com>
2679
2680 * ax.c (ax_printf): Update.
2681
a8806230
YQ
26822017-12-07 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2685 aarch64_linux_read_description.
2686 * linux-amd64-ipa.c (idx2mask): New array.
2687 (get_ipa_tdesc): Move idx2mask out.
2688 (initialize_low_tracepoint): Initialize target descriptions.
2689 * linux-i386-ipa.c (idx2mask): New array.
2690 (get_ipa_tdesc): Move idx2mask out.
2691 (initialize_low_tracepoint): Initialize target descriptions.
2692
d4a0e8b5
SM
26932017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2694
2695 * tdesc.c (struct tdesc_type): Change return type.
2696 (tdesc_add_flag): Change parameter type.
2697 (tdesc_add_bitfield): Likewise.
2698 (tdesc_add_field): Likewise.
2699 (tdesc_set_struct_size): Likewise.
2700
798a7429
SM
27012017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2702
2703 * regcache.c (registers_to_string): Remove unused variable.
2704
c0e15c9b
SM
27052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2706
2707 * inferiors.c (for_each_inferior_with_data): Remove.
2708 * inferiors.h (for_each_inferior_with_data): Remove.
2709 * server.c (handle_qxfer_threads_worker): Change parameter type.
2710 (handle_qxfer_threads_proper): Use for_each_thread.
2711
f0045347
SM
27122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2713
2714 * inferiors.c (for_each_inferior): Remove.
2715 (clear_inferiors): Use for_each_thread.
2716 * inferiors.h (for_each_inferior): Remove.
2717 * linux-low.c (linux_wait_for_event_filtered): Use
2718 for_each_thread.
2719 (linux_stabilize_threads): Likewise.
2720 * regcache.c (regcache_release): Likewise.
2721 * server.c (gdb_wants_all_threads_stopped): Likewise.
2722 (clear_pending_status_callback): Remove.
2723 (handle_status): Use for_each_thread.
2724 (captured_main): Likewise.
2725 * win32-low.c (child_init_thread_list): Likewise.
2726 (win32_clear_inferiors): Likewise.
2727 (fake_breakpoint_event): Likewise.
2728
9521758b
SM
27292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2730
2731 * inferiors.h (find_inferior): Remove.
2732 * inferiors.c (find_inferior): Remove.
2733
8f86d7aa
SM
27342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2735
2736 * linux-low.c (resume_status_pending_p): Update comment.
2737 (need_step_over_p): Update comment.
2738
e2b44075
SM
27392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2740
2741 * linux-low.c (proceed_one_lwp): Return void, change parameter
2742 type.
2743 (unsuspend_and_proceed_one_lwp): Likewise.
2744 (proceed_all_lwps): Use for_each_thread.
2745 (unstop_all_lwps): Likewise.
2746
c80825ff
SM
27472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2748
2749 * linux-low.c (linux_resume_one_thread): Return void, take
2750 parameter directly.
2751 (linux_resume): Use for_each_thread.
2752
df3e4dbe
SM
27532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2754
2755 * linux-low.c (send_sigstop_callback): Return void, change
2756 parameter type. Rename to...
2757 (send_sigstop): ... this.
2758 (suspend_and_send_sigstop_callback): Return void, change parameter
2759 type. Rename to...
2760 (suspend_and_send_sigstop): ... this.
2761 (stop_all_lwps): Use for_each_thread.
2762
5a6b0a41
SM
27632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2764
2765 * linux-low.c (lwp_running): Return bool, remove unused
2766 argument.
2767 (linux_stabilize_threads): Use find_thread.
2768
39a64da5
SM
27692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2770
2771 * linux-low.c (select_singlestep_lwp_callback): Remove.
2772 (count_events_callback): Remove.
2773 (select_event_lwp_callback): Remove.
2774 (select_event_lwp): Use find_thread/for_each_thread.
2775
a1385b7b
SM
27762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2777
2778 * linux-low.c (not_stopped_callback): Return bool, take filter
2779 argument directly.
2780 (linux_wait_for_event_filtered): Use find_thread.
2781 (linux_wait_1): Likewise.
2782
454296a2
SM
27832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2784
2785 * linux-low.c (same_lwp): Remove.
2786 (find_lwp_pid): Use find_thread.
2787
6b2a85da
SM
27882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2789
2790 * linux-low.c (delete_lwp_callback): Remove.
2791 (linux_mourn): Use for_each_thread.
2792
798a38e8
SM
27932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2794
2795 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2796 args parameter, don't check for pid.
2797 (linux_detach): Use for_each_thread.
2798
e4eb0dec
SM
27992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2800
2801 * linux-low.c (struct counter): Remove.
2802 (second_thread_of_pid_p): Remove.
2803 (last_thread_of_process_p): Use find_thread.
2804
83e1b6c1
SM
28052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2806
2807 * inferiors.c (find_inferior_in_random): Remove.
2808 * inferiors.h (find_inferior_in_random): Remove.
2809 * linux-low.c (status_pending_p_callback): Return bool, accept
2810 parameter ptid directly.
2811 (linux_wait_for_event_filtered): Use find_thread_in_random.
2812 (linux_wait_1): Likewise.
2813
8dc7b443
SM
28142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2815
2816 * inferiors.c (find_inferior_id): Remove.
2817 (find_thread_ptid): Move implemention from find_inferior_id to
2818 here.
2819 * inferiors.h (find_inferior_id): Remove.
2820 * server.c (handle_status): Use find_thread_ptid.
2821 (process_serial_event): Likewise.
2822 * thread-db.c (find_one_thread): Likewise.
2823 (thread_db_thread_handle): Likewise.
2824 * win32-low.c (thread_rec): Likewise.
2825 (child_delete_thread): Likewise.
2826 (win32_thread_alive): Likewise.
2827 (get_child_debug_event): Likewise.
2828
da25033c
SM
28292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2830
2831 * linux-mips-low.c (update_watch_registers_callback): Return
2832 void, remove pid_p parameter, don't check for pid.
2833 (mips_insert_point, mips_remove_point): Use for_each_thread.
2834
c91bb56b
SM
28352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2836
2837 * lynx.low (lynx_delete_thread_callback): Remove.
2838 (lynx_mourn): Use for_each_thread.
2839
634a3254
SM
28402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2841
2842 * regcache.c (regcache_invalidate_one): Remove.
2843 (regcache_invalidate_pid): use for_each_thread.
2844
41272101
TT
28452017-11-26 Tom Tromey <tom@tromey.com>
2846
2847 * linux-low.c (linux_create_inferior): Update.
2848
f5291a6f
UW
28492017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2850
2851 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2852
6654d750
AH
28532017-11-24 Alan Hayward <alan.hayward@arm.com>
2854
2855 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2856 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2857 * linux-aarch64-tdesc-selftest.c: New file.
2858 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2859
28602017-11-24 Alan Hayward <alan.hayward@arm.com>
2861
2862 * configure.srv: Add new file.
2863 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2864 * linux-aarch64-tdesc-selftest.c: New file.
2865 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2866
49bdb7ee
AH
28672017-11-24 Alan Hayward <alan.hayward@arm.com>
2868
2869 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2870 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2871 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2872
d6d7ce56
AH
28732017-11-24 Alan Hayward <alan.hayward@arm.com>
2874
2875 * configure.srv: Add new files.
2876 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2877 aarch64_linux_read_description.
2878 * linux-aarch64-low.c (aarch64_linux_read_description):
2879 Merge with aarch64_arch_setup.
2880 (aarch64_arch_setup): Call aarch64_linux_read_description.
2881 * linux-aarch64-tdesc.c: New file.
2882 * linux-aarch64-tdesc.h: New file.
2883
506fe5f4
YQ
28842017-11-24 Yao Qi <yao.qi@linaro.org>
2885
2886 * configure.srv: Set $srv_regobj for tic6x-linux.
2887 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2888 (tic6x_read_description): Move some code to tic6x_arch_setup.
2889 (tic6x_tdesc_test): New function.
2890 (initialize_low_arch): Call selftests::register_test.
2891
29f9a567
YQ
28922017-11-22 Yao Qi <yao.qi@linaro.org>
2893
2894 * remote-utils.c (prepare_resume_reply): Use memcpy.
2895
578290ec
SM
28962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2897
2898 * linux-low.c (kill_one_lwp_callback): Return void, take
2899 argument directly, don't filter on pid.
2900 (linux_kill): Use for_each_thread.
2901
eca55aec
SM
29022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2903
2904 * linux-low.c (need_step_over_p): Return bool, remove dummy
2905 argument.
2906 (linux_resume, proceed_all_lwps): Use find_thread.
2907
25c28b4d
SM
29082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2909
2910 * linux-low.c (resume_status_pending_p): Return bool, remove
2911 flag_p argument.
2912 (linux_resume): Use find_thread.
2913
5fdda392
SM
29142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2915
2916 * linux-low.c (struct thread_resume_array): Remove.
2917 (linux_set_resume_request): Return void, take arguments
2918 directly.
2919 (linux_resume): Use for_each_thread.
2920
fcb056a5
SM
29212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2922
2923 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2924 return bool, remove data argument.
2925 (linux_stabilize_threads): Use find_thread.
2926
139720c5
SM
29272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2928
2929 * linux-low.c (unsuspend_one_lwp): Remove.
2930 (unsuspend_all_lwps): Use for_each_thread, inline code from
2931 unsuspend_one_lwp.
2932
6d1e5673
SM
29332017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2934
2935 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2936 * linux-low.c (struct iterate_over_lwps_args): Remove.
2937 (iterate_over_lwps_filter): Remove.
2938 (iterate_over_lwps): Use find_thread.
2939
bbf550d5
SM
29402017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2941
2942 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2943 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2944 code from reset_lwp_ptrace_options_callback.
2945
00192f77
SM
29462017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2947
2948 * linux-arm-low.c (struct update_registers_data): Remove.
2949 (update_registers_callback): Return void, take arguments
2950 directly, don't check thread's pid.
2951 (arm_insert_point, arm_remove_point): Use for_each_thread.
2952
2bee2b6c
SM
29532017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2954
2955 * win32-low.c (continue_one_thread): Return void, take argument
2956 directly.
2957 (child_continue): Use for_each_thread.
2958
0b360f19
SM
29592017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2960
2961 * win32-i386-low.c (update_debug_registers_callback): Rename
2962 to ...
2963 (update_debug_registers): ... this, return void, remove pid_p arg.
2964 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2965
f27866ba
SM
29662017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2967
2968 * inferiors.h (struct process_info): Add constructor, initialize
2969 fields..
2970 <syscalls_to_catch>: Change type to std::vector<int>.
2971 * inferiors.c (add_process): Allocate process_info with new.
2972 (remove_process): Free process_info with delete.
2973 * linux-low.c (handle_extended_wait): Adjust.
2974 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2975 * server.c (handle_general_set): Adjust.
2976
e849ea89
PA
29772017-11-16 Pedro Alves <palves@redhat.com>
2978
2979 * remote-utils.c (remote_close): Block SIGIO signals instead of
2980 uninstalling the SIGIO handler.
2981
1d0aa65c
AH
29822017-11-16 Alan Hayward <alan.hayward@arm.com>
2983
2984 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2985
3491a34c
YQ
29862017-11-16 Yao Qi <yao.qi@linaro.org>
2987
2988 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2989 (tic6x_store_gregset): Likewise.
2990 (tic6x_usrregs_info): Move it up.
2991
a602f924
AH
29922017-11-15 Alan Hayward <alan.hayward@arm.com>
2993
2994 * Makefile.in: Update arch rules.
2995 * configure.srv: Explicitly mark arch/ files.
2996
5616b6c3
AS
29972017-11-13 Andreas Schwab <schwab@suse.de>
2998
2999 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3000 function.
3001 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3002
d1928160
PA
30032017-11-06 Pedro Alves <palves@redhat.com>
3004
3005 * config.in, configure: Regenerate.
3006
bac608e7
SM
30072017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3008
3009 * target.c (struct thread_search): Remove.
3010 (thread_search_callback): Remove.
3011 (prepare_to_access_memory): Use for_each_thread instead of
3012 find_inferior. Inline code from thread_search_callback.
3013
eaddb425
SM
30142017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3015
3016 * server.c (struct visit_actioned_threads_data): Remove.
3017 (visit_actioned_threads): Change prototype to take arguments
3018 directly.
3019 (resume): Use find_thread instead of find_inferior.
3020
99078d34
SM
30212017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3022
3023 * server.c (queue_stop_reply_callback): Change prototype, return
3024 void.
3025 (find_status_pending_thread_callback): Remove.
3026 (handle_status): Replace find_inferior with find_thread and
3027 for_each_thread.
3028
cc628f3d
AH
30292017-10-25 Alan Hayward <alan.hayward@arm.com>
3030
3031 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3032 with REGNO.
3033 (aarch64_store_gregset): Likewise.
3034 (aarch64_fill_fpregset): Likewise.
3035 (aarch64_store_fpregset): Likewise.
3036
4d3bb80e
SM
30372017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3038
3039 * gdbthread.h (find_thread, for_each_thread): New functions.
3040 * inferiors.c (thread_of_pid): Remove.
3041 (find_any_thread_of_pid): Use find_thread.
3042 * linux-low.c (num_lwps): Use for_each_thread.
3043
7a7cdfa0
YQ
30442017-10-17 Yao Qi <yao.qi@linaro.org>
3045
3046 * Makefile.in: Remove one rule.
3047 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3048
e675d170
YQ
30492017-10-17 Yao Qi <yao.qi@linaro.org>
3050
3051 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3052 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3053
7eb4e0f9
YQ
30542017-10-17 Yao Qi <yao.qi@linaro.org>
3055
3056 * configure.srv: Rename arm.o with arch/arm.o.
3057
60d6cfc9
YQ
30582017-10-17 Yao Qi <yao.qi@linaro.org>
3059
3060 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3061 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3062 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3063 (arch-i386.o, arch-amd64.o): Remove rules.
3064 (arch/%.o): New rule.
3065 Update POSTCOMPILE and COMPILE.pre.
3066 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3067 * configure: Re-generated.
3068 * configure.srv: Replace arch-i386.o with arch/i386.o.
3069 Replace arch-amd64.o with arch/amd64.o.
3070
5bfda255
YQ
30712017-10-16 Yao Qi <yao.qi@linaro.org>
3072
3073 * configure: Regenerated.
3074
9c80ecd6
SM
30752017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3076
3077 * inferiors.h: (struct inferior_list): Remove.
3078 (struct inferior_list_entry); Remove.
3079 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3080 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3081 get_first_inferior): Remove.
3082 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3083 find_inferior_id, find_inferior_in_random): Change signature.
3084 * inferiors.c (all_threads): Change type to
3085 std::list<thread_info *>.
3086 (get_thread): Remove macro.
3087 (find_inferior, find_inferior_id): Change signature, implement
3088 using find_thread.
3089 (find_inferior_in_random): Change signature, implement using
3090 find_thread_in_random.
3091 (for_each_inferior, for_each_inferior_with_data): Change
3092 signature, implement using for_each_thread.
3093 (add_inferior_to_list, remove_inferior): Remove.
3094 (add_thread, get_first_thread, thread_of_pid,
3095 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3096 (get_first_inferior, one_inferior_p, clear_inferior_list):
3097 Remove.
3098 (clear_inferiors, get_thread_process): Update.
3099 * gdbthread.h: Include <list>.
3100 (struct thread_info) <entry>: Remove field.
3101 <id>: New field.
3102 (all_threads): Change type to std::list<thread_info *>.
3103 (get_first_inferior): Add doc.
3104 (find_thread, for_each_thread, find_thread_in_random): New
3105 functions.
3106 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3107 * linux-arm-low.c (update_registers_callback): Update.
3108 * linux-low.c (second_thread_of_pid_p): Update.
3109 (kill_one_lwp_callback, linux_detach_lwp_callback,
3110 delete_lwp_callback, status_pending_p_callback, same_lwp,
3111 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3112 iterate_over_lwps, not_stopped_callback,
3113 resume_stopped_resumed_lwps, count_events_callback,
3114 select_singlestep_lwp_callback, select_event_lwp_callback,
3115 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3116 suspend_and_send_sigstop_callback, wait_for_sigstop,
3117 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3118 lwp_running, linux_set_resume_request, resume_status_pending_p,
3119 need_step_over_p, start_step_over, linux_resume_one_thread,
3120 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3121 reset_lwp_ptrace_options_callback): Update.
3122 * linux-mips-low.c (update_watch_registers_callback): Update.
3123 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3124 Update.
3125 (free_register_cache_thread_one): Remove.
3126 (regcache_release): Update.
3127 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3128 handle_qxfer_threads_worker): Update.
3129 (handle_query): Update, use list iterator.
3130 (visit_actioned_threads, handle_pending_status,
3131 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3132 clear_pending_status_callback, set_pending_status_callback,
3133 find_status_pending_thread_callback, handle_status,
3134 process_serial_event): Update.
3135 * target.c (thread_search_callback): Update.
3136 * thread-db.c (thread_db_get_tls_address): Update.
3137 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3138 Update.
3139 * win32-i386-low.c (update_debug_registers_callback): Update.
3140 * win32-low.c (delete_thread_info, child_delete_thread,
3141 continue_one_thread, suspend_one_thread,
3142 get_child_debug_event): Adjust.
3143
9179355e
SM
31442017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3145
3146 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3147 * inferiors.h: Include <list>.
3148 (struct process_info) <entry>: Remove field.
3149 <pid>: New field.
3150 (pid_of): Change macro to function.
3151 (ptid_of, lwpid_of): Remove macro.
3152 (all_processes): Change type to std::list<process_info *>.
3153 (ALL_PROCESSES): Remove macro.
3154 (for_each_process, find_process): New function.
3155 * inferiors.c (all_processes): Change type to
3156 std::list<process_info *>.
3157 (find_thread_process): Adjust.
3158 (add_process): Likewise.
3159 (remove_process): Likewise.
3160 (find_process_pid): Likewise.
3161 (get_first_process): Likewise.
3162 (started_inferior_callback): Remove.
3163 (have_started_inferiors_p): Adjust.
3164 (attached_inferior_callback): Remove.
3165 (have_attached_inferiors_p): Adjust.
3166 * linux-low.c (check_zombie_leaders): Likewise.
3167 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3168 (x86_linux_update_xmltarget): Adjust.
3169 * server.c (handle_query): Likewise.
3170 (gdb_reattached_process): Remove.
3171 (handle_status): Adjust.
3172 (kill_inferior_callback): Likewise.
3173 (detach_or_kill_inferior): Remove.
3174 (print_started_pid): Likewise.
3175 (print_attached_pid): Likewise.
3176 (detach_or_kill_for_exit): Update.
3177 (process_serial_event): Likewise.
3178 * linux-arm-low.c (arm_new_fork): Likewise.
3179
c9cb8905
SM
31802017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3181
3182 * dll.h: Include <list>.
3183 (struct dll_info): Add constructor.
3184 <entry>: Remove field.
3185 (all_dlls): Change type to std::list<dll_info>.
3186 * dll.c: Include <algorithm>.
3187 (get_dll): Remove macro.
3188 (all_dlls): Change type to std::list<dll_info *>.
3189 (free_one_dll): Remove.
3190 (match_dll): Likewise.
3191 (loaded_dll): Adjust.
3192 (unloaded_dll): Adjust to all_dlls type change, use
3193 std::find_if. Inline code from match_dll.
3194 (clear_dlls): Adjust to all_dlls type change.
3195 * server.c (emit_dll_description): Remove.
3196 (handle_qxfer_libraries): Adjust to all_dlls type change,
3197 integrate emit_dll_description's functionality.
3198
04ec7890
SM
31992017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3200
3201 * linux-low.h (struct linux_target_ops) <delete_process>: New
3202 field.
3203 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3204 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3205 (struct linux_target_ops): Add delete_process callback.
3206 * linux-arm-low.c (arm_delete_process): New.
3207 (struct linux_target_ops): Add delete_process callback.
3208 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3209 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3210 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3211 * linux-mips-low.c (mips_linux_delete_process): New.
3212 (struct linux_target_ops): Add delete_process callback.
3213 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3214 * linux-s390-low.c (struct linux_target_ops): Likewise.
3215 * linux-sh-low.c (struct linux_target_ops): Likewise.
3216 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3217 * linux-tile-low.c (struct linux_target_ops): Likewise.
3218 * linux-x86-low.c (x86_linux_delete_process): New.
3219 (struct linux_target_ops): Add delete_process callback.
3220 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3221
466eecee
SM
32222017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3223
3224 * linux-aarch64-low.c (the_low_target): Add thread delete
3225 callback.
3226 * linux-arm-low.c (arm_delete_thread): New function.
3227 (the_low_target): Add thread delete callback.
3228 * linux-bfin-low.c (the_low_target): Likewise.
3229 * linux-crisv32-low.c (the_low_target): Likewise.
3230 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3231 set.
3232 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3233 field.
3234 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3235 * linux-mips-low.c (mips_linux_delete_thread): New function.
3236 (the_low_target): Add thread delete callback.
3237 * linux-ppc-low.c (the_low_target): Likewise.
3238 * linux-s390-low.c (the_low_target): Likewise.
3239 * linux-sh-low.c (the_low_target): Likewise.
3240 * linux-tic6x-low.c (the_low_target): Likewise.
3241 * linux-tile-low.c (the_low_target): Likewise.
3242 * linux-x86-low.c (the_low_target): Likewise.
3243 * linux-xtensa-low.c (the_low_target): Likewise.
3244
b79f7801
YZ
32452017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3246
3247 * win32-low.c: Include "common-inferior.h".
3248
bc3b087d
SDJ
32492017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3250
3251 * inferiors.c (set_inferior_cwd): New function.
3252 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3253 (handle_query): Inform that QSetWorkingDir is supported.
3254 * win32-low.c (create_process): Pass the inferior's cwd to
3255 CreateProcess.
3256
d092c5a2
SDJ
32572017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3258
3259 * inferiors.c (current_inferior_cwd): New global variable.
3260 (get_inferior_cwd): New function.
3261 * inferiors.h (struct process_info) <cwd>: New field.
3262
7da0a886
SDJ
32632017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3264
3265 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3266 (OBS): Add gdb_tilde_expand.o.
3267
289a6840
SM
32682017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3269
3270 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3271 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3272
256642e8
PA
32732017-09-29 Pedro Alves <palves@redhat.com>
3274
3275 * ax.c (gdb_parse_agent_expr): Constify.
3276 * ax.h (gdb_parse_agent_expr): Constify.
3277 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3278 Constify.
3279 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3280 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3281 * remote-utils.h (read_ptid): Constify.
3282 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3283 (process_point_options, process_serial_event): Constify.
3284 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3285 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3286 (cmd_qtbuffer): Constify.
3287
5b9ca4d4
PA
32882017-09-29 Pedro Alves <palves@redhat.com>
3289
3290 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3291 fails.
3292
94c207e0
PA
32932017-09-29 Pedro Alves <palves@redhat.com>
3294
3295 * linux-low.c (handle_extended_wait): Pass parent thread instead
3296 of process to thread_db_notice_clone.
3297 * linux-low.h (thread_db_notice_clone): Replace parent process
3298 parameter with parent thread parameter.
3299 * thread-db.c (find_one_thread): Add comment.
3300 (thread_db_notice_clone): Replace parent process parameter with
3301 parent thread parameter. Temporarily switch to the parent thread.
3302
75352e28
SDJ
33032017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3304
3305 * gdbthread.h: Include "common-gdbthread.h".
3306 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3307 "if" when validating the ptid.
3308 * remote-utils.c: Include "gdbthread.h".
3309 (prepare_resume_reply): Use "switch_to_thread".
3310 * target.c (done_accessing_memory): Likewise.
3311
ad339634
AA
33122017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3313
3314 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3315 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3316 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3317 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3318 s390x-gs-linux64-ipa.o to ipa_obj.
3319 * linux-s390-low.c (HWCAP_S390_GS): New define.
3320 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3321 New functions.
3322 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3323 (s390_arch_setup): Check for guarded-storage support and choose
3324 appropriate tdesc.
3325 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3326 init_registers_s390x_gs_linux64.
3327 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3328 enum value.
3329 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3330 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3331
cc4d742f
SM
33322017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3333
3334 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3335
f6327dcb
KB
33362017-09-21 Kevin Buettner <kevinb@redhat.com>
3337
3338 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3339 (thread_db_thread_handle): Declare.
3340 * linux-low.c (linux_target_ops): Initialize thread_handle.
3341 * server.c (handle_qxfer_threads_worker): Add support for
3342 "handle" attribute.
3343 * target.h (struct target_ops): Add new function pointer,
3344 thread_handle.
3345 (target_thread_handle): Define.
3346 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3347 field in lwp.
3348 (thread_db_thread_handle): New function.
3349
86299109
KB
33502017-09-21 Kevin Buettner <kevinb@redhat.com>
3351
3352 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3353 * linux-low.h (thread_db_notice_clone): Declare.
3354 * thread-db.c (thread_db_notice_clone): New function.
3355
f557a88a
PA
33562017-09-21 Pedro Alves <palves@redhat.com>
3357
3358 * server.c (gdb_read_memory, handle_status, process_serial_event)
3359 (handle_serial_event, handle_target_event): Adjust to
3360 set_desired_thread prototype change.
3361 * target.c (set_desired_thread): Remove 'use_general' parameter
3362 and adjust.
3363 * target.h (set_desired_thread): Remove 'use_general' parameter.
3364
223ffa71
TT
33652017-09-20 Tom Tromey <tom@tromey.com>
3366
3367 * target.c (target_terminal::terminal_state): Define.
3368 (target_terminal::init): Rename from target_terminal_init.
3369 (target_terminal::inferior): Rename from
3370 target_terminal_inferior.
3371 (target_terminal::ours): Rename from target_terminal_ours.
3372 (target_terminal::ours_for_output, target_terminal::info): New.
3373
04fd3ba9
SM
33742017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3375
3376 * server.c (accumulate_file_name_length): Remove.
3377 (emit_dll_description): Adjust to std::string change.
3378 (handle_qxfer_libraries): Use std::string to hold document.
3379
5e187554
SM
33802017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3381
3382 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3383 return type of xml_escape_text.
3384 * server.c (emit_dll_description): Likewise.
3385
1526853e
SM
33862017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3387
3388 * server.c (captured_main): Accept argument for --selftest.
3389 Update run_tests call.
3390 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3391 when registering selftests.
3392
c4dfafab
SDJ
33932017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3394
3395 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3396 instead of "VEC" for "target_desc.reg_defs".
3397 (regcache_cpy): Likewise.
3398 (registers_to_string): Likewise.
3399 (registers_from_string): Likewise.
3400 (find_regno): Likewise.
3401 (supply_regblock): Likewise.
3402 (regcache_raw_read_unsigned): Likewise.
3403 * tdesc.c (init_target_desc): Likewise.
3404 (tdesc_create_reg): Likewise.
3405 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3406 (struct target_desc) <reg_defs>: Convert to "std::vector".
3407 (target_desc): Do not initialize "reg_defs".
3408 (~target_desc): Update code to use "std::vector" instead of "VEC"
3409 for "target_desc.reg_defs".
3410 (operator==): Likewise.
3411
124aceb4
SM
34122017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3413
3414 * inferiors.h (thread_to_gdb_id): Remove.
3415 * inferiors.c (thread_to_gdb_id): Remove.
3416 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3417 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3418 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3419 Likewise.
3420 * nto-low.c (nto_fetch_registers, nto_store_registers,
3421 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3422
96cde54f
SM
34232017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3424
3425 * inferiors.h (gdb_id_to_thread_id): Remove.
3426 * inferiors.c (gdb_id_to_thread_id): Remove.
3427 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3428 removal. Move pid declaration closer to where it's used.
3429
e8ca139e
SM
34302017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3431
3432 * server.c (handle_detach): New function.
3433 (process_serial_event): Move code out, call handle_detach.
3434
f8a4e119
SM
34352017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3436
3437 * server.c (require_running): Rename to ...
3438 (require_running_or_return): ... this ...
3439 (require_running_or_break): ... and this.
3440 (handle_query, process_serial_event): Adjust.
3441
0eb0a407
SM
34422017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3443
3444 * linux-low.c (linux_set_resume_request): Remove unused
3445 variables.
3446
785922a5
SM
34472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3448
3449 * server.c (first_thread_of): Remove.
3450 (process_serial_event): Replace usage of first_thread_of with
3451 find_any_thread_of_pid.
3452 * tracepoint.c (same_process_p): Remove.
3453 (gdb_agent_about_to_close): Replace usage of same_process_p with
3454 find_any_thread_of_pid.
3455 * linux-x86-low.c (same_process_callback): Remove.
3456 (x86_arch_setup_process_callback): Replace usage of
3457 same_process_callback with find_any_thread_of_pid.
3458 * thread-db.c (any_thread_of): Remove.
3459 (switch_to_process): Replace usage of any_thread_of with
3460 find_any_thread_of_pid.
3461 * inferiors.c (thread_pid_matches_callback): Remove.
3462 (find_thread_process): Adjust to use find_any_thread_of_pid.
3463
a059f00c
SDJ
34642017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3465
3466 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3467 with "!VEC_empty".
a059f00c 3468
cc397f3a
SDJ
34692017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3470
3471 * linux-low.c (handle_extended_wait): Use
3472 "allocate_target_description" instead of "XNEW".
3473 * linux-x86-low.c (initialize_low_arch): Likewise.
3474
22916b07
YQ
34752017-09-05 Yao Qi <yao.qi@linaro.org>
3476
3477 * configure.srv (srv_i386_regobj): Remove.
3478 (srv_amd64_regobj): Remove.
3479 (srv_regobj): Set it to "" for x86 non-linux targets.
3480 * linux-x86-tdesc.c (i386_linux_read_description):
3481 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3482 (init_registers_i386): Remove the declaration.
3483 (tdesc_i386): Remove the declaration.
3484 (lynx_i386_arch_setup): Call i386_create_target_description.
3485 * nto-x86-low.c: Likewise.
3486 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3487 [!__x86_64__]: include arch/i386.h.
3488 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3489
38602d55
YQ
34902017-09-05 Yao Qi <yao.qi@linaro.org>
3491
3492 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3493 i386/amd64-XXX-linux from it.
3494
44b886ff
YQ
34952017-09-05 Yao Qi <yao.qi@linaro.org>
3496
3497 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3498 false.
3499 (ipa_amd64_linux_regobj): Remove.
3500 (ipa_x32_linux_regobj): Remove.
3501
b4570e4b
YQ
35022017-09-05 Yao Qi <yao.qi@linaro.org>
3503
3504 * Makefile.in (arch-amd64.o): New rule.
3505 * configure.srv: Append arch-amd64.o.
3506 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3507 (get_ipa_tdesc): Call amd64_linux_read_description.
3508 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3509 and init_registers_amd64_XXX.
3510 * linux-x86-low.c (x86_linux_read_description): Call
3511 amd64_linux_read_description.
3512 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3513 (initialize_low_arch): Don't call init_registers_x32_XXX and
3514 init_registers_amd64_XXX.
3515 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3516 and tdesc_amd64_XXX.
3517 [__x86_64__] (amd64_tdesc_test): New function.
3518 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3519 and init_registers_amd64_XXX.
3520 * linux-x86-tdesc.c: Include arch/amd64.h.
3521 (xcr0_to_tdesc_idx): New function.
3522 (i386_linux_read_description): New function.
3523 (amd64_get_ipa_tdesc_idx): New function.
3524 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3525 (amd64_get_ipa_tdesc): Declare.
3526
d1f28ea2
YQ
35272017-09-05 Yao Qi <yao.qi@linaro.org>
3528
3529 * configure.srv (srv_i386_linux_xmlfiles): Remove
3530 i386/i386-XXX-linux.xml from it.
3531
25a93583
YQ
35322017-09-05 Yao Qi <yao.qi@linaro.org>
3533
3534 * configure.srv: Set srv_i386_linux_regobj empty if $development
3535 is false.
3536 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3537 initialize_low_tdesc.
3538 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3539 with #if initialize_low_tdesc.
3540 * linux-x86-tdesc-selftest.c: New file.
3541 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3542
5f035c07
YQ
35432017-09-05 Yao Qi <yao.qi@linaro.org>
3544
3545 * Makefile.in (arch-i386.o): New rule.
3546 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3547 (x86_64-*-linux*): Likewise.
3548 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3549 include arch/i386.h.
3550 (i386_linux_read_description): Remove code and call
3551 i386_create_target_description.
3552 * tdesc.c (allocate_target_description): New function.
3553 * tdesc.h (set_tdesc_architecture): Remove declaration.
3554 (set_tdesc_osabi): Likewise.
3555
0abe8a89
YQ
35562017-09-05 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3559 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3560 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3561 .xmltarget.
3562 * server.c (get_features_xml): Call tdesc_get_features_xml.
3563 * tdesc.c (set_tdesc_architecture): New function.
3564 (set_tdesc_osabi): New function.
3565 (tdesc_get_features_xml): New function.
3566 (tdesc_create_feature): Add an argument.
3567 * tdesc.h (struct target_desc) <features>: New field.
3568 <arch, osabi>: New field.
3569 (~target_desc): xfree features, arch, and osabi.
3570 (target_desc::oerator==): Don't compare .xmltarget.
3571 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3572 (set_tdesc_osabi): Likewise.
3573 (tdesc_get_features_xml): Likewise.
3574
0a188386
YQ
35752017-09-05 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-x86-tdesc.c: Include selftest.h.
3578 (i386_tdesc_test): New function.
3579 (initialize_low_tdesc): Call selftests::register_test.
3580 * tdesc.h: Include regdef.h.
3581 (target_desc): Override operator == and !=.
3582
f49ff000
YQ
35832017-09-05 Yao Qi <yao.qi@linaro.org>
3584
3585 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3586 (ipa_obj): Likewise.
3587 * linux-i386-ipa.c: Include common/x86-xstate.h
3588 (get_ipa_tdesc): Call i386_linux_read_description.
3589 (initialize_low_tracepoint): Don't call init_registers_XXX
3590 functions, call initialize_low_tdesc instead.
3591 * linux-x86-low.c (x86_linux_read_description): Call
3592 i386_linux_read_description.
3593 (initialize_low_arch): Don't call init_registers_i386_XXX
3594 functions, call initialize_low_tdesc.
3595 * linux-x86-tdesc.c: New file.
3596 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3597 (i386_get_ipa_tdesc_idx): Declare.
3598 (i386_get_ipa_tdesc): Declare.
3599 (initialize_low_tdesc): Declare.
3600
2b68ef2f
YQ
36012017-09-05 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3604 instead of 0.
3605
f7000548
YQ
36062017-09-05 Yao Qi <yao.qi@linaro.org>
3607
3608 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3609 * regcache.c (get_thread_regcache): Use VEC_length.
3610 (init_register_cache): Likewise.
3611 (regcache_cpy): Likewise.
3612 (registers_to_string): Iterate reg_defs via VEC_iterate.
3613 (find_regno): Likewise.
3614 (find_register_by_number): Use VEC_index.
3615 (register_size): Call find_register_by_number.
3616 (register_data): Call find_register_by_number.
3617 (supply_regblock): Use VEC_length.
3618 (regcache_raw_read_unsigned): Likewise.
3619 * tdesc.c (init_target_desc): Iterate reg_defs via
3620 VEC_iterate.
3621 (default_description): Update initializer.
3622 (copy_target_description): Don't update field num_registers.
3623 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3624 <num_registers>: Remove.
3625
50a421ac
SM
36262017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * Makefile.in (.SECONDARY): Define target.
3629
23fdd69e
SM
36302017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3631
3632 * linux-low.c (linux_wait_1): Adjust.
3633 * server.c (queue_stop_reply_callback): Adjust.
3634
0a2dde4a
SDJ
36352017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3636
3637 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3638 QEnvironmentUnset and QEnvironmentReset packets.
3639 (handle_query): Inform remote that QEnvironmentHexEncoded,
3640 QEnvironmentUnset and QEnvironmentReset are supported.
3641
6afd337d
SM
36422017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3643
3644 * inferiors.h (inferior_target_data): Rename to ...
3645 (thread_target_data): ... this.
3646 (inferior_regcache_data): Rename to ...
3647 (thread_regcache_data): ... this.
3648 (set_inferior_regcache_data): Rename to ...
3649 (set_thread_regcache_data): ... this.
3650 * inferiors.c (inferior_target_data): Rename to ...
3651 (thread_target_data): ... this.
3652 (inferior_regcache_data): Rename to ...
3653 (thread_regcache_data): ... this.
3654 (set_inferior_regcache_data): Rename to ...
3655 (set_thread_regcache_data): ... this.
3656 (free_one_thread): Update.
3657 * linux-low.h (get_thread_lwp): Update.
3658 * regcache.c (get_thread_regcache): Update.
3659 (regcache_invalidate_thread): Update.
3660 (free_register_cache_thread): Update.
3661 * win32-i386-low.c (update_debug_registers_callback): Update.
3662 (win32_get_current_dr): Update.
3663 * win32-low.c (thread_rec): Update.
3664 (delete_thread_info): Update.
3665 (continue_one_thread): Update.
3666 (suspend_one_thread): Update.
3667
a160cc46
SM
36682017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3669
3670 * inferiors.c (set_inferior_target_data): Remove.
3671 * inferiors.h (set_inferior_target_data): Remove.
3672
6d580b63
YQ
36732017-08-18 Yao Qi <yao.qi@linaro.org>
3674
3675 * Makefile.in (OBS): Add selftest.o.
3676 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3677 * configure, config.in: Re-generated.
3678 * server.c: Include common/sefltest.h.
3679 (captured_main): Handle option --selftest.
3680
f5a29eb0
YQ
36812017-08-09 Yao Qi <yao.qi@linaro.org>
3682
3683 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3684 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3685 i386-avx-mpx.o and i386-mmx.o.
3686 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3687 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3688 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3689 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3690 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3691 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3692 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3693 i386/amd64-avx-mpx.xml.
3694
57757c2f
YQ
36952017-08-09 Yao Qi <yao.qi@linaro.org>
3696
3697 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3698 and x32-avx-avx512.o.
3699 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3700 i386/x32-avx-avx512.xml.
3701
229d26fc
SM
37022017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3703
3704 * tracepoint.h (enum class fast_tpoint_collect_result): New
3705 enumeration.
3706 (fast_tracepoint_collecting): Change return type to
3707 fast_tpoint_collect_result.
3708 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3709 * linux-low.h: Include tracepoint.h.
3710 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3711 fast_tpoint_collect_result.
3712 * linux-low.c (handle_tracepoints): Adjust.
3713 (linux_fast_tracepoint_collecting): Change return type to
3714 fast_tpoint_collect_result.
3715 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3716 linux_wait_1, stuck_in_jump_pad_callback,
3717 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3718 proceed_one_lwp): Adjust to type change.
3719
2e1e43e1
YQ
37202017-07-10 Yao Qi <yao.qi@linaro.org>
3721
3722 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3723
adc764e7
YQ
37242017-06-29 Yao Qi <yao.qi@linaro.org>
3725
3726 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3727 Remove.
3728 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3729
a206891a
SM
37302017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3731
3732 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3733
9a6c7d9c
SDJ
37342017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3735
3736 * linux-low.c (linux_create_inferior): Adjust code to access the
3737 environment information via 'gdb_environ' class.
3738 * lynx-low.c (lynx_create_inferior): Likewise.
3739 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3740 (get_environ): Return a pointer to 'our_environ'.
3741 (captured_main): Initialize 'our_environ'.
3742 * server.h (get_environ): Adjust prototype.
3743 * spu-low.c (spu_create_inferior): Adjust code to access the
3744 environment information via 'gdb_environ' class.
3745
ae3e2ccf
SM
37462017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3747
3748 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3749 usage of "register" keyword.
3750
3e019bdc
SM
37512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3752
3753 * configure: Re-generate.
3754
8465943a
SM
37552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3756
3757 * configure: Re-generate.
3758
cf0dd6f0
SM
37592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3760
3761 * Makefile.in (COMPILE.pre): Add "-x c++".
3762
9845682b
SDJ
37632017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3764
3765 * fork-child.c: Conditionally include <signal.h>.
3766
aefd8b33
SDJ
37672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3768
3769 * server.c (handle_general_set): Handle new packet
3770 "QStartupWithShell".
3771 (handle_query): Add "QStartupWithShell" to the list of supported
3772 packets.
3773 (gdbserver_usage): Add help text explaining the
3774 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3775 options.
3776 (captured_main): Recognize and act upon the presence of the new
3777 CLI options.
3778
2090129c
SDJ
37792017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3780 Pedro Alves <palves@redhat.com>
3781
3782 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3783 * configure: Regenerate.
3784 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3785 "fork-inferior.o".
3786 (i[34567]86-*-lynxos*): Likewise.
3787 (spu*-*-*): Likewise.
3788 * fork-child.c: New file.
3789 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3790 and "environ.h".
3791 (linux_ptrace_fun): New function.
3792 (linux_create_inferior): Adjust function prototype to reflect
3793 change on "target.h". Adjust function code to use
3794 "fork_inferior".
3795 (linux_request_interrupt): Delete "signal_pid".
3796 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3797 (lynx_ptrace_fun): New function.
3798 (lynx_create_inferior): Adjust function prototype to reflect
3799 change on "target.h". Adjust function code to use
3800 "fork_inferior".
3801 * nto-low.c (nto_create_inferior): Adjust function prototype and
3802 code to reflect change on "target.h". Update comments.
3803 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3804 "common-terminal.h" and "environ.h".
3805 (terminal_fd): Moved to fork-child.c.
3806 (old_foreground_pgrp): Likewise.
3807 (restore_old_foreground_pgrp): Likewise.
3808 (last_status): Make it global.
3809 (last_ptid): Likewise.
3810 (our_environ): New variable.
3811 (startup_with_shell): Likewise.
3812 (program_name): Likewise.
3813 (program_argv): Rename to...
3814 (program_args): ...this.
3815 (wrapper_argv): New variable.
3816 (start_inferior): Delete function.
3817 (get_exec_wrapper): New function.
3818 (get_exec_file): Likewise.
3819 (get_environ): Likewise.
3820 (prefork_hook): Likewise.
3821 (post_fork_inferior): Likewise.
3822 (postfork_hook): Likewise.
3823 (postfork_child_hook): Likewise.
3824 (handle_v_run): Update code to deal with arguments coming from the
3825 remote host. Update calls from "start_inferior" to
3826 "create_inferior".
3827 (captured_main): Likewise. Initialize environment variable. Call
3828 "have_job_control".
3829 * server.h (post_fork_inferior): New prototype.
3830 (get_environ): Likewise.
3831 (last_status): Declare.
3832 (last_ptid): Likewise.
3833 (signal_pid): Likewise.
3834 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3835 (spu_ptrace_fun): New function.
3836 (spu_create_inferior): Adjust function prototype to reflect change
3837 on "target.h". Adjust function code to use "fork_inferior".
3838 * target.c (target_terminal_init): New function.
3839 (target_terminal_inferior): Likewise.
3840 (target_terminal_ours): Likewise.
3841 * target.h: Include <vector>.
3842 (struct target_ops) <create_inferior>: Update prototype.
3843 (create_inferior): Update macro.
3844 * utils.c (gdb_flush_out_err): New function.
3845 * win32-low.c (win32_create_inferior): Adjust function prototype
3846 and code to reflect change on "target.h".
3847
043a4934
SDJ
38482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3849
3850 * inferiors.c (switch_to_thread): New function.
3851
15652511
SDJ
38522017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3853
3854 * Makefile.in (SFILE): Add "common/job-control.c".
3855 (OBS): Add "job-control.o".
3856
21ea5acd
SDJ
38572017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3858
3859 * Makefile: Remove "@host_makefile_frag@".
3860
e13cb306
PA
38612017-05-05 Pedro Alves <palves@redhat.com>
3862
3863 * configure: Regenerate.
3864
c94fee56
SDJ
38652017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3866
3867 * configure: Regenerate.
3868
a0ff9e1a
SM
38692017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3870
3871 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3872 software_single_step change of return type to
3873 std::vector<CORE_ADDR>.
3874 * linux-low.c (install_software_single_step_breakpoints):
3875 Likewise.
3876 * linux-low.h (install_software_single_step_breakpoints):
3877 Likewise.
3878
be628ab8
SDJ
38792017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3880
3881 * remote-utils.c: Include "gdb_termios.h" instead of
3882 "terminal.h".
3883 * terminal.h: Delete file.
3884
7c5ded6a
SDJ
38852017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3886
3887 * server.c: Include <vector>.
3888 <program_argv, wrapper_argv>: Convert to std::vector.
3889 (start_inferior): Rewrite function to use C++.
3890 (handle_v_run): Likewise. Update code that calculates the argv
3891 based on the vRun packet; use C++.
3892 (captured_main): Likewise.
3893
436252de
SM
38942017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3895
3896 * server.c (handle_v_cont): Initialize thread_resume::thread
3897 with null_ptid.
3898
9bf2a700
PA
38992017-04-05 Pedro Alves <palves@redhat.com>
3900
3901 * configure: Regenerate.
3902
a121b7c1
PA
39032017-04-05 Pedro Alves <palves@redhat.com>
3904
3905 * gdbreplay.c (sync_error): Constify.
3906 * linux-x86-low.c (push_opcode): Constify.
3907
21c8a587
PA
39082017-04-05 Pedro Alves <palves@redhat.com>
3909
3910 * win32-low.c (get_child_debug_event)
3911 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3912 Report TARGET_WAITKIND_SPURIOUS instead.
3913
fb32b4f7
PA
39142017-04-05 Pedro Alves <palves@redhat.com>
3915
e79be6e5
SM
3916 * remote-utils.c (remote_prepare, remote_open): Constify.
3917 * remote-utils.h (remote_prepare, remote_open): Constify.
3918 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3919
65dd1e59
SM
39202017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3921
3922 * Makefile.in (clean): Clear .deps.
3923
8fa5b777
SM
39242017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3925
3926 * .gitignore: Remove generated files, replace with wildcard.
3927 * (clean): Replace removal of generated files with wildcard.
3928 (version.c): Replace with...
3929 (version-generated.c): ...this.
3930 (xml-builtin.c): Replace with...
3931 (xml-builtin-generated.c): ...this.
3932 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3933 (%.c: *regformats*): Replace with...
3934 (%-generated.c: *regformats*): ...this.
3935
a12e714b
MF
39362017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3937
3938 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3939 (xtensa_fill_gregset): Call collect_register_by_name for
3940 threadptr register.
3941 (xtensa_store_gregset): Call supply_register_by_name for
3942 threadptr register.
3943
1a09b50a
MF
39442017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3945
3946 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3947 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3948 (xtensa_store_gregset): Call supply_register for all registers in
3949 a0_regnum..a0_regnum + C0_NREGS range.
3950
1a01e7c6
SM
39512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3952
3953 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3954 (ax-ipa.o: ax.c): Remove.
3955 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3956 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3957 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3958 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3959 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3960
36bc18a8
SM
39612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3962
3963 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3964 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3965 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3966 (errors-ipa.o: ../common/errors.c): Remove.
3967 (format-ipa.o: ../common/format.c): Remove.
3968 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3969
a8ebe3d5
SM
39702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3971
3972 * Makefile.in (%-ipa.o: %.c): New rule.
3973 (tracepoint-ipa.o: tracepoint.c): Remove.
3974 (utils-ipa.o: utils.c): Remove.
3975 (remote-utils-ipa.o: remote-utils.c): Remove.
3976 (regcache-ipa.o: regcache.c): Remove.
3977 (i386-linux-ipa.o: i386-linux.c): Remove.
3978 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3979 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3980 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3981 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3982 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3983 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3984 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3985 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3986 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3987 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3988 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3989 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3990 (aarch64-ipa.o: aarch64.c): Remove.
3991 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3992 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3993 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3994 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3995 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3996 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3997 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3998 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3999 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4000 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4001 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4002 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4003 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4004 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4005 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4006 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4007 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4008 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4009 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4010 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4011 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4012 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4013 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4014 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4015 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4016 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4017 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4018 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4019 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4020 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4021 (tdesc-ipa.o: tdesc.c): Remove.
4022 (x32-linux-ipa.o: x32-linux.c): Remove.
4023 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4024 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4025
50cfacb7
SM
40262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4027
4028 * Makefile.in (%.o: ../arch/%.c): New rule.
4029 (arm.o: ../arch/arm.c): Remove.
4030 (arm-linux.o: ../arch/arm-linux.c): Remove.
4031 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4032 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4033
c5a22423
SM
40342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4035
4036 * Makefile.in (%.o: ../nat/%.c): New rule.
4037 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4038 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4039 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4040 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4041 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4042 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4043 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4044 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4045 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4046 (linux-personality.o: ../nat/linux-personality.c): Remove.
4047 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4048 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4049 (x86-linux.o: ../nat/x86-linux.c): Remove.
4050 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4051 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4052
6bda016b
SM
40532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4054
4055 * Makefile.in (%.o: ../common/%.c): New rule.
4056 (signals.o: ../common/signals.c): Remove.
4057 (print-utils.o: ../common/print-utils.c): Remove.
4058 (rsp-low.o: ../common/rsp-low.c): Remove.
4059 (common-utils.o: ../common/common-utils.c): Remove.
4060 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4061 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4062 (vec.o: ../common/vec.c): Remove.
4063 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4064 (xml-utils.o: ../common/xml-utils.c): Remove.
4065 (ptid.o: ../common/ptid.c): Remove.
4066 (buffer.o: ../common/buffer.c): Remove.
4067 (format.o: ../common/format.c): Remove.
4068 (filestuff.o: ../common/filestuff.c): Remove.
4069 (agent.o: ../common/agent.c): Remove.
4070 (errors.o: ../common/errors.c): Remove.
4071 (environ.o: ../common/environ.c): Remove.
4072 (common-debug.o: ../common/common-debug.c): Remove.
4073 (cleanups.o: ../common/cleanups.c): Remove.
4074 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4075 (fileio.o: ../common/fileio.c): Remove.
4076 (common-regcache.o: ../common/common-regcache.c): Remove.
4077 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4078 (new-op.o: ../common/new-op.c): Remove.
4079 (btrace-common.o: ../common/btrace-common.c): Remove.
4080
21122961
SM
40812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4082
4083 * Makefile.in (%.o: ../target/%.c): New rule.
4084 (waitstatus.o: ../target/waitstatus.c): Remove.
4085
c362e621
SM
40862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4087
4088 * Makefile.in
4089 (%.c: ../regformats/%.dat,
4090 (%.c: ../regformats/arm/%.dat,
4091 (%.c: ../regformats/i386/%.dat,
4092 (%.c: ../regformats/rs6000/%.dat): New rules.
4093 (aarch64.c): Remove.
4094 (reg-arm.c): Remove.
4095 (arm-with-iwmmxt.c): Remove.
4096 (arm-with-vfpv2.c): Remove.
4097 (arm-with-vfpv3.c): Remove.
4098 (arm-with-neon.c): Remove.
4099 (reg-bfin.c): Remove.
4100 (reg-cris.c): Remove.
4101 (reg-crisv32.c): Remove.
4102 (i386.c): Remove.
4103 (i386-linux.c): Remove.
4104 (i386-avx.c): Remove.
4105 (i386-avx-linux.c): Remove.
4106 (i386-avx-avx512.c): Remove.
4107 (i386-avx-avx512-linux.c): Remove.
4108 (i386-mpx.c): Remove.
4109 (i386-mpx-linux.c): Remove.
4110 (i386-avx-mpx-avx512-pku.c): Remove.
4111 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4112 (i386-avx-mpx.c): Remove.
4113 (i386-avx-mpx-linux.c): Remove.
4114 (i386-mmx.c): Remove.
4115 (i386-mmx-linux.c): Remove.
4116 (reg-ia64.c): Remove.
4117 (reg-m32r.c): Remove.
4118 (reg-m68k.c): Remove.
4119 (reg-cf.c): Remove.
4120 (mips-linux.c): Remove.
4121 (mips-dsp-linux.c): Remove.
4122 (mips64-linux.c): Remove.
4123 (mips64-dsp-linux.c): Remove.
4124 (nios2-linux.c): Remove.
4125 (powerpc-32.c): Remove.
4126 (powerpc-32l.c): Remove.
4127 (powerpc-altivec32l.c): Remove.
4128 (powerpc-cell32l.c): Remove.
4129 (powerpc-vsx32l.c): Remove.
4130 (powerpc-isa205-32l.c): Remove.
4131 (powerpc-isa205-altivec32l.c): Remove.
4132 (powerpc-isa205-vsx32l.c): Remove.
4133 (powerpc-e500l.c): Remove.
4134 (powerpc-64l.c): Remove.
4135 (powerpc-altivec64l.c): Remove.
4136 (powerpc-cell64l.c): Remove.
4137 (powerpc-vsx64l.c): Remove.
4138 (powerpc-isa205-64l.c): Remove.
4139 (powerpc-isa205-altivec64l.c): Remove.
4140 (powerpc-isa205-vsx64l.c): Remove.
4141 (s390-linux32.c): Remove.
4142 (s390-linux32v1.c): Remove.
4143 (s390-linux32v2.c): Remove.
4144 (s390-linux64.c): Remove.
4145 (s390-linux64v1.c): Remove.
4146 (s390-linux64v2.c): Remove.
4147 (s390-te-linux64.c): Remove.
4148 (s390-vx-linux64.c): Remove.
4149 (s390-tevx-linux64.c): Remove.
4150 (s390x-linux64.c): Remove.
4151 (s390x-linux64v1.c): Remove.
4152 (s390x-linux64v2.c): Remove.
4153 (s390x-te-linux64.c): Remove.
4154 (s390x-vx-linux64.c): Remove.
4155 (s390x-tevx-linux64.c): Remove.
4156 (tic6x-c64xp-linux.c): Remove.
4157 (tic6x-c64x-linux.c): Remove.
4158 (tic6x-c62x-linux.c): Remove.
4159 (reg-sh.c): Remove.
4160 (reg-sparc64.c): Remove.
4161 (reg-spu.c): Remove.
4162 (amd64.c): Remove.
4163 (amd64-linux.c): Remove.
4164 (amd64-avx.c): Remove.
4165 (amd64-avx-linux.c): Remove.
4166 (amd64-avx-avx512.c): Remove.
4167 (amd64-avx-avx512-linux.c): Remove.
4168 (amd64-mpx.c): Remove.
4169 (amd64-mpx-linux.c): Remove.
4170 (amd64-avx-mpx-avx512-pku.c): Remove.
4171 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4172 (amd64-avx-mpx.c): Remove.
4173 (amd64-avx-mpx-linux.c): Remove.
4174 (x32.c): Remove.
4175 (x32-linux.c): Remove.
4176 (x32-avx.c): Remove.
4177 (x32-avx-linux.c): Remove.
4178 (x32-avx-avx512.c): Remove.
4179 (x32-avx-avx512-linux.c): Remove.
4180 (reg-xtensa.c): Remove.
4181 (reg-tilegx.c): Remove.
4182 (reg-tilegx32.c): Remove.
4183
1672e0d9
SDJ
41842017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4185
4186 * Makefile.in (SFILES): Add "common/environ.c".
4187 (OBJS): Add "common/environ.h".
4188
239b6d10
WT
41892017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4190
4191 * configure.ac: Check if the fs_base and gs_base members of
4192 `struct user_regs_struct' exist.
4193 * config.in: Regenerated.
4194 * configure: Likewise.
4195
694b382c
AT
41962017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4197
4198 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4199 target_read_memory.
4200 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4201 (get_next_pcs_syscall_next_pc): Likewise.
4202
7dc53023
LM
42032016-12-23 Luis Machado <lgustavo@codesourcery.com>
4204
4205 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4206 * nto-x86-low.c: Likewise.
4207
ad02e4fe
SM
42082016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4209
4210 * Makefile.in: Include disable-implicit-rules.mk.
4211
dcb07cfa
PA
42122016-11-23 Pedro Alves <palves@redhat.com>
4213
4214 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4215 (debug_vprintf): Use std::chrono::steady_clock instead of
4216 gettimeofday. Use '.' instead of ':'.
4217 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4218 (get_timestamp): Use std::chrono::steady_clock instead of
4219 gettimeofday.
4220
8629c02c
SM
42212016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4222
4223 * Makefile.in: Fix whitespace formatting.
4224
b593ecca
SM
42252016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4226
4227 * Makefile.in (SFILES, OBS): Flatten list and order
4228 alphabetically.
4229
9986ba08
PA
42302016-11-23 Pedro Alves <palves@redhat.com>
4231
4232 * event-loop.c (handle_file_event): Use warning.
4233 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4234 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4235 Use warning.
4236
4eefa7bc
PA
42372016-11-23 Pedro Alves <palves@redhat.com>
4238
4239 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4240 output.
4241 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4242 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4243 debug_printf and debug_flush for debug output.
4244 * server.c (handle_general_set): Likewise.
4245 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4246 output.
4247
5443506e
SM
42482016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4249
4250 * Makefile.in (.c.o): Replace rule with ...
4251 (%.o: %.c): ... this one.
4252
3b165252
SM
42532016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4254
4255 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4256 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4257 make.
4258 * configure.ac: Remove checks for the make program.
4259 * configure: Re-generate.
4260
0bcda685
PA
42612016-10-28 Pedro Alves <palves@redhat.com>
4262
4263 * Makefile.in (CXX_DIALECT): Get from configure.
4264 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4265 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4266 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4267 * config.in: Regenerate.
4268 * configure: Regenerate.
4269
c3805894
YQ
42702016-10-27 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-low.c (linux_supports_range_stepping): Return true if
4273 can_software_single_step return true.
4274
89342618
YQ
42752016-10-27 Yao Qi <yao.qi@linaro.org>
4276
4277 * inferiors.c (find_inferior_in_random): New function.
4278 * inferiors.h (find_inferior_in_random): Declare.
4279 * linux-low.c (linux_wait_for_event_filtered): Call
4280 find_inferior_in_random instead of find_inferior.
4281
e3652c84
YQ
42822016-10-27 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-low.c (linux_wait_1): If single-step breakpoints are
4285 inserted, remove them.
4286
5a04c4cf
PA
42872016-10-26 Pedro Alves <palves@redhat.com>
4288
4289 * linux-low.c (handle_extended_wait): Link parent/child fork
4290 threads.
4291 (linux_wait_1): Unlink them.
4292 (linux_set_resume_request): Ignore resume requests for
4293 already-resumed and unhandled fork child threads.
4294 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4295 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4296 New functions.
4297 (handle_v_requests) <vCont>: Don't call require_running.
4298 * server.h (in_queued_stop_replies): New declaration.
4299
cb93dc7f
YQ
43002016-10-24 Yao Qi <yao.qi@linaro.org>
4301
4302 PR server/20733
4303 * linux-aarch64-low.c (append_insns): Cast the return value to
4304 'uint32_t *'.
4305
a1078bea
YQ
43062016-10-10 Yao Qi <yao.qi@linaro.org>
4307
4308 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4309
1fb77080
SDJ
43102016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4311
4312 * target.c (target_supports_multi_process): New function, moved
4313 from...
4314 * target.h (target_supports_multi_process): ... here. Remove
4315 macro.
4316
39b5a3b9
TT
43172016-10-05 Tom Tromey <tom@tromey.com>
4318
4319 PR remote/20655:
4320 * tracepoint.c (handle_tracepoint_bkpts): Check
4321 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4322
c1d0b70a
YQ
43232016-10-05 Yao Qi <yao.qi@linaro.org>
4324
4325 * configure.srv: Update the path of arm-*.xml files.
4326
0a69eedb
YQ
43272016-10-05 Terry Guo <terry.guo@arm.com>
4328 Yao Qi <yao.qi@linaro.org>
4329
4330 * Makefile.in: Adjust the path of rules.
4331 * configure.srv: Update the path of xml files.
4332 * regformats/arm-with-iwmmxt.dat: Regenerated.
4333 * regformats/arm-with-neon.dat: Likewise.
4334 * regformats/arm-with-vfpv2.dat: Likewise.
4335 * regformats/arm-with-vfpv3.dat Likewise.
4336
17e16485
YQ
43372016-09-30 Yao Qi <yao.qi@linaro.org>
4338
4339 PR gdbserver/20627
4340 * target.c (target_stop_and_wait): Don't call
4341 target_continue_no_signal, use resume_stop instead.
4342
edeeb602
YQ
43432016-09-26 Yao Qi <yao.qi@linaro.org>
4344
4345 * linux-low.c (linux_wait_1): Call debug_exit.
4346
503b1c39
PA
43472016-09-23 Pedro Alves <palves@redhat.com>
4348
4349 * Makefile.in (SFILES): Add common/new-op.c.
4350 (OBS): Add common/new-op.o.
4351 (new-op.o): New rule.
4352
74172ecf
SM
43532016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4354
4355 * .gitinore: Ignore more files.
4356
fc6cda2e
YQ
43572016-09-21 Yao Qi <yao.qi@linaro.org>
4358
4359 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4360 23.
4361
bc1e6c81
SDJ
43622016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4363
4364 * server.c (start_inferior): Call target_mourn_inferior instead of
4365 mourn_inferior; pass ptid_t argument to it.
4366 (resume): Likewise.
4367 (handle_target_event): Likewise.
4368 * target.c (target_mourn_inferior): New function.
4369 * target.h (mourn_inferior): Delete macro.
4370
0e00e962
AA
43712016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4372
4373 * linux-low.c (lwp_is_stepping): New function.
4374
1d8cb77d
CL
43752016-09-06 Carl Love <cel@us.ibm.com>
4376
4377 * server.c (start_inferior): Fixed comment, requested comment change
4378 didn't get updated correctly. Removed reference to ptrace () call as
4379 it is only true on Linux systems.
4380
7313bced
CL
43812016-09-06 Carl Love <cel@us.ibm.com>
4382
4383 * server.c (start_inferior): Do not call
4384 function target_post_create_inferior () if the
4385 inferior process has already exited.
4386
cf6de44d
PA
43872016-09-05 Pedro Alves <palves@redhat.com>
4388
4389 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4390 (COMPILE.pre, CC_LD): Use CXX directly.
4391 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4392 * acinclude.m4: Don't include build-with-cxx.m4.
4393 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4394 * configure: Regenerate.
4395
c1da6748
AT
43962016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4397
4398 PR gdb/19495
4399 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4400 call writing data to own_buf.
4401
f2b9e3df
SDJ
44022016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4403
4404 * target.c (mywait): Call target_wait instead of
4405 the_target->wait.
4406 (target_wait): New function.
4407
049a8570
SDJ
44082016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4409
4410 * server.c (start_inferior): New variable 'ptid'. Replace calls
4411 to the_target->resume by target_continue{,_no_signal}, depending
4412 on the case.
4413 * target.c (target_stop_and_wait): Call target_continue_no_signal
4414 instead of the_target->resume.
4415 (target_continue): New function.
4416
3aa5cfa0
AT
44172016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4418
4419 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4420
754653a7
AZ
44212016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4422
4423 PR server/20491
4424 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4425 ps_prochandle.
4426 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4427 * linux-arm-low.c (ps_get_thread_area): Likewise.
4428 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4429 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4430 * linux-mips-low.c (ps_get_thread_area): Likewise.
4431 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4432 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4433 * linux-x86-low.c (ps_get_thread_area): Likewise.
4434 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4435
ed036b40
PA
44362016-08-19 Pedro Alves <palves@redhat.com>
4437
4438 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4439
c8ef42ee
PA
44402016-08-19 Pedro Alves <palves@redhat.com>
4441
4442 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4443 comment. Use memcpy instead of casting through unsigned long.
4444
9c235a72
PA
44452016-08-19 Pedro Alves <palves@redhat.com>
4446
4447 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4448 allocating around 0x80000000.
4449
201506da
PA
44502016-08-19 Pedro Alves <palves@redhat.com>
4451
4452 PR gdb/20415
4453 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4454 (x32-avx512-linux-ipa.o): New rules.
4455 * configure.ac (x86_64-*-linux*): New x32 check.
4456 * configure.srv (ipa_x32_linux_regobj): New.
4457 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4458 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4459 descriptions.
4460 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4461 descriptions.
4462 * configure: Regenerate.
4463
f348d89a
PA
44642016-08-09 Pedro Alves <palves@redhat.com>
4465
4466 PR gdb/18653
4467 * Makefile.in (OBS): Add signals-state-save-restore.o.
4468 (signals-state-save-restore.o): New rule.
4469 * config.in: Regenerate.
4470 * configure: Regenerate.
4471 * linux-low.c: Include "signals-state-save-restore.h".
4472 (linux_create_inferior): Call
4473 restore_original_signals_state.
4474 * server.c: Include "dispositions-save-restore.h".
4475 (captured_main): Call save_original_signals_state.
4476
1baf5149
PA
44772016-08-05 Pedro Alves <palves@redhat.com>
4478
4479 * configure: Regenerate.
4480
fcd4a73d
YQ
44812016-08-04 Yao Qi <yao.qi@linaro.org>
4482
4483 * linux-low.c (regsets_fetch_inferior_registers): Check
4484 errno is ESRCH or not.
4485
979659d0
YQ
44862016-08-02 Yao Qi <yao.qi@linaro.org>
4487
4488 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4489 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4490 (thread_db_load_search): Update.
4491 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4492 td_ta_set_event and td_ta_event_getmsg.
4493
6598661d
PA
44942016-07-26 Pedro Alves <palves@redhat.com>
4495
4496 PR server/20414
4497 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4498 of unsigned long for 64-bit registers and use uint32_t instead of
4499 unsigned int for 32-bit registers.
4500
9cf12d57
PA
45012016-07-26 Pedro Alves <palves@redhat.com>
4502
4503 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4504 to 'ptrace'.
4505
305450ed
TT
45062016-07-21 Tom Tromey <tom@tromey.com>
4507
4508 * configure: Rebuild.
4509
2583da7c
YQ
45102016-07-21 Yao Qi <yao.qi@linaro.org>
4511
4512 * mem-break.c (find_gdb_breakpoint): Cast bp to
4513 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4514
21536b36
YQ
45152016-07-21 Yao Qi <yao.qi@linaro.org>
4516
4517 * server.c (handle_v_requests): Support s and S actions
4518 if target_supports_software_single_step return true.
4519
8901d193
YQ
45202016-07-21 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4523 is resume_step, call maybe_hw_step.
4524 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4525 and unstop them.
4526 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4527 breakpoints or not.
4528 (proceed_one_lwp): If resume request is resume_step, install
4529 reinsert breakpoints and call maybe_hw_step.
4530
0e9a339e
YQ
45312016-07-21 Yao Qi <yao.qi@linaro.org>
4532
4533 * linux-low.c (proceed_one_lwp): Declare.
4534 (linux_resume_one_thread): Remove local variable 'step'.
4535 Lift code enqueue signal. Call proceed_one_lwp instead of
4536 linux_resume_one_lwp.
4537
4281b351
YQ
45382016-07-21 Yao Qi <yao.qi@linaro.org>
4539
4540 * linux-low.c (linux_resume_one_thread): Call
4541 enqueue_pending_signal.
4542
984a2c04
YQ
45432016-07-21 Yao Qi <yao.qi@linaro.org>
4544
4545 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4546 * inferiors.c (do_restore_current_thread_cleanup): New function.
4547 (make_cleanup_restore_current_thread): Likewise.
4548 * linux-low.c (install_software_single_step_breakpoints): Call
4549 make_cleanup_restore_current_thread. Switch current_thread to
4550 thread.
4551
bec903c9
YQ
45522016-07-21 Yao Qi <yao.qi@linaro.org>
4553
4554 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4555 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4556 (clone_one_breakpoint): Likewise.
4557 (delete_reinsert_breakpoints): Change parameter to thread.
4558 Callers updated.
4559 (has_reinsert_breakpoints): Likewise.
4560 (uninsert_reinsert_breakpoints): Likewise.
4561 (reinsert_reinsert_breakpoints): Likewise.
4562 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4563 (delete_reinsert_breakpoints): Likewise.
4564 (reinsert_reinsert_breakpoints): Likewise.
4565 (uninsert_reinsert_breakpoints): Likewise.
4566 (has_reinsert_breakpoints): Likewise.
4567
63c40ec7
YQ
45682016-07-21 Yao Qi <yao.qi@linaro.org>
4569
4570 * inferiors.c (get_thread_process): Make parameter const.
4571 * inferiors.h (get_thread_process): Update declaration.
4572 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4573 Add new parameters child_thread and parent_thread. Callers
4574 updated.
4575 * mem-break.h (clone_all_breakpoints): Update declaration.
4576
9aa76cd0
YQ
45772016-07-21 Yao Qi <yao.qi@linaro.org>
4578
4579 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4580 <command_list, handler>: Remove.
4581 (struct gdb_breakpoint): New.
4582 (struct other_breakpoint): New.
4583 (struct reinsert_breakpoint): New.
4584 (is_gdb_breakpoint): New function.
4585 (any_persistent_commands): Update command_list if
4586 is_gdb_breakpoint returns true.
4587 (set_breakpoint): Create breakpoints according to their types.
4588 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4589 (set_gdb_breakpoint_1): Likewise.
4590 (set_gdb_breakpoint): Likewise.
4591 (clear_breakpoint_conditions): Change parameter type to
4592 'struct gdb_breakpoint *'.
4593 (clear_breakpoint_commands): Likewise.
4594 (clear_breakpoint_conditions_and_commands): Likewise.
4595 (add_condition_to_breakpoint): Likewise.
4596 (add_breakpoint_condition): Likewise.
4597 (add_commands_to_breakpoint): Likewise.
4598 (check_breakpoints): Check other_breakpoint.
4599 (clone_one_breakpoint): Clone breakpopint according to its type.
4600 * mem-break.h (struct gdb_breakpoint): Declare.
4601 (set_gdb_breakpoint): Update declaration.
4602 (clear_breakpoint_conditions_and_commands): Likewise.
4603 (add_breakpoint_condition): Likewise.
4604 (add_breakpoint_commands): Likewise.
4605 * server.c (process_point_options): Change parameter type to
4606 'struct gdb_breakpoint *'.
4607
811f8301
YQ
46082016-07-21 Yao Qi <yao.qi@linaro.org>
4609
4610 * mem-break.c (set_breakpoint_at): Rename it to ...
4611 (set_breakpoint_type_at): ... it.
4612 (set_breakpoint_at): Call set_breakpoint_type_at.
4613 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4614 * mem-break.h (set_breakpoint_at): Update comments.
4615
b1c51e36
CLT
46162016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4617
4618 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4619 to buf parameter.
4620 (nios2_store_gregset): Likewise.
4621
ced2dffb
PA
46222016-07-01 Pedro Alves <palves@redhat.com>
4623 Antoine Tremblay <antoine.tremblay@ericsson.com>
4624
4625 * linux-low.c: Change interface to take the target lwp_info
4626 pointer directly and return void. Handle detaching from a zombie
4627 thread.
4628 (linux_detach_lwp_callback): New function.
4629 (linux_detach): Detach from the leader thread after detaching from
4630 the clone threads.
4631
2ac09a5b
YQ
46322016-06-28 Yao Qi <yao.qi@linaro.org>
4633
4634 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4635 for variable new_offset.
4636 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4637 (aarch64_ftrace_insn_reloc_cb): Likewise.
4638 (aarch64_ftrace_insn_reloc_tb): Likewise.
4639 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4640 PRIx64 instead of PRIx32.
4641
79e7fd4f
YQ
46422016-06-28 Yao Qi <yao.qi@linaro.org>
4643
4644 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4645 (the_low_target): Install arm_get_syscall_trapinfo.
4646
061fc021
YQ
46472016-06-28 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4650 function.
4651 (the_low_target): Install aarch64_get_syscall_trapinfo.
4652
4cc32bec
YQ
46532016-06-28 Yao Qi <yao.qi@linaro.org>
4654
4655 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4656 Callers updated.
4657 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4658 Remove parameter sysno.
4659 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4660 sysret.
4661
782c1122
AA
46622016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4663
4664 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4665 (s390_emit_ne_goto): Likewise.
4666 (s390_emit_lt_goto): Likewise.
4667 (s390_emit_le_goto): Likewise.
4668 (s390_emit_gt_goto): Likewise.
4669 (s390_emit_ge_goto): Likewise.
4670 (s390x_emit_eq_goto): Likewise.
4671 (s390x_emit_ne_goto): Likewise.
4672 (s390x_emit_lt_goto): Likewise.
4673 (s390x_emit_le_goto): Likewise.
4674 (s390x_emit_gt_goto): Likewise.
4675 (s390x_emit_ge_goto): Likewise.
4676 (s390_emit_ops_impl): Mark variable static.
4677 (s390x_emit_ops): Likewise.
4678
2e7b624b
YQ
46792016-06-17 Yao Qi <yao.qi@linaro.org>
4680
4681 * linux-low.c (handle_extended_wait): Call
4682 uninsert_reinsert_breakpoints for the parent process. Remove
4683 reinsert breakpoints from the child process. Reinsert them to
4684 the parent process when vfork is done.
4685 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4686 (reinsert_reinsert_breakpoints): New function.
4687 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4688 (reinsert_reinsert_breakpoints): Declare.
4689
8a81c5d7
YQ
46902016-06-17 Yao Qi <yao.qi@linaro.org>
4691
4692 * linux-low.c (handle_extended_wait): If the parent is doing
4693 step-over, remove the reinsert breakpoints from the forked child.
4694
f50bf8e5
YQ
46952016-06-17 Yao Qi <yao.qi@linaro.org>
4696
4697 * linux-low.c (unsuspend_all_lwps): Declare.
4698 (linux_low_filter_event): If thread exited, call finish_step_over.
4699 If step-over is finished, unsuspend other threads.
4700
8376a3cb
YQ
47012016-06-17 Yao Qi <yao.qi@linaro.org>
4702
4703 * linux-low.c (linux_resume_one_lwp_throw): Assert
4704 has_reinsert_breakpoints returns false.
4705 * mem-break.c (delete_disabled_breakpoints): Assert
4706 bp type isn't reinsert_breakpoint.
4707
f79b145d
YQ
47082016-06-17 Yao Qi <yao.qi@linaro.org>
4709
4710 * linux-low.c (maybe_hw_step): New function.
4711 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4712 (finish_step_over): Switch current_thread to lwp temporarily,
4713 and assert has_reinsert_breakpoints returns true.
4714 (proceed_one_lwp): Call maybe_hw_step.
4715 * mem-break.c (has_reinsert_breakpoints): New function.
4716 * mem-break.h (has_reinsert_breakpoints): Declare.
4717
0ae534d2
JT
47182016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4719
4720 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4721
fcdad592
YQ
47222016-05-17 Yao Qi <yao.qi@linaro.org>
4723
4724 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4725 instead of find_inferior.
4726
9e784964
YQ
47272016-05-05 Yao Qi <yao.qi@linaro.org>
4728
4729 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4730 Initialize res to zero.
4731
cf2ebb6e
YQ
47322016-05-05 Yao Qi <yao.qi@linaro.org>
4733
4734 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4735 to uint32_t.
4736
c1aebf87
UW
47372016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4738
4739 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4740 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4741 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4742
35fd2deb 47432016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4744 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4745
4746 * tracepoint.c (write_inferior_int8): New function.
4747 (cmd_qtenable_disable): Write enable flag using
4748 write_inferior_int8.
4749
484b3c32
YQ
47502016-04-25 Yao Qi <yao.qi@linaro.org>
4751
4752 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4753 (need_step_over_p): Return zero if the LWP has pending signals
4754 can be delivered on software single step target.
4755
85ba7d86
YQ
47562016-04-25 Yao Qi <yao.qi@linaro.org>
4757
4758 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4759 return instead of error.
4760
3539aa13
YQ
47612016-04-22 Yao Qi <yao.qi@linaro.org>
4762
4763 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4764 to 23.
4765
5b061e98
YQ
47662016-04-22 Yao Qi <yao.qi@linaro.org>
4767
4768 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4769 signal when stepping over breakpoint with software single
4770 step.
4771
3451269c
PA
47722016-04-21 Pedro Alves <palves@redhat.com>
4773
4774 * linux-s390-low.c (s390_collect_ptrace_register)
4775 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4776 add casts.
4777 (s390_check_regset): Use void * instead of gdb_byte *.
4778
a2358508
PA
47792016-04-20 Pedro Alves <palves@redhat.com>
4780
4781 * configure: Renegerate.
4782
6885166d
YQ
47832016-04-20 Yao Qi <yao.qi@linaro.org>
4784
4785 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4786 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4787 number 16.
4788 (arm_store_gregset): Likewise.
4789
2b863f51
WT
47902016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4791
4792 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4793 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4794 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4795 (amd64-avx-mpx-linux.c): New rules.
4796 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4797 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4798 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4799 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4800 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4801 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4802 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4803 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4804 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4805 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4806 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4807 * linux-x86-low.c (x86_linux_read_description): Add case for
4808 X86_XSTATE_AVX_MPX_MASK.
4809 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4810 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4811 init_registers_i386_avx_mpx_linux.
4812 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4813 (initialize_low_tracepoint): Call
4814 init_registers_i386_avx_mpx_linux.
4815 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4816 (initialize_low_tracepoint): Call
4817 init_registers_amd64_avx_mpx_linux.
4818 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4819 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4820 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4821 declarations.
4822
9b30624b
PA
48232016-04-18 Pedro Alves <palves@redhat.com>
4824
4825 * configure: Regenerate.
4826
45e3745e
AT
48272016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4828
4829 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4830 (aarch64_emit_sub): Likewise.
4831
2afc13ff
PA
48322016-04-12 Pedro Alves <palves@redhat.com>
4833
4834 * utils.c (prepare_to_throw_exception): Delete.
4835
6e774b13
SM
48362016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4837
4838 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4839
4dca19f8
MK
48402016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4841
4842 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4843
d0a9981f
MK
48442016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4845
4846 * linux-aarch64-ipa.c: Add <elf.h> include.
4847 * linux-ppc-ipa.c: Add <elf.h> include.
4848 * linux-s390-ipa.c: Add <elf.h> include.
4849
252db07e
MK
48502016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4851
4852 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4853 (get_raw_reg_ptr): Likewise.
4854 (get_trace_state_variable_value_ptr): Likewise.
4855 (set_trace_state_variable_value_ptr): Likewise.
4856 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4857 char *.
4858
14e2b6d9
MK
48592016-03-31 Wei-cheng Wang <cole945@gmail.com>
4860 Marcin Kościelnicki <koriakin@0x04.net>
4861
4862 PR/17221
4863 * linux-ppc-low.c (emit_insns): New function.
4864 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4865 (ppc_emit_prologue): New function.
4866 (ppc_emit_epilogue): New function.
4867 (ppc_emit_add): New function.
4868 (ppc_emit_sub): New function.
4869 (ppc_emit_mul): New function.
4870 (ppc_emit_lsh): New function.
4871 (ppc_emit_rsh_signed): New function.
4872 (ppc_emit_rsh_unsigned): New function.
4873 (ppc_emit_ext): New function.
4874 (ppc_emit_zero_ext): New function.
4875 (ppc_emit_log_not): New function.
4876 (ppc_emit_bit_and): New function.
4877 (ppc_emit_bit_or): New function.
4878 (ppc_emit_bit_xor): New function.
4879 (ppc_emit_bit_not): New function.
4880 (ppc_emit_equal): New function.
4881 (ppc_emit_less_signed): New function.
4882 (ppc_emit_less_unsigned): New function.
4883 (ppc_emit_ref): New function.
4884 (ppc_emit_const): New function.
4885 (ppc_emit_reg): New function.
4886 (ppc_emit_pop): New function.
4887 (ppc_emit_stack_flush): New function.
4888 (ppc_emit_swap): New function.
4889 (ppc_emit_stack_adjust): New function.
4890 (ppc_emit_call): New function.
4891 (ppc_emit_int_call_1): New function.
4892 (ppc_emit_void_call_2): New function.
4893 (ppc_emit_if_goto): New function.
4894 (ppc_emit_goto): New function.
4895 (ppc_emit_eq_goto): New function.
4896 (ppc_emit_ne_goto): New function.
4897 (ppc_emit_lt_goto): New function.
4898 (ppc_emit_le_goto): New function.
4899 (ppc_emit_gt_goto): New function.
4900 (ppc_emit_ge_goto): New function.
4901 (ppc_write_goto_address): New function.
4902 (ppc_emit_ops_impl): New static variable.
4903 (ppc64v1_emit_prologue): New function.
4904 (ppc64v2_emit_prologue): New function.
4905 (ppc64_emit_epilogue): New function.
4906 (ppc64_emit_add): New function.
4907 (ppc64_emit_sub): New function.
4908 (ppc64_emit_mul): New function.
4909 (ppc64_emit_lsh): New function.
4910 (ppc64_emit_rsh_signed): New function.
4911 (ppc64_emit_rsh_unsigned): New function.
4912 (ppc64_emit_ext): New function.
4913 (ppc64_emit_zero_ext): New function.
4914 (ppc64_emit_log_not): New function.
4915 (ppc64_emit_bit_and): New function.
4916 (ppc64_emit_bit_or): New function.
4917 (ppc64_emit_bit_xor): New function.
4918 (ppc64_emit_bit_not): New function.
4919 (ppc64_emit_equal): New function.
4920 (ppc64_emit_less_signed): New function.
4921 (ppc64_emit_less_unsigned): New function.
4922 (ppc64_emit_ref): New function.
4923 (ppc64_emit_const): New function.
4924 (ppc64v1_emit_reg): New function.
4925 (ppc64v2_emit_reg): New function.
4926 (ppc64_emit_pop): New function.
4927 (ppc64_emit_stack_flush): New function.
4928 (ppc64_emit_swap): New function.
4929 (ppc64v1_emit_call): New function.
4930 (ppc64v2_emit_call): New function.
4931 (ppc64v1_emit_int_call_1): New function.
4932 (ppc64v2_emit_int_call_1): New function.
4933 (ppc64v1_emit_void_call_2): New function.
4934 (ppc64v2_emit_void_call_2): New function.
4935 (ppc64_emit_if_goto): New function.
4936 (ppc64_emit_eq_goto): New function.
4937 (ppc64_emit_ne_goto): New function.
4938 (ppc64_emit_lt_goto): New function.
4939 (ppc64_emit_le_goto): New function.
4940 (ppc64_emit_gt_goto): New function.
4941 (ppc64_emit_ge_goto): New function.
4942 (ppc64v1_emit_ops_impl): New static variable.
4943 (ppc64v2_emit_ops_impl): New static variable.
4944 (ppc_emit_ops): New function.
4945 (linux_low_target): Wire in ppc_emit_ops.
4946
a2174ba4
MK
49472016-03-31 Wei-cheng Wang <cole945@gmail.com>
4948 Marcin Kościelnicki <koriakin@0x04.net>
4949
4950 PR/17221
4951 * Makefile.in: Add powerpc-*-ipa.o
4952 * configure.srv: Add ipa_obj for powerpc*-linux.
4953 * linux-ppc-ipa.c: New file.
4954 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4955 includes.
4956 (PPC_FIELD): New macro.
4957 (PPC_SEXT): New macro.
4958 (PPC_OP6): New macro.
4959 (PPC_BO): New macro.
4960 (PPC_LI): New macro.
4961 (PPC_BD): New macro.
4962 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4963 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4964 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4965 (ppc_get_thread_area): New function.
4966 (is_elfv2_inferior): New function.
4967 (gen_ds_form): New function.
4968 (GEN_STD): New macro.
4969 (GEN_STDU): New macro.
4970 (GEN_LD): New macro.
4971 (GEN_LDU): New macro.
4972 (gen_d_form): New function.
4973 (GEN_ADDI): New macro.
4974 (GEN_ADDIS): New macro.
4975 (GEN_LI): New macro.
4976 (GEN_LIS): New macro.
4977 (GEN_ORI): New macro.
4978 (GEN_ORIS): New macro.
4979 (GEN_LWZ): New macro.
4980 (GEN_STW): New macro.
4981 (GEN_STWU): New macro.
4982 (gen_xfx_form): New function.
4983 (GEN_MFSPR): New macro.
4984 (GEN_MTSPR): New macro.
4985 (GEN_MFCR): New macro.
4986 (GEN_MTCR): New macro.
4987 (GEN_SYNC): New macro.
4988 (GEN_LWSYNC): New macro.
4989 (gen_x_form): New function.
4990 (GEN_OR): New macro.
4991 (GEN_MR): New macro.
4992 (GEN_LWARX): New macro.
4993 (GEN_STWCX): New macro.
4994 (GEN_CMPW): New macro.
4995 (gen_md_form): New function.
4996 (GEN_RLDICL): New macro.
4997 (GEN_RLDICR): New macro.
4998 (gen_i_form): New function.
4999 (GEN_B): New macro.
5000 (GEN_BL): New macro.
5001 (gen_b_form): New function.
5002 (GEN_BNE): New macro.
5003 (GEN_LOAD): New macro.
5004 (GEN_STORE): New macro.
5005 (gen_limm): New function.
5006 (gen_atomic_xchg): New function.
5007 (gen_call): New function.
5008 (ppc_relocate_instruction): New function.
5009 (ppc_install_fast_tracepoint_jump_pad): New function.
5010 (ppc_get_min_fast_tracepoint_insn_len): New function.
5011 (ppc_get_ipa_tdesc_idx): New function.
5012 (the_low_target): Wire in the new functions.
5013 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5014 tdescs.
5015 * linux-ppc-tdesc.h: New file.
5016
a13c4696
MK
50172016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5018
5019 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5020 (alloc_jump_pad_buffer): New function.
5021 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5022 (alloc_jump_pad_buffer): New function.
5023 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5024 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5025 (alloc_jump_pad_buffer): New function.
5026 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5027 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5028 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5029 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5030
1cda1512
MK
50312016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5032
5033 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5034 * linux-amd64-ipa.c: Likewise.
5035 * linux-i386-ipa.c: Likewise.
5036 * linux-s390-ipa.c: Likewise.
5037 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5038 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5039 set_trace_state_variable_value_ptr.
5040 (struct ipa_sym_addresses): Likewise.
5041 (symbol_list): Likewise.
5042 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5043 accessing gdb_collect directly.
5044 (gdb_collect_ptr_type): New typedef.
5045 (get_raw_reg_ptr_type): New typedef.
5046 (get_trace_state_variable_value_ptr_type): New typedef.
5047 (set_trace_state_variable_value_ptr_type): New typedef.
5048 (gdb_collect_ptr): New global.
5049 (get_raw_reg_ptr): New global.
5050 (get_trace_state_variable_value_ptr): New global.
5051 (set_trace_state_variable_value_ptr): New global.
5052 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5053 accessing get_raw_reg directly.
5054 (get_get_tsv_func_addr): Likewise for
5055 get_trace_state_variable_value_ptr.
5056 (get_set_tsv_func_addr): Likewise for
5057 set_trace_state_variable_value_ptr.
5058 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5059
72fb5488
SM
50602016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5061
5062 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5063
28170b88
MK
50642016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5065
5066 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5067 packets.
5068 (relocate_instruction): Remove own_buf.
5069 * server.c (own_buf): Make global.
5070 (handle_v_requests): Make global.
5071 * server.h (own_buf): New declaration.
5072 (handle_v_requests): New prototype.
5073
f39e8743
MK
50742016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5075
5076 PR 18377
5077 * linux-s390-low.c (add_insns): New function.
5078 (s390_emit_prologue): New function.
5079 (s390_emit_epilogue): New function.
5080 (s390_emit_add): New function.
5081 (s390_emit_sub): New function.
5082 (s390_emit_mul): New function.
5083 (s390_emit_lsh): New function.
5084 (s390_emit_rsh_signed): New function.
5085 (s390_emit_rsh_unsigned): New function.
5086 (s390_emit_ext): New function.
5087 (s390_emit_log_not): New function.
5088 (s390_emit_bit_and): New function.
5089 (s390_emit_bit_or): New function.
5090 (s390_emit_bit_xor): New function.
5091 (s390_emit_bit_not): New function.
5092 (s390_emit_equal): New function.
5093 (s390_emit_less_signed): New function.
5094 (s390_emit_less_unsigned): New function.
5095 (s390_emit_ref): New function.
5096 (s390_emit_if_goto): New function.
5097 (s390_emit_goto): New function.
5098 (s390_write_goto_address): New function.
5099 (s390_emit_litpool): New function.
5100 (s390_emit_const): New function.
5101 (s390_emit_call): New function.
5102 (s390_emit_reg): New function.
5103 (s390_emit_pop): New function.
5104 (s390_emit_stack_flush): New function.
5105 (s390_emit_zero_ext): New function.
5106 (s390_emit_swap): New function.
5107 (s390_emit_stack_adjust): New function.
5108 (s390_emit_set_r2): New function.
5109 (s390_emit_int_call_1): New function.
5110 (s390_emit_void_call_2): New function.
5111 (s390_emit_eq_goto): New function.
5112 (s390_emit_ne_goto): New function.
5113 (s390_emit_lt_goto): New function.
5114 (s390_emit_le_goto): New function.
5115 (s390_emit_gt_goto): New function.
5116 (s390_emit_ge_goto): New function.
5117 (s390x_emit_prologue): New function.
5118 (s390x_emit_epilogue): New function.
5119 (s390x_emit_add): New function.
5120 (s390x_emit_sub): New function.
5121 (s390x_emit_mul): New function.
5122 (s390x_emit_lsh): New function.
5123 (s390x_emit_rsh_signed): New function.
5124 (s390x_emit_rsh_unsigned): New function.
5125 (s390x_emit_ext): New function.
5126 (s390x_emit_log_not): New function.
5127 (s390x_emit_bit_and): New function.
5128 (s390x_emit_bit_or): New function.
5129 (s390x_emit_bit_xor): New function.
5130 (s390x_emit_bit_not): New function.
5131 (s390x_emit_equal): New function.
5132 (s390x_emit_less_signed): New function.
5133 (s390x_emit_less_unsigned): New function.
5134 (s390x_emit_ref): New function.
5135 (s390x_emit_if_goto): New function.
5136 (s390x_emit_const): New function.
5137 (s390x_emit_call): New function.
5138 (s390x_emit_reg): New function.
5139 (s390x_emit_pop): New function.
5140 (s390x_emit_stack_flush): New function.
5141 (s390x_emit_zero_ext): New function.
5142 (s390x_emit_swap): New function.
5143 (s390x_emit_stack_adjust): New function.
5144 (s390x_emit_int_call_1): New function.
5145 (s390x_emit_void_call_2): New function.
5146 (s390x_emit_eq_goto): New function.
5147 (s390x_emit_ne_goto): New function.
5148 (s390x_emit_lt_goto): New function.
5149 (s390x_emit_le_goto): New function.
5150 (s390x_emit_gt_goto): New function.
5151 (s390x_emit_ge_goto): New function.
5152 (s390_emit_ops): New function.
5153 (struct linux_target_ops): Fill in emit_ops hook.
5154
abd9baf9
MK
51552016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5156
5157 PR 18377
5158 * Makefile.in: Add s390 IPA files.
5159 * configure.srv: Build IPA for s390.
5160 * linux-s390-ipa.c: New file.
5161 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5162 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5163 (tdesc_s390_linux32): Likewise.
5164 (init_registers_s390_linux32v1): Likewise.
5165 (tdesc_s390_linux32v1): Likewise.
5166 (init_registers_s390_linux32v2): Likewise.
5167 (tdesc_s390_linux32v2): Likewise.
5168 (init_registers_s390_linux64): Likewise.
5169 (tdesc_s390_linux64): Likewise.
5170 (init_registers_s390_linux64v1): Likewise.
5171 (tdesc_s390_linux64v1): Likewise.
5172 (init_registers_s390_linux64v2): Likewise.
5173 (tdesc_s390_linux64v2): Likewise.
5174 (init_registers_s390_te_linux64): Likewise.
5175 (tdesc_s390_te_linux64): Likewise.
5176 (init_registers_s390_vx_linux64): Likewise.
5177 (tdesc_s390_vx_linux64): Likewise.
5178 (init_registers_s390_tevx_linux64): Likewise.
5179 (tdesc_s390_tevx_linux64): Likewise.
5180 (init_registers_s390x_linux64): Likewise.
5181 (tdesc_s390x_linux64): Likewise.
5182 (init_registers_s390x_linux64v1): Likewise.
5183 (tdesc_s390x_linux64v1): Likewise.
5184 (init_registers_s390x_linux64v2): Likewise.
5185 (tdesc_s390x_linux64v2): Likewise.
5186 (init_registers_s390x_te_linux64): Likewise.
5187 (tdesc_s390x_te_linux64): Likewise.
5188 (init_registers_s390x_vx_linux64): Likewise.
5189 (tdesc_s390x_vx_linux64): Likewise.
5190 (init_registers_s390x_tevx_linux64): Likewise.
5191 (tdesc_s390x_tevx_linux64): Likewise.
5192 (have_hwcap_s390_vx): New static variable.
5193 (s390_arch_setup): Fill have_hwcap_s390_vx.
5194 (s390_get_thread_area): New function.
5195 (s390_ft_entry_gpr_esa): New const.
5196 (s390_ft_entry_gpr_zarch): New const.
5197 (s390_ft_entry_misc): New const.
5198 (s390_ft_entry_fr): New const.
5199 (s390_ft_entry_vr): New const.
5200 (s390_ft_main_31): New const.
5201 (s390_ft_main_64): New const.
5202 (s390_ft_exit_fr): New const.
5203 (s390_ft_exit_vr): New const.
5204 (s390_ft_exit_misc): New const.
5205 (s390_ft_exit_gpr_esa): New const.
5206 (s390_ft_exit_gpr_zarch): New const.
5207 (append_insns): New function.
5208 (s390_relocate_instruction): New function.
5209 (s390_install_fast_tracepoint_jump_pad): New function.
5210 (s390_get_min_fast_tracepoint_insn_len): New function.
5211 (s390_get_ipa_tdesc_idx): New function.
5212 (struct linux_target_ops): Wire in the above functions.
5213 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5214 * linux-s390-tdesc.h: New file.
5215
a4105d04
MK
52162016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5217
5218 * linux-s390-low.c (s390_supports_tracepoints): New function.
5219 (struct linux_target_ops): Fill supports_tracepoints hook.
5220
35ac8b3e
YQ
52212016-03-18 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-low.c (lwp_signal_can_be_delivered): New function.
5224 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5225
94610ec4
YQ
52262016-03-18 Yao Qi <yao.qi@linaro.org>
5227
5228 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5229 0 if signal is enqueued. Remove 'signal' from one debugging
5230 message. Move one debugging message to some lines below.
5231 Remove code setting 'signal' to 0.
5232
80aea927
YQ
52332016-03-18 Yao Qi <yao.qi@linaro.org>
5234
5235 * linux-low.c (linux_low_filter_event): Remove redundant
5236 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5237
b04fd3be
MK
52382016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5239
5240 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5241 (struct linux_target_ops): Wire in the above.
5242
c40c8d4b
YQ
52432016-03-03 Yao Qi <yao.qi@linaro.org>
5244
5245 * linux-low.c: Update comments to start_step_over.
5246
0f8288ae
YQ
52472016-03-03 Yao Qi <yao.qi@linaro.org>
5248
5249 PR server/19736
5250 * linux-low.c (handle_extended_wait): Set child suspended
5251 if event_lwp->bp_reinsert isn't zero.
5252
fdbd04a8
YQ
52532016-03-02 Yao Qi <yao.qi@linaro.org>
5254
5255 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5256 enqueue_pending_signal.
5257
6896a8fa
MK
52582016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5259
5260 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5261 is actually loaded.
5262
ab503087
MK
52632016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5264
5265 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5266 (s390_regmap_3264) [!__s390x__]: New global.
5267 (s390_collect_ptrace_register): Skip map entries containing -1.
5268 (s390_supply_ptrace_register): Ditto.
5269 (s390_fill_gprs_high): New function.
5270 (s390_store_gprs_high): New function.
5271 (s390_regsets): Add NT_S390_HIGH_GPRS.
5272 (s390_get_hwcap): Enable on 31-bit.
5273 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5274 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5275 Detect NT_S390_HIGH_GPRS.
5276 (s390_usrregs_info_3264): Enable on 31-bit.
5277 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5278 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5279
ae91f625
MK
52802016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5281
5282 PR gdb/13808
5283 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5284 * configure.srv: Ditto.
5285 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5286 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5287 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5288 (init_registers_amd64_linux): Remove prototype.
5289 (tdesc_amd64_linux): Remove declaration.
5290 (get_ipa_tdesc): New function.
5291 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5292 initialize remaining tdescs.
5293 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5294 (init_registers_i386_linux): Remove prototype.
5295 (tdesc_i386_linux): Remove declaration.
5296 (get_ipa_tdesc): New function.
5297 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5298 initialize remaining tdescs.
5299 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5300 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5301 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5302 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5303 (x86_get_ipa_tdesc_idx): New function.
5304 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5305 * linux-x86-tdesc.h: New file.
5306 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5307 (target_get_ipa_tdesc_idx): New macro.
5308 * tracepoint.c (ipa_tdesc_idx): New macro.
5309 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5310 (symbol_list): Add ipa_tdesc_idx.
5311 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5312 (ipa_tdesc): Remove.
5313 (ipa_tdesc_idx): New variable.
5314 (get_context_regcache): Use get_ipa_tdesc.
5315 (gdb_collect): Ditto.
5316 (gdb_probe): Ditto.
5317 * tracepoint.h (get_ipa_tdesc): New prototype.
5318 (ipa_tdesc): Remove.
5319
e7ad2f14
PA
53202016-02-24 Pedro Alves <palves@redhat.com>
5321
5322 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5323 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5324 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5325 Factor out common code between the USE_SIGTRAP_SIGINFO and
5326 !USE_SIGTRAP_SIGINFO blocks.
5327 (linux_low_filter_event): Call save_stop_reason instead of
5328 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5329 Update comments.
5330 (linux_wait_1): Update comments.
5331
657f9cde
WW
53322016-02-24 Wei-cheng Wang <cole945@gmail.com>
5333
5334 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5335 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5336 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5337 ppc_insert_point, ppc_remove_point.
5338
b00b61e1
MK
53392016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5340
5341 * linux-s390-low.c (s390_supports_z_point_type): New function.
5342 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5343
553cb527
YQ
53442016-02-16 Yao Qi <yao.qi@linaro.org>
5345
5346 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5347 PC. Get pc from regcache_read_pc.
5348
a5652c21
YQ
53492016-02-12 Yao Qi <yao.qi@linaro.org>
5350
5351 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5352 or linux_get_pc_32bit.
5353 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5354
ed443b61
YQ
53552016-02-12 Yao Qi <yao.qi@linaro.org>
5356
5357 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5358 arm_linux_get_next_pcs_fixup.
5359
020ecd38
MK
53602016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5361
5362 * tracepoint.c (x_tracepoint_action_download): Change
5363 write_inferior_data_ptr to write_inferior_data_pointer.
5364 (cmd_qtstart): Likewise.
5365 (write_inferior_data_ptr): Remove.
5366 (download_agent_expr): Change write_inferior_data_ptr to
5367 write_inferior_data_pointer.
5368 (download_tracepoint_1): Likewise.
5369 (download_tracepoint): Likewise.
5370 (download_trace_state_variables): Likewise.
5371
7cae9051
WW
53722016-02-11 Wei-cheng Wang <cole945@gmail.com>
5373 Marcin Kościelnicki <koriakin@0x04.net>
5374
5375 * tracepoint.c (struct tracepoint_action_ops): Remove.
5376 (struct tracepoint_action): Remove ops.
5377 (m_tracepoint_action_download, r_tracepoint_action_download)
5378 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5379 size and offset accordingly.
5380 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5381 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5382 (tracepoint_action_send, tracepoint_action_download): New functions.
5383 Helpers for trace action handlers.
5384 (add_tracepoint_action): Remove setup actions ops.
5385 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5386
9f6a71b4
YQ
53872016-02-10 Yao Qi <yao.qi@linaro.org>
5388
5389 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5390
1e94266c
SM
53912016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5392
5393 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5394 to AC_OUTPUT.
5395 * configure: Regenerate.
5396
8adce034
SM
53972016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5398
5399 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5400 void * to gdb_byte *.
5401 * linux-low.c (siginfo_fixup): Likewise.
5402 (linux_xfer_siginfo): Likewise.
5403 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5404 Likewise.
5405 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5406
93813b37
WT
54072016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5408
5409 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5410 to srv_tgtobj.
5411 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5412 to srv_tgtobj.
5413 * linux-x86-low.c [__x86_64__]: Include
5414 "nat/amd64-linux-siginfo.h".
5415 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5416 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5417 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5418 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5419 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5420 (cpt_si_fd, si_timerid, si_overrun): Move from
5421 nat/amd64-linux-siginfo.c.
5422 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5423
8424cc97
SM
54242016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5425
5426 * server.c (skip_to_semicolon): Remove.
5427 (process_point_options): Use strchrnul instead of
5428 skip_to_semicolon.
5429
4d18591b
YQ
54302016-01-26 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5433 * linux-low.c (install_software_single_step_breakpoints): Don't
5434 call regcache_read_pc.
5435 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5436 argument pc.
5437
d8020970
YQ
54382016-01-26 Yao Qi <yao.qi@linaro.org>
5439
5440 * linux-low.c (install_software_single_step_breakpoints): Call
5441 regcache_read_pc instead of get_pc.
5442
8b207339
YQ
54432016-01-26 Yao Qi <yao.qi@linaro.org>
5444
5445 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5446 (unblock_async_io): Rename to ...
5447 (block_unblock_async_io): ... it. New function.
5448 (enable_async_io): Don't install SIGIO handler. Unblock it
5449 instead.
5450 (disable_async_io): Don't ignore SIGIO. Block it instead.
5451 (initialize_async_io): Install SIGIO handler. Don't call
5452 unblock_async_io.
5453
18879fef
YQ
54542016-01-26 Yao Qi <yao.qi@linaro.org>
5455
5456 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5457 first character is '\003', call *the_target->request_interrupt.
5458
a0f8e08a
YQ
54592016-01-25 Yao Qi <yao.qi@linaro.org>
5460
5461 * remote-utils.c (new_thread_notify): Remove.
5462 (dead_thread_notify): Likewise.
5463 * remote-utils.h (new_thread_notify): Remove declaration.
5464 (dead_thread_notify): Likewise.
5465
cc5fd9ab
MK
54662016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5467
5468 * gdb.trace/pending.exp: Fix expected message on continue.
5469
99e8eb11
MK
54702016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5471
5472 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5473 it works properly on big-endian machines where sizeof (CORE_ADDR)
5474 != sizeof (void *).
5475
a994041d
PA
54762016-01-21 Pedro Alves <palves@redhat.com>
5477
5478 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5479 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5480 * configure: Regenerate.
5481
f7a6a40d
YQ
54822016-01-21 Yao Qi <yao.qi@linaro.org>
5483
5484 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5485 is_thumb and set it according to CPSR saved on the stack.
5486 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5487 arm_sigreturn_next_pc.
5488
6f69e520
YQ
54892016-01-18 Yao Qi <yao.qi@linaro.org>
5490
5491 * linux-low.c (linux_set_pc_64bit): New function.
5492 (linux_get_pc_64bit): New function.
5493 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5494 Declare.
5495 * linux-sparc-low.c (debug_threads): Remove declaration.
5496 (sparc_get_pc): Remove.
5497 (the_low_target): Use linux_get_pc_64bit instead of
5498 sparc_get_pc.
5499 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5500 (the_low_target): Use linux_get_pc_64bit and
5501 linux_set_pc_64bit.
5502
276d4552
YQ
55032016-01-18 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-arm-low.c (debug_threads): Remove declaration.
5506 (arm_get_pc, arm_set_pc): Remove.
5507 (the_low_target): Use linux_get_pc_32bit and
5508 linux_set_pc_32bit.
5509 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5510 (the_low_target): Use linux_get_pc_32bit and
5511 linux_set_pc_32bit.
5512 * linux-cris-low.c (debug_threads): Remove declaration.
5513 (cris_get_pc, cris_set_pc,): Remove.
5514 (the_low_target): Use linux_get_pc_32bit and
5515 linux_set_pc_32bit.
5516 * linux-crisv32-low.c (debug_threads): Remove declaration.
5517 (cris_get_pc, cris_set_pc): Remove.
5518 (the_low_target): Use linux_get_pc_32bit and
5519 linux_set_pc_32bit.
5520 * linux-low.c: Include inttypes.h.
5521 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5522 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5523 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5524 (the_low_target): Use linux_get_pc_32bit and
5525 linux_set_pc_32bit.
5526 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5527 (the_low_target): Use linux_get_pc_32bit and
5528 linux_set_pc_32bit.
5529 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5530 (the_low_target): Use linux_get_pc_32bit and
5531 linux_set_pc_32bit.
5532 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5533 (the_low_target): Use linux_get_pc_32bit and
5534 linux_set_pc_32bit.
5535 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5536 (the_low_target): Use linux_get_pc_32bit and
5537 linux_set_pc_32bit.
5538
eb0edac8
GB
55392016-01-18 Gary Benson <gbenson@redhat.com>
5540
5541 * configure.ac (AC_FUNC_FORK): New check.
5542 * config.in: Regenerate.
5543 * configure: Likewise.
5544
1b451dda
YQ
55452016-01-14 Yao Qi <yao.qi@linaro.org>
5546
5547 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5548 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5549 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5550 arm_get_next_pcs_ctor.
5551
82075af2
JS
55522016-01-12 Josh Stone <jistone@redhat.com>
5553 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5554
5555 * inferiors.h: Include "gdb_vecs.h".
5556 (struct process_info): Add syscalls_to_catch.
5557 * inferiors.c (remove_process): Free syscalls_to_catch.
5558 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5559 syscall_return stops.
5560 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5561 * server.c (handle_general_set): Handle QCatchSyscalls.
5562 (handle_query): Report support for QCatchSyscalls.
5563 * target.h (struct target_ops): Add supports_catch_syscall.
5564 (target_supports_catch_syscall): New macro.
5565 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5566 (struct lwp_info): Add syscall_state.
5567 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5568 Maintain syscall_state and syscalls_to_catch across exec.
5569 (get_syscall_trapinfo): New function, proxy to the_low_target.
5570 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5571 (linux_low_filter_event): Toggle syscall_state entry/return for
5572 syscall traps, and set it ignored for all others.
5573 (gdb_catching_syscalls_p): New function.
5574 (gdb_catch_this_syscall_p): New function.
5575 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5576 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5577 (linux_supports_catch_syscall): New function.
5578 (linux_target_ops): Install it.
5579 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5580 (the_low_target): Install it.
5581
8f13a3ce
MF
55822016-01-12 Mike Frysinger <vapier@gentoo.org>
5583
5584 * acinclude.m4: Include new ../warning.m4 file.
5585 * configure: Regenerated.
5586 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5587
5b3da067
MF
55882016-01-12 Mike Frysinger <vapier@gentoo.org>
5589
5590 * ax.c (is_goto_target): Mark static.
5591 * linux-low.c (register_addr): Likewise.
5592 (linux_fetch_registers, linux_store_registers): Likewise.
5593 * mem-break.c (any_persistent_commands): Fix old prototype.
5594 (add_commands_to_breakpoint): Mark static.
5595 * regcache.c (find_register_by_name): Delete unused func.
5596 * remote-utils.c (hex_or_minus_one): Mark static.
5597 * server.c (monitor_show_help): Mark static.
5598 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5599 handle_v_requests): Likewise.
5600
bc504a31
PA
56012016-01-12 Pedro Alves <palves@redhat.com>
5602
5603 Remove use of the registered trademark symbol throughout.
5604
5a0dd67a
YQ
56052016-01-08 Yao Qi <yao.qi@linaro.org>
5606
5607 * remote-utils.c (getpkt): If c is '\003', call target hook
5608 request_interrupt.
5609
b2ca446f
YQ
56102016-01-06 Yao Qi <yao.qi@linaro.org>
5611
5612 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5613 linux-aarch32-low.c.
5614 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5615 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5616 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5617 (thumb2_breakpoint): Declare.
5618 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5619 linux-aarch32-low.h.
5620 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5621 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5622 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5623
edd88788
JB
56242016-01-01 Joel Brobecker <brobecker@adacore.com>
5625
5626 * gdbreplay.c (gdbreplay_version): Change copyright year in
5627 version message.
5628 * server.c (gdbserver_version): Likewise.
5629
65da7f14
PP
56302015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5631
5632 * server.c (crc32_table): Delete.
5633 (crc32): Use libiberty's xcrc32 function.
5634
4abd5ed2
JB
56352015-12-22 Joel Brobecker <brobecker@adacore.com>
5636
5637 * lynx-low.c (lynx_delete_thread_callback): New function.
5638 (lynx_mourn): Properly delete our process and all of its
5639 threads. Remove call to clear_inferiors.
5640
0e50fe5c
JB
56412015-12-22 Joel Brobecker <brobecker@adacore.com>
5642
5643 * target.c (thread_search_callback): Add check that
5644 the thread_stopped target callback is not NULL before
5645 calling it.
5646
35adc03f
YQ
56472015-12-21 Yao Qi <yao.qi@linaro.org>
5648
5649 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5650 arm breakpoint.
5651
bd2b2909
AT
56522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5653
5654 * server.c (handle_query): Call target_supports_software_single_step.
5655
7fe5e27e
AT
56562015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5657
5658 * linux-low.c (single_step): New function.
5659 (linux_resume_one_lwp_throw): Call single_step.
5660 (start_step_over): Likewise.
5661
d9311bfa
AT
56622015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5663
5664 * Makefile.in (SFILES): Append arch/arm-linux.c,
5665 arch/arm-get-next-pcs.c.
5666 (arm-linux.o): New rule.
5667 (arm-get-next-pcs.o): New rule.
5668 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5669 arm-linux.o.
5670 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5671 to linux-aarch32-low.c.
5672 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5673 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5674 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5675 (thumb2_breakpoint_len): Likewise.
5676 (arm_is_thumb_mode): Make non-static.
5677 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5678 from linux-aarch32-low.c.
5679 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5680 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5681 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5682 (thumb2_breakpoint_len): Likewise.
5683 (arm_is_thumb_mode): New declaration.
5684 * linux-arm-low.c: Include arch/arm-linux.h
5685 aarch/arm-get-next-pcs.h, sys/syscall.h.
5686 (get_next_pcs_ops): New struct.
5687 (get_next_pcs_addr_bits_remove): New function.
5688 (get_next_pcs_is_thumb): New function.
5689 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5690 (arm_sigreturn_next_pc): Likewise.
5691 (get_next_pcs_syscall_next_pc): Likewise.
5692 (arm_gdbserver_get_next_pcs): Likewise.
5693 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5694 Initialize.
5695 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5696 * server.h: Include gdb_vecs.h.
5697
68ce2059
AT
56982015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5699
5700 * Makefile.in (SFILES): Append common/common-regcache.c.
5701 (OBS): Append common-regcache.o.
5702 (common-regcache.o): New rule.
5703 * regcache.c (init_register_cache): Initialize cache to
5704 REG_UNAVAILABLE.
5705 (regcache_raw_read_unsigned): New function.
5706 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5707 register_status enum.
5708
fa5308bd
AT
57092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5710
5711 * linux-aarch64-low.c (the_low_targets): Rename
5712 breakpoint_reinsert_addr to get_next_pcs.
5713 * linux-arm-low.c (the_low_targets): Likewise.
5714 * linux-bfin-low.c (the_low_targets): Likewise.
5715 * linux-cris-low.c (the_low_targets): Likewise.
5716 * linux-crisv32-low.c (the_low_targets): Likewise.
5717 * linux-low.c (can_software_single_step): Likewise.
5718 (install_software_single_step_breakpoints): New function.
5719 (start_step_over): Use install_software_single_step_breakpoints.
5720 * linux-low.h: New CORE_ADDR vector.
5721 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5722 get_next_pcs.
5723 * linux-mips-low.c (the_low_targets): Likewise.
5724 * linux-nios2-low.c (the_low_targets): Likewise.
5725 * linux-sparc-low.c (the_low_targets): Likewise.
5726
4a6ed09b
PA
57272015-12-17 Pedro Alves <palves@redhat.com>
5728
5729 * linux-low.c (linux_kill_one_lwp): Remove references to
5730 LinuxThreads.
5731 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5732 to 'kill'.
5733 (linux_init_signals): Delete.
5734 (initialize_low): Adjust.
5735 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5736
7544db95
PA
57372015-12-16 Pedro Alves <palves@redhat.com>
5738
5739 * configure.ac (compiler warning flags): When testing a
5740 -Wno-foo option, check whether -Wfoo works instead.
5741 * configure: Regenerate.
5742
8020350c
DB
57432015-12-11 Don Breazeal <donb@codesourcery.com>
5744
5745 * server.c (process_serial_event): Don't exit from gdbserver
5746 in remote mode if there are still active inferiors.
5747
db91f502
YQ
57482015-12-11 Yao Qi <yao.qi@linaro.org>
5749
5750 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5751 arm_breakpoint_at if the process is 32-bit.
5752
b37a6290
YQ
57532015-12-11 Yao Qi <yao.qi@linaro.org>
5754
5755 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5756 arm breakpoint.
5757
17b1509a
YQ
57582015-12-07 Yao Qi <yao.qi@linaro.org>
5759
5760 * configure.srv: Append arm.o to srv_tgtobj for
5761 aarch64*-*-linux* target.
5762 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5763 from linux-arm-low.c.
5764 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5765 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5766 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5767 (thumb2_breakpoint_len): Likewise.
5768 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5769 (arm_breakpoint_kinds): Likewise.
5770 (arm_breakpoint_kind_from_pc): Likewise.
5771 (arm_sw_breakpoint_from_kind): Likewise.
5772 (arm_breakpoint_kind_from_current_state): Likewise.
5773 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5774 (arm_sw_breakpoint_from_kind): Declare.
5775 (arm_breakpoint_kind_from_current_state): Declare.
5776 (arm_breakpoint_at): Declare.
5777 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5778 arm_sw_breakpoint_from_kind if process is 32-bit.
5779 (aarch64_breakpoint_kind_from_pc): New function.
5780 (aarch64_breakpoint_kind_from_current_state): New function.
5781 (the_low_target): Initialize fields breakpoint_kind_from_pc
5782 and breakpoint_kind_from_current_state.
5783 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5784 linux-aarch32-low.c.
5785 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5786 (arm_breakpoint, arm_breakpoint_len): Likewise.
5787 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5788 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5789 (arm_is_thumb_mode): Likewise.
5790 (arm_breakpoint_at): Likewise.
5791 (arm_breakpoint_kind_from_pc): Likewise.
5792 (arm_sw_breakpoint_from_kind): Likewise.
5793 (arm_breakpoint_kind_from_current_state): Likewise.
5794
5795 Revert:
5796 2015-08-04 Yao Qi <yao.qi@linaro.org>
5797
5798 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5799 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5800 * server.c (extended_protocol): Remove "static".
5801 * server.h (extended_protocol): Declare it.
5802
ece66d65
JS
58032015-12-04 Josh Stone <jistone@redhat.com>
5804
5805 * target.h (struct target_ops) <arch_setup>: Rename to ...
5806 (struct target_ops) <post_create_inferior>: ... this.
5807 (target_arch_setup): Rename to ...
5808 (target_post_create_inferior): ... this, calling post_create_inferior.
5809 * server.c (start_inferior): Update target_arch_setup calls to
5810 target_post_create_inferior.
5811 * linux-low.c (linux_low_ptrace_options): Forward declare.
5812 (linux_arch_setup): Update its comment for general use.
5813 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5814 (struct linux_target_ops): Use linux_post_create_inferior.
5815 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5816 to post_create_inferior.
5817 * nto-low.c (struct nto_target_ops): Likewise.
5818 * spu-low.c (struct spu_target_ops): Likewise.
5819 * win32-low.c (struct win32_target_ops): Likewise.
5820
e58c48b4
AT
58212015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5822
5823 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5824
fbec8956
AT
58252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5826
5827 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5828 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5829 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5830 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5831 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5832 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5833 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5835 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5836 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5837 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5838 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5839
9b4c5f87
AT
58402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5841
5842 * linux-low.c (linux_look_up_symbols): Don't call
5843 linux_supports_traceclone.
5844 * linux-low.h (thread_db_init): Remove use_events argument.
5845 * thread-db.c (thread_db_use_event): Remove global variable.
5846 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5847 (struct thread_db) <td_create_bp>: Remove field.
5848 (thread_db_create_event): Remove function.
5849 (thread_db_enable_reporting): Likewise.
5850 (find_one_thread): Don't check for thread_db_use_events.
5851 (attach_thread): Likewise.
5852 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5853 (try_thread_db_load_1): Don't check for thread_db_use_events.
5854 (thread_db_init): Remove use_events argument and thread events
5855 handling.
5856 (remove_thread_event_breakpoints): Remove function.
5857 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5858
7d00775e
AT
58592015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5860
5861 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5862 New function.
5863 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5864 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5866 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5867 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5868 Initialize.
5869 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5870 New function.
5871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5872 * linux-low.c (can_hardware_single_step): Use
5873 supports_hardware_single_step.
5874 (can_software_single_step): New function.
5875 (start_step_over): Call can_software_single_step.
5876 (linux_supports_hardware_single_step): New function.
5877 (struct target_ops) <supports_software_single_step>: Initialize.
5878 * linux-low.h (struct linux_target_ops)
5879 <supports_hardware_single_step>: Initialize.
5880 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5881 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5882 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5883 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5884 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5886 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5887 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5888 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5889 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5890 Initialize.
5891 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5892 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5893 Initialize.
5894 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5895 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5896 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5897 New function.
5898 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5899 * target.h (struct target_ops): <supports_software_single_step>:
5900 New field.
5901 (target_supports_software_single_step): New macro.
5902
2d97cd35
AT
59032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5904
5905 * linux-low.c (linux_wait_1): Fix pc advance condition.
5906 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5907 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5908
769ef81f
AT
59092015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5910
5911 * linux-arm-low.c (arm_is_thumb_mode): New function.
5912 (arm_breakpoint_at): Use arm_is_thumb_mode.
5913 (arm_breakpoint_kind_from_current_state): New function.
5914 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5915 Initialize.
5916 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5917 (linux_breakpoint_kind_from_current_state): New function.
5918 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5919 * linux-low.h (struct linux_target_ops)
5920 <breakpoint_kind_from_current_state>: New field.
5921 * target.h (struct target_ops): Likewise.
5922 (target_breakpoint_kind_from_current_state): New macro.
5923
1bebeeca
PA
59242015-11-30 Pedro Alves <palves@redhat.com>
5925
5926 * linux-low.c (linux_resume): Wake up the event loop before
5927 returning.
5928
a67a9fae
PA
59292015-11-30 Pedro Alves <palves@redhat.com>
5930
5931 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5932 check.
5933 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5934 to -1.
5935 * target.c (struct thread_search): New structure.
5936 (thread_search_callback): New function.
5937 (prev_general_thread): New global.
5938 (prepare_to_access_memory, done_accessing_memory): New functions.
5939 * target.h (prepare_to_access_memory, done_accessing_memory):
5940 Replace macros with function declarations.
5941
f2faf941
PA
59422015-11-30 Pedro Alves <palves@redhat.com>
5943
5944 PR 14618
5945 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5946 report TARGET_WAITKIND_NO_RESUMED.
5947 * remote-utils.c (prepare_resume_reply): Handle
5948 TARGET_WAITKIND_NO_RESUMED.
5949 * server.c (report_no_resumed): New global.
5950 (handle_query) <qSupported>: Handle "no-resumed+". Report
5951 "no-resumed+" support.
5952 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5953 return error if the client doesn't support no-resumed events.
5954 (push_stop_notification): New function.
5955 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5956 events if the client supports them.
5957
a681f9c9
PA
59582015-11-30 Pedro Alves <palves@redhat.com>
5959
5960 * linux-low.c (thread_still_has_status_pending_p): Don't check
5961 vCont;t here.
5962 (lwp_resumed): New function.
5963 (status_pending_p_callback): Return early if the LWP is not
5964 supposed to be resumed.
5965
65706a29
PA
59662015-11-30 Pedro Alves <palves@redhat.com>
5967
5968 * linux-low.c (handle_extended_wait): Assert that the LWP's
5969 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5970 thread create events, leave the new child's status pending.
5971 (linux_low_filter_event): If GDB wants to hear about thread exit
5972 events, leave the LWP marked dead and don't delete it.
5973 (linux_wait_for_event_filtered): Don't check for thread exit.
5974 (filter_exit_event): New function.
5975 (linux_wait_1): Use it, when returning an exit event.
5976 (linux_resume_one_lwp_throw): Assert that the LWP's
5977 waitstatus is TARGET_WAITKIND_IGNORE.
5978 * remote-utils.c (prepare_resume_reply): Handle
5979 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5980 * server.c (report_thread_events): New global.
5981 (handle_general_set): Handle QThreadEvents.
5982 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5983 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5984 TARGET_WAITKIND_THREAD_EXITED.
5985 * server.h (report_thread_events): Declare.
5986
56cf4bed
PA
59872015-11-30 Pedro Alves <palves@redhat.com>
5988
5989 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5990 the thread's last_resume_kind was resume_stop.
5991
500c1d85
PA
59922015-11-30 Pedro Alves <palves@redhat.com>
5993
5994 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5995 before returning.
5996
de979965
PA
59972015-11-30 Pedro Alves <palves@redhat.com>
5998
5999 * server.c (handle_v_requests): Handle vCtrlC.
6000
34c65914
PA
60012015-11-30 Pedro Alves <palves@redhat.com>
6002
6003 * gdbthread.h (find_any_thread_of_pid): Declare.
6004 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6005 functions.
6006 * server.c (handle_query): If current_thread is NULL, look for
6007 another thread of the selected process.
6008
79efa585 60092015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 6010 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
6011
6012 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6013 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6014 name in reply.
6015 * target.h (struct target_ops) <thread_name>: New field.
6016 (target_thread_name): New macro.
6017
80d82c19
JB
60182015-11-23 Joel Brobecker <brobecker@adacore.com>
6019
6020 * regcache.h (regcache_invalidate_pid): Add declaration.
6021 * regcache.c (regcache_invalidate_pid): New function, extracted
6022 from regcache_invalidate.
6023 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6024 Add trivial documentation comment.
6025 * lynx-low.c: Use regcache_invalidate_pid instead of
6026 regcache_invalidate.
6027
64da5dd5
JB
60282015-11-23 Joel Brobecker <brobecker@adacore.com>
6029
6030 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6031 and Elf64_auxv_t if the target is Android.
6032
37ce4055
DE
60332015-11-22 Doug Evans <xdje42@gmail.com>
6034
6035 * target.h: #include <sys/types.h>.
6036
06e03fff
PA
60372015-11-19 Pedro Alves <palves@redhat.com>
6038
6039 * linux-low.c (linux_process_qsupported): Change prototype.
6040 Adjust.
6041 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6042 Change prototype.
6043 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6044 and adjust to loop over all features.
6045 * server.c (handle_query) <qSupported>: Adjust to call
6046 target_process_qsupported once, passing it a vector of unprocessed
6047 features.
6048 * target.h (struct target_ops) <process_qsupported>: Change
6049 prototype.
6050 (target_process_qsupported): Adjust.
6051
9a084706
PA
60522015-11-19 Pedro Alves <palves@redhat.com>
6053
6054 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6055 mode.
6056 * configure: Regenerate.
6057
dad44a1f
PA
60582015-11-19 Pedro Alves <palves@redhat.com>
6059
6060 * configure: Regenerate.
6061
231c0592
YQ
60622015-11-19 Yao Qi <yao.qi@linaro.org>
6063
6064 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6065 type to uint32_t.
6066
6c1c9a8b
YQ
60672015-11-19 Yao Qi <yao.qi@linaro.org>
6068
6069 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6070 (struct aarch64_operand): Move enum out.
6071
9caa3311
YQ
60722015-11-19 Yao Qi <yao.qi@linaro.org>
6073
6074 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6075 struct user_fpsimd_state *.
6076 (aarch64_store_fpregset): Likewise.
6077
6a69a054
YQ
60782015-11-19 Yao Qi <yao.qi@linaro.org>
6079
6080 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6081 struct user_pt_regs *.
6082 (aarch64_store_gregset): Likewise.
6083
1798301e
PA
60842015-11-18 Pedro Alves <palves@redhat.com>
6085
6086 * Makefile.in (all_object_files): Add $IPA_OBJS.
6087
ce7715e2
PA
60882015-11-17 Pedro Alves <palves@redhat.com>
6089
6090 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6091 GDB_SIGNAL_0 and gdb_signal_to_string.
6092
c0879059
PA
60932015-11-17 Pedro Alves <palves@redhat.com>
6094
6095 * win32-low.c (handle_output_debug_string): Remove parameter.
6096 (win32_kill): Remove our_status local and adjust call to
6097 handle_output_debug_string.
6098 (get_child_debug_event): Adjust call to
6099 handle_output_debug_string.
6100
1996e237
SM
61012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6102
6103 * linux-mips-low.c (mips_fill_gregset): Add cast.
6104 (mips_store_gregset): Likewise.
6105 (mips_fill_fpregset): Likewise.
6106 (mips_store_fpregset): Likewise.
6107
cbec665b
SM
61082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6109
6110 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6111 priv.
6112
eb3e3c67
SM
61132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6114
6115 * linux-mips-low.c (mips_linux_new_thread): Change type of
6116 watch_type to enum target_hw_bp_type.
6117
171de4b8
SM
61182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6119
6120 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6121 Change return type to arm_hwbp_type.
6122
04248ead
SM
61232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6124
6125 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6126 (arm_store_gregset): Likewise.
6127 * linux-arm-low.c (arm_get_hwcap): Likewise.
6128 (arm_read_description): Likewise.
6129
04b3479c
SM
61302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6131
6132 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6133
2bc84e8a
SM
61342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6135
6136 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6137 (ppc_fill_vsxregset): Likewise.
6138 (ppc_store_vsxregset): Likewise.
6139 (ppc_fill_vrregset): Likewise.
6140 (ppc_store_vrregset): Likewise.
6141 (ppc_fill_evrregset): Likewise.
6142 (ppc_store_evrregset): Likewise.
6143
e6c5bb05
SM
61442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6145
6146 * linux-ppc-low.c (ppc_usrregs_info): Remove
6147 forward-declaration.
6148 (ppc_arch_setup): Move lower in file.
6149
7ea45d72
SM
61502015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6151
6152 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6153 (ps_pdwrite): Likewise.
6154
69291610
HW
61552015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6156
6157 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6158 to after assert checks.
6159
b42945fd
SM
61602015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6161
6162 * proc-service.c (ps_pdread): Add/adjust casts.
6163 (ps_pdwrite): Add/adjust casts.
6164
d6f85c84
SM
61652015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6166
6167 * server.c (handle_search_memory_1): Cast return value of
6168 memmem.
6169
f98cd059
SM
61702015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6171
6172 * server.c (write_qxfer_response): Change type of data to
6173 gdb_byte *.
6174
d2412fa5
PA
61752015-10-29 Pedro Alves <palves@redhat.com>
6176
6177 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6178
c17414a2
PA
61792015-10-29 Pedro Alves <palves@redhat.com>
6180
6181 * tracepoint.c (clear_installed_tracepoints): Add casts.
6182
e053fbc4
PA
61832015-10-29 Pedro Alves <palves@redhat.com>
6184
6185 * server.c (handle_v_cont, process_serial_event): Add enum
6186 gdb_signal casts to signal parsing code.
6187
add67df8
PA
61882015-10-29 Pedro Alves <palves@redhat.com>
6189
6190 * linux-low.h (NULL_REGSET): Define.
6191 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6192 * linux-arm-low.c (arm_regsets): Likewise.
6193 * linux-crisv32-low.c (cris_regsets): Likewise.
6194 * linux-m68k-low.c (m68k_regsets): Likewise.
6195 * linux-mips-low.c (mips_regsets): Likewise.
6196 * linux-nios2-low.c (nios2_regsets): Likewise.
6197 * linux-ppc-low.c (ppc_regsets): Likewise.
6198 * linux-s390-low.c (s390_regsets): Likewise.
6199 * linux-sh-low.c (sh_regsets): Likewise.
6200 * linux-sparc-low.c (sparc_regsets): Likewise.
6201 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6202 * linux-tile-low.c (tile_regsets): Likewise.
6203 * linux-x86-low.c (x86_regsets): Likewise.
6204 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6205
50bc912a
PA
62062015-10-29 Pedro Alves <palves@redhat.com>
6207
6208 * linux-low.h (NULL_REGSET): Define.
6209 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6210 * linux-arm-low.c (arm_regsets): Likewise.
6211 * linux-crisv32-low.c (cris_regsets): Likewise.
6212 * linux-m68k-low.c (m68k_regsets): Likewise.
6213 * linux-mips-low.c (mips_regsets): Likewise.
6214 * linux-nios2-low.c (nios2_regsets): Likewise.
6215 * linux-ppc-low.c (ppc_regsets): Likewise.
6216 * linux-s390-low.c (s390_regsets): Likewise.
6217 * linux-sh-low.c (sh_regsets): Likewise.
6218 * linux-sparc-low.c (sparc_regsets): Likewise.
6219 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6220 * linux-tile-low.c (tile_regsets): Likewise.
6221 * linux-x86-low.c (x86_regsets): Likewise.
6222 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6223
682b2546
DE
62242015-10-26 Doug Evans <dje@google.com>
6225
6226 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6227
963843d4
DE
62282015-10-26 Doug Evans <dje@google.com>
6229
6230 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6231
d41401ac
DE
62322015-10-26 Doug Evans <dje@google.com>
6233
6234 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6235 for debug_printf.
6236 (attach_thread, find_new_threads_callback): Ditto.
6237
3db28855
AT
62382015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6239
6240 * mem-break.h (set_breakpoint_data): Remove.
6241
fb78e89c
AT
62422015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6243
6244 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6245 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6246 (initialize_low): Remove set_breakpoint_data call.
6247 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6248 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6249 (initialize_low): Remove set_breakpoint_data call.
6250 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6251 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6252 (initialize_low): Remove set_breakpoint_data call.
6253
2e6ee069
AT
62542015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6255
6256 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6257 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6258 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6259 * target.h (target_breakpoint_kind_from_pc): New macro.
6260
1652a986
AT
62612015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6262
6263 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6264 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6265 the default breakpoint kind.
6266
abeead09
AT
62672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6268
6269 * linux-arm-low.c (arm_supports_z_point_type): Add software
6270 breakpoint support.
6271
b0b4b501
AT
62722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6273
6274 * linux-arm-low.c: Refactor breakpoint definitions.
6275 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6276 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6277
8689682c
AT
62782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6279
6280 * Makefile.in: Add arm.c/o.
6281 * configure.srv: Likewise.
6282 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6283 (arm_breakpoint_kind_from_pc): New function.
6284 (arm_sw_breakpoint_from_kind): Return proper kind.
6285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6286
27165294
AT
62872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6288
6289 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6290 removal.
6291 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6292 (struct raw_breakpoint) <size>: Remove.
6293 (struct raw_breakpoint) <kind>: Add.
6294 (bp_size): New function.
6295 (bp_opcode): Likewise.
6296 (find_raw_breakpoint_at): Adjust for kind.
6297 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6298 (remove_memory_breakpoint): Adjust for kind call bp_size.
6299 (set_raw_breakpoint_at): Adjust for kind.
6300 (set_breakpoint): Likewise.
6301 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6302 (delete_raw_breakpoint): Adjust for kind.
6303 (delete_breakpoint): Likewise.
6304 (find_gdb_breakpoint): Likewise.
6305 (set_gdb_breakpoint_1): Likewise.
6306 (set_gdb_breakpoint): Likewise.
6307 (delete_gdb_breakpoint_1): Likewise.
6308 (delete_gdb_breakpoint): Likewise.
6309 (uninsert_raw_breakpoint): Likewise.
6310 (reinsert_raw_breakpoint): Likewise.
6311 (set_breakpoint_data): Remove.
6312 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6313 (check_mem_read): Adjust for kind call bp_size.
6314 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6315 (clone_one_breakpoint): Adjust for kind.
6316 * mem-break.h (set_gdb_breakpoint): Likewise.
6317 (delete_gdb_breakpoint): Likewise.
6318 * server.c (process_serial_event): Likewise.
6319
dd373349
AT
63202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6321
6322 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6323 (struct linux_target_ops) <breakpoint>: Remove.
6324 (struct linux_target_ops) <breakpoint_len>: Remove.
6325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6327 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6328 (arm_sw_breakpoint_from_kind): New function.
6329 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6330 (struct linux_target_ops) <breakpoint>: Remove.
6331 (struct linux_target_ops) <breakpoint_len>: Remove.
6332 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6333 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6334 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6335 (struct linux_target_ops) <breakpoint>: Remove.
6336 (struct linux_target_ops) <breakpoint_len>: Remove.
6337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6338 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6339 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6340 (struct linux_target_ops) <breakpoint>: Remove.
6341 (struct linux_target_ops) <breakpoint_len>: Remove.
6342 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6344 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6345 and sw_breakpoint_from_kind to increment the pc.
6346 (linux_breakpoint_kind_from_pc): New function.
6347 (linux_sw_breakpoint_from_kind): New function.
6348 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6349 (initialize_low): Call breakpoint_kind_from_pc and
6350 sw_breakpoint_from_kind to replace breakpoint_data/len.
6351 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6352 New field.
6353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6354 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6355 (struct linux_target_ops) <breakpoint>: Remove.
6356 (struct linux_target_ops) <breakpoint_len>: Remove.
6357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6359 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6360 (struct linux_target_ops) <breakpoint>: Remove.
6361 (struct linux_target_ops) <breakpoint_len>: Remove.
6362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6363 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6364 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6365 (struct linux_target_ops) <breakpoint>: Remove.
6366 (struct linux_target_ops) <breakpoint_len>: Remove.
6367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6369 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6370 (struct linux_target_ops) <breakpoint>: Remove.
6371 (struct linux_target_ops) <breakpoint_len>: Remove.
6372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6374 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6375 (struct linux_target_ops) <breakpoint>: Remove.
6376 (struct linux_target_ops) <breakpoint_len>: Remove.
6377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6379 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6380 (struct linux_target_ops) <breakpoint>: Remove.
6381 (struct linux_target_ops) <breakpoint_len>: Remove.
6382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6384 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6385 (struct linux_target_ops) <breakpoint>: Remove.
6386 (struct linux_target_ops) <breakpoint_len>: Remove.
6387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6389 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6390 (struct linux_target_ops) <breakpoint>: Remove.
6391 (struct linux_target_ops) <breakpoint_len>: Remove.
6392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6394 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6395 (struct linux_target_ops) <breakpoint>: Remove.
6396 (struct linux_target_ops) <breakpoint_len>: Remove.
6397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6399 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6400 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6401 (struct linux_target_ops) <breakpoint>: Remove.
6402 (struct linux_target_ops) <breakpoint_len>: Remove.
6403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6405 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6406 (struct linux_target_ops) <breakpoint>: Remove.
6407 (struct linux_target_ops) <breakpoint_len>: Remove.
6408 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6410
4cd98a19
AT
64112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6412
6413 * linux-cris-low.c (cris_get_pc): Remove void arg.
6414
774ee6d2
AR
64152015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6416
6417 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6418 variable name.
6419
833dcd29
AR
64202015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6421
6422 * inferiors.c (thread_pid_matches_callback): New function.
6423 (find_thread_process): New function.
6424 (remove_thread): Reset current_thread.
6425 (remove_process): Assert threads have been removed first.
6426
8d689ee5
YQ
64272015-10-15 Yao Qi <yao.qi@linaro.org>
6428
6429 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6430 if it is 3.
6431 (aarch64_remove_point): Likewise.
6432 * regcache.c (regcache_register_size): New function.
6433
1c2e1515
YQ
64342015-10-12 Yao Qi <yao.qi@linaro.org>
6435
6436 * linux-aarch64-low.c: Update all callers as emit_load_store
6437 is renamed to aarch64_emit_load_store.
6438
e1c587c3
YQ
64392015-10-12 Yao Qi <yao.qi@linaro.org>
6440
6441 * linux-aarch64-low.c: Update all callers of function renaming
6442 from emit_insn to aarch64_emit_insn.
6443
b6542f81
YQ
64442015-10-12 Yao Qi <yao.qi@linaro.org>
6445
6446 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6447 arch/aarch64-insn.h.
6448 (struct aarch64_memory_operand): Likewise.
6449 (ENCODE): Likewise.
6450 (emit_insn): Move to arch/aarch64-insn.c.
6451 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6452 (emit_load_store): Move to arch/aarch64-insn.c.
6453 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6454 (can_encode_int32): Remove.
6455
246994ce
YQ
64562015-10-12 Yao Qi <yao.qi@linaro.org>
6457
6458 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6459 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6460 (aarch64_relocate_instruction): Likewise.
6461 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6462 (struct aarch64_insn_visitor): Likewise.
6463
0badd99f
YQ
64642015-10-12 Yao Qi <yao.qi@linaro.org>
6465
6466 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6467 (struct aarch64_insn_visitor): New.
6468 (struct aarch64_insn_relocation_data): New.
6469 (aarch64_ftrace_insn_reloc_b): New function.
6470 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6471 (aarch64_ftrace_insn_reloc_cb): Likewise.
6472 (aarch64_ftrace_insn_reloc_tb): Likewise.
6473 (aarch64_ftrace_insn_reloc_adr): Likewise.
6474 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6475 (aarch64_ftrace_insn_reloc_others): Likewise.
6476 (visitor): New.
6477 (aarch64_relocate_instruction): Use visitor.
6478
dfaffe9d
YQ
64792015-10-12 Yao Qi <yao.qi@linaro.org>
6480
6481 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6482 int. Add argument buf.
6483 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6484 aarch64_relocate_instruction.
6485
70b439f0
YQ
64862015-10-12 Yao Qi <yao.qi@linaro.org>
6487
6488 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6489 argument insn. Remove local variable insn. Don't call
6490 target_read_uint32.
6491 (aarch64_install_fast_tracepoint_jump_pad): Call
6492 target_read_uint32.
6493
7781c06f
YQ
64942015-09-30 Yao Qi <yao.qi@linaro.org>
6495
6496 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6497 (emit_load_store_pair): Likewise.
6498
9a3c8263
SM
64992015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6500
6501 * dll.c (match_dll): Add cast(s).
6502 (unloaded_dll): Likewise.
6503 * linux-low.c (second_thread_of_pid_p): Likewise.
6504 (delete_lwp_callback): Likewise.
6505 (count_events_callback): Likewise.
6506 (select_event_lwp_callback): Likewise.
6507 (linux_set_resume_request): Likewise.
6508 * server.c (accumulate_file_name_length): Likewise.
6509 (emit_dll_description): Likewise.
6510 (handle_qxfer_threads_worker): Likewise.
6511 (visit_actioned_threads): Likewise.
6512 * thread-db.c (any_thread_of): Likewise.
6513 * tracepoint.c (same_process_p): Likewise.
6514 (match_blocktype): Likewise.
6515 (build_traceframe_info_xml): Likewise.
6516
224c3ddb
SM
65172015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6518
6519 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6520 assignment.
6521 (gdb_unparse_agent_expr): Likewise.
6522 * hostio.c (require_data): Likewise.
6523 (handle_pread): Likewise.
6524 * linux-low.c (disable_regset): Likewise.
6525 (fetch_register): Likewise.
6526 (store_register): Likewise.
6527 (get_dynamic): Likewise.
6528 (linux_qxfer_libraries_svr4): Likewise.
6529 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6530 (set_fast_tracepoint_jump): Likewise.
6531 (uninsert_fast_tracepoint_jumps_at): Likewise.
6532 (reinsert_fast_tracepoint_jumps_at): Likewise.
6533 (validate_inserted_breakpoint): Likewise.
6534 (clone_agent_expr): Likewise.
6535 * regcache.c (init_register_cache): Likewise.
6536 * remote-utils.c (putpkt_binary_1): Likewise.
6537 (decode_M_packet): Likewise.
6538 (decode_X_packet): Likewise.
6539 (look_up_one_symbol): Likewise.
6540 (relocate_instruction): Likewise.
6541 (monitor_output): Likewise.
6542 * server.c (handle_search_memory): Likewise.
6543 (handle_qxfer_exec_file): Likewise.
6544 (handle_qxfer_libraries): Likewise.
6545 (handle_qxfer): Likewise.
6546 (handle_query): Likewise.
6547 (handle_v_cont): Likewise.
6548 (handle_v_run): Likewise.
6549 (captured_main): Likewise.
6550 * target.c (write_inferior_memory): Likewise.
6551 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6552 * tracepoint.c (init_trace_buffer): Likewise.
6553 (add_tracepoint_action): Likewise.
6554 (add_traceframe): Likewise.
6555 (add_traceframe_block): Likewise.
6556 (cmd_qtdpsrc): Likewise.
6557 (cmd_qtdv): Likewise.
6558 (cmd_qtstatus): Likewise.
6559 (response_source): Likewise.
6560 (response_tsv): Likewise.
6561 (cmd_qtnotes): Likewise.
6562 (gdb_collect): Likewise.
6563 (initialize_tracepoint): Likewise.
6564
afbe19f8
PL
65652015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6566
6567 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6568 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6569 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6570 <NOP>: New.
6571 (enum aarch64_condition_codes): New enum.
6572 (w0): New static global.
6573 (fp): Likewise.
6574 (lr): Likewise.
6575 (struct aarch64_memory_operand) <type>: New
6576 MEMORY_OPERAND_POSTINDEX type.
6577 (postindex_memory_operand): New helper function.
6578 (emit_ret): New function.
6579 (emit_load_store_pair): New function, factored out of emit_stp
6580 with support for MEMORY_OPERAND_POSTINDEX.
6581 (emit_stp): Rewrite using emit_load_store_pair.
6582 (emit_ldp): New function.
6583 (emit_load_store): Likewise.
6584 (emit_ldr): Mention post-index instruction in comment.
6585 (emit_ldrh): New function.
6586 (emit_ldrb): New function.
6587 (emit_ldrsw): Mention post-index instruction in comment.
6588 (emit_str): Likewise.
6589 (emit_subs): New function.
6590 (emit_cmp): Likewise.
6591 (emit_and): Likewise.
6592 (emit_orr): Likewise.
6593 (emit_orn): Likewise.
6594 (emit_eor): Likewise.
6595 (emit_mvn): Likewise.
6596 (emit_lslv): Likewise.
6597 (emit_lsrv): Likewise.
6598 (emit_asrv): Likewise.
6599 (emit_mul): Likewise.
6600 (emit_sbfm): Likewise.
6601 (emit_sbfx): Likewise.
6602 (emit_ubfm): Likewise.
6603 (emit_ubfx): Likewise.
6604 (emit_csinc): Likewise.
6605 (emit_cset): Likewise.
6606 (emit_nop): Likewise.
6607 (emit_ops_insns): New helper function.
6608 (emit_pop): Likewise.
6609 (emit_push): Likewise.
6610 (aarch64_emit_prologue): New function.
6611 (aarch64_emit_epilogue): Likewise.
6612 (aarch64_emit_add): Likewise.
6613 (aarch64_emit_sub): Likewise.
6614 (aarch64_emit_mul): Likewise.
6615 (aarch64_emit_lsh): Likewise.
6616 (aarch64_emit_rsh_signed): Likewise.
6617 (aarch64_emit_rsh_unsigned): Likewise.
6618 (aarch64_emit_ext): Likewise.
6619 (aarch64_emit_log_not): Likewise.
6620 (aarch64_emit_bit_and): Likewise.
6621 (aarch64_emit_bit_or): Likewise.
6622 (aarch64_emit_bit_xor): Likewise.
6623 (aarch64_emit_bit_not): Likewise.
6624 (aarch64_emit_equal): Likewise.
6625 (aarch64_emit_less_signed): Likewise.
6626 (aarch64_emit_less_unsigned): Likewise.
6627 (aarch64_emit_ref): Likewise.
6628 (aarch64_emit_if_goto): Likewise.
6629 (aarch64_emit_goto): Likewise.
6630 (aarch64_write_goto_address): Likewise.
6631 (aarch64_emit_const): Likewise.
6632 (aarch64_emit_call): Likewise.
6633 (aarch64_emit_reg): Likewise.
6634 (aarch64_emit_pop): Likewise.
6635 (aarch64_emit_stack_flush): Likewise.
6636 (aarch64_emit_zero_ext): Likewise.
6637 (aarch64_emit_swap): Likewise.
6638 (aarch64_emit_stack_adjust): Likewise.
6639 (aarch64_emit_int_call_1): Likewise.
6640 (aarch64_emit_void_call_2): Likewise.
6641 (aarch64_emit_eq_goto): Likewise.
6642 (aarch64_emit_ne_goto): Likewise.
6643 (aarch64_emit_lt_goto): Likewise.
6644 (aarch64_emit_le_goto): Likewise.
6645 (aarch64_emit_gt_goto): Likewise.
6646 (aarch64_emit_ge_got): Likewise.
6647 (aarch64_emit_ops_impl): New static global variable.
6648 (aarch64_emit_ops): New target function, return
6649 &aarch64_emit_ops_impl.
6650 (struct linux_target_ops): Install it.
6651
bb903df0
PL
66522015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6653
6654 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6655 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6656 aarch64-ipa.o.
6657 * linux-aarch64-ipa.c: New file.
6658 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6659 and endian.h.
6660 (aarch64_get_thread_area): New target method.
6661 (extract_signed_bitfield): New helper function.
6662 (aarch64_decode_ldr_literal): New function.
6663 (enum aarch64_opcodes): New enum.
6664 (struct aarch64_register): New struct.
6665 (struct aarch64_operand): New struct.
6666 (x0): New static global.
6667 (x1): Likewise.
6668 (x2): Likewise.
6669 (x3): Likewise.
6670 (x4): Likewise.
6671 (w2): Likewise.
6672 (ip0): Likewise.
6673 (sp): Likewise.
6674 (xzr): Likewise.
6675 (aarch64_register): New helper function.
6676 (register_operand): Likewise.
6677 (immediate_operand): Likewise.
6678 (struct aarch64_memory_operand): New struct.
6679 (offset_memory_operand): New helper function.
6680 (preindex_memory_operand): Likewise.
6681 (enum aarch64_system_control_registers): New enum.
6682 (ENCODE): New macro.
6683 (emit_insn): New helper function.
6684 (emit_b): New function.
6685 (emit_bcond): Likewise.
6686 (emit_cb): Likewise.
6687 (emit_tb): Likewise.
6688 (emit_blr): Likewise.
6689 (emit_stp): Likewise.
6690 (emit_ldp_q_offset): Likewise.
6691 (emit_stp_q_offset): Likewise.
6692 (emit_load_store): Likewise.
6693 (emit_ldr): Likewise.
6694 (emit_ldrsw): Likewise.
6695 (emit_str): Likewise.
6696 (emit_ldaxr): Likewise.
6697 (emit_stxr): Likewise.
6698 (emit_stlr): Likewise.
6699 (emit_data_processing_reg): Likewise.
6700 (emit_data_processing): Likewise.
6701 (emit_add): Likewise.
6702 (emit_sub): Likewise.
6703 (emit_mov): Likewise.
6704 (emit_movk): Likewise.
6705 (emit_mov_addr): Likewise.
6706 (emit_mrs): Likewise.
6707 (emit_msr): Likewise.
6708 (emit_sevl): Likewise.
6709 (emit_wfe): Likewise.
6710 (append_insns): Likewise.
6711 (can_encode_int32_in): New helper function.
6712 (aarch64_relocate_instruction): New function.
6713 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6714 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6715 (struct linux_target_ops): Install aarch64_get_thread_area,
6716 aarch64_install_fast_tracepoint_jump_pad and
6717 aarch64_get_min_fast_tracepoint_insn_len.
6718
787749ea
PL
67192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6720
6721 * Makefile.in (aarch64-insn.o): New rule.
6722 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6723
9812b2e6
YQ
67242015-09-21 Yao Qi <yao.qi@linaro.org>
6725
6726 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6727
18fe412b
YQ
67282015-09-21 Yao Qi <yao.qi@linaro.org>
6729
6730 * tracepoint.c (max_jump_pad_size): Remove.
6731
a0cc84cd
YQ
67322015-09-18 Yao Qi <yao.qi@linaro.org>
6733
6734 * linux-aarch64-low.c: Don't include sys/uio.h.
6735 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6736
d78908cf
WW
67372015-09-16 Wei-cheng Wang <cole945@gmail.com>
6738
6739 * tracepoint.c (eval_result_type): Change prototype.
6740 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6741
d57e0d50
PA
67422015-09-15 Pedro Alves <palves@redhat.com>
6743
6744 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6745 Check whether to report exec events instead of checking whether
6746 multiprocess is enabled.
6747
5a676acc
PA
67482015-09-15 Pedro Alves <palves@redhat.com>
6749
6750 PR remote/18965
6751 * remote-utils.c (prepare_resume_reply): Merge
6752 TARGET_WAITKIND_VFORK_DONE switch case with the
6753 TARGET_WAITKIND_FORKED case.
6754
7c5d0fad
YQ
67552015-09-15 Yao Qi <yao.qi@linaro.org>
6756
6757 * server.c (handle_query): Check string comparison using
6758 "else if" instead of "if".
6759
750ce8d1
YQ
67602015-09-15 Yao Qi <yao.qi@linaro.org>
6761
6762 * server.c (vCont_supported): New global variable.
6763 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6764 matches. Append ";vContSupported+" to own_buf.
6765 (handle_v_requests): Append ";s;S" to own_buf if target supports
6766 hardware single step or vCont_supported is false.
6767 (capture_main): Set vCont_supported to zero.
6768
70b90b91
YQ
67692015-09-15 Yao Qi <yao.qi@linaro.org>
6770
6771 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6772 it to ...
6773 (linux_supports_hardware_single_step): ... New function.
6774 (linux_target_ops): Update.
6775 * lynx-low.c (lynx_target_ops): Set field
6776 supports_hardware_single_step to target_can_do_hardware_single_step.
6777 * nto-low.c (nto_target_ops): Likewise.
6778 * spu-low.c (spu_target_ops): Likewise.
6779 * win32-low.c (win32_target_ops): Likewise.
6780 * target.c (target_can_do_hardware_single_step): New function.
6781 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6782 Remove. <supports_hardware_single_step>: New field.
6783 (target_supports_conditional_breakpoints): Remove.
6784 (target_supports_hardware_single_step): New macro.
6785 (target_can_do_hardware_single_step): Declare.
6786 * server.c (handle_query): Use target_supports_hardware_single_step
6787 instead of target_supports_conditional_breakpoints.
6788
ade90bde
YQ
67892015-09-15 Yao Qi <yao.qi@linaro.org>
6790
6791 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6792 function.
6793 (struct linux_target_ops the_low_target): Install
6794 aarch64_linux_siginfo_fixup.
6795
94585166
DB
67962015-09-11 Don Breazeal <donb@codesourcery.com>
6797 Luis Machado <lgustavo@codesourcery.com>
6798
6799 * linux-low.c (linux_mourn): Static declaration.
6800 (linux_arch_setup): Move in front of
6801 handle_extended_wait.
6802 (linux_arch_setup_thread): New function.
6803 (handle_extended_wait): Handle exec events. Call
6804 linux_arch_setup_thread. Make event_lwp argument a
6805 pointer-to-a-pointer.
6806 (check_zombie_leaders): Do not check stopped threads.
6807 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6808 (linux_low_filter_event): Add lwp and thread for exec'ing
6809 non-leader thread if leader thread has been deleted.
6810 Refactor code into linux_arch_setup_thread and call it.
6811 Pass child lwp pointer by reference to handle_extended_wait.
6812 (linux_wait_for_event_filtered): Update comment.
6813 (linux_wait_1): Prevent clobbering exec event status.
6814 (linux_supports_exec_events): New function.
6815 (linux_target_ops) <supports_exec_events>: Initialize new member.
6816 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6817 new member.
6818 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6819 * server.c (report_exec_events): New global variable.
6820 (handle_query): Handle qSupported query for exec-events feature.
6821 (captured_main): Initialize report_exec_events.
6822 * server.h (report_exec_events): Declare new global variable.
6823 * target.h (struct target_ops) <supports_exec_events>: New
6824 member.
6825 (target_supports_exec_events): New macro.
6826 * win32-low.c (win32_target_ops) <supports_exec_events>:
6827 Initialize new member.
6828
0568462b
MM
68292015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6830
6831 * linux-low.c (linux_low_enable_btrace): Remove.
6832 (linux_target_ops): Replace linux_low_enable_btrace with
6833 linux_enable_btrace.
6834
39edd165
YQ
68352015-09-03 Yao Qi <yao.qi@linaro.org>
6836
6837 * linux-aarch64-low.c (aarch64_insert_point): Call
6838 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6839 returns true.
6840
1db33b5a
UW
68412015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6842
6843 * linux-low.c (check_stopped_by_breakpoint): Use
6844 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6845
ab290430
PA
68462015-08-27 Pedro Alves <palves@redhat.com>
6847
6848 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6849
8d749320
SM
68502015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6851
6711b7f8
SM
6852 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6853 the XNEW-family equivalent.
8d749320
SM
6854 (compile_bytecodes): Likewise.
6855 * dll.c (loaded_dll): Likewise.
6856 * event-loop.c (append_callback_event): Likewise.
6857 (create_file_handler): Likewise.
6858 (create_file_event): Likewise.
6859 * hostio.c (handle_open): Likewise.
6860 * inferiors.c (add_thread): Likewise.
6861 (add_process): Likewise.
6862 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6863 * linux-arm-low.c (arm_new_process): Likewise.
6864 (arm_new_thread): Likewise.
6865 * linux-low.c (add_to_pid_list): Likewise.
6866 (linux_add_process): Likewise.
6867 (handle_extended_wait): Likewise.
6868 (add_lwp): Likewise.
6869 (enqueue_one_deferred_signal): Likewise.
6870 (enqueue_pending_signal): Likewise.
6871 (linux_resume_one_lwp_throw): Likewise.
6872 (linux_resume_one_thread): Likewise.
6873 (linux_read_memory): Likewise.
6874 (linux_write_memory): Likewise.
6875 * linux-mips-low.c (mips_linux_new_process): Likewise.
6876 (mips_linux_new_thread): Likewise.
6877 (mips_add_watchpoint): Likewise.
6878 * linux-x86-low.c (initialize_low_arch): Likewise.
6879 * lynx-low.c (lynx_add_process): Likewise.
6880 * mem-break.c (set_raw_breakpoint_at): Likewise.
6881 (set_breakpoint): Likewise.
6882 (add_condition_to_breakpoint): Likewise.
6883 (add_commands_to_breakpoint): Likewise.
6884 (clone_agent_expr): Likewise.
6885 (clone_one_breakpoint): Likewise.
6886 * regcache.c (new_register_cache): Likewise.
6887 * remote-utils.c (look_up_one_symbol): Likewise.
6888 * server.c (queue_stop_reply): Likewise.
6889 (start_inferior): Likewise.
6890 (queue_stop_reply_callback): Likewise.
6891 (handle_target_event): Likewise.
6892 * spu-low.c (fetch_ppc_memory): Likewise.
6893 (store_ppc_memory): Likewise.
6894 * target.c (set_target_ops): Likewise.
6895 * thread-db.c (thread_db_load_search): Likewise.
6896 (try_thread_db_load_1): Likewise.
6897 * tracepoint.c (add_tracepoint): Likewise.
6898 (add_tracepoint_action): Likewise.
6899 (create_trace_state_variable): Likewise.
6900 (cmd_qtdpsrc): Likewise.
6901 (cmd_qtro): Likewise.
6902 (add_while_stepping_state): Likewise.
6903 * win32-low.c (child_add_thread): Likewise.
6904 (get_image_name): Likewise.
6905
ed8b7b42
YQ
69062015-08-25 Yao Qi <yao.qi@linaro.org>
6907
6908 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6909
db3cb7cb
YQ
69102015-08-25 Yao Qi <yao.qi@linaro.org>
6911
6912 * Makefile.in (aarch64-linux.o): New rule.
6913 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6914 srv_tgtobj.
6915 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6916 (aarch64_init_debug_reg_state): Make it extern.
6917 (aarch64_linux_prepare_to_resume): Remove.
6918
f6011a1c
YQ
69192015-08-25 Yao Qi <yao.qi@linaro.org>
6920
6921 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6922 lwp_arch_private_info and ptid_of_lwp.
6923
88e2cf7e
YQ
69242015-08-25 Yao Qi <yao.qi@linaro.org>
6925
6926 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6927 Find proc_info by find_process_pid. All callers updated.
6928
5e35436e
YQ
69292015-08-25 Yao Qi <yao.qi@linaro.org>
6930
6931 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6932 Remove.
6933 (debug_reg_change_callback): Remove.
6934 (aarch64_notify_debug_reg_change): Remove.
6935
4a8a7965
YQ
69362015-08-25 Yao Qi <yao.qi@linaro.org>
6937
6938 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6939 Call current_lwp_ptid.
6940
32a271ee
YQ
69412015-08-25 Yao Qi <yao.qi@linaro.org>
6942
6943 * linux-aarch64-low.c (debug_reg_change_callback): Use
6944 debug_printf.
6945
0d51c8d7
YQ
69462015-08-25 Yao Qi <yao.qi@linaro.org>
6947
6948 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6949
31a43dd5
YQ
69502015-08-25 Yao Qi <yao.qi@linaro.org>
6951
6952 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6953
8ee52567
YQ
69542015-08-25 Yao Qi <yao.qi@linaro.org>
6955
6956 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6957 the code.
6958
ff3f0f45
YQ
69592015-08-25 Yao Qi <yao.qi@linaro.org>
6960
6961 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6962 Remove.
6963 (debug_reg_change_callback): Remove argument entry and add argument
6964 lwp. Remove local variable thread. Don't print thread id in the
6965 debugging output. Don't check whether pid of thread equals to pid.
6966 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6967 iterate_over_lwps instead find_inferior.
6968
3d40fbb5
PA
69692015-08-24 Pedro Alves <palves@redhat.com>
6970
6971 * inferiors.c (get_first_process): New function.
6972 * inferiors.h (get_first_process): New declaration.
6973 * remote-utils.c (read_ptid): Default to the first process in the
6974 list, instead of to the current thread's process.
6975
438e1e42
PA
69762015-08-24 Pedro Alves <palves@redhat.com>
6977
6978 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6979 * event-loop.c: Likewise.
6980 * remote-utils.c: Likewise.
6981 * tracepoint.c: Likewise.
6982
a8c6d4fc
PA
69832015-08-24 Pedro Alves <palves@redhat.com>
6984
6985 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6986 ptid_get_lwp.
6987
99b0bb12
PA
69882015-08-21 Pedro Alves <palves@redhat.com>
6989
6990 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6991 instead of literal 1.
6992
f8904751
PA
69932015-08-21 Pedro Alves <palves@redhat.com>
6994
6995 * tdesc.c (default_description): Explicitly zero-initialize.
6996
465a859e
PA
69972015-08-21 Pedro Alves <palves@redhat.com>
6998
6999 PR gdb/18749
7000 * inferiors.c (remove_thread): Discard any pending stop reply for
7001 this thread.
7002 * server.c (remove_all_on_match_pid): Rename to ...
7003 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7004 instead of a pid.
7005 (discard_queued_stop_replies): Change parameter to a ptid. Now
7006 extern.
7007 (handle_v_kill, kill_inferior_callback, captured_main)
7008 (process_serial_event): Adjust.
7009 * server.h (discard_queued_stop_replies): Declare.
7010
f0db101d
PA
70112015-08-21 Pedro Alves <palves@redhat.com>
7012
7013 * linux-low.c (wait_for_sigstop): Always switch to no thread
7014 selected if the previously current thread dies.
7015 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7016 process instead of the current thread's.
7017 * remote-utils.c (input_interrupt): Don't check if there's no
7018 current thread.
7019 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7020 current thread to the general thread fails, error out.
7021 (handle_qxfer_auxv, handle_qxfer_libraries)
7022 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7023 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7024 (handle_query): Check if there's a thread selected instead of
7025 checking whether there's any thread in the thread list.
7026 (handle_qxfer_threads, handle_qxfer_btrace)
7027 (handle_qxfer_btrace_conf): Don't error out early if there's no
7028 thread in the thread list.
7029 (handle_v_cont, myresume): Don't set the current thread to the
7030 continue thread.
7031 (process_serial_event) <Hg handling>: Also set thread_id if the
7032 previous general thread is still alive.
7033 (process_serial_event) <g/G handling>: If setting the current
7034 thread to the general thread fails, error out.
7035 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7036 thread's lwp instead of the current thread's.
7037 * target.c (set_desired_thread): If the desired thread was not
7038 found, leave the current thread pointing to NULL. Return an int
7039 (boolean) indicating success.
7040 * target.h (set_desired_thread): Change return type to int.
7041
40045d91
MF
70422015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7043
7044 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7045 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7046 #includes.
7047 (ps_get_thread_area): New function.
7048
45face3b
GB
70492015-08-19 Gary Benson <gbenson@redhat.com>
7050
7051 * hostio.c (handle_pread): Do not attempt to read more data
7052 than hostio_reply_with_data can fit in a packet.
7053
16d5f642
JB
70542015-08-18 Joel Brobecker <brobecker@adacore.com>
7055
7056 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7057
a738da3a
MF
70582015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7059
7060 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7061
33ebda9d
PA
70622015-08-06 Pedro Alves <palves@redhat.com>
7063
7064 * tracepoint.c (expr_eval_result): Now an int.
7065
a44892be
PA
70662015-08-06 Pedro Alves <palves@redhat.com>
7067
7068 * gdbthread.h (struct regcache): Forward declare.
7069 (struct thread_info) <regcache_data>: Now a struct regcache
7070 pointer.
7071 * inferiors.c (inferior_regcache_data)
7072 (set_inferior_regcache_data): Now work with struct regcache
7073 pointers.
7074 * inferiors.h (struct regcache): Forward declare.
7075 (inferior_regcache_data, set_inferior_regcache_data): Now work
7076 with struct regcache pointers.
7077 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7078 (free_register_cache_thread): Remove struct regcache pointer
7079 casts.
7080
608a1e46
PA
70812015-08-06 Pedro Alves <palves@redhat.com>
7082
7083 * server.c (captured_main): On error, print the exception message
7084 to stderr, and if run_once is set, throw a quit.
7085
f0ce0d3a
PA
70862015-08-06 Pedro Alves <palves@redhat.com>
7087
7088 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7089 the current thread.
7090
bf47e248
PA
70912015-08-06 Pedro Alves <palves@redhat.com>
7092
7093 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7094 reading beyond the passed in buffer length.
7095
b6b9ffcc
PL
70962015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7097
7098 * tracepoint.c (symbol_list) <required>: Remove.
7099
863d01bd
PA
71002015-08-06 Pedro Alves <palves@redhat.com>
7101
7102 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7103 count if stopping and suspending threads.
7104 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7105 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7106 (linux_detach): Complete an ongoing step-over.
7107 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7108 throughout.
7109 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7110 (linux_wait_1): If passing a signal to the inferior after
7111 finishing a step-over, unsuspend and re-resume all lwps. If we
7112 see a single-step event but the thread should be continuing, don't
7113 pass the trap to gdb.
7114 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7115 internal_error instead of gdb_assert.
7116 (enqueue_pending_signal): New function.
7117 (check_ptrace_stopped_lwp_gone): Add debug output.
7118 (start_step_over): Use internal_error instead of gdb_assert.
7119 (complete_ongoing_step_over): New function.
7120 (linux_resume_one_thread): Don't resume a suspended thread.
7121 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7122 it stepping.
7123
00db26fa
PA
71242015-08-06 Pedro Alves <palves@redhat.com>
7125
7126 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7127 (linux_thread_alive): Use lwp_is_marked_dead.
7128 (extended_event_reported): Delete.
7129 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7130 instead of extended_event_reported.
7131 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7132 as well.
7133 (lwp_is_marked_dead): New function.
7134 (lwp_running): Use lwp_is_marked_dead.
7135 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7136 comment.
7137
ad071a30
PA
71382015-08-06 Pedro Alves <palves@redhat.com>
7139
7140 * linux-low.c (linux_wait_1): Move fork event output out of the
7141 !report_to_gdb check. Pass event_child->waitstatus to
7142 target_waitstatus_to_string instead of ourstatus.
7143
524b57e6
YQ
71442015-08-04 Yao Qi <yao.qi@linaro.org>
7145
7146 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7147 if current_thread is 32 bit.
7148
6085d6f6
YQ
71492015-08-04 Yao Qi <yao.qi@linaro.org>
7150
7151 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7152 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7153 * server.c (extended_protocol): Remove "static".
7154 * server.h (extended_protocol): Declare it.
7155
8a7e4587
YQ
71562015-08-04 Yao Qi <yao.qi@linaro.org>
7157
7158 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7159 both aarch64 and aarch32.
7160 (aarch64_set_pc): Likewise.
7161
3b53ae99
YQ
71622015-08-04 Yao Qi <yao.qi@linaro.org>
7163
7164 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7165 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7166 arm-with-neon.xml to srv_xmlfiles.
7167 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7168 (is_64bit_tdesc): New function.
7169 (aarch64_linux_read_description): New function.
7170 (aarch64_arch_setup): Call aarch64_linux_read_description.
7171 (regs_info): Rename to regs_info_aarch64.
7172 (aarch64_regs_info): Return right regs_info.
7173 (initialize_low_arch): Call initialize_low_arch_aarch32.
7174
bd9e6534
YQ
71752015-08-04 Yao Qi <yao.qi@linaro.org>
7176
7177 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7178 * linux-aarch32-low.c: New file.
7179 * linux-aarch32-low.h: New file.
7180 * linux-arm-low.c (arm_fill_gregset): Move it to
7181 linux-aarch32-low.c.
7182 (arm_store_gregset): Likewise.
7183 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7184 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7185 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7186 (regs_info): Rename to regs_info_arm.
7187 (arm_regs_info): Return regs_info_aarch32 if
7188 have_ptrace_getregset is 1 and target description is
7189 arm_with_neon or arm_with_vfpv3.
7190 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7191 Call initialize_low_arch_aarch32 instead.
7192
ded48a5e
YQ
71932015-08-04 Yao Qi <yao.qi@linaro.org>
7194
7195 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7196 * linux-low.c: ... here.
7197 * linux-low.h (have_ptrace_getregset): Declare it.
7198
96e9210f
PA
71992015-08-04 Pedro Alves <palves@redhat.com>
7200
7201 * thread-db.c (struct thread_db): Use new typedefs.
7202 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7203 CHK calls.
7204 (disable_thread_event_reporting): Cast result of dlsym to
7205 destination function pointer type.
7206 (thread_db_mourn): Use td_ta_delete_ftype.
7207
af60a1ef
SL
72082015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7209
7210 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7211 arch variant.
7212 (CDX_BREAKPOINT): Define for R2.
7213 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7214 (the_low_target): Add comments.
7215
e8b41681
YQ
72162015-07-30 Yao Qi <yao.qi@linaro.org>
7217
7218 * linux-arm-low.c (arm_hwcap): Remove it.
7219 (arm_read_description): New local variable arm_hwcap. Don't
7220 set arm_hwcap to zero.
7221
89abb039
YQ
72222015-07-30 Yao Qi <yao.qi@linaro.org>
7223
7224 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7225 Use regcache->tdesc instead.
7226 (arm_store_wmmxregset): Likewise.
7227 (arm_fill_vfpregset): Likewise.
7228 (arm_store_vfpregset): Likewise.
7229
deca266c
YQ
72302015-07-30 Yao Qi <yao.qi@linaro.org>
7231
7232 * linux-arm-low.c: Include arch/arm.h.
7233 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7234 (arm_store_gregset): Likewise.
7235
aa58a496
SM
72362015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7237
7238 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7239 ptrace's 4th parameter.
7240
50904b25
YQ
72412015-07-27 Yao Qi <yao.qi@linaro.org>
7242
7243 * configure.srv (case aarch64*-*-linux*): Don't set
7244 srv_linux_usrregs.
7245
5826e159
PA
72462015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7247
7248 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7249 sys/ptrace.h.
7250 * linux-arm-low.c: Likewise.
7251 * linux-cris-low.c: Likewise.
7252 * linux-crisv32-low.c: Likewise.
7253 * linux-low.c: Likewise.
7254 * linux-m68k-low.c: Likewise.
7255 * linux-mips-low.c: Likewise.
7256 * linux-nios2-low.c: Likewise.
7257 * linux-s390-low.c: Likewise.
7258 * linux-sparc-low.c: Likewise.
7259 * linux-tic6x-low.c: Likewise.
7260 * linux-tile-low.c: Likewise.
7261 * linux-x86-low.c: Likewise.
7262
54019719
PA
72632015-07-24 Pedro Alves <palves@redhat.com>
7264
7265 * config.in: Regenerate.
7266 * configure: Regenerate.
7267
eb7aa561
PA
72682015-07-24 Pedro Alves <palves@redhat.com>
7269
7270 * acinclude.m4: Include ../ptrace.m4.
7271 * configure.ac: Call GDB_AC_PTRACE.
7272 * config.in, configure: Regenerate.
7273
55d7b841
YQ
72742015-07-24 Yao Qi <yao.qi@linaro.org>
7275
7276 * linux-low.c (linux_create_inferior): Remove setting to
7277 proc->priv->new_inferior.
7278 (linux_attach): Likewise.
7279 (linux_low_filter_event): Likewise.
7280 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7281
c06cbd92
YQ
72822015-07-24 Yao Qi <yao.qi@linaro.org>
7283
7284 * linux-low.c (linux_arch_setup): New function.
7285 (linux_low_filter_event): If proc->tdesc is NULL and
7286 proc->attached is true, call the_low_target.arch_setup.
7287 Otherwise, keep status pending, and return.
7288 (linux_resume_one_lwp_throw): Don't call get_pc if
7289 thread->while_stepping isn't NULL. Don't call
7290 get_thread_regcache if proc->tdesc is NULL.
7291 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7292 (linux_target_ops): Install arch_setup.
7293 * server.c (start_inferior): Call the_target->arch_setup.
7294 * target.h (struct target_ops) <arch_setup>: New field.
7295 (target_arch_setup): New marco.
7296 * lynx-low.c (lynx_target_ops): Update.
7297 * nto-low.c (nto_target_ops): Update.
7298 * spu-low.c (spu_target_ops): Update.
7299 * win32-low.c (win32_target_ops): Update.
7300
5ae3ebba
YQ
73012015-07-24 Yao Qi <yao.qi@linaro.org>
7302
7303 * linux-low.c (linux_add_process): Don't set
7304 proc->priv->new_inferior.
7305 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7306 (linux_attach): Likewise.
7307
eb97750b
YQ
73082015-07-24 Yao Qi <yao.qi@linaro.org>
7309
7310 * server.c (start_inferior): Code refactor.
7311
51aee833
YQ
73122015-07-24 Yao Qi <yao.qi@linaro.org>
7313
7314 * server.c (process_serial_event): Set general_thread.
7315
af1b22f3
YQ
73162015-07-21 Yao Qi <yao.qi@linaro.org>
7317
7318 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7319 aarch64_linux_get_debug_reg_capacity.
7320
554717a3
YQ
73212015-07-17 Yao Qi <yao.qi@linaro.org>
7322
7323 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7324 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7325 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7326 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7327 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7328 (AARCH64_HWP_ALIGNMENT): Likewise.
7329 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7330 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7331 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7332 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7333 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7334 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7335 (struct aarch64_debug_reg_state): Likewise.
7336 (struct arch_lwp_info): Likewise.
7337 (aarch64_align_watchpoint): Likewise.
7338 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7339 (aarch64_watchpoint_length): Likewise.
7340 (aarch64_point_encode_ctrl_reg): Likewise
7341 (aarch64_point_is_aligned): Likewise.
7342 (aarch64_align_watchpoint): Likewise.
7343 (aarch64_linux_set_debug_regs):
7344 (aarch64_dr_state_insert_one_point): Likewise.
7345 (aarch64_dr_state_remove_one_point): Likewise.
7346 (aarch64_handle_breakpoint): Likewise.
7347 (aarch64_handle_aligned_watchpoint): Likewise.
7348 (aarch64_handle_unaligned_watchpoint): Likewise.
7349 (aarch64_handle_watchpoint): Likewise.
7350
c67ca4de
YQ
73512015-07-17 Yao Qi <yao.qi@linaro.org>
7352
7353 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7354 and don't aarch64_get_debug_reg_state. All callers update.
7355 (aarch64_handle_aligned_watchpoint): Likewise.
7356 (aarch64_handle_unaligned_watchpoint): Likewise.
7357 (aarch64_handle_watchpoint): Likewise.
7358 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7359 (aarch64_remove_point): Likewise.
7360
25abf979
YQ
73612015-07-17 Yao Qi <yao.qi@linaro.org>
7362
7363 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7364 debug_printf.
7365 (aarch64_handle_unaligned_watchpoint): Likewise.
7366
db1ff28b
JK
73672015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7368
7369 Revert the previous 3 commits:
7370 Move gdb_regex* to common/
7371 Move linux_find_memory_regions_full & co.
7372 gdbserver build-id attribute generator
7373
700ca40f
JK
73742015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7375 Jan Kratochvil <jan.kratochvil@redhat.com>
7376
7377 gdbserver build-id attribute generator.
7378 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7379 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7380 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7381 (find_phdr): New.
7382 (get_dynamic): Use find_pdhr to traverse program headers.
7383 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7384 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7385 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7386 (get_hex_build_id): New.
7387 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7388 to reply XML document.
7389
9904185c
JK
73902015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7391 Jan Kratochvil <jan.kratochvil@redhat.com>
7392
7393 * target.c: Include target/target-utils.h and fcntl.h.
7394 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7395 (target_fileio_read_stralloc): New functions.
7396
6e5b4429
JK
73972015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7398
7399 * Makefile.in (OBS): Add gdb_regex.o.
7400 (gdb_regex.o): New.
7401 * config.in: Rebuilt.
7402 * configure: Rebuilt.
7403
ddc98fbf
JK
74042015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7405 Jan Kratochvil <jan.kratochvil@redhat.com>
7406
7407 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7408 * Makefile.in (OBS): Add target-utils.o.
7409 (linux-maps.o, target-utils.o): New.
7410 * configure.srv (srv_linux_obj): Add linux-maps.o.
7411
e57bb7a0
PL
74122015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7413
7414 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7415 function, return 1.
7416 (the_low_target): Install it.
7417
586b02a9
PA
74182015-07-14 Pedro Alves <palves@redhat.com>
7419
7420 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7421 Instead, ignore ECHILD, and throw an error for other errnos.
7422
58c1b36c
PA
74232015-07-10 Pedro Alves <palves@redhat.com>
7424
7425 * event-loop.c (struct callback_event) <data>: Change type to
7426 gdb_client_data instance instead of gdb_client_data pointer.
7427 (append_callback_event): Adjust.
7428
421530db
PL
74292015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7430
7431 * linux-aarch64-low.c: Add comments for each linux_target_ops
7432 method. Remove comments already covered in target_ops and
7433 linux_target_ops definitions.
7434 (the_low_target): Add comments for each unimplemented method.
7435
c2d65f38
YQ
74362015-07-09 Yao Qi <yao.qi@linaro.org>
7437
7438 * linux-aarch64-low.c (aarch64_regmap): Remove.
7439 (aarch64_usrregs_info): Remove.
7440 (regs_info): Set field usrregs to NULL.
7441
b20a6524
MM
74422015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7443
7444 * linux-low.c: Include "rsp-low.h"
7445 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7446 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7447 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7448 (handle_btrace_enable_pt): New.
7449 (handle_btrace_general_set): Support "pt".
7450 (handle_btrace_conf_general_set): Support "pt:size".
7451
96c97461
PL
74522015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7453
7454 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7455 Z_PACKET_SW_BP.
7456
37d66942
PL
74572015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7458
7459 * linux-aarch64-low.c: Remove comment about endianness.
7460 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7461 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7462 memcmp.
7463
dc06243f
GB
74642015-06-24 Gary Benson <gbenson@redhat.com>
7465
7466 * linux-i386-ipa.c (stdint.h): Do not include.
7467 * lynx-i386-low.c (stdint.h): Likewise.
7468 * lynx-ppc-low.c (stdint.h): Likewise.
7469 * mem-break.c (stdint.h): Likewise.
7470 * thread-db.c (stdint.h): Likewise.
7471 * tracepoint.c (stdint.h): Likewise.
7472 * win32-low.c (stdint.h): Likewise.
7473
124e13d9
SM
74742015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7475
7476 * server.c (write_qxfer_response): Update call to
7477 remote_escape_output.
7478
909c2cda
JK
74792015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7480 Jan Kratochvil <jan.kratochvil@redhat.com>
7481
7482 Merge multiple hex conversions.
7483 * gdbreplay.c (tohex): Rename to 'fromhex'.
7484 (logchar): Use fromhex.
7485
24c05f46
JK
74862015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7487
7488 * server.c (handle_qxfer_libraries): Set `version' attribute for
7489 <library-list>.
7490
14d2069a
GB
74912015-06-10 Gary Benson <gbenson@redhat.com>
7492
7493 * target.h (struct target_ops) <multifs_open>: New field.
7494 <multifs_unlink>: Likewise.
7495 <multifs_readlink>: Likewise.
7496 * linux-low.c (nat/linux-namespaces.h): New include.
7497 (linux_target_ops): Initialize the_target->multifs_open,
7498 the_target->multifs_unlink and the_target->multifs_readlink.
7499 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7500 * hostio.c (hostio_fs_pid): New static variable.
7501 (hostio_handle_new_gdb_connection): New function.
7502 (handle_setfs): Likewise.
7503 (handle_open): Use the_target->multifs_open as appropriate.
7504 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7505 (handle_readlink): Use the_target->multifs_readlink as
7506 appropriate.
7507 (handle_vFile): Handle vFile:setfs packets.
7508 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7509 after target_handle_new_gdb_connection.
7510
4b8b5e72
GB
75112015-06-10 Gary Benson <gbenson@redhat.com>
7512
7513 * configure.ac (AC_CHECK_FUNCS): Add setns.
7514 * config.in: Regenerate.
7515 * configure: Likewise.
7516 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7517 (linux-namespaces.o): New rule.
7518 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7519
3ac2e371
GB
75202015-06-09 Gary Benson <gbenson@redhat.com>
7521
7522 * hostio.c (handle_open): Process mode argument with
7523 fileio_to_host_mode.
7524
ca9b78ce
YQ
75252015-06-01 Yao Qi <yao.qi@linaro.org>
7526
7527 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7528 * linux-x86-low.c: Likewise.
7529
bfacd19d
DB
75302015-05-28 Don Breazeal <donb@codesourcery.com>
7531
7532 * linux-low.c (handle_extended_wait): Initialize
7533 thread_info.last_resume_kind for new fork children.
7534
452003ef
PA
75352015-05-15 Pedro Alves <palves@redhat.com>
7536
7537 * target.h (target_handle_new_gdb_connection): Rewrite using if
7538 wrapped in do/while.
7539
1041a03c
JB
75402015-05-14 Joel Brobecker <brobecker@adacore.com>
7541
7542 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7543 * configure, config.in: Regenerate.
7544 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7545 Declare typedef.
7546
c269dbdb
DB
75472015-05-12 Don Breazeal <donb@codesourcery.com>
7548
7549 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7550 PTRACE_EVENT_VFORK_DONE.
7551 (linux_low_ptrace_options, extended_event_reported): Add vfork
7552 events.
7553 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7554 and "vforkdone" for RSP 'T' Stop Reply Packet.
7555 * server.h (report_vfork_events): Declare
7556 global variable.
7557
3a8a0396
DB
75582015-05-12 Don Breazeal <donb@codesourcery.com>
7559
7560 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7561 (the_low_target) <new_fork>: Initialize new member.
7562 * linux-arm-low.c (arm_new_fork): New function.
7563 (the_low_target) <new_fork>: Initialize new member.
7564 * linux-low.c (handle_extended_wait): Call new target function
7565 new_fork.
7566 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7567 * linux-mips-low.c (mips_add_watchpoint): New function
7568 extracted from mips_insert_point.
7569 (the_low_target) <new_fork>: Initialize new member.
7570 (mips_linux_new_fork): New function.
7571 (mips_insert_point): Call mips_add_watchpoint.
7572 * linux-x86-low.c (x86_linux_new_fork): New function.
7573 (the_low_target) <new_fork>: Initialize new member.
7574
de0d863e
DB
75752015-05-12 Don Breazeal <donb@codesourcery.com>
7576
7577 * linux-low.c (handle_extended_wait): Implement return value,
7578 rename argument 'event_child' to 'event_lwp', handle
7579 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7580 (linux_low_ptrace_options): New function.
7581 (linux_low_filter_event): Call linux_low_ptrace_options,
7582 use different argument fo linux_enable_event_reporting,
7583 use return value from handle_extended_wait.
7584 (extended_event_reported): New function.
7585 (linux_wait_1): Call extended_event_reported and set
7586 status to report fork events.
7587 (linux_write_memory): Add pid to debug message.
7588 (reset_lwp_ptrace_options_callback): New function.
7589 (linux_handle_new_gdb_connection): New function.
7590 (linux_target_ops): Initialize new structure member.
7591 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7592 * lynx-low.c: Initialize new structure member.
7593 * remote-utils.c (prepare_resume_reply): Implement stop reason
7594 "fork" for "T" stop message.
7595 * server.c (handle_query): Call handle_new_gdb_connection.
7596 * server.h (report_fork_events): Declare global flag.
7597 * target.h (struct target_ops) <handle_new_gdb_connection>:
7598 New member.
7599 (target_handle_new_gdb_connection): New macro.
7600 * win32-low.c: Initialize new structure member.
7601
ddcbc397
DB
76022015-05-12 Don Breazeal <donb@codesourcery.com>
7603
7604 * mem-break.c (APPEND_TO_LIST): Define macro.
7605 (clone_agent_expr): New function.
7606 (clone_one_breakpoint): New function.
7607 (clone_all_breakpoints): New function.
7608 * mem-break.h: Declare new functions.
7609
89245bc0
DB
76102015-05-12 Don Breazeal <donb@codesourcery.com>
7611
7612 * linux-low.c (linux_supports_fork_events): New function.
7613 (linux_supports_vfork_events): New function.
7614 (linux_target_ops): Initialize new structure members.
7615 (initialize_low): Call linux_check_ptrace_features.
7616 * lynx-low.c (lynx_target_ops): Initialize new structure
7617 members.
7618 * server.c (report_fork_events, report_vfork_events):
7619 New global flags.
7620 (handle_query): Add new features to qSupported packet and
7621 response.
7622 (captured_main): Initialize new global variables.
7623 * target.h (struct target_ops) <supports_fork_events>:
7624 New member.
7625 <supports_vfork_events>: New member.
7626 (target_supports_fork_events): New macro.
7627 (target_supports_vfork_events): New macro.
7628 * win32-low.c (win32_target_ops): Initialize new structure
7629 members.
7630
835205d0
GB
76312015-05-12 Gary Benson <gbenson@redhat.com>
7632
7633 * server.c (handle_qxfer_exec_file): Use current process
7634 if annex is empty.
7635
21e94bd9
SL
76362015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7637
7638 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7639 Remove HAVE_PTRACE_GETREGS conditionals.
7640 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7641 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7642
45614f15
YQ
76432015-05-08 Yao Qi <yao.qi@linaro.org>
7644
7645 * linux-low.c (linux_supports_conditional_breakpoints): New
7646 function.
7647 (linux_target_ops): Install new target method.
7648 * lynx-low.c (lynx_target_ops): Install NULL hook for
7649 supports_conditional_breakpoints.
7650 * nto-low.c (nto_target_ops): Likewise.
7651 * spu-low.c (spu_target_ops): Likewise.
7652 * win32-low.c (win32_target_ops): Likewise.
7653 * server.c (handle_query): Check
7654 target_supports_conditional_breakpoints.
7655 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7656 New field.
7657 (target_supports_conditional_breakpoints): New macro.
7658
80ad801e
PA
76592015-05-06 Pedro Alves <palves@redhat.com>
7660
7661 PR server/18081
7662 * server.c (start_inferior): If the process exits, mourn it.
7663
819843c7
GB
76642015-04-21 Gary Benson <gbenson@redhat.com>
7665
7666 * hostio.c (fileio_open_flags_to_host): Factored out to
7667 fileio_to_host_openflags in common/fileio.c. Single use
7668 updated.
7669
a2d5a9d7
MF
76702015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7671
7672 * linux-xtensa-low.c (xtensa_fill_gregset)
7673 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7674 XCHAL_HAVE_LOOP.
7675
deb44829
MF
76762015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7677
7678 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7679 (regs_info): Replace usrregs pointer with NULL.
7680
e57f1de3
GB
76812015-04-17 Gary Benson <gbenson@redhat.com>
7682
7683 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7684 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7685 * server.c (handle_qxfer_exec_file): New function.
7686 (qxfer_packets): Add exec-file entry.
7687 (handle_query): Report qXfer:exec-file:read as supported packet.
7688
62828379
RN
76892015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7690
7691 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7692
b88bb450
GB
76932015-04-09 Gary Benson <gbenson@redhat.com>
7694
7695 * hostio-errno.c (errno_to_fileio_error): Remove function.
7696 Update caller to use remote_fileio_to_fio_error.
7697
c8f4bfdd
YQ
76982015-04-09 Yao Qi <yao.qi@linaro.org>
7699
7700 * linux-low.c (linux_insert_point): Call
7701 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7702 (linux_remove_point): Call remove_memory_breakpoint if type is
7703 raw_bkpt_type_sw.
7704 * linux-x86-low.c (x86_insert_point): Don't call
7705 insert_memory_breakpoint.
7706 (x86_remove_point): Don't call remove_memory_breakpoint.
7707
41f98f02
PA
77082015-04-01 Pedro Alves <palves@redhat.com>
7709 Cleber Rosa <crosa@redhat.com>
7710
7711 * server.c (gdbserver_usage): Reorganize and extend the usage
7712 message.
7713
2bf6fb9d
PA
77142015-03-24 Pedro Alves <palves@redhat.com>
7715
7716 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7717 output. Also dump TRAP_TRACE.
7718 (linux_low_filter_event): In debug output, distinguish a
7719 resume_stop SIGSTOP from a delayed SIGSTOP.
7720
369f6daa
GB
77212015-03-24 Gary Benson <gbenson@redhat.com>
7722
7723 * linux-x86-low.c (x86_linux_new_thread): Moved to
7724 nat/x86-linux.c.
7725 (x86_linux_prepare_to_resume): Likewise.
7726
8e5d4070
GB
77272015-03-24 Gary Benson <gbenson@redhat.com>
7728
7729 * Makefile.in (x86-linux-dregs.o): New rule.
7730 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7731 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7732 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7733 (x86_linux_dr_get): Likewise.
7734 (x86_linux_dr_set): Likewise.
7735 (update_debug_registers_callback): Likewise.
7736 (x86_linux_dr_set_addr): Likewise.
7737 (x86_linux_dr_get_addr): Likewise.
7738 (x86_linux_dr_set_control): Likewise.
7739 (x86_linux_dr_get_control): Likewise.
7740 (x86_linux_dr_get_status): Likewise.
7741 (x86_linux_update_debug_registers): Likewise.
7742
2b95d440
GB
77432015-03-24 Gary Benson <gbenson@redhat.com>
7744
7745 * linux-x86-low.c (x86_linux_update_debug_registers):
7746 New function, factored out from...
7747 (x86_linux_prepare_to_resume): ...this.
7748
14b0bc68
GB
77492015-03-24 Gary Benson <gbenson@redhat.com>
7750
7751 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7752 (x86_linux_dr_set): Likewise.
7753 (update_debug_registers_callback): Likewise.
7754 (x86_linux_dr_set_addr): Likewise.
7755 (x86_linux_dr_get_addr): Likewise.
7756 (x86_linux_dr_set_control): Likewise.
7757 (x86_linux_dr_get_control): Likewise.
7758 (x86_linux_dr_get_status): Likewise.
7759 (x86_linux_prepare_to_resume): Likewise.
7760
5dfe6ca8
GB
77612015-03-24 Gary Benson <gbenson@redhat.com>
7762
7763 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7764 Use perror_with_name. Pass string through gettext.
7765 (x86_linux_dr_set): Likewise.
7766
d33472ad
GB
77672015-03-24 Gary Benson <gbenson@redhat.com>
7768
7769 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7770 (x86_linux_dr_set_addr): ...this.
7771 (x86_dr_low_get_addr): Rename to...
7772 (x86_linux_dr_get_addr): ...this.
7773 (x86_dr_low_set_control): Rename to...
7774 (x86_linux_dr_set_control): ...this.
7775 (x86_dr_low_get_control): Rename to...
7776 (x86_linux_dr_get_control): ...this.
7777 (x86_dr_low_get_status): Rename to...
7778 (x86_linux_dr_get_status): ...this.
7779 (x86_dr_low): Update with new function names.
7780
4b134ca1
GB
77812015-03-24 Gary Benson <gbenson@redhat.com>
7782
7783 * Makefile.in (x86-linux.o): New rule.
7784 * configure.srv: Add x86-linux.o to relevant targets.
7785 * linux-low.c (lwp_set_arch_private_info): New function.
7786 (lwp_arch_private_info): Likewise.
7787 * linux-x86-low.c: Include nat/x86-linux.h.
7788 (arch_lwp_info): Removed structure.
7789 (update_debug_registers_callback):
7790 Use lwp_set_debug_registers_changed.
7791 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7792 and lwp_set_debug_registers_changed.
7793 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7794
34c703da
GB
77952015-03-24 Gary Benson <gbenson@redhat.com>
7796
7797 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7798 * linux-arm-low.c (arm_new_thread): Likewise.
7799 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7800 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7801 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7802 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7803
cff068da
GB
78042015-03-24 Gary Benson <gbenson@redhat.com>
7805
7806 * linux-low.c (ptid_of_lwp): New function.
7807 (lwp_is_stopped): Likewise.
7808 (lwp_stop_reason): Likewise.
7809 * linux-x86-low.c (update_debug_registers_callback):
7810 Use lwp_is_stopped.
7811 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7812 lwp_stop_reason.
7813
b2f7c7e8
GB
78142015-03-24 Gary Benson <gbenson@redhat.com>
7815
7816 * linux-low.h (linux_stop_lwp): Remove declaration.
7817
6d4ee8c6
GB
78182015-03-24 Gary Benson <gbenson@redhat.com>
7819
7820 * linux-low.h: Include nat/linux-nat.h.
7821 * linux-low.c (iterate_over_lwps_args): New structure.
7822 (iterate_over_lwps_filter): New function.
7823 (iterate_over_lwps): Likewise.
7824 * linux-x86-low.c (update_debug_registers_callback):
7825 Update signature to what iterate_over_lwps expects.
7826 Remove PID check that iterate_over_lwps now performs.
7827 (x86_dr_low_set_addr): Use iterate_over_lwps.
7828 (x86_dr_low_set_control): Likewise.
7829
70a0bb6b
GB
78302015-03-24 Gary Benson <gbenson@redhat.com>
7831
7832 * linux-x86-low.c (x86_debug_reg_state): New function.
7833 (x86_linux_prepare_to_resume): Use the above.
7834
7b669087
GB
78352015-03-24 Gary Benson <gbenson@redhat.com>
7836
7837 * linux-low.c (current_lwp_ptid): New function.
7838 * linux-x86-low.c: Include nat/linux-nat.h.
7839 (x86_dr_low_get_addr): Use current_lwp_ptid.
7840 (x86_dr_low_get_control): Likewise.
7841 (x86_dr_low_get_status): Likewise.
7842
eef49a3d
PA
78432015-03-20 Pedro Alves <palves@redhat.com>
7844
7845 * tracepoint.c (cmd_qtstatus): Make "str" const.
7846
b2333d22
PA
78472015-03-20 Pedro Alves <palves@redhat.com>
7848
7849 * server.c (handle_general_set): Make "req_str" const.
7850
23f238d3
PA
78512015-03-19 Pedro Alves <palves@redhat.com>
7852
7853 * linux-low.c (linux_resume_one_lwp): Rename to ...
7854 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7855 instead call perror_with_name.
7856 (check_ptrace_stopped_lwp_gone): New function.
7857 (linux_resume_one_lwp): Reimplement as wrapper around
7858 linux_resume_one_lwp_throw that swallows errors if the LWP is
7859 gone.
7860
91baf43f
PA
78612015-03-19 Pedro Alves <palves@redhat.com>
7862
7863 * linux-low.c (count_events_callback, select_event_lwp_callback):
7864 No longer check whether the thread has resume_stop as last resume
7865 kind.
7866
8bf3b159
PA
78672015-03-19 Pedro Alves <palves@redhat.com>
7868
7869 * linux-low.c (count_events_callback, select_event_lwp_callback):
7870 Use the lwp's status_pending_p field, not the thread's.
7871
b90fc188
PA
78722015-03-19 Pedro Alves <palves@redhat.com>
7873
7874 * linux-low.c (select_event_lwp_callback): Update comments to
7875 no longer mention SIGTRAP.
7876
464b0089
GB
78772015-03-18 Gary Benson <gbenson@redhat.com>
7878
7879 * server.c (handle_query): Do not report vFile:fstat as supported.
7880
aa9e327f
GB
78812015-03-11 Gary Benson <gbenson@redhat.com>
7882
7883 * hostio.c (sys/types.h): New include.
7884 (sys/stat.h): Likewise.
7885 (common-remote-fileio.h): Likewise.
7886 (handle_fstat): New function.
7887 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7888
791c0056
GB
78892015-03-11 Gary Benson <gbenson@redhat.com>
7890
7891 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7892 struct stat.st_blocks and struct stat.st_blksize.
7893 * configure: Regenerate.
7894 * config.in: Likewise.
7895 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7896 (OBS): Add common-remote-fileio.o.
7897 (common-remote-fileio.o): New rule.
7898
9a9df970
PA
78992015-03-09 Pedro Alves <palves@redhat.com>
7900
7901 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7902 'struct sockaddr' pointer in 'accept' call.
7903
9eb1356e
PA
79042015-03-09 Pedro Alves <palves@redhat.com>
7905
7906 Revert:
7907 2015-03-07 Pedro Alves <palves@redhat.com>
7908 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7909 or <winsock2.h> here. Instead include "gdb_socket.h".
7910 (remote_open): Use union gdb_sockaddr_u.
7911 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7912 or <winsock2.h> here. Instead include "gdb_socket.h".
7913 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7914 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7915 or <sys/un.h>.
7916 (init_named_socket, gdb_agent_helper_thread): Use union
7917 gdb_sockaddr_u.
7918
aac331e4
PA
79192015-03-07 Pedro Alves <palves@redhat.com>
7920
7921 * configure.ac (build_warnings): Move
7922 -Wdeclaration-after-statement to the C-specific set.
7923 * configure: Regenerate.
7924
366c75fc
PA
79252015-03-07 Pedro Alves <palves@redhat.com>
7926
7927 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7928 or <winsock2.h> here. Instead include "gdb_socket.h".
7929 (remote_open): Use union gdb_sockaddr_u.
7930 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7931 or <winsock2.h> here. Instead include "gdb_socket.h".
7932 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7933 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7934 or <sys/un.h>.
7935 (init_named_socket, gdb_agent_helper_thread): Use union
7936 gdb_sockaddr_u.
7937
492d29ea
PA
79382015-03-07 Pedro Alves <palves@redhat.com>
7939
7940 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7941 instead.
7942
60a191ed
YQ
79432015-03-06 Yao Qi <yao.qi@linaro.org>
7944
7945 * linux-aarch64-low.c (aarch64_insert_point): Use
7946 show_debug_regs as a boolean.
7947 (aarch64_remove_point): Likewise.
7948
f5771b1d
PA
79492015-03-05 Pedro Alves <palves@redhat.com>
7950
7951 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7952 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7953 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7954 * nto-low.c (nto_target_ops): Likewise.
7955 * spu-low.c (spu_target_ops): Likewise.
7956 * win32-low.c (win32_target_ops): Likewise.
7957
3e572f71
PA
79582015-03-04 Pedro Alves <palves@redhat.com>
7959
72f4393d 7960 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7961 Decide whether a breakpoint triggered based on the SIGTRAP's
7962 siginfo.si_code.
72f4393d
L
7963 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7964 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7965 (linux_low_filter_event): Check for breakpoints before checking
7966 watchpoints.
7967 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7968 siginfo.si_code.
72f4393d
L
7969 (linux_stopped_by_sw_breakpoint)
7970 (linux_supports_stopped_by_sw_breakpoint)
7971 (linux_stopped_by_hw_breakpoint)
7972 (linux_supports_stopped_by_hw_breakpoint): New functions.
7973 (linux_target_ops): Install new target methods.
3e572f71 7974
1ec68e26
PA
79752015-03-04 Pedro Alves <palves@redhat.com>
7976
7977 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7978 * server.c (swbreak_feature, hwbreak_feature): New globals.
7979 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7980 (captured_main): Clear swbreak_feature and hwbreak_feature.
7981 * server.h (swbreak_feature, hwbreak_feature): Declare.
7982 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7983 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7984 supports_stopped_by_hw_breakpoint>: New fields.
7985 (target_supports_stopped_by_sw_breakpoint)
7986 (target_stopped_by_sw_breakpoint)
7987 (target_supports_stopped_by_hw_breakpoint)
7988 (target_stopped_by_hw_breakpoint): Declare.
7989
15c66dd6
PA
79902015-03-04 Pedro Alves <palves@redhat.com>
7991
7992 enum lwp_stop_reason -> enum target_stop_reason
7993 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7994 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7995 (linux_wait_1, stuck_in_jump_pad_callback)
7996 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7997 (linux_stopped_by_watchpoint):
7998 * linux-low.h (enum lwp_stop_reason): Delete.
7999 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8000 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8001
98fc70d6
YQ
80022015-03-04 Yao Qi <yao.qi@linaro.org>
8003
8004 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8005
dd2ac174
GB
80062015-03-03 Gary Benson <gbenson@redhat.com>
8007
8008 * hostio.c (handle_vFile): Fix prefix lengths.
8009
d68e53f4
MM
80102015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8011
8012 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8013 ptr_bits.
8014
bf2d68ab
AA
80152015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8016
8017 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8018 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8019 (clean): Add "rm -f" for above C files.
8020 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8021 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8022 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8023 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8024 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8025 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8026 (init_registers_s390x_vx_linux64)
8027 (init_registers_s390x_tevx_linux64)
8028 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8029 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8030 declarations.
8031 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8032 (s390_store_vxrs_high): New functions.
8033 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8034 NT_S390_VXRS_HIGH.
8035 (s390_arch_setup): Add logic for selecting one of the new target
8036 descriptions. Activate the new vector regsets if applicable.
8037 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8038 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8039 and init_registers_s390x_tevx_linux64.
8040
c966a859
PA
80412015-03-01 Pedro Alves <palves@redhat.com>
8042
8043 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8044 parameter.
8045
4180215b
PA
80462015-02-27 Pedro Alves <palves@redhat.com>
8047
8048 * linux-x86-low.c (u_debugreg_offset): New function.
8049 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8050
749bab01
PA
80512015-02-27 Pedro Alves <palves@redhat.com>
8052
8053 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8054 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8055 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8056 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8057 (ps_lsetfpregs, ps_getpid)
8058 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8059 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8060 (ps_lsetxregs, ps_plog): Declare.
8061
3c14e5a3
PA
80622015-02-27 Pedro Alves <palves@redhat.com>
8063
8064 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8065 IP_AGENT_EXPORT_FUNC.
8066 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8067 IP_AGENT_EXPORT_FUNC.
8068 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8069 (IP_AGENT_EXPORT): Delete.
8070 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8071 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8072 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8073 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8074 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8075 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8076 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8077 (traceframe_read_count, traceframe_write_count)
8078 (traceframes_created, trace_state_variables, get_raw_reg)
8079 (get_trace_state_variable_value, set_trace_state_variable_value)
8080 (ust_loaded, helper_thread_id, cmd_buf): Use
8081 IPA_SYM_EXPORTED_NAME.
8082 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8083 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8084 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8085 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8086 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8087 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8088 EXTERN_C_PUSH/EXTERN_C_POP.
8089 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8090 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8091 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8092 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8093 (traceframe_write_count, traceframe_read_count)
8094 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8095 (about_to_request_buffer_space, get_trace_state_variable_value)
8096 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8097 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8098 EXTERN_C_PUSH/EXTERN_C_POP.
8099 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8100 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8101 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8102 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8103 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8104 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8105 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8106 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8107 Define.
8108 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8109 (IP_AGENT_EXPORT_VAR_DECL): Define.
8110 (tracing): Declare.
8111 (gdb_agent_get_raw_reg): Declare.
8112
fe978cb0
PA
81132015-02-27 Tom Tromey <tromey@redhat.com>
8114 Pedro Alves <palves@redhat.com>
8115
8116 Rename symbols whose names are reserved C++ keywords throughout.
8117
3bc3d82a
PA
81182015-02-27 Pedro Alves <palves@redhat.com>
8119
8120 * Makefile.in (COMPILER): New, get it from autoconf.
8121 (CXX): Get from autoconf instead.
8122 (COMPILE.pre): Use COMPILER.
8123 (CC-LD): Rename to ...
8124 (CC_LD): ... this. Use COMPILER.
8125 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8126 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8127 * acinclude.m4: Include build-with-cxx.m4.
8128 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8129 Disable -Werror by default if building in C++ mode.
8130 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8131 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8132 the C++ compiler. Save/restore CXXFLAGS too.
8133 * configure: Regenerate.
8134
07697489
PA
81352015-02-27 Pedro Alves <palves@redhat.com>
8136
8137 * acinclude.m4: Include libiberty.m4.
8138 * configure.ac: Call libiberty_INIT.
8139 * config.in, configure: Regenerate.
8140
9beb7c4e
PA
81412015-02-26 Pedro Alves <palves@redhat.com>
8142
8143 * linux-low.c (linux_wait_1): When incrementing the PC past a
8144 program breakpoint always use the_low_target.breakpoint_len as
8145 increment, rather than the maximum between that and
8146 the_low_target.decr_pc_after_break.
8147
8090aef2
PA
81482015-02-23 Pedro Alves <palves@redhat.com>
8149
8150 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8151 thread was doing a step-over; always adjust the PC if
8152 we stepped over a permanent breakpoint.
8153 (linux_wait_1): If we stepped over breakpoint that was on top of a
8154 permanent breakpoint, manually advance the PC past it.
8155
bc9540e8
PA
81562015-02-23 Pedro Alves <palves@redhat.com>
8157
8158 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8159 modes.
8160 (x86_fill_gregset, x86_store_gregset): Use it when handling
8161 $orig_eax.
8162
2db9a427
PA
81632015-02-20 Pedro Alves <palves@redhat.com>
8164
8165 * thread-db.c: Include "nat/linux-procfs.h".
8166 (thread_db_init): Skip listing new threads if the kernel supports
8167 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8168
afa8d396
PA
81692015-02-20 Pedro Alves <palves@redhat.com>
8170
8171 * linux-low.c (status_pending_p_callback): Use ptid_match.
8172
c9587f88
AT
81732015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8174
8175 PR breakpoints/16812
8176 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8177 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8178 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8179
b05ec7a5
AT
81802015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8181
8182 PR breakpoints/15956
8183 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8184
d33501a5
MM
81852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8186
8187 * linux-low.c (linux_low_btrace_conf): Print size.
8188 * server.c (handle_btrace_conf_general_set): New.
8189 (hanle_general_set): Call handle_btrace_conf_general_set.
8190 (handle_query): Report Qbtrace-conf:bts:size as supported.
8191
f4abbc16
MM
81922015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8193
8194 * linux-low.c (linux_low_enable_btrace): Update parameters.
8195 (linux_low_btrace_conf): New.
8196 (linux_target_ops)<to_btrace_conf>: Initialize.
8197 * server.c (current_btrace_conf): New.
8198 (handle_btrace_enable): Rename to ...
8199 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8200 to target_enable_btrace. Update comment. Update users.
8201 (handle_qxfer_btrace_conf): New.
8202 (qxfer_packets): Add btrace-conf entry.
8203 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8204 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8205 (target_ops)<read_btrace_conf>: New.
8206 (target_enable_btrace): Update parameters.
8207 (target_read_btrace_conf): New.
8208
043c3577
MM
82092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8210
8211 * server.c (handle_btrace_general_set): Remove call to
8212 target_supports_btrace.
8213 (supported_btrace_packets): New.
8214 (handle_query): Call supported_btrace_packets.
8215 * target.h: include btrace-common.h.
8216 (btrace_target_info): Removed.
8217 (supports_btrace, target_supports_btrace): Update parameters.
8218
734b0e4b
MM
82192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8220
8221 * Makefile.in (SFILES): Add common/btrace-common.c.
8222 (OBS): Add common/btrace-common.o.
8223 (btrace-common.o): Add build rules.
8224 * linux-low: Include btrace-common.h.
8225 (linux_low_read_btrace): Use struct btrace_data. Call
8226 btrace_data_init and btrace_data_fini.
8227
d6c146e9
PA
82282015-02-06 Pedro Alves <palves@redhat.com>
8229
8230 * thread-db.c (find_new_threads_callback): Add debug output.
8231
20ba1ce6
PA
82322015-02-04 Pedro Alves <palves@redhat.com>
8233
8234 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8235 (resume_stopped_resumed_lwps): New function.
8236 (linux_wait_for_event_filtered): Use it.
8237
8cc73a39
SDJ
82382015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8239
8240 * Makefile.in (SFILES): Add linux-personality.c.
8241 (linux-personality.o): New rule.
8242 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8243 list of objects to be built.
8244 * linux-low.c: Include nat/linux-personality.h.
8245 (linux_create_inferior): Remove code to disable address space
8246 randomization (moved to ../nat/linux-personality.c). Create
8247 cleanup to disable address space randomization.
8248
fb23d554
SDJ
82492015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8250
8251 * Makefile.in (posix-strerror.o): New rule.
8252 (mingw-strerror.o): Likewise.
8253 * configure: Regenerated.
8254 * configure.ac: Source file ../common/common.host. Initialize new
8255 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8256
cdf43629
YQ
82572015-01-14 Yao Qi <yao@codesourcery.com>
8258
8259 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8260 (ppc-linux.o): New rule.
8261 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8262 * configure.ac: AC_CHECK_FUNCS(getauxval).
8263 * config.in: Re-generated.
8264 * configure: Re-generated.
8265 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8266 ppc64_64bit_inferior_p
8267
514c5338
YQ
82682015-01-14 Yao Qi <yao@codesourcery.com>
8269
8270 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8271 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8272 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8273 (PT_ORIG_R3, PT_TRAP): Likewise.
8274 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8275 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8276 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8277
3368c1e5
JB
82782015-01-10 Joel Brobecker <brobecker@adacore.com>
8279
8280 * i387-fp.c (i387_cache_to_xsave): In look over
8281 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8282 zmmh_low_space field by use of zmmh_high_space.
8283
582511be
PA
82842015-01-09 Pedro Alves <palves@redhat.com>
8285
8286 * linux-low.c (step_over_bkpt): Move higher up in the file.
8287 (handle_extended_wait): Don't store the stop_pc here.
8288 (get_stop_pc): Adjust comments and rename to ...
8289 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8290 stopped for a software breakpoint or hardware breakpoint.
8291 (thread_still_has_status_pending_p): New function.
8292 (status_pending_p_callback): Use
8293 thread_still_has_status_pending_p. If the event is no longer
8294 interesting, resume the LWP.
8295 (handle_tracepoints): Add assert.
8296 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8297 (wstatus_maybe_breakpoint): New function.
8298 (cancel_breakpoint): Delete function.
8299 (check_stopped_by_watchpoint): New function, factored out from
8300 linux_low_filter_event.
8301 (lp_status_maybe_breakpoint): Delete function.
8302 (linux_low_filter_event): Remove filter_ptid argument.
8303 Leave thread group exits pending here. Store the LWP's stop PC.
8304 Always leave events pending.
8305 (linux_wait_for_event_filtered): Pull all events out of the
8306 kernel, and leave them all pending.
8307 (count_events_callback, select_event_lwp_callback): Consider all
8308 events.
8309 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8310 (select_event_lwp): Only give preference to the stepping LWP in
8311 all-stop mode. Adjust comments.
8312 (ignore_event): New function.
8313 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8314 references to cancel_breakpoints. Adjust to renames. Also give
8315 equal priority to all LWPs that have had events in non-stop mode.
8316 If reporting a software breakpoint event, unadjust the LWP's PC.
8317 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8318 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8319 Adjust.
8320 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8321 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8322 (linux_stopped_by_watchpoint): Adjust.
8323 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8324 * linux-low.h (enum lwp_stop_reason): New.
8325 (struct lwp_info) <stop_pc>: Adjust comment.
8326 <stopped_by_watchpoint>: Delete field.
8327 <stop_reason>: New field.
8328 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8329 * mem-break.c (software_breakpoint_inserted_here)
8330 (hardware_breakpoint_inserted_here): New function.
8331 * mem-break.h (software_breakpoint_inserted_here)
8332 (hardware_breakpoint_inserted_here): Declare.
8333 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8334 (cancel_breakpoints): Delete.
8335 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8336 (upload_fast_traceframes): Remove references to
8337 cancel_breakpoints.
8338
a33e3959
PA
83392015-01-09 Pedro Alves <palves@redhat.com>
8340
8341 * thread-db.c (find_new_threads_callback): Ignore thread if the
8342 kernel thread ID is -1.
8343
8784d563
PA
83442015-01-09 Pedro Alves <palves@redhat.com>
8345
8346 * linux-low.c (linux_attach_fail_reason_string): Move to
8347 nat/linux-ptrace.c, and rename.
8348 (linux_attach_lwp): Update comment.
8349 (attach_proc_task_lwp_callback): New function.
8350 (linux_attach): Adjust to rename and use
8351 linux_proc_attach_tgid_threads.
8352 (linux_attach_fail_reason_string): Delete declaration.
8353
76f2b779
JB
83542015-01-01 Joel Brobecker <brobecker@adacore.com>
8355
8356 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8357 * server.c (gdbserver_version): Likewise.
8358
fafcc06a
SDJ
83592014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8360
8361 * remote-utils.c: Include ctype.h.
8362 (input_interrupt): Explicitly handle the case when the char
8363 received is the NUL byte. Improve the printing of non-ASCII
8364 characters.
8365
beed38b8
JB
83662014-12-16 Joel Brobecker <brobecker@adacore.com>
8367
8368 * linux-low.c (linux_low_filter_event): Update call to
8369 linux_enable_event_reporting following the addition of
8370 a new parameter to that function.
8371
bf330350
CU
83722014-12-16 Catalin Udma <catalin.udma@freescale.com>
8373
8374 PR server/17457
8375 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8376 (AARCH64_FPCR_REGNO): Likewise.
8377 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8378 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8379 (aarch64_store_fpregset): Likewise.
8380
5227d625
JB
83812014-12-15 Joel Brobecker <brobecker@adacore.com>
8382
8383 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8384 Remove FIXME comment about assumption about N.
8385
f93b65a0
JB
83862014-12-13 Joel Brobecker <brobecker@adacore.com>
8387
8388 * configure.ac: If large-file support is disabled in GDBserver,
8389 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8390 * configure: Regenerate.
8391
e5a9158d
AA
83922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8393
8394 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8395 warning upon ENODATA from ptrace.
8396 * linux-s390-low.c (s390_store_tdb): New.
8397 (s390_regsets): Add regset for NT_S390_TDB.
8398
feea5f36
AA
83992014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8400
8401 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8402 without a fill_function.
8403 * linux-s390-low.c (s390_fill_last_break): Remove.
8404 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8405 (s390_arch_setup): Use regset's size instead of fill_function for
8406 loop end condition.
8407
098dbe61
AA
84082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8409
8410 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8411 the regset's store function when ptrace returned an error.
8412 * regcache.c (get_thread_regcache): Invalidate register cache
8413 before fetching inferior's registers.
8414
28eef672
AA
84152014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8416
8417 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8418 while-loop as for-loop.
8419 (regsets_store_inferior_registers): Likewise.
8420
bdca27a2
YQ
84212014-11-28 Yao Qi <yao@codesourcery.com>
8422
8423 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8424 * config.in, configure: Re-generate.
8425 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8426 is defined.
8427
9c232dda
YQ
84282014-11-21 Yao Qi <yao@codesourcery.com>
8429
8430 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8431 (AC_CHECK_HEADERS): Remove malloc.h.
8432 * configure: Re-generated.
8433 * config.in: Re-generated.
8434 * server.h: Don't include alloca.h and malloc.h.
8435 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8436 Don't include malloc.h.
8437
43968415
JB
84382014-11-17 Joel Brobecker <brobecker@adacore.com>
8439
8440 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8441 corresponding ERRNO check in same block.
8442
40e91bc7
PA
84432014-11-12 Pedro Alves <palves@redhat.com>
8444
8445 * server.c (cont_thread): Update comment.
8446 (start_inferior, attach_inferior): No longer clear cont_thread.
8447 (handle_v_cont): No longer set cont_thread.
8448 (captured_main): Clear cont_thread each time a GDB connects.
8449
c2c118cf
PA
84502014-11-12 Pedro Alves <palves@redhat.com>
8451
8452 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8453 thread, and don't resume all threads if the Hc thread has exited.
8454
78708b7c
PA
84552014-11-12 Pedro Alves <palves@redhat.com>
8456
8457 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8458 the process group instead of to a specific LWP.
8459
a2abc7de
PA
84602014-10-15 Pedro Alves <palves@redhat.com>
8461
8462 PR server/17487
8463 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8464 parameter.
8465 (arm_set_thread_context): Delete.
8466 (the_low_target): Adjust.
8467 * win32-i386-low.c (debug_registers_changed)
8468 (debug_registers_used): Delete.
8469 (update_debug_registers_callback): New function.
8470 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8471 needing to update their debug registers.
8472 (win32_get_current_dr): New function.
8473 (x86_dr_low_get_addr, x86_dr_low_get_control)
8474 (x86_dr_low_get_status): Fetch the debug register from the thread
8475 record's context.
8476 (i386_initial_stuff): Adjust.
8477 (i386_get_thread_context): Remove current_event parameter. Don't
8478 clear debug_registers_changed nor copy DR values to
8479 debug_reg_state.
8480 (i386_set_thread_context): Delete.
8481 (i386_prepare_to_resume): New function.
8482 (i386_thread_added): Mark the thread as needing to update irs
8483 debug registers.
8484 (the_low_target): Remove i386_set_thread_context and install
8485 i386_prepare_to_resume.
8486 * win32-low.c (win32_get_thread_context): Adjust.
8487 (win32_set_thread_context): Use SetThreadContext
8488 directly.
8489 (win32_prepare_to_resume): New function.
8490 (win32_require_context): New function, factored out from ...
8491 (thread_rec): ... this.
8492 (continue_one_thread): Call win32_prepare_to_resume on each thread
8493 we're about to continue.
8494 (win32_resume): Call win32_prepare_to_resume on the event thread.
8495 * win32-low.h (struct win32_thread_info)
8496 <debug_registers_changed>: New field.
8497 (struct win32_target_ops): Change prototype of set_thread_context,
8498 delete set_thread_context and add prepare_to_resume.
8499 (win32_require_context): New declaration.
8500
a442d071
GB
85012014-10-08 Gary Benson <gbenson@redhat.com>
8502
8503 * server.h: Do not include common-exceptions.h.
8504
6f1947e8
GB
85052014-10-08 Gary Benson <gbenson@redhat.com>
8506
8507 * server.h: Do not include cleanups.h.
8508
63b434a4
JH
85092014-09-30 James Hogan <james.hogan@imgtec.com>
8510
8511 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8512 mips64-dsp-linux.c.
8513
c4d9ceb6
YQ
85142014-09-23 Yao Qi <yao@codesourcery.com>
8515
8516 * linux-low.c (lp_status_maybe_breakpoint): New function.
8517 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8518 (count_events_callback): Likewise.
8519 (select_event_lwp_callback): Likewise.
8520 (cancel_breakpoints_callback): Likewise.
8521
89a5711c
DB
85222014-09-19 Don Breazeal <donb@codesourcery.com>
8523
8524 * linux-low.c (handle_extended_wait): Call
8525 linux_ptrace_get_extended_event.
8526 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8527 linux_is_extended_waitstatus.
8528
bffc0964
JB
85292014-09-16 Joel Brobecker <brobecker@adacore.com>
8530
8531 * Makefile.in (CPPFLAGS): Define.
8532 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8533 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8534
0bfdf32f
GB
85352014-09-16 Gary Benson <gbenson@redhat.com>
8536
8537 * inferiors.h (current_inferior): Renamed as...
8538 (current_thread): New variable. All uses updated.
8539 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8540 (maybe_move_out_of_jump_pad): Likewise.
8541 (cancel_breakpoint): Likewise.
8542 (linux_low_filter_event): Likewise.
8543 (wait_for_sigstop): Likewise.
8544 (linux_resume_one_lwp): Likewise.
8545 (need_step_over_p): Likewise.
8546 (start_step_over): Likewise.
8547 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8548 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8549 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8550 and save_inferior as saved_thread.
8551 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8552 saved_thread.
8553 (regcache_invalidate_thread): Likewise.
8554 * remote-utils.c (prepare_resume_reply): Likewise.
8555 * thread-db.c (thread_db_get_tls_address): Likewise.
8556 (disable_thread_event_reporting): Likewise.
8557 (remove_thread_event_breakpoints): Likewise.
8558 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8559 as saved_thread.
8560 * target.h (set_desired_inferior): Renamed as...
8561 (set_desired_thread): New declaration. All uses updated.
8562 * server.c (myresume): Updated comment to reference thread instead
8563 of inferior.
8564 (handle_serial_event): Likewise.
8565 (handle_target_event): Likewise.
8566
361c8ade
GB
85672014-09-12 Tom Tromey <tromey@redhat.com>
8568 Gary Benson <gbenson@redhat.com>
8569
8570 * regcache.h: Include common-regcache.h.
8571 (regcache_read_pc): Don't declare.
8572 * regcache.c (get_thread_regcache_for_ptid): New function.
8573
bd9269f7
GB
85742014-09-11 Tom Tromey <tromey@redhat.com>
8575 Gary Benson <gbenson@redhat.com>
8576
8577 * symbol.c: New file.
8578 * Makefile.in (SFILES): Add symbol.c.
8579 (OBS): Add symbol.o.
8580
f8c1d06b
GB
85812014-09-11 Gary Benson <gbenson@redhat.com>
8582
8583 * target.c (target_stop_ptid, target_continue_ptid): New
8584 functions.
8585
721ec300
GB
85862014-09-11 Tom Tromey <tromey@redhat.com>
8587 Gary Benson <gbenson@redhat.com>
8588
8589 * target.h: Include target/target.h.
8590 * target.c (target_read_memory, target_read_uint32)
8591 (target_write_memory): New functions.
8592
c5e92cca
GB
85932014-09-11 Gary Benson <gbenson@redhat.com>
8594
8595 * server.h (debug_hw_points): Don't declare.
8596 * server.c (debug_hw_points): Don't define. Replace all uses
8597 with show_debug_regs.
8598 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8599 all uses with show_debug_regs.
8600
2e4bb98a
EBM
86012014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8602
8603 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8604 endianness into account.
8605 (ppc_supply_ptrace_register): Likewise.
8606
ac740bc7
JH
86072014-09-03 James Hogan <james.hogan@imgtec.com>
8608
8609 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8610 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8611
97ea6506
GB
86122014-09-03 Gary Benson <gbenson@redhat.com>
8613
8614 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8615 ALL_DEBUG_ADDRESS_REGISTERS.
8616
df7e5265
GB
86172014-09-02 Gary Benson <gbenson@redhat.com>
8618
8619 * i386-low.h: Renamed as...
8620 * x86-low.h: New file. All type, function and variable name
8621 prefixes changed from "i386_" to "x86_". All references updated.
8622 * i386-low.c: Renamed as...
8623 * x86-low.c: New file. All type, function and variable name
8624 prefixes changed from "i386_" to "x86_". All references updated.
8625
ed859da7
GB
86262014-09-02 Gary Benson <gbenson@redhat.com>
8627
8628 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8629 (x86_linux_new_thread): Likewise.
8630
860789c7
GB
86312014-08-29 Gary Benson <gbenson@redhat.com>
8632
8633 * server.h (setjmp.h): Do not include.
8634 (toplevel): Do not declare.
8635 (common-exceptions.h): Include.
8636 (cleanups.h): Likewise.
8637 * server.c (toplevel): Do not define.
8638 (exit_code): New static global.
8639 (detach_or_kill_for_exit_cleanup): New function.
8640 (main): New function. Original main renamed to...
8641 (captured_main): New function.
8642 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8643
ff55e1b5
GB
86442014-08-29 Gary Benson <gbenson@redhat.com>
8645
8646 * Makefile.in (SFILES): Add common/common-exceptions.c.
8647 (OBS): Add common-exceptions.o.
8648 (common-exceptions.o): New rule.
8649 * utils.c (prepare_to_throw_exception): New function.
8650
e9bcb658
GB
86512014-08-29 Gary Benson <gbenson@redhat.com>
8652
8653 * config.in: Regenerate.
8654 * configure: Likewise.
8655
e3180625
GB
86562014-08-29 Gary Benson <gbenson@redhat.com>
8657
8658 * Makefile.in (SFILES): Add common/cleanups.c.
8659 (OBS): cleanups.o.
8660 (cleanups.o): New rule.
8661
e3d6ba5d
GB
86622014-08-29 Gary Benson <gbenson@redhat.com>
8663
8664 * utils.c (internal_vwarning): New function.
8665
7096e886
GB
86662014-08-28 Gary Benson <gbenson@redhat.com>
8667
8668 * utils.h (fatal): Remove declaration.
8669 * utils.c (fatal): Remove function.
8670
14ce3192
GB
86712014-08-28 Gary Benson <gbenson@redhat.com>
8672
8673 * tracepoint.c (gdb_agent_init): Replace fatal with
8674 perror_with_name.
8675 (initialize_tracepoint): Likewise.
8676
50278d59
GB
86772014-08-28 Gary Benson <gbenson@redhat.com>
8678
8679 * remote-utils.c (remote_prepare): Replace fatal with error.
8680
aa96c426
GB
86812014-08-28 Gary Benson <gbenson@redhat.com>
8682
8683 * linux-low.c (linux_async): Replace fatal with warning.
8684 Tidy up and return.
8685 (linux_start_non_stop): Return -1 if linux_async failed.
8686
f7160e97
GB
86872014-08-28 Gary Benson <gbenson@redhat.com>
8688
8689 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8690 gdb_assert.
8691 (i386_dr_low_get_addr): Remove vague comment.
8692 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8693 gdb_assert.
8694
38e08fca
GB
86952014-08-28 Gary Benson <gbenson@redhat.com>
8696
8697 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8698 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8699 internal_error.
8700 (linux_resume_one_lwp): Likewise.
8701 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8702 gdb_assert.
8703 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8704 with internal_error.
8705 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8706 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8707 (find_register_by_name): Replace fatal with internal_error.
8708 (find_regno): Likewise.
8709 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8710 * thread-db.c (thread_db_create_event): Likewise.
8711 (thread_db_load_search): Likewise.
8712 (try_thread_db_load_1): Likewise.
8713 * tracepoint.c (get_jump_space_head): Replace fatal with
8714 internal_error.
8715 (claim_trampoline_space): Likewise.
8716 (have_fast_tracepoint_trampoline_buffer): Likewise.
8717 (cmd_qtstart): Likewise.
8718 (stop_tracing): Likewise.
8719 (fast_tracepoint_collecting): Likewise.
8720 (target_malloc): Likewise.
8721 (download_tracepoint): Likewise.
8722 (download_trace_state_variables): Replace check with gdb_assert.
8723 (upload_fast_traceframes): Replace fatal with internal_error.
8724
34abf635
GB
87252014-08-19 Tom Tromey <tromey@redhat.com>
8726 Gary Benson <gbenson@redhat.com>
8727
8728 * Makefile.in (SFILES): Add common/common-debug.c.
8729 (OBS): Add common-debug.o.
8730 (common-debug.o): New rule.
8731 * debug.h (debug_printf): Don't declare.
8732 * debug.c (debug_printf): Renamed and rewritten as...
8733 (debug_vprintf): New function.
8734
f6e94d78
GB
87352014-08-19 Gary Benson <gbenson@redhat.com>
8736
8737 * utils.h: Do not include print-utils.h.
8738
9239eeab
GB
87392014-08-19 Tom Tromey <tromey@redhat.com>
8740 Gary Benson <gbenson@redhat.com>
8741
8742 * server.h: Add static assertion.
8743 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8744
ef87c8bb
GB
87452014-08-19 Tom Tromey <tromey@redhat.com>
8746 Gary Benson <gbenson@redhat.com>
8747
8748 * Makefile.in (SFILES): Add common/errors.c.
8749 (OBS): Add errors.o.
8750 (IPA_OBS): Add errors-ipa.o.
8751 (errors.o): New rule.
8752 (errors-ipa.o): Likewise.
8753 * utils.h (perror_with_name, error, warning): Don't declare.
8754 * utils.c (warning): Renamed and rewritten as...
8755 (vwarning): New function.
8756 (error): Renamed and rewritten as...
8757 (verror): New function.
8758 (internal_error): Renamed and rewritten as...
8759 (internal_verror): New function.
8760
bb974a24
GB
87612014-08-07 Gary Benson <gbenson@redhat.com>
8762
8763 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8764 * configure: Regenerate.
8765 * config.in: Likewise.
8766 * server.h: Do not include errno.h.
8767 * event-loop.c: Likewise.
8768 * hostio-errno.c: Likewise.
8769 * linux-low.c: Likewise.
8770 * remote-utils.c: Likewise.
8771 * spu-low.c: Likewise.
8772 * utils.c: Likewise.
8773 * gdbreplay.c: Unconditionally include errno.h.
8774
6d3d12eb
GB
87752014-08-07 Gary Benson <gbenson@redhat.com>
8776
8777 * server.h: Do not include string.h.
8778 * event-loop.c: Likewise.
8779 * linux-low.c: Likewise.
8780 * regcache.c: Likewise.
8781 * remote-utils.c: Likewise.
8782 * spu-low.c: Likewise.
8783 * utils.c: Likewise.
8784
dccbb609
GB
87852014-08-07 Gary Benson <gbenson@redhat.com>
8786
8787 * server.h: Do not include gdb_assert.h.
8788
e76df0d0
GB
87892014-08-07 Gary Benson <gbenson@redhat.com>
8790
8791 * server.h: Do not include common-utils.h.
8792
4cb9c816
GB
87932014-08-07 Gary Benson <gbenson@redhat.com>
8794
8795 * server.h: Do not include ptid.h.
8796 * notif.h: Likewise.
8797
3995eeee
GB
87982014-08-07 Gary Benson <gbenson@redhat.com>
8799
8800 * server.h: Do not include gdb_locale.h.
8801
cb9f1a9b
GB
88022014-08-07 Gary Benson <gbenson@redhat.com>
8803
8804 * server.h: Do not include gdb/signals.h.
8805 * win32-low.c: Likewise.
8806
a5fceff8
GB
88072014-08-07 Gary Benson <gbenson@redhat.com>
8808
8809 * server.h: Do not include pathmax.h.
8810
b9391142
GB
88112014-08-07 Gary Benson <gbenson@redhat.com>
8812
8813 * server.h: Do not include libiberty.h.
8814 * linux-bfin-low.c: Likewise.
8815
0e443c87
GB
88162014-08-07 Gary Benson <gbenson@redhat.com>
8817
8818 * server.h: Do not include ansidecl.h.
8819
8ebb3f56
GB
88202014-08-07 Gary Benson <gbenson@redhat.com>
8821
8822 * linux-x86-low.c: Do not include stddef.h.
8823 * lynx-ppc-low.c: Likewise.
8824 * tracepoint.c: Likewise.
8825
8980bdf6
GB
88262014-08-07 Gary Benson <gbenson@redhat.com>
8827
8828 * server.h: Do not include stdarg.h.
8829 * nto-low.c: Likewise.
8830
d7096f71
GB
88312014-08-07 Gary Benson <gbenson@redhat.com>
8832
8833 * server.h: Do not include stdlib.h.
8834 * inferiors.c: Likewise.
8835 * linux-low.c: Likewise.
8836 * regcache.c: Likewise.
8837 * spu-low.c: Likewise.
8838 * tracepoint.c: Likewise.
8839 * utils.c: Likewise.
8840
d02f550d
GB
88412014-08-07 Gary Benson <gbenson@redhat.com>
8842
8843 * server.h: Do not include stdio.h.
8844 * linux-low.c: Likewise.
8845 * remote-utils.c: Likewise.
8846 * spu-low.c: Likewise.
8847 * utils.c: Likewise.
8848 * wincecompat.c: Likewise.
8849
87f6c4e3
GB
88502014-08-06 Gary Benson <gbenson@redhat.com>
8851
8852 * regcache.c (init_register_cache): Move conditionals inside if.
8853
7089dca4
GB
88542014-08-06 Gary Benson <gbenson@redhat.com>
8855
8856 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8857
462f517e
GB
88582014-07-31 Gary Benson <gbenson@redhat.com>
8859
8860 * ax.h: Do not include server.h.
8861 * gdbthread.h: Likewise.
8862 * lynx-low.h: Likewise.
8863 * notif.h: Likewise.
8864
976411d6
GB
88652014-07-30 Gary Benson <gbenson@redhat.com>
8866
8867 * server.h: Include common-defs.h.
8868 Do not include config.h or build-gnulib-gdbserver/config.h.
8869
d41f6d8e
GB
88702014-07-30 Gary Benson <gbenson@redhat.com>
8871
8872 * hostio-errno.c: Move server.h to top of includes list.
8873 * inferiors.c: Likewise.
8874 * linux-x86-low.c: Likewise.
8875 * notif.c: Include server.h.
8876
314c6a35
TT
88772014-07-24 Tom Tromey <tromey@redhat.com>
8878 Gary Benson <gbenson@redhat.com>
8879
8880 * server.h (CORE_ADDR): Now unsigned.
8881
69ff6be5
PA
88822014-07-16 Pedro Alves <palves@redhat.com>
8883
8884 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8885
ce9e3fe7
PA
88862014-07-15 Pedro Alves <palves@redhat.com>
8887
8888 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8889 copy.
8890
e76126e8
PA
88912014-07-11 Pedro Alves <palves@redhat.com>
8892
8893 * linux-low.c (kill_wait_lwp): New function, based on
8894 kill_one_lwp_callback, but use my_waitpid directly.
8895 (kill_one_lwp_callback, linux_kill): Use it.
8896
8e9db26e
PA
88972014-06-23 Pedro Alves <palves@redhat.com>
8898
8899 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8900 before setting DR0..DR3.
8901
698b3e08
GB
89022014-06-20 Gary Benson <gbenson@redhat.com>
8903
8904 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8905 * configure: Regenerated.
8906 * config.in: Likewise.
8907
125f8a3d
GB
89082014-06-20 Gary Benson <gbenson@redhat.com>
8909
8910 * Makefile.in (SFILES): Update locations for files moved
8911 from common to nat.
8912 (object file files): Reordered.
8913
42995dbd
GB
89142014-06-20 Gary Benson <gbenson@redhat.com>
8915
8916 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8917 (i386_dr_low_set_addr): Likewise.
8918 (i386_dr_low_get_addr): Likewise.
8919 (i386_dr_low_can_set_control): Likewise.
8920 (i386_dr_low_set_control): Likewise.
8921 (i386_dr_low_get_control): Likewise.
8922 (i386_dr_low_get_status): Likewise.
8923 (i386_get_debug_register_length): Likewise.
8924 * linux-x86-low.c (i386_dr_low_set_addr):
8925 Changed signature. Made static.
8926 (i386_dr_low_get_addr): Likewise.
8927 (i386_dr_low_set_control): Likewise.
8928 (i386_dr_low_get_control): Likewise.
8929 (i386_dr_low_get_status): Likewise.
8930 (i386_dr_low): New global variable.
8931 * win32-i386-low.c (i386_dr_low_set_addr):
8932 Changed signature. Made static.
8933 (i386_dr_low_get_addr): Likewise.
8934 (i386_dr_low_set_control): Likewise.
8935 (i386_dr_low_get_control): Likewise.
8936 (i386_dr_low_get_status): Likewise.
8937 (i386_dr_low): New global variable.
8938
e1d2394b
MS
89392014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8940
8941 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8942 * Makefile.in (AR, AR_FLAGS): Define.
8943 * configure: Regenerate.
8944
3a8ee006
GB
89452014-06-19 Gary Benson <gbenson@redhat.com>
8946
8947 * Makefile.in (i386-dregs.o): New rule.
8948 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8949 * i386-low.c (target.h): Remove include.
8950 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8951 (DR_CONTROL_SHIFT): Likewise.
8952 (DR_CONTROL_SIZE): Likewise.
8953 (DR_RW_EXECUTE): Likewise.
8954 (DR_RW_WRITE): Likewise.
8955 (DR_RW_READ): Likewise.
8956 (DR_RW_IORW): Likewise.
8957 (DR_LEN_1): Likewise.
8958 (DR_LEN_2): Likewise.
8959 (DR_LEN_4): Likewise.
8960 (DR_LEN_8): Likewise.
8961 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8962 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8963 (DR_ENABLE_SIZE): Likewise.
8964 (DR_LOCAL_SLOWDOWN): Likewise.
8965 (DR_GLOBAL_SLOWDOWN): Likewise.
8966 (DR_CONTROL_RESERVED): Likewise.
8967 (I386_DR_CONTROL_MASK): Likewise.
8968 (I386_DR_VACANT): Likewise.
8969 (I386_DR_LOCAL_ENABLE): Likewise.
8970 (I386_DR_GLOBAL_ENABLE): Likewise.
8971 (I386_DR_DISABLE): Likewise.
8972 (I386_DR_SET_RW_LEN): Likewise.
8973 (I386_DR_GET_RW_LEN): Likewise.
8974 (I386_DR_WATCH_HIT): Likewise.
8975 (i386_wp_op_t): Likewise.
8976 (i386_show_dr): Likewise.
8977 (i386_length_and_rw_bits): Likewise.
8978 (i386_insert_aligned_watchpoint): Likewise.
8979 (i386_remove_aligned_watchpoint): Likewise.
8980 (i386_handle_nonaligned_watchpoint): Likewise.
8981 i386_update_inferior_debug_regs(): Likewise.
8982 (i386_dr_insert_watchpoint): Likewise.
8983 (i386_dr_remove_watchpoint): Likewise.
8984 (i386_dr_region_ok_for_watchpoint): Likewise.
8985 (i386_dr_stopped_data_address): Likewise.
8986 (i386_dr_stopped_by_watchpoint): Likewise.
8987
8f26655c
GB
89882014-06-19 Gary Benson <gbenson@redhat.com>
8989
8990 * i386-low.c (i386_dr_show): Renamed to
8991 i386_show_dr and made static. All uses updated.
8992 (i386_dr_length_and_rw_bits): Renamed to
8993 i386_length_and_rw_bits and made static.
8994 All uses updated.
8995 (i386_dr_insert_aligned_watchpoint): Renamed to
8996 i386_insert_aligned_watchpoint and made static.
8997 All uses updated.
8998 (i386_dr_remove_aligned_watchpoint): Renamed to
8999 i386_remove_aligned_watchpoint and made static.
9000 All uses updated.
9001 (i386_dr_update_inferior_debug_regs): Renamed to
9002 i386_update_inferior_debug_regs and made static.
9003 All uses updated.
9004
b9228891
GB
90052014-06-18 Gary Benson <gbenson@redhat.com>
9006
5171def3
GB
9007 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9008 (i386_dr_low_can_set_control): Likewise.
9009 (i386_get_debug_register_length): Likewise.
9010 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9011 (i386_dr_low_can_set_control): Likewise.
9012 (i386_get_debug_register_length): Likewise.
9013
90142014-06-17 Gary Benson <gbenson@redhat.com>
9015
b9228891
GB
9016 * i386-low.h (i386-dregs.h): New include.
9017 (DR_FIRSTADDR): Now in i386-dregs.h.
9018 (DR_LASTADDR): Likewise.
9019 (DR_NADDR): Likewise.
9020 (DR_STATUS): Likewise.
9021 (DR_CONTROL): Likewise.
9022 (i386_debug_reg_state): Likewise.
9023 (i386_dr_insert_watchpoint): Likewise.
9024 (i386_dr_remove_watchpoint): Likewise.
9025 (i386_dr_region_ok_for_watchpoint): Likewise.
9026 (i386_dr_stopped_data_address): Likewise.
9027 (i386_dr_stopped_by_watchpoint): Likewise.
9028 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9029
4be83cc2
GB
90302014-06-18 Gary Benson <gbenson@redhat.com>
9031
9032 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9033 i386_dr_insert_watchpoint.
9034 (i386_low_remove_watchpoint): Renamed to
9035 i386_dr_remove_watchpoint.
9036 (i386_low_region_ok_for_watchpoint): Renamed to
9037 i386_dr_region_ok_for_watchpoint.
9038 (i386_low_stopped_data_address): Renamed to
9039 i386_dr_stopped_data_address.
9040 (i386_low_stopped_by_watchpoint): Renamed to
9041 i386_dr_stopped_by_watchpoint.
9042 * i386-low.c (i386_show_dr): Renamed to
9043 i386_dr_show and made nonstatic. All uses updated.
9044 (i386_length_and_rw_bits): Renamed to
9045 i386_dr_length_and_rw_bits and made nonstatic.
9046 All uses updated.
9047 (i386_insert_aligned_watchpoint): Renamed to
9048 i386_dr_insert_aligned_watchpoint and made nonstatic.
9049 All uses updated.
9050 (i386_remove_aligned_watchpoint): Renamed to
9051 i386_dr_remove_aligned_watchpoint and made nonstatic.
9052 All uses updated.
9053 (i386_update_inferior_debug_regs): Renamed to
9054 i386_dr_update_inferior_debug_regs and made nonstatic.
9055 All uses updated.
9056 (i386_low_insert_watchpoint): Renamed to
9057 i386_dr_insert_watchpoint. All uses updated.
9058 (i386_low_remove_watchpoint): Renamed to
9059 i386_dr_remove_watchpoint. All uses updated.
9060 (i386_low_region_ok_for_watchpoint): Renamed to
9061 i386_dr_region_ok_for_watchpoint. All uses updated.
9062 (i386_low_stopped_data_address): Renamed to
9063 i386_dr_stopped_data_address. All uses updated.
9064 (i386_low_stopped_by_watchpoint): Renamed to
9065 i386_dr_stopped_by_watchpoint. All uses updated.
9066
131aa0d4
GB
90672014-06-18 Gary Benson <gbenson@redhat.com>
9068
9069 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9070 (i386_dr_low_can_set_control): Likewise.
9071 (i386_insert_aligned_watchpoint): New check.
9072
d9305f7f
GB
90732014-06-18 Gary Benson <gbenson@redhat.com>
9074
9075 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9076 Renamed to state.
9077
e927c9fc
GB
90782014-06-18 Gary Benson <gbenson@redhat.com>
9079
9080 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9081 instead of fatal and error.
9082 (i386_handle_nonaligned_watchpoint): Likewise.
9083
1b6d4134
GB
90842014-06-18 Gary Benson <gbenson@redhat.com>
9085
9086 * i386-low.c (i386_get_debug_register_length): New macro.
9087 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9088 (i386_show_dr): Use debug_printf instead of fprintf. Use
9089 phex to format values.
9090
6e62758f
GB
90912014-06-18 Gary Benson <gbenson@redhat.com>
9092
9093 * i386-low.h: Comment changes.
9094 * i386-low.c: Likewise.
9095
fc6e2f03
GB
90962014-06-18 Gary Benson <gbenson@redhat.com>
9097
9098 * i386-low.c: Whitespace changes.
9099
f9d1eeed
TT
91002014-06-12 Tom Tromey <tromey@redhat.com>
9101
9102 * utils.c (freeargv): Remove.
9103
0b04e523
TT
91042014-06-12 Tom Tromey <tromey@redhat.com>
9105
9106 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9107 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9108 (parse_debug_format_options): Likewise.
9109 (gdbserver_usage): Likewise.
9110 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9111 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9112 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9113 against libiberty.
9114 ($(LIBGNU)): Depend on libiberty.
9115 (all-lib): Recurse into all subdirs.
9116 (install-only): Invoke "install" target in subdirs.
9117 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9118 targets.
9119 * configure: Rebuild.
9120 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9121 for vasprintf, vsnprintf, or gettimeofday.
9122 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9123 srv_tgtobj.
9124
270c9937
JB
91252014-06-05 Joel Brobecker <brobecker@adacore.com>
9126
9127 * development.sh: Delete.
9128 * Makefile.in (config.status): Adjust dependency on development.sh.
9129 * configure.ac: Adjust development.sh source call.
9130 * configure: Regenerate.
9131
0a261ed8
PA
91322014-06-02 Pedro Alves <palves@redhat.com>
9133
9134 * ax.c (gdb_free_agent_expr): New function.
9135 * ax.h (gdb_free_agent_expr): New declaration.
9136 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9137 list.
9138 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9139 static.
9140 (clear_breakpoint_conditions_and_commands): New function.
9141 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9142 (clear_breakpoint_conditions_and_commands): New declaration.
9143
e9dae05e
RR
91442014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9145
9146 * linux-aarch64-low.c (asm/ptrace.h): Include.
9147
5876f503
JK
91482014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9149
9150 Fix TLS access for -static -pthread.
9151 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9152 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9153 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9154
802e8e6d
PA
91552014-05-20 Pedro Alves <palves@redhat.com>
9156
9157 * linux-aarch64-low.c (aarch64_insert_point)
9158 (aarch64_remove_point): No longer check whether the type is
9159 supported here. Adjust to new interface.
9160 (the_low_target): Install aarch64_supports_z_point_type as
9161 supports_z_point_type method.
9162 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9163 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9164 instead of a Z packet char. Adjust.
9165 (arm_supports_z_point_type): New function.
9166 (arm_insert_point, arm_remove_point): Adjust to new interface.
9167 (the_low_target): Install arm_supports_z_point_type.
9168 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9169 (cris_insert_point, cris_remove_point): Adjust to new interface.
9170 Don't check whether the type is supported here.
9171 (the_low_target): Install cris_supports_z_point_type.
9172 * linux-low.c (linux_supports_z_point_type): New function.
9173 (linux_insert_point, linux_remove_point): Adjust to new interface.
9174 * linux-low.h (struct linux_target_ops) <insert_point,
9175 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9176 raw_breakpoint pointer parameter.
9177 <supports_z_point_type>: New method.
9178 * linux-mips-low.c (mips_supports_z_point_type): New function.
9179 (mips_insert_point, mips_remove_point): Adjust to new interface.
9180 Use mips_supports_z_point_type.
9181 (the_low_target): Install mips_supports_z_point_type.
9182 * linux-ppc-low.c (the_low_target): Install NULL as
9183 supports_z_point_type method.
9184 * linux-s390-low.c (the_low_target): Install NULL as
9185 supports_z_point_type method.
9186 * linux-sparc-low.c (the_low_target): Install NULL as
9187 supports_z_point_type method.
9188 * linux-x86-low.c (x86_supports_z_point_type): New function.
9189 (x86_insert_point): Adjust to new insert_point interface. Use
9190 insert_memory_breakpoint. Adjust to new
9191 i386_low_insert_watchpoint interface.
9192 (x86_remove_point): Adjust to remove_point interface. Use
9193 remove_memory_breakpoint. Adjust to new
9194 i386_low_remove_watchpoint interface.
9195 (the_low_target): Install x86_supports_z_point_type.
9196 * lynx-low.c (lynx_target_ops): Install NULL as
9197 supports_z_point_type callback.
9198 * nto-low.c (nto_supports_z_point_type): New.
9199 (nto_insert_point, nto_remove_point): Adjust to new interface.
9200 (nto_target_ops): Install nto_supports_z_point_type.
9201 * mem-break.c: Adjust intro comment.
9202 (struct raw_breakpoint) <raw_type, size>: New fields.
9203 <inserted>: Update comment.
9204 <shlib_disabled>: Delete field.
9205 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9206 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9207 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9208 (raw_bkpt_type_to_target_hw_bp_type): New function.
9209 (find_enabled_raw_code_breakpoint_at): New function.
9210 (find_raw_breakpoint_at): New type and size parameters. Use them.
9211 (insert_memory_breakpoint): New function, based off
9212 set_raw_breakpoint_at.
9213 (remove_memory_breakpoint): New function.
9214 (set_raw_breakpoint_at): Reimplement.
9215 (set_breakpoint): New, based on set_breakpoint_at.
9216 (set_breakpoint_at): Reimplement.
9217 (delete_raw_breakpoint): Go through the_target->remove_point
9218 instead of assuming memory breakpoints.
9219 (find_gdb_breakpoint_at): Delete.
9220 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9221 (find_gdb_breakpoint): New function.
9222 (set_gdb_breakpoint_at): Delete.
9223 (z_type_supported): New function.
9224 (set_gdb_breakpoint_1): New function, loosely based off
9225 set_gdb_breakpoint_at.
9226 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9227 (delete_gdb_breakpoint_at): Delete.
9228 (delete_gdb_breakpoint_1): New function, loosely based off
9229 delete_gdb_breakpoint_at.
9230 (delete_gdb_breakpoint): New function.
9231 (clear_gdb_breakpoint_conditions): Rename to ...
9232 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9233 breakpoint.
9234 (add_condition_to_breakpoint): Make static.
9235 (add_breakpoint_condition): Take a struct breakpoint pointer
9236 instead of an address. Adjust.
9237 (gdb_condition_true_at_breakpoint): Rename to ...
9238 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9239 z_type parameter.
9240 (gdb_condition_true_at_breakpoint): Reimplement.
9241 (add_breakpoint_commands): Take a struct breakpoint pointer
9242 instead of an address. Adjust.
9243 (gdb_no_commands_at_breakpoint): Rename to ...
9244 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9245 parameter. Return true if no breakpoint was found. Change debug
9246 output.
9247 (gdb_no_commands_at_breakpoint): Reimplement.
9248 (run_breakpoint_commands): Rename to ...
9249 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9250 and change return type to boolean.
9251 (run_breakpoint_commands): New function.
9252 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9253 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9254 breakpoint. Go through the_target->remove_point instead of
9255 assuming memory breakpoint.
9256 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9257 software and hardware breakpoints.
9258 (reinsert_raw_breakpoint): Go through the_target->insert_point
9259 instead of assuming memory breakpoint.
9260 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9261 software and hardware breakpoints.
9262 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9263 Check both software and hardware breakpoints.
9264 (validate_inserted_breakpoint): Assert the breakpoint is a
9265 software breakpoint. Set the inserted flag to -1 instead of
9266 setting shlib_disabled.
9267 (delete_disabled_breakpoints): Adjust.
9268 (validate_breakpoints): Only validate software breakpoints.
9269 Adjust to inserted flag change.
9270 (check_mem_read, check_mem_write): Skip breakpoint types other
9271 than software breakpoints. Adjust to inserted flag change.
9272 * mem-break.h (enum raw_bkpt_type): New enum.
9273 (raw_breakpoint, struct process_info): Forward declare.
9274 (Z_packet_to_target_hw_bp_type): Delete declaration.
9275 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9276 (set_gdb_breakpoint, delete_gdb_breakpoint)
9277 (clear_breakpoint_conditions): New declarations.
9278 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9279 (breakpoint_inserted_here): Update comment.
9280 (add_breakpoint_condition, add_breakpoint_commands): Replace
9281 address parameter with a breakpoint pointer parameter.
9282 (gdb_breakpoint_here): Update comment.
9283 (delete_gdb_breakpoint_at): Delete.
9284 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9285 * server.c (process_point_options): Take a struct breakpoint
9286 pointer instead of an address. Adjust.
9287 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9288 delete_gdb_breakpoint.
9289 * spu-low.c (spu_target_ops): Install NULL as
9290 supports_z_point_type method.
9291 * target.h: Include mem-break.h.
9292 (struct target_ops) <prepare_to_access_memory>: Update comment.
9293 <supports_z_point_type>: New field.
9294 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9295 instead of a char. Also take a raw breakpoint pointer.
9296 * win32-arm-low.c (the_low_target): Install NULL as
9297 supports_z_point_type.
9298 * win32-i386-low.c (i386_supports_z_point_type): New function.
9299 (i386_insert_point, i386_remove_point): Adjust to new interface.
9300 (the_low_target): Install i386_supports_z_point_type.
9301 * win32-low.c (win32_supports_z_point_type): New function.
9302 (win32_insert_point, win32_remove_point): Adjust to new interface.
9303 (win32_target_ops): Install win32_supports_z_point_type.
9304 * win32-low.h (struct win32_target_ops):
9305 <supports_z_point_type>: New method.
9306 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9307 instead of a char. Also take a raw breakpoint pointer.
9308
932539e3
PA
93092014-05-20 Pedro Alves <palves@redhat.com>
9310
9311 * mem-break.h: Include break-common.h.
9312 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9313 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9314 (Z_packet_to_target_hw_bp_type): New declaration.
9315 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9316 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9317 (Z_PACKET_ACCESS_WP): Delete macros.
9318 (Z_packet_to_hw_type): Delete function.
9319 * i386-low.h: Don't include break-common.h here.
9320 (Z_packet_to_hw_type): Delete declaration.
9321 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9322 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9323 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9324 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9325 * linux-aarch64-low.c: Don't include break-common.h here.
9326 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9327 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9328 (Z_packet_to_target_hw_bp_type): Delete function.
9329 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9330 function.
9331 (mips_insert_point, mips_remove_point): Use
9332 Z_packet_to_target_hw_bp_type.
9333
4ff0d3d8
PA
93342014-05-20 Pedro Alves <palves@redhat.com>
9335
9336 * linux-aarch64-low.c: Include break-common.h.
9337 (enum target_point_type): Delete.
9338 (Z_packet_to_point_type): Rename to ...
9339 (Z_packet_to_target_hw_bp_type): ... this, and return a
9340 target_hw_bp_type instead.
9341 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9342 instead of an enum target_point_type.
9343 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9344 breakpoint type.
9345 (aarch64_dr_state_insert_one_point)
9346 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9347 (aarch64_handle_aligned_watchpoint)
9348 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9349 Take an enum target_hw_bp_type instead of an enum
9350 target_point_type.
9351 (aarch64_supports_z_point_type): New function.
9352 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9353 use Z_packet_to_target_hw_bp_type.
9354
786dc519
JB
93552014-05-20 Joel Brobecker <brobecker@adacore.com>
9356
9357 * configure.ac: Only use -Werror by default when DEVELOPMENT
9358 is true.
9359 * configure: Regenerate.
9360
9e0aa64f
JK
93612014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9362
9363 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9364 * linux-x86-low.c (X86_64_USER_REGS): New.
9365 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9366
2b577b92
YQ
93672014-04-28 Yao Qi <yao@codesourcery.com>
9368
9369 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9370 name.
9371
94611da2
PA
93722014-04-25 Pedro Alves <palves@redhat.com>
9373
9374 PR server/16255
9375 * linux-low.c (linux_attach_fail_reason_string): New function.
9376 (linux_attach_lwp): Delete.
9377 (linux_attach_lwp_1): Rename to ...
9378 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9379 argument. Remove "initial" parameter. Return int instead of
9380 void. Don't error or warn here.
9381 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9382 failure to attach to the tgid. Call warning when failing to
9383 attach to an lwp.
9384 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9385 argument. Remove "initial" parameter. Return int instead of
9386 void. Don't error or warn here.
9387 (linux_attach_fail_reason_string): New declaration.
9388 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9389 interface change. Use linux_attach_fail_reason_string.
9390
01f9f808
MS
93912014-04-24 Michael Sturm <michael.sturm@mintel.com>
9392 Walfred Tedeschi <walfred.tedeschi@intel.com>
9393
9394 * Makefile.in: Added rules to handle new files
9395 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9396 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9397 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9398 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9399 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9400 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9401 x32-avx512-linux.o.
9402 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9403 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9404 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9405 i386/x32-avx512.xml.
9406 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9407 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9408 i386/x32-avx512-linux.xml.
9409 * i387-fp.c (num_avx512_k_registers): New constant for number
9410 of K registers.
9411 (num_avx512_zmmh_low_registers): New constant for number of
9412 lower ZMM registers (0-15).
9413 (num_avx512_zmmh_high_registers): New constant for number of
9414 higher ZMM registers (16-31).
9415 (num_avx512_ymmh_registers): New contant for number of higher
9416 YMM registers (ymm16-31 added by avx521 on x86_64).
9417 (num_avx512_xmm_registers): New constant for number of higher
9418 XMM registers (xmm16-31 added by AVX512 on x86_64).
9419 (struct i387_xsave): Add space for AVX512 registers.
9420 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9421 Add code to handle AVX512 registers.
9422 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9423 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9424 prototypei from generated file.
9425 (tdesc_amd64_avx512_linux): Likewise.
9426 (init_registers_x32_avx512_linux): Likewise.
9427 (tdesc_x32_avx512_linux): Likewise.
9428 (init_registers_i386_avx512_linux): Likewise.
9429 (tdesc_i386_avx512_linux): Likewise.
9430 (x86_64_regmap): Add AVX512 registers.
9431 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9432 mask.
9433 (initialize_low_arch): Add code to initialize AVX512 registers.
9434
51aa91f9
PA
94352014-04-23 Pedro Alves <palves@redhat.com>
9436
9437 * mem-break.c (find_gdb_breakpoint_at): Make static.
9438 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9439
a4165e94
PA
94402014-04-23 Pedro Alves <palves@redhat.com>
9441
9442 * i386-low.c: Don't include break-common.h here.
9443 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9444 prototype to take target_hw_bp_type as argument instead of a Z
9445 packet char.
9446 * i386-low.h: Include break-common.h here.
9447 (Z_packet_to_hw_type): Declare.
9448 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9449 prototypes.
9450 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9451 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9452 (x86_remove_point): Convert the packet number to a
9453 target_hw_bp_type before calling i386_low_remove_watchpoint.
9454 * win32-i386-low.c (i386_insert_point): Convert the packet number
9455 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9456 (i386_remove_point): Convert the packet number to a
9457 target_hw_bp_type before calling i386_low_remove_watchpoint.
9458
b8acf843
PA
94592014-04-23 Pedro Alves <palves@redhat.com>
9460
9461 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9462
d708bcd1
PA
94632014-04-10 Pedro Alves <palves@redhat.com>
9464
9465 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9466 Check if the condition or command is NULL before checking if the
9467 breakpoint is known. On success, return true.
9468 * mem-break.h (add_breakpoint_condition): Document return.
9469 (add_breakpoint_commands): Add describing comment.
9470 * server.c (skip_to_semicolon): New function.
9471 (process_point_options): Use it.
9472
2eec7d5b
PA
94732014-04-09 Pedro Alves <palves@redhat.com>
9474
9475 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9476 to lwpid_of.
9477
fa96cb38
PA
94782014-02-27 Pedro Alves <palves@redhat.com>
9479
9480 PR 12702
9481 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9482 macros.
9483 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9484 output.
9485 (last_thread_of_process_p): Take a PID argument instead of a
9486 thread pointer.
9487 (linux_wait_for_lwp): Delete.
9488 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9489 functions.
9490 (linux_low_filter_event): New function, party factored out from
9491 linux_wait_for_event.
9492 (linux_wait_for_event): Rename to ...
9493 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9494 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9495 sigsuspend. Check for zombie leaders.
9496 (linux_wait_for_event): Reimplement as wrapper around
9497 linux_wait_for_event_filtered.
9498 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9499 a normal or signal exit is seen, it's the whole process exiting.
9500 (wait_for_sigstop): No longer a for_each_inferior callback.
9501 Rewrite on top of linux_wait_for_event_filtered.
9502 (stop_all_lwps): Call wait_for_sigstop directly.
9503 * server.c (resume, handle_target_event): Handle
9504 TARGET_WAITKIND_NO_RESUMED.
9505
d763de10
JB
95062014-02-26 Joel Brobecker <brobecker@adacore.com>
9507
9508 * win32-low.c (psapi_get_dll_name,
9509 * win32_CreateToolhelp32Snapshot): Delete.
9510 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9511 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9512 Delete.
9513 (handle_load_dll): Add function description.
9514 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9515
850a0f76
JB
95162014-02-26 Joel Brobecker <brobecker@adacore.com>
9517
9518 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9519 Add comment.
9520 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9521 base address when calling win32_add_one_solib.
9522 (handle_load_dll): Delete local variable load_addr.
9523 Remove 0x1000 offset applied to DLL base address when calling
9524 win32_add_one_solib.
9525 (handle_unload_dll): Add comment.
9526
f25b3fc3
JB
95272014-02-26 Joel Brobecker <brobecker@adacore.com>
9528
9529 * win32-low.c (win32_add_all_dlls): Renames
9530 win32_ensure_ntdll_loaded. Rewrite function documentation.
9531 Adjust implementation to always load all DLLs.
9532 Add 0x1000 offset to DLL base address when calling
9533 win32_add_one_solib.
9534 (child_initialization_done): New static global.
9535 (do_initial_child_stuff): Set child_initialization_done to
9536 zero during child initialization, and 1 after. Replace call
9537 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9538 Add comment.
9539 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9540 (handle_unload_dll): Add function documentation.
9541 (get_child_debug_event): Ignore load and unload DLL events
9542 during child initialization.
9543
d86d4aaf
DE
95442014-02-20 Doug Evans <dje@google.com>
9545
3bc32da3 9546 Remove global all_lwps.
d86d4aaf
DE
9547 * inferiors.h (ptid_of): Move here from linux-low.h.
9548 (pid_of, lwpid_of): Ditto.
9549 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9550 parameter is a struct thread_info * now.
9551 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9552 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9553 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9554 directly.
9555 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9556 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9557 * linux-arm-low.c (update_registers_callback): Update, "entry"
9558 parameter is a struct thread_info * now.
9559 Fetch lwpid from current_inferior directly.
9560 (arm_insert_point): Pass &all_threads to find_inferior instead of
9561 &all_lwps.
9562 (arm_remove_point): Ditto.
9563 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9564 (arm_prepare_to_resume): Fetch pid from thread.
9565 (arm_read_description): Fetch lwpid from current_inferior directly.
9566 * linux-low.c (all_lwps): Delete.
9567 (delete_lwp): Delete call to remove_inferior.
9568 (handle_extended_wait): Fetch lwpid from thread.
9569 (add_lwp): Don't set lwp->entry.id. Remove call to
9570 add_inferior_to_list.
9571 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9572 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9573 (kill_one_lwp_callback): Ditto.
9574 (linux_kill): Don't dereference NULL pointer.
9575 Fetch ptid,lwpid from thread.
9576 (get_detach_signal): Fetch ptid from thread.
9577 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9578 Simplify call to regcache_invalidate_thread.
9579 (delete_lwp_callback): Update, "entry" parameter is a
9580 struct thread_info * now. Fetch pid from thread.
9581 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9582 (status_pending_p_callback): Update, "entry" parameter is a
9583 struct thread_info * now. Fetch ptid from thread.
9584 (find_lwp_pid): Update, "entry" parameter is a
9585 struct thread_info * now.
9586 (linux_wait_for_lwp): Fetch pid from thread.
9587 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9588 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9589 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9590 (dequeue_one_deferred_signal): Ditto.
9591 (cancel_breakpoint): Fetch ptid from current_inferior.
9592 (linux_wait_for_event): Pass &all_threads to find_inferior,
9593 not &all_lwps. Fetch ptid, lwpid from thread.
9594 (count_events_callback): Update, "entry" parameter is a
9595 struct thread_info * now.
9596 (select_singlestep_lwp_callback): Ditto.
9597 (select_event_lwp_callback): Ditto.
9598 (cancel_breakpoints_callback): Ditto.
9599 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9600 not &all_lwps.
9601 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9602 (unsuspend_one_lwp): Update, "entry" parameter is a
9603 struct thread_info * now.
9604 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9605 not &all_lwps.
9606 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9607 Fetch lwpid from thread, not lwp.
9608 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9609 Pass &all_threads to find_inferior, not &all_lwps.
9610 (send_sigstop): Fetch lwpid from thread, not lwp.
9611 (send_sigstop_callback): Update, "entry" parameter is a
9612 struct thread_info * now.
9613 (suspend_and_send_sigstop_callback): Ditto.
9614 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9615 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9616 struct thread_info * now.
9617 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9618 from thread, lwp.
9619 (lwp_running): Update, "entry" parameter is a
9620 struct thread_info * now.
9621 (stop_all_lwps): Fetch ptid from thread.
9622 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9623 (linux_resume_one_lwp): Fetch lwpid from thread.
9624 (linux_set_resume_request): Update, "entry" parameter is a
9625 struct thread_info * now. Fetch pid, lwpid from thread.
9626 (resume_status_pending_p): Update, "entry" parameter is a
9627 struct thread_info * now.
9628 (need_step_over_p): Ditto. Fetch lwpid from thread.
9629 (start_step_over): Fetch lwpid from thread.
9630 (linux_resume_one_thread): Update, "entry" parameter is a
9631 struct thread_info * now. Fetch lwpid from thread.
9632 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9633 (proceed_one_lwp): Update, "entry" parameter is a
9634 struct thread_info * now. Fetch lwpid from thread.
9635 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9636 struct thread_info * now.
9637 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9638 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9639 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9640 directly.
9641 (regsets_store_inferior_registers): Ditto.
9642 (fetch_register, store_register): Ditto.
9643 (linux_read_memory, linux_write_memory): Ditto.
9644 (linux_request_interrupt): Ditto.
9645 (linux_read_auxv): Ditto.
9646 (linux_xfer_siginfo): Ditto.
9647 (linux_qxfer_spu): Ditto.
9648 (linux_qxfer_libraries_svr4): Ditto.
9649 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9650 moved to inferiors.h.
9651 (get_lwp): Delete.
9652 (get_thread_lwp): Update.
9653 (struct lwp_info): Delete member "entry". Simplify comment for
9654 member "thread".
9655 (all_lwps): Delete.
9656 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9657 current_inferior directly.
9658 (update_watch_registers_callback): Update, "entry" parameter is a
9659 struct thread_info * now. Fetch pid from thread.
9660 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9661 (mips_insert_point): Fetch lwpid from current_inferior.
9662 Pass &all_threads to find_inferior, not &all_lwps.
9663 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9664 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9665 directly.
9666 (mips_stopped_data_address): Ditto.
9667 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9668 directly.
9669 * linux-tile-low.c (tile_arch_setup): Ditto.
9670 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9671 (update_debug_registers_callback): Update, "entry" parameter is a
9672 struct thread_info * now. Fetch pid from thread.
9673 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9674 Pass &all_threads to find_inferior, not &all_lwps.
9675 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9676 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9677 Pass &all_threads to find_inferior, not &all_lwps.
9678 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9679 (i386_dr_low_get_status): Ditto.
9680 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9681 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9682 (x86_linux_read_description): Ditto.
9683 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9684
3b8361aa
DE
96852014-02-20 Doug Evans <dje@google.com>
9686
9687 * inferiors.c (get_first_inferior): Fix buglet.
9688
f7667f0d
DE
96892014-02-19 Doug Evans <dje@google.com>
9690
9691 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9692 * inferiors.c (add_thread): Change result type to struct thread_info *.
9693 All callers updated.
9694 (add_lwp): Call add_thread here instead of in callers.
9695 All callers updated.
9696 * linux-low.h (get_lwp_thread): Rewrite.
9697 (struct lwp_info): New member "thread".
9698
b3312d80
DE
96992014-02-19 Doug Evans <dje@google.com>
9700
9701 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9702 All callers updated.
9703
ecc6f45c
DE
97042014-02-19 Doug Evans <dje@google.com>
9705
9706 * inferiors.c (add_thread): Fix whitespace.
9707
649ebbca
DE
97082014-02-19 Doug Evans <dje@google.com>
9709
9710 * dll.c (clear_dlls): Replace accessing list implemention details
9711 with API function.
9712 * gdbthread.h (get_first_thread): Declare.
9713 * inferiors.c (for_each_inferior_with_data): New function.
9714 (get_first_thread): New function.
9715 (find_thread_ptid): Simplify.
9716 (get_first_inferior): New function.
9717 (clear_list): Delete.
9718 (one_inferior_p): New function.
9719 (clear_inferior_list): New function.
9720 (clear_inferiors): Update.
9721 * inferiors.h (for_each_inferior_with_data): Declare.
9722 (clear_inferior_list): Declare.
9723 (one_inferior_p): Declare.
9724 (get_first_inferior): Declare.
9725 * linux-low.c (linux_wait_for_event): Replace accessing list
9726 implemention details with API function.
9727 * server.c (target_running): Ditto.
9728 (accumulate_file_name_length): New function.
9729 (emit_dll_description): New function.
9730 (handle_qxfer_libraries): Replace accessing list implemention
9731 details with API function.
9732 (handle_qxfer_threads_worker): New function.
9733 (handle_qxfer_threads_proper): Replace accessing list implemention
9734 details with API function.
9735 (handle_query): Ditto.
9736 (visit_actioned_threads_callback_ftype): New typedef.
9737 (visit_actioned_threads_data): New struct.
9738 (visit_actioned_threads): Rewrite to be find_inferior callback.
9739 (resume): Call find_inferior.
9740 (handle_status): Replace accessing list implemention
9741 details with API function.
9742 (process_serial_event): Replace accessing list implemention details
9743 with API function.
9744 * target.c (set_desired_inferior): Replace accessing list implemention
9745 details with API function.
9746 * tracepoint.c (same_process_p): New function.
9747 (gdb_agent_about_to_close): Replace accessing list implemention
9748 details with API function.
9749 * win32-low.c (child_delete_thread): Replace accessing list
9750 implemention details with API function.
9751 (match_dll_by_basename): New function.
9752 (dll_is_loaded_by_basename): New function.
9753 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9754 details call to dll_is_loaded_by_basename.
9755
80894984
DE
97562014-02-19 Doug Evans <dje@google.com>
9757
9758 * dll.h (struct dll_info): Add comment.
9759 * gdbthread.h (struct thread_info): Add comment.
9760 (current_ptid): Simplify.
9761 * inferiors.c (add_process): Update.
9762 (remove_process): Update.
9763 * inferiors.h (struct process_info): Rename member "head" to "entry".
9764 * linux-low.c (delete_lwp): Update.
9765 (add_lwp): Update.
9766 (last_thread_of_process_p): Update.
9767 (kill_one_lwp_callback, linux_kill): Update.
9768 (status_pending_p_callback): Update.
9769 (wait_for_sigstop): Update. Simplify read of ptid.
9770 (start_step_over): Update.
9771 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9772 (get_lwp_thread): Update.
9773 (struct lwp_info): Rename member "head" to "entry".
9774 * regcache.h (inferior_list_entry): Delete.
9775 * server.c (kill_inferior_callback): Update.
9776 (detach_or_kill_inferior_callback): Update.
9777 (print_started_pid): Update.
9778 (print_attached_pid): Update.
9779 (process_serial_event): Simplify read of ptid.
9780 * thread-db.c (thread_db_create_event): Update.
9781 (thread_db_get_tls_address): Update.
9782 * win32-low.c (current_inferior_ptid): Simplify.
9783
46917d26
TT
97842014-02-19 Tom Tromey <tromey@redhat.com>
9785
9786 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9787 argument.
9788 (target_supports_btrace): Update.
9789
0759a81e
YQ
97902014-02-14 Yao Qi <yao@codesourcery.com>
9791
9792 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9793 (rsp-low-ipa.o): New target.
9794
a7191e8b
TT
97952014-02-12 Tom Tromey <tromey@redhat.com>
9796
9797 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9798 convert_ascii_to_int.
9799 * regcache.c (registers_to_string): Likewise.
9800 * remote-utils.c (decode_M_packet): Likewise.
9801 * server.c (process_serial_event): Likewise.
9802
ff0e980e
TT
98032014-02-12 Tom Tromey <tromey@redhat.com>
9804
9805 * server.c (handle_query, handle_v_run): Use hex2bin, not
9806 unhexify.
9807 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9808
e9371aff
TT
98092014-02-12 Tom Tromey <tromey@redhat.com>
9810
9811 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9812 convert_int_to_ascii.
9813 * regcache.c (registers_to_string, collect_register_as_string):
9814 Likewise.
9815 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9816 Likewise.
9817 * server.c (process_serial_event): Likewise.
9818 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9819 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9820
971dc0b8
TT
98212014-02-12 Tom Tromey <tromey@redhat.com>
9822
9823 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9824 bin2hex, not hexify.
9825 * tracepoint.c (cmd_qtstatus): Likewise.
9826
0a822afb
TT
98272014-02-12 Tom Tromey <tromey@redhat.com>
9828
9829 * remote-utils.c (monitor_output): Pass explicit length to
9830 hexify.
9831
9c3d6531
TT
98322014-02-12 Tom Tromey <tromey@redhat.com>
9833
9834 * tracepoint.c: Include rsp-low.h.
9835 * server.c: Include rsp-low.h.
9836 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9837 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9838 declare.
9839 * remote-utils.c: Include rsp-low.h.
9840 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9841 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9842 (convert_int_to_ascii, convert_ascii_to_int): Move to
9843 common/rsp-low.c.
9844 * regcache.c: Include rsp-low.h.
9845 * ax.c: Include rsp-low.h.
9846 * Makefile.in (SFILES): Add common/rsp-low.c.
9847 (OBS): Add rsp-low.o.
9848 (rsp-low.o): New target.
9849
01fd3ea5
TT
98502014-02-12 Tom Tromey <tromey@redhat.com>
9851
9852 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9853 Include print-utils.h.
9854 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9855 (plongest, thirty_two, phex_nz): Remove.
9856 * Makefile.in (SFILES): Add common/print-utils.c.
9857 (OBS): Add print-utils.o.
9858 (print-utils-ipa.o): New target.
9859 (print-utils.o): New target.
9860 (IPA_OBJS): Add print-utils-ipa.o.
9861
e99dc820
TT
98622014-02-06 Tom Tromey <tromey@redhat.com>
9863
9864 * Makefile.in (SFILES): Fix indentation.
9865
ee1e2d4f
DE
98662014-02-05 Doug Evans <dje@google.com>
9867
9868 * linux-low.c (linux_wait_for_event): Improve comment.
9869 (linux_wait_1): Keep current_inferior in sync with event_child.
9870
f5a02773
DE
98712014-01-22 Doug Evans <dje@google.com>
9872
9873 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9874
87ce2a04
DE
98752014-01-22 Doug Evans <dje@google.com>
9876
9877 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9878 * configure: Regenerate.
9879 * config.in: Regenerate.
9880 * Makefile.in (SFILES): Add debug.c.
9881 (OBS): Add debug.o.
9882 * debug.c: New file.
9883 * debug.h: New file.
9884 * linux-aarch64-low.c (*): Update all debugging printfs to use
9885 debug_printf instead of fprintf.
9886 * linux-arm-low.c (*): Ditto.
9887 * linux-cris-low.c (*): Ditto.
9888 * linux-crisv32-low.c (*): Ditto.
9889 * linux-m32r-low.c (*): Ditto.
9890 * linux-sparc-low.c (*): Ditto.
9891 * linux-x86.c (*): Ditto.
9892 * linux-low.c (*): Ditto.
9893 (linux_wait_1): Add calls to debug_enter, debug_exit.
9894 (linux_wait): Remove redundant debugging printf.
9895 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9896 (linux_resume, unstop_all_lwps): Ditto.
9897 * mem-break.c (*): Update all debugging printfs to use
9898 debug_printf instead of fprintf.
9899 * remote-utils.c (*): Ditto.
9900 * thread-db.c (*): Ditto.
9901 * server.c #include <ctype.h>, "gdb_vecs.h".
9902 (debug_threads): Moved to debug.c.
9903 (*): Update all debugging printfs to use debug_printf instead of
9904 fprintf.
9905 (start_inferior): Replace call to fflush with call to debug_flush.
9906 (monitor_show_help): Mention set debug-format.
9907 (parse_debug_format_options): New function.
9908 (handle_monitor_command): Handle "monitor set debug-format".
9909 (gdbserver_usage): Mention --debug-format.
9910 (main): Parse --debug-format.
9911 * server.h (debug_threads): Declaration moved to debug.h.
9912 #include "debug.h".
9913 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9914 trace_debug_1 that uses debug_printf.
9915 (tracepoint_look_up_symbols): Update all debugging printfs to use
9916 debug_printf instead of fprintf.
9917
e671835b
BS
99182014-01-20 Baruch Siach <baruch@tkos.co.il>
9919
9920 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9921 sys/ptrace.h.
9922
b5737fa9
PA
99232014-01-17 Pedro Alves <palves@redhat.com>
9924
ea38d2a9 9925 PR build/16445
c7faa97a
PA
9926 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9927 defined after including gdb_proc_service.h.
b5737fa9 9928
40ed484e
DE
99292014-01-16 Doug Evans <dje@google.com>
9930
9931 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9932 (match_dll): Use it.
9933
969c39fb
MM
99342014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9935
9936 * target.h (target_ops) <read_btrace>: Change parameters and
9937 return type to allow error reporting.
9938 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9939 trace reading errors on.
9940 * linux-low.c (linux_low_read_btrace): Pass trace reading
9941 errors on.
9942 (linux_low_disable_btrace): New.
9943
ab7f45ba
DE
99442014-01-15 Doug Evans <dje@google.com>
9945
9946 * inferiors.c (thread_id_to_gdb_id): Delete.
9947 * inferiors.h (thread_id_to_gdb_id): Delete.
9948
66af0f44
EZ
99492014-01-13 Eli Zaretskii <eliz@gnu.org>
9950
9951 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9952 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9953 versions.
9954
9939e131
PA
99552014-01-08 Pedro Alves <palves@redhat.com>
9956
9957 * server.c (handle_status): Don't discard previous queued stop
9958 replies or thread's pending status here.
9959 (main) <disconnection>: Do it here instead.
9960
b7ea362b
PA
99612014-01-08 Pedro Alves <palves@redhat.com>
9962
9963 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9964 * server.c (visit_actioned_threads, handle_pending_status): New
9965 function.
9966 (handle_v_cont): Factor out parts to ...
9967 (resume): ... this new function. If in all-stop, and a thread
9968 being resumed has a pending status, report it without actually
9969 resuming.
9970 (myresume): Adjust to use the new 'resume' function.
9971 (clear_pending_status_callback, set_pending_status_callback)
9972 (find_status_pending_thread_callback): New functions.
9973 (handle_status): Handle the case of multiple threads having
9974 interesting statuses to report. Report threads' real last signal
9975 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9976 with an interesting thread to report the status for, instead of
9977 always reporting the status of the first thread.
9978
28498c42
JB
99792014-01-01 Joel Brobecker <brobecker@adacore.com>
9980
9981 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9982 * gdbreplay.c (gdbreplay_version): Likewise.
9983
f45c82da
YZ
99842013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9985
9986 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9987 iov.iov_len with the real length in use.
9988
379a5e2d
JB
99892013-12-13 Joel Brobecker <brobecker@adacore.com>
9990
9991 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9992 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9993 for all targets that use win32-low.c.
9994 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9995 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9996
4210d83e
PA
99972013-12-13 Pedro Alves <palves@redhat.com>
9998
9999 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10000 if equal to TARGET_WAITKIND_LOADED.
10001 * win32-low.c (cached_status): New static global.
10002 (win32_wait): Add declaration.
10003 (do_initial_child_stuff): Flush all initial pending debug events
10004 up to the initial breakpoint.
10005 (win32_wait): If CACHED_STATUS was set, return that instead
10006 of doing a real wait. Remove the code resuming the execution
10007 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10008 during the initial phase. Also remove the code changing
10009 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10010 TARGET_WAITKIND_STOPPED.
10011
e7f0d979
YQ
100122013-12-11 Yao Qi <yao@codesourcery.com>
10013
10014 * notif.c (handle_notif_ack): Return 0 if no notification
10015 matches.
10016
ebcf782c
DE
100172013-11-20 Doug Evans <dje@google.com>
10018
10019 * linux-low.c (linux_set_resume_request): Fix comment.
10020
20ad9378
DE
100212013-11-20 Doug Evans <dje@google.com>
10022
10023 * linux-low.c (resume_status_pending_p): Tweak comment.
10024
a196ebeb
WT
100252013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10026
10027 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10028 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10029 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10030 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10031 (srv_amd64_regobj): Add amd64-mpx.o.
10032 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10033 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10034 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10035 * i387-fp.c (num_pl_bnd_register) Added constant.
10036 (num_pl_bnd_cfg_registers) Added constant.
10037 (struct i387_xsave) Added reserved area and MPX fields.
10038 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10039 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10040 function.
10041 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10042 (init_registers_amd64_mpx_linux): Declare new function.
10043 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10044 (x86_64_regmap): Add MPX registers.
10045 (x86_linux_read_description): Add MPX case.
10046 (initialize_low_arch): Initialize MPX targets.
10047
0080a2f6
TT
100482013-11-18 Tom Tromey <tromey@redhat.com>
10049
10050 * configure: Rebuild.
10051 * configure.ac: Don't check for stdlib.h.
10052 * gdbreplay.c: Unconditionally include stdlib.h.
10053
2978b111
TT
100542013-11-18 Tom Tromey <tromey@redhat.com>
10055
10056 * config.in: Rebuild.
10057 * configure: Rebuild.
10058 * configure.ac: Don't use AC_HEADER_DIRENT.
10059
a3d08894
TT
100602013-11-18 Tom Tromey <tromey@redhat.com>
10061
10062 * server.h: Don't check HAVE_STRING_H.
10063 * gdbreplay.c: Don't check HAVE_STRING_H.
10064 * configure: Rebuild.
10065
0a5dd17d
TT
100662013-11-18 Tom Tromey <tromey@redhat.com>
10067
10068 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10069 LIBGNU.
10070
1bd2f0ba
TT
100712013-11-08 Tom Tromey <tromey@redhat.com>
10072
10073 * configure, config.in: Rebuild.
10074 * configure.ac: Remove unused configury.
10075
3266f10b
TT
100762013-11-08 Tom Tromey <tromey@redhat.com>
10077
10078 * acinclude.m4: Include common.m4, codeset.m4.
10079 * configure, config.in: Rebuild.
10080 * configure.ac: Use GDB_AC_COMMON.
10081
6682d959
AA
100822013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10083
10084 * linux-s390-low.c (HWCAP_S390_TE): New define.
10085 (s390_arch_setup): Consider the TE field in the HWCAP for
10086 determining 'have_regset_tdb'.
10087
fd0a4d76
SDJ
100882013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10089
10090 PR gdb/16014
10091 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10092 call to sizeof.
10093
1a3d890b
PA
100942013-10-02 Pedro Alves <palves@redhat.com>
10095
10096 * server.c (process_serial_event): Don't output "GDBserver
10097 exiting" if GDB is connected through stdio.
10098 * target.c (mywait): Likewise, be silent if GDB is connected
10099 through stdio.
10100
97ad4581
JB
101012013-10-01 Joel Brobecker <brobecker@adacore.com>
10102
10103 * lynx-low.c (lynx_add_threads_after_attach): New function.
10104 (lynx_attach): Remove call to add_thread. Add call to
10105 lynx_add_threads_after_attach instead.
10106
5b4e221c
MF
101072013-09-28 Mike Frysinger <vapier@gentoo.org>
10108
10109 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10110 * config.in, configure: Regenerated.
10111
ee47b2f8
YQ
101122013-09-18 Yao Qi <yao@codesourcery.com>
10113
10114 PR server/15959
10115 * server.c (start_inferior): Clear 'resume_info'.
10116
d6707650 101172013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10118
d6707650
JW
10119 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10120 for each register.
10121
9243dd0e 101222013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10123
9243dd0e
JW
10124 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10125 linux-tile-low.o to srv_tgtobj.
10126
c623a6ef
WN
101272013-09-16 Will Newton <will.newton@linaro.org>
10128
10129 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10130 out regs.
10131
fb71d39e
PA
101322013-09-06 Pedro Alves <palves@redhat.com>
10133
10134 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10135 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10136 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10137 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10138 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10139 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10140
8e7e9910
PA
101412013-09-06 Pedro Alves <palves@redhat.com>
10142
10143 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10144 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10145
7c3a12ca
PA
101462013-09-06 Pedro Alves <palves@redhat.com>
10147
10148 * linux-amd64-ipa.c: Include tracepoint.h.
10149 * linux-i386-ipa.c: Include tracepoint.h.
10150
8eb3d7b6
RW
101512013-09-06 Ricard Wanderlof <ricardw@axis.com>
10152
10153 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10154 (ps_get_thread_area): New function.
10155
eddddb9d
RW
101562013-09-06 Ricard Wanderlof <ricardw@axis.com>
10157
10158 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10159 (initialize_low_arch): Call init_registers_crisv32 rather than
10160 init_register_crisv32.
10161
533b0600
PA
101622013-09-05 Pedro Alves <palves@redhat.com>
10163
10164 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10165 to ...
10166 * hostio.h: ... this new file.
10167 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10168 win32-low.c: Include hostio.h.
10169
0ce3d3b5
PA
101702013-09-05 Pedro Alves <palves@redhat.com>
10171
10172 * server.h (gdb_client_data, handler_func, callback_handler_func)
10173 (delete_file_handler, add_file_handler, append_callback_event)
10174 (delete_callback_event, start_event_loop, initialize_event_loop):
10175 Move to event-loop.h and include it.
10176 * event-loop.h: New file.
10177
799cdc37
PA
101782013-09-05 Pedro Alves <palves@redhat.com>
10179
10180 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10181 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10182 (loaded_dll, unloaded_dll): Move to ...
10183 * dll.h: ... this new file.
10184 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10185
6a6bbd9d
PA
101862013-09-05 Pedro Alves <palves@redhat.com>
10187
10188 * server.h (current_process, get_thread_process, all_processes)
10189 (add_inferior_to_list, for_each_inferior, current_inferior)
10190 (remove_inferior, add_process, remove_process, find_process_pid)
10191 (have_started_inferiors_p, have_attached_inferiors_p)
10192 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10193 (clear_inferiors, find_inferior, find_inferior_id)
10194 (inferior_target_data, set_inferior_target_data)
10195 (inferior_regcache_data, set_inferior_regcache_data): Move to
10196 inferiors.h, and include it.
10197 * inferiors.h: New file.
10198
f699aaba
PA
101992013-09-05 Pedro Alves <palves@redhat.com>
10200
10201 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10202 Move ...
72f4393d 10203 * ax.h: ... here.
f699aaba 10204
c144c7a0
PA
102052013-09-05 Pedro Alves <palves@redhat.com>
10206
10207 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10208 tracepoint.h.
10209 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10210 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10211 (handle_tracepoint_general_set, handle_tracepoint_query)
10212 (tracepoint_finished_step, tracepoint_was_hit)
10213 (release_while_stepping_state_list, current_traceframe)
10214 (in_readonly_region, traceframe_read_mem)
10215 (fetch_traceframe_registers, traceframe_read_sdata)
10216 (traceframe_read_info, struct fast_tpoint_collect_status)
10217 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10218 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10219 (supply_fast_tracepoint_registers)
10220 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10221 (ipa_tdesc, claim_trampoline_space)
10222 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10223 (agent_mem_read, agent_get_trace_state_variable_value)
10224 (agent_set_trace_state_variable_value, agent_tsv_read)
10225 (agent_mem_read_string, get_raw_reg_func_addr)
10226 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10227 * tracepoint.h: ... this new file.
10228
ff42e6ab
PA
102292013-09-05 Pedro Alves <palves@redhat.com>
10230
10231 * server.h (perror_with_name, error, fatal, warning, paddress)
10232 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10233 include it.
10234 * utils.h: New file.
10235
541af0f4
PA
102362013-09-05 Pedro Alves <palves@redhat.com>
10237
10238 * server.h (remote_debug, noack_mode, transport_is_reliable)
10239 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10240 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10241 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10242 (write_enn, initialize_async_io, enable_async_io)
10243 (disable_async_io, check_remote_input_interrupt_request)
10244 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10245 (dead_thread_notify, prepare_resume_reply)
10246 (decode_address_to_semicolon, decode_address, decode_m_packet)
10247 (decode_M_packet, decode_X_packet, decode_xfer_write)
10248 (decode_search_memory_packet, unhexify, hexify)
10249 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10250 (look_up_one_symbol, relocate_instruction)
10251 (monitor_output): Move to remote-utils.h, and include it.
10252 * remote-utils.h: New file.
10253
eebdf26b
PA
102542013-09-05 Pedro Alves <palves@redhat.com>
10255
10256 * server.h (_): Delete.
10257
3aafd2ff
PA
102582013-09-02 Pedro Alves <palves@redhat.com>
10259
10260 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10261 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10262 allocated.
10263 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10264
cee83bcb
PM
102652013-09-02 Pierre Muller <muller@sourceware.org>
10266
10267 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10268 or WriteProcessMemory complete successfully and handle
10269 ERROR_PARTIAL_COPY error.
10270
9a13b2fa
PA
102712013-09-02 Pedro Alves <palves@redhat.com>
10272
10273 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10274 error instead of EIO.
10275
602e3198
JK
102762013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10277
10278 PR server/15604
10279 * linux-low.c: Include filestuff.h.
10280 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10281 * lynx-low.c: Include filestuff.h.
10282 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10283 * server.c: Include filestuff.h.
10284 (main): Call notice_open_fds.
10285 * spu-low.c: Include filestuff.h.
10286 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10287
96d7229d
LM
102882013-08-22 Luis Machado <lgustavo@codesourcery.com>
10289
10290 * Makefile.in: Explain why ../target and ../nat are not
10291 listed as include file search paths.
10292 (linux-waitpid.o): New object file rule.
10293 * configure.srv (srv_native_linux_obj): New variable.
10294 Replace all occurrences of linux native object files with
10295 $srv_native_linux_obj.
10296 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10297 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10298 (linux_enable_event_reporting): Remove declaration.
10299 (my_waitpid): Moved to common/linux-waitpid.c.
10300 (linux_wait_for_event): Pass ptid when calling
10301 linux_enable_event_reporting.
10302 (linux_supports_tracefork_flag): Remove.
10303 (linux_enable_event_reporting): Likewise.
10304 (linux_tracefork_grandchild): Remove.
10305 (STACK_SIZE): Moved to common/linux-ptrace.c.
10306 (linux_tracefork_child): Remove.
10307 (linux_test_for_tracefork): Remove.
10308 (linux_look_up_symbols): Call linux_supports_traceclone.
10309 (initialize_low): Remove call to linux_test_for_tracefork.
10310 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10311 common/linux-ptrace.h.
10312 (PTRACE_TYPE_ARG4): Likewise.
10313 Include linux-ptrace.h.
10314
32940073
PA
103152013-08-21 Pedro Alves <palves@redhat.com>
10316
10317 * config.in: Renegerate.
10318
33b60d58 103192013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 10320
33b60d58
LM
10321 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10322 (SFILES): Remove $(srcdir)/common/target-common.c and
10323 add $(srcdir)/target/waitstatus.c.
10324 (OBS): Remove target-common.o and add waitstatus.o.
10325 (server_h): Remove $(srcdir)/../common/target-common.h and
10326 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10327 and $(srcdir)/../target/waitstatus.h.
10328 (target-common.o): Remove.
10329 (waitstatus.o): New target object file.
10330 * target.h: Do not include target-common.h and
10331 include target/resume.h, target/wait.h and
10332 target/waitstatus.h.
10333
b8e1b30e
LM
103342013-08-13 Luis Machado <lgustavo@codesourcery.com>
10335
10336 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10337 to PTRACE_TYPE_ARG3.
10338 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10339 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10340 PTRACE_TYPE_ARG4.
10341 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10342 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10343
7a60ad40
YQ
103442013-07-27 Jie Zhang <jie@codesourcery.com>
10345 Daniel Jacobowitz <dan@codesourcery.com>
10346 Yao Qi <yao@codesourcery.com>
10347
10348 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10349 (mips-linux-watch.o): New rule.
10350 (mips_linux_watch_h): New variable.
10351 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10352 srv_tgtobj.
10353 * linux-mips-low.c: Include mips-linux-watch.h.
10354 (struct arch_process_info, struct arch_lwp_info): New.
10355 (update_watch_registers_callback): New function.
10356 (mips_linux_new_process, mips_linux_new_thread) New functions.
10357 (mips_linux_prepare_to_resume, mips_insert_point): New
10358 functions.
10359 (mips_remove_point, mips_stopped_by_watchpoint): New
10360 functions.
10361 (rsp_bp_type_to_target_hw_bp_type): New function.
10362 (mips_stopped_data_address): New function.
10363 (the_low_target): Add watchpoint support functions.
10364
de6f69ad
YQ
103652013-07-27 Yao Qi <yao@codesourcery.com>
10366
10367 * i386-low.c: Include break-common.h.
10368 (enum target_hw_bp_type): Remove.
10369
3360c0bf
LM
103702013-07-24 Luis Machado <lgustavo@codesourcery.com>
10371
10372 * Makefile.in (SFILES): /common/target-common.c.
10373 (OBS): Add target-common.o.
10374 (server_h): Add $(srcdir)/../common/target-common.h.
10375 (target-common.o): New target.
10376 * server.c (queue_stop_reply_callback): Free
10377 status string after use.
10378 * target.c (target_waitstatus_to_string): Remove.
10379 * target.h: Include target-common.h.
10380 (resume_kind): Likewise.
10381 (target_waitkind): Likewise.
10382 (target_waitstatus): Likewise.
10383 (TARGET_WNOHANG): Likewise.
10384
bd885420
YQ
103852013-07-04 Yao Qi <yao@codesourcery.com>
10386
10387 * Makefile.in (host_alias): Use @host_noncanonical@.
10388 (target_alias): Use @target_noncanonical@.
10389 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10390 ACX_NONCANONICAL_HOST.
10391 * configure: Regenerated.
10392
10393 Revert:
10394 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10395
10396 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10397 * configure: Rebuild.
10398 * Makefile.in (version_host, version_target): Get from configure.
10399 (version.c): Use $(version_host) and $(version_target).
10400
17ef446e
PA
104012013-07-03 Pedro Alves <palves@redhat.com>
10402
10403 * Makefile.in (config.status): Depend on development.sh.
10404 * acinclude.m4: Include libmcheck.m4.
10405 * configure: Regenerate.
10406
7a9a7487
MG
104072013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10408
10409 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10410 attribute inside the parentheses.
10411 (winapi_DebugSetProcessKillOnExit): Ditto.
10412 (winapi_DebugBreakProcess): Ditto.
10413 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 10414
49b64de6
MG
104152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10416
10417 * notif.h (notif_event): Add a dummy member to avoid compiler
10418 errors.
10419
d5749ee7
PA
104202013-07-01 Pedro Alves <palves@redhat.com>
10421
10422 * hostio.c (HOSTIO_PATH_MAX): Define.
10423 (require_filename, handle_open, handle_unlink, handle_readlink):
10424 Use it.
10425
d8d2a3ee
PA
104262013-07-01 Pedro Alves <palves@redhat.com>
10427
10428 * server.h: Include "pathmax.h".
10429 * linux-low.c: Don't include sys/param.h.
10430 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10431 MAXPATHLEN.
10432 * win32-low.c: Don't include sys/param.h.
10433 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10434
bc7dea8d
PA
104352013-07-01 Pedro Alves <palves@redhat.com>
10436
10437 * event-loop.c: Don't check HAVE_UNISTD_H before including
10438 <unistd.h>.
10439 * gdbreplay.c: Likewise.
10440 * remote-utils.c: Likewise.
10441 * server.c: Likewise.
10442 * configure.ac: Don't check for unistd.h.
10443 * configure: Regenerate.
10444
d6c2da54
TT
104452013-06-28 Tom Tromey <tromey@redhat.com>
10446
10447 * Makefile.in (version.c): Use version.in, not
10448 common/version.in.
10449
257b6bec
MG
104502013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10451
10452 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10453 * configure: Rebuild.
10454 * Makefile.in (version_host, version_target): Get from configure.
10455 (version.c): Use $(version_host) and $(version_target).
10456
86ebe149
DK
104572013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10458
10459 Fix trace-status to output user name without trailing colon.
10460 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10461
f30aa5af
DK
104622013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10463
10464 Fix trace-status to output proper start-time and stop-time.
10465 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10466 output start time and stop time in hex as gdb expects.
10467
28a93511
YQ
104682013-06-26 Pedro Alves <pedro@codesourcery.com>
10469
10470 * tracepoint.c (build_traceframe_info_xml): Output trace state
10471 variables present in the trace buffer.
10472
01208463
TT
104732013-06-24 Tom Tromey <tromey@redhat.com>
10474
10475 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10476 create-version.sh.
10477 (version.o): Remove.
10478 * gdbreplay.c: Include version.h.
10479 (version, host_name): Don't declare.
10480 * server.h: Include version.h.
10481 (version, host_name): Don't declare.
10482
760256f9
PA
104832013-06-12 Pedro Alves <palves@redhat.com>
10484
10485 * linux-x86-low.c (linux_is_elf64): Delete global.
10486 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10487 with local linux_pid_exe_is_elf_64_file use.
10488
030031ee
PA
104892013-06-11 Pedro Alves <palves@redhat.com>
10490
10491 * linux-low.c (regset_disabled, disable_regset): New functions.
10492 (regsets_fetch_inferior_registers)
10493 (regsets_store_inferior_registers): Use them.
10494 (initialize_regsets_info); Don't allocate the disabled_regsets
10495 array here.
10496 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10497 comment.
10498
5da6eb0a
PA
104992013-06-11 Pedro Alves <palves@redhat.com>
10500
10501 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10502 xmalloc.
10503
7e5aaa09
PA
105042013-06-11 Pedro Alves <palves@redhat.com>
10505
10506 * linux-x86-low.c (initialize_low_arch): Call
10507 init_registers_x32_avx_linux.
10508
d878444c
JK
105092013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10510
10511 Fix compatibility with Android Bionic.
10512 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10513 it is not empty.
10514
3aee8918
PA
105152013-06-07 Pedro Alves <palves@redhat.com>
10516
5f2b57b5 10517 PR server/14823
3aee8918
PA
10518 * Makefile.in (OBS): Add tdesc.o.
10519 (IPA_OBJS): Add tdesc-ipa.o.
10520 (tdesc-ipa.o): New rule.
10521 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10522 interface.
10523 * linux-low.c (new_inferior): Delete.
10524 (disabled_regsets, num_regsets): Delete.
10525 (linux_add_process): Adjust to set the new per-process
10526 new_inferior flag.
10527 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10528 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10529 was a stop. When calling arch_setup, switch the current inferior
10530 to the thread that got an event.
10531 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10532 (regsets_fetch_inferior_registers)
10533 (regsets_store_inferior_registers): New regsets_info parameter.
10534 Adjust to use it.
10535 (linux_register_in_regsets): New regs_info parameter. Adjust to
10536 use it.
10537 (register_addr, fetch_register, store_register): New usrregs_info
10538 parameter. Adjust to use it.
10539 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10540 parameter regs_info. Adjust to use it.
10541 (linux_fetch_registers): Get the current inferior's regs_info, and
10542 adjust to use it.
10543 (linux_store_registers): Ditto.
10544 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10545 (initialize_low): Don't initialize the target_regsets here. Call
10546 initialize_low_arch.
10547 * linux-low.h (target_regsets): Delete declaration.
10548 (struct regsets_info): New.
10549 (struct usrregs_info): New.
10550 (struct regs_info): New.
10551 (struct process_info_private) <new_inferior>: New field.
10552 (struct linux_target_ops): Delete the num_regs, regmap, and
10553 regset_bitmap fields. New field regs_info.
10554 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10555 * i387-fp.c (num_xmm_registers): Delete.
10556 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10557 calls to new interface.
10558 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10559 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10560 Infer the number of xmm registers from the regcache's target
10561 description.
10562 * i387-fp.h (num_xmm_registers): Delete.
10563 * inferiors.c (add_thread): Don't install the thread's regcache
10564 here.
10565 * proc-service.c (gregset_info): Fetch the current inferior's
10566 regs_info. Adjust to use it.
10567 * regcache.c: Include tdesc.h.
10568 (register_bytes, reg_defs, num_registers)
10569 (gdbserver_expedite_regs): Delete.
10570 (get_thread_regcache): If the thread doesn't have a regcache yet,
10571 create one, instead of aborting gdbserver.
10572 (regcache_invalidate_one): Rename to ...
10573 (regcache_invalidate_thread): ... this.
10574 (regcache_invalidate_one): New.
10575 (regcache_invalidate): Only invalidate registers of the current
10576 process.
10577 (init_register_cache): Add target_desc parameter, and use it.
10578 (new_register_cache): Ditto. Assert the target description has a
10579 non zero registers_size.
10580 (regcache_cpy): Add assertions. Adjust.
10581 (realloc_register_cache, set_register_cache): Delete.
10582 (registers_to_string, registers_from_string): Adjust.
10583 (find_register_by_name, find_regno, find_register_by_number)
10584 (register_cache_size): Add target_desc parameter, and use it.
10585 (free_register_cache_thread, free_register_cache_thread_one)
10586 (regcache_release, register_cache_size): New.
10587 (register_size): Add target_desc parameter, and use it.
10588 (register_data, supply_register, supply_register_zeroed)
10589 (supply_regblock, supply_register_by_name, collect_register)
10590 (collect_register_as_string, collect_register_by_name): Adjust.
10591 * regcache.h (struct target_desc): Forward declare.
10592 (struct regcache) <tdesc>: New field.
10593 (init_register_cache, new_register_cache): Add target_desc
10594 parameter.
10595 (regcache_invalidate_thread): Declare.
10596 (regcache_invalidate_one): Delete declaration.
10597 (regcache_release): Declare.
10598 (find_register_by_number, register_cache_size, register_size)
10599 (find_regno): Add target_desc parameter.
10600 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10601 declarations.
10602 * remote-utils.c: Include tdesc.h.
10603 (outreg, prepare_resume_reply): Adjust.
10604 * server.c: Include tdesc.h.
10605 (gdbserver_xmltarget): Delete declaration.
10606 (get_features_xml, process_serial_event): Adjust.
10607 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10608 declare.
10609 (struct process_info) <tdesc>: New field.
10610 (ipa_tdesc): Declare.
10611 * tdesc.c: New file.
10612 * tdesc.h: New file.
10613 * tracepoint.c: Include tdesc.h.
10614 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10615 (get_context_regcache): Adjust to pass ipa_tdesc down.
10616 (do_action_at_tracepoint): Adjust to get the register cache size
10617 from the context regcache's description.
10618 (traceframe_walk_blocks): Adjust to get the register cache size
10619 from the current trace frame's description.
10620 (traceframe_get_pc): Adjust to get current trace frame's
10621 description and pass it down.
10622 (gdb_collect): Adjust to get the register cache size from the
10623 IPA's description.
10624 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10625 (gdbserver_xmltarget): Delete.
10626 (initialize_low_tracepoint): Set the ipa's target description.
10627 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10628 (initialize_low_tracepoint): Set the ipa's target description.
10629 * linux-x86-low.c: Include tdesc.h.
10630 [__x86_64__] (is_64bit_tdesc): New.
10631 (ps_get_thread_area, x86_get_thread_area): Use it.
10632 (i386_cannot_store_register): Rename to ...
10633 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10634 (i386_cannot_fetch_register): Rename to ...
10635 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10636 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10637 to new interface.
10638 (target_regsets): Rename to ...
10639 (x86_regsets): ... this.
10640 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10641 interface.
10642 (x86_siginfo_fixup): Use is_64bit_tdesc.
10643 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10644 (tdesc_x32_avx_linux, tdesc_x32_linux)
10645 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10646 Declare.
10647 (x86_linux_update_xmltarget): Delete.
10648 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10649 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10650 (AMD64_LINUX_USER64_CS): New.
10651 (x86_linux_read_description): New, based on
10652 x86_linux_update_xmltarget.
10653 (same_process_callback): New.
10654 (x86_arch_setup_process_callback): New.
10655 (x86_linux_update_xmltarget): New.
10656 (x86_regsets_info): New.
10657 (amd64_linux_regs_info): New.
10658 (i386_linux_usrregs_info): New.
10659 (i386_linux_regs_info): New.
10660 (x86_linux_regs_info): New.
10661 (x86_arch_setup): Reimplement.
10662 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10663 (x86_emit_ops): Ditto.
10664 (the_low_target): Adjust. Install x86_linux_regs_info,
10665 x86_cannot_fetch_register, and x86_cannot_store_register.
10666 (initialize_low_arch): New.
10667 * linux-ia64-low.c (tdesc_ia64): Declare.
10668 (ia64_fetch_register): Adjust.
10669 (ia64_usrregs_info, regs_info): New globals.
10670 (ia64_regs_info): New function.
10671 (the_low_target): Adjust.
10672 (initialize_low_arch): New function.
10673 * linux-sparc-low.c (tdesc_sparc64): Declare.
10674 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10675 Adjust.
10676 (sparc_arch_setup): New function.
10677 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10678 (the_low_target): Adjust.
10679 (initialize_low_arch): New function.
10680 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10681 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10682 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10683 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10684 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10685 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10686 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10687 (tdesc_powerpc_isa205_vsx64l): Declare.
10688 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10689 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10690 (ppc_set_pc, ppc_get_hwcap): Adjust.
10691 (ppc_usrregs_info): Forward declare.
10692 (!__powerpc64__) ppc_regmap_adjusted: New global.
10693 (ppc_arch_setup): Adjust to the current process'es target
10694 description.
10695 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10696 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10697 (ppc_store_evrregset): Adjust.
10698 (target_regsets): Rename to ...
10699 (ppc_regsets): ... this, and make static.
10700 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10701 (ppc_regs_info): New function.
10702 (the_low_target): Adjust.
10703 (initialize_low_arch): New function.
10704 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10705 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10706 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10707 (tdesc_s390x_linux64v2): Declare.
10708 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10709 (s390_fill_gregset, s390_store_last_break): Adjust.
10710 (target_regsets): Rename to ...
10711 (s390_regsets): ... this, and make static.
10712 (s390_get_pc, s390_set_pc): Adjust.
10713 (s390_get_hwcap): New target_desc parameter, and use it.
10714 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10715 (s390_arch_setup): Adjust to set the current process'es target
10716 description. Don't adjust the regmap.
10717 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10718 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10719 (regs_info_3264): New globals.
10720 (s390_regs_info): New function.
10721 (the_low_target): Adjust.
10722 (initialize_low_arch): New function.
10723 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10724 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10725 [__mips64] (init_registers_mips_linux)
10726 (init_registers_mips_dsp_linux): Delete defines.
10727 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10728 (have_dsp): New global.
10729 (mips_read_description): New, based on mips_arch_setup.
10730 (mips_arch_setup): Reimplement.
10731 (get_usrregs_info): New function.
10732 (mips_cannot_fetch_register, mips_cannot_store_register)
10733 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10734 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10735 (target_regsets): Rename to ...
10736 (mips_regsets): ... this, and make static.
10737 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10738 (dsp_regs_info, regs_info): New globals.
10739 (mips_regs_info): New function.
10740 (the_low_target): Adjust.
10741 (initialize_low_arch): New function.
10742 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10743 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10744 Declare.
10745 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10746 (arm_read_description): New, with bits factored from
10747 arm_arch_setup.
10748 (arm_arch_setup): Reimplement.
10749 (target_regsets): Rename to ...
10750 (arm_regsets): ... this, and make static.
10751 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10752 (arm_regs_info): New function.
10753 (the_low_target): Adjust.
10754 (initialize_low_arch): New function.
10755 * linux-m68k-low.c (tdesc_m68k): Declare.
10756 (target_regsets): Rename to ...
10757 (m68k_regsets): ... this, and make static.
10758 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10759 (m68k_regs_info): New function.
10760 (m68k_arch_setup): New function.
10761 (the_low_target): Adjust.
10762 (initialize_low_arch): New function.
10763 * linux-sh-low.c (tdesc_sharch): Declare.
10764 (target_regsets): Rename to ...
10765 (sh_regsets): ... this, and make static.
10766 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10767 (sh_regs_info, sh_arch_setup): New functions.
10768 (the_low_target): Adjust.
10769 (initialize_low_arch): New function.
10770 * linux-bfin-low.c (tdesc_bfin): Declare.
10771 (bfin_arch_setup): New function.
10772 (bfin_usrregs_info, regs_info): New globals.
10773 (bfin_regs_info): New function.
10774 (the_low_target): Adjust.
10775 (initialize_low_arch): New function.
10776 * linux-cris-low.c (tdesc_cris): Declare.
10777 (cris_arch_setup): New function.
10778 (cris_usrregs_info, regs_info): New globals.
10779 (cris_regs_info): New function.
10780 (the_low_target): Adjust.
10781 (initialize_low_arch): New function.
10782 * linux-cris-low.c (tdesc_crisv32): Declare.
10783 (cris_arch_setup): New function.
10784 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10785 (cris_regs_info): New function.
10786 (the_low_target): Adjust.
10787 (initialize_low_arch): New function.
10788 * linux-m32r-low.c (tdesc_m32r): Declare.
10789 (m32r_arch_setup): New function.
10790 (m32r_usrregs_info, regs_info): New globals.
10791 (m32r_regs_info): Adjust.
10792 (initialize_low_arch): New function.
10793 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10794 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10795 (tic6x_usrregs_info): Forward declare.
10796 (tic6x_read_description): New function, based on ...
10797 (tic6x_arch_setup): ... this. Reimplement.
10798 (target_regsets): Rename to ...
10799 (tic6x_regsets): ... this, and make static.
10800 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10801 (tic6x_regs_info): New function.
10802 (the_low_target): Adjust.
10803 (initialize_low_arch): New function.
10804 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10805 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10806 (target_regsets): Rename to ...
10807 (xtensa_regsets): ... this, and make static.
10808 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10809 globals.
10810 (xtensa_arch_setup, xtensa_regs_info): New functions.
10811 (the_low_target): Adjust.
10812 (initialize_low_arch): New function.
10813 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10814 (nios2_arch_setup): Set the current process'es tdesc.
10815 (target_regsets): Rename to ...
10816 (nios2_regsets): ... this.
10817 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10818 (nios2_regs_info): New function.
10819 (the_low_target): Adjust.
10820 (initialize_low_arch): New function.
a261b8f5
PA
10821 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10822 (aarch64_arch_setup): Set the current process'es tdesc.
10823 (target_regsets): Rename to ...
10824 (aarch64_regsets): ... this.
10825 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10826 (aarch64_regs_info): New function.
10827 (the_low_target): Adjust.
10828 (initialize_low_arch): New function.
3aee8918
PA
10829 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10830 globals.
10831 (target_regsets): Rename to ...
10832 (tile_regsets): ... this.
10833 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10834 (tile_regs_info): New function.
10835 (tile_arch_setup): Set the current process'es tdesc.
10836 (the_low_target): Adjust.
10837 (initialize_low_arch): New function.
10838 * spu-low.c (tdesc_spu): Declare.
10839 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10840 * win32-arm-low.c (tdesc_arm): Declare.
10841 (arm_arch_setup): New function.
10842 (the_low_target): Install arm_arch_setup instead of
10843 init_registers_arm.
10844 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10845 (init_windows_x86): Rename to ...
10846 (i386_arch_setup): ... this. Set `win32_tdesc'.
10847 (the_low_target): Adjust.
10848 * win32-low.c (win32_tdesc): New global.
10849 (child_add_thread): Don't create the thread cache here.
10850 (do_initial_child_stuff): Set the new process'es tdesc.
10851 * win32-low.h (struct target_desc): Forward declare.
10852 (win32_tdesc): Declare.
10853 * lynx-i386-low.c (tdesc_i386): Declare global.
10854 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10855 * lynx-low.c (lynx_tdesc): New global.
10856 (lynx_add_process): Set the new process'es tdesc.
10857 * lynx-low.h (struct target_desc): Forward declare.
10858 (lynx_tdesc): Declare global.
10859 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10860 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10861 * nto-low.c (nto_tdesc): New global.
10862 (do_attach): Set the new process'es tdesc.
10863 * nto-low.h (struct target_desc): Forward declare.
10864 (nto_tdesc): Declare.
10865 * nto-x86-low.c (tdesc_i386): Declare.
10866 (nto_x86_arch_setup): Set `nto_tdesc'.
10867
b1fbec62
GB
108682013-06-04 Gary Benson <gbenson@redhat.com>
10869
10870 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10871 to qSupported response when appropriate.
10872 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10873 with nonzero-length annex.
10874 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10875 arguments supplied in annex.
10876
d1ec4ce7
DE
108772013-05-31 Doug Evans <dje@google.com>
10878
ac44adcb 10879 PR server/15594
d1ec4ce7
DE
10880 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10881 64 bits in 64-cross-32 environment.
10882
9b25f2d3
PA
108832013-05-28 Pedro Alves <palves@redhat.com>
10884
10885 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10886 (aarch64-without-fpu.c): Delete rule.
10887 * configure.srv (aarch64*-*-linux*): Remove references to
10888 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10889 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10890 declaration.
10891
6740dc9c
PA
108922013-05-24 Pedro Alves <palves@redhat.com>
10893
10894 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10895 instead of strchr/decode_address. Error if the range isn't split
10896 with a ','. Don't assume there's be a ':' in the action.
10897
c2d6af84
PA
108982013-05-23 Yao Qi <yao@codesourcery.com>
10899 Pedro Alves <palves@redhat.com>
10900
10901 * linux-low.c (lwp_in_step_range): New function.
10902 (linux_wait_1): If the thread was range stepping and stopped
10903 outside the stepping range, report the stop to GDB. Otherwise,
10904 continue stepping. Add range stepping debug output.
10905 (linux_set_resume_request): Copy the step range from the resume
10906 request to the lwp.
10907 (linux_supports_range_stepping): New.
10908 (linux_target_ops) <supports_range_stepping>: Set to
10909 linux_supports_range_stepping.
10910 * linux-low.h (struct linux_target_ops)
10911 <supports_range_stepping>: New field.
10912 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10913 * linux-x86-low.c (x86_supports_range_stepping): New.
10914 (the_low_target) <supports_range_stepping>: Set to
10915 x86_supports_range_stepping.
10916 * server.c (handle_v_cont): Handle 'r' action.
10917 (handle_v_requests): Append ";r" if the target supports range
10918 stepping.
10919 * target.h (struct thread_resume) <step_range_start,
10920 step_range_end>: New fields.
10921 (struct target_ops) <supports_range_stepping>:
10922 New field.
10923 (target_supports_range_stepping): New macro.
10924
58794e1a
JB
109252013-05-17 Joel Brobecker <brobecker@adacore.com>
10926
10927 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10928 confusion in comment.
10929
d631c5a7
JB
109302013-05-17 Joel Brobecker <brobecker@adacore.com>
10931
10932 * lynx-low.c (struct process_info_private): New type.
10933 (lynx_add_process): New function.
10934 (lynx_create_inferior, lynx_attach): Replace calls to
10935 add_process by calls to lynx_add_process.
10936 (lynx_resume): If PTID is null, then try using
10937 current_process()->private->last_wait_event_ptid.
10938 Add comments.
10939 (lynx_clear_inferiors): Delete. The contents of that function
10940 has been inlined in lynx_mourn;
10941 (lynx_wait_1): Save the ptid in the process's private data.
10942 (lynx_mourn): Free the process' private data. Replace call
10943 to lynx_clear_inferiors by call to clear_inferiors.
10944
96f7a20f
YQ
109452013-05-17 Yao Qi <yao@codesourcery.com>
10946
10947 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10948 the right place.
10949
db0dfaa0
LM
109502013-05-16 Luis Machado <lgustavo@codesourcery.com>
10951
10952 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10953 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10954 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10955 PT_TEXT_END_ADDR guards. Update comments.
10956 (linux_target_op) <read_offsets>: Conditionally define to
10957 linux_read_offsets if the target is UCLIBC and if it defines
10958 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10959
68f5f838
SL
109602013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10961 Andrew Jenner <andrew@codesourcery.com>
10962
10963 * Makefile.in (SFILES): Add linux-nios2-low.c.
10964 (clean): Add action to delete nios2-linux.c.
10965 (nios2-linux.c): New rule.
10966 * configure.srv: Add nios2*-*-linux*.
10967 * linux-nios2-low.c: New.
10968
1ebff1fd
HAQ
109692013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10970
10971 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10972
f6150862
HZ
109732013-04-25 Hui Zhu <hui@codesourcery.com>
10974
10975 PR gdb/15186
f6150862
HZ
10976 * ax.c (ax_printf): Add fflush.
10977
614c279d
TT
109782013-04-22 Tom Tromey <tromey@redhat.com>
10979
10980 * Makefile.in (SFILES): Add filestuff.c.
10981 (OBS): Add filestuff.o.
10982 (filestuff.o): New target.
10983 * config.in, configure: Rebuild.
10984 * configure.ac: Check for fdwalk, pipe2.
10985
7d4e5717
PA
109862013-04-17 Pedro Alves <palves@redhat.com>
10987
10988 * configure.ac (USE_THREAD_DB): Delete variable.
10989 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10990 Don't AC_SUBST USE_THREAD_DB.
10991 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10992 * config.in, configure: Regenerate.
10993
d5c93e41
PA
109942013-04-16 Pedro Alves <palves@redhat.com>
10995
10996 * linux-low.h (struct lwp_info) <thread_known>: Move under
10997 the USE_THREAD_DB #ifdef.
10998
04f5fe89
PA
109992013-04-16 Pedro Alves <palves@redhat.com>
11000
11001 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11002 (linux-low.o): Delete rule.
11003 * linux-low.h: Always include "gdb_thread_db.h" instead of
11004 conditionally including thread_db.h.
11005 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11006 HAVE_THREAD_DB_H.
11007
480b27bf
JK
110082013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11009
11010 * Makefile.in (install-only): Fix make install regression.
11011
43662968
JK
110122013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11013
11014 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11015 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11016 installation.
11017 * gdbserver.1: Remove.
11018
3e74e146
PA
110192013-03-22 Pedro Alves <palves@redhat.com>
11020
11021 * linux-low.c (handle_extended_wait): Don't call
11022 linux_enable_event_reporting.
11023
a8347a2a
TT
110242013-03-15 Tony Theodore <tonyt@logyst.com>
11025
11026 PR build/9098:
11027 * Makefile.in (SHELL): Use @SHELL@.
11028
eeb56fa7
SDJ
110292013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11030
11031 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11032 compiler warning.
11033
4fa7e2ff
JB
110342013-03-13 Joel Brobecker <brobecker@adacore.com>
11035
11036 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11037 Remove extraneous NULL element.
11038
8ddb1965
YQ
110392013-03-13 Yao Qi <yao@codesourcery.com>
11040
11041 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11042 'V' block in trace frame.
11043
9accd112
MM
110442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11045
11046 * target.h (struct target_ops): Add btrace ops.
11047 (target_supports_btrace): New macro.
11048 (target_enable_btrace): New macro.
11049 (target_disable_btrace): New macro.
11050 (target_read_btrace): New macro.
11051 * gdbthread.h (struct thread_info): Add btrace field.
11052 * server.c: Include btrace-common.h.
11053 (handle_btrace_general_set): New function.
11054 (handle_btrace_enable): New function.
11055 (handle_btrace_disable): New function.
11056 (handle_general_set): Call handle_btrace_general_set.
11057 (handle_qxfer_btrace): New function.
11058 (struct qxfer qxfer_packets[]): Add btrace entry.
11059 * inferiors.c (remove_thread): Disable btrace.
11060 * linux-low: Include linux-btrace.h.
11061 (linux_low_enable_btrace): New function.
11062 (linux_low_read_btrace): New function.
11063 (linux_target_ops): Add btrace ops.
11064 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11065 Add srv_linux_btrace=yes.
11066 (x86_64-*-linux*): Add linux-btrace.o.
11067 Add srv_linux_btrace=yes.
11068 * configure.ac: Define HAVE_LINUX_BTRACE.
11069 * config.in: Regenerated.
11070 * configure: Regenerated.
11071
5cc22e4c
MM
110722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11073
11074 * server.c (handle_qxfer): Preserve error message if -3 is
11075 returned.
11076 (qxfer): Document the -3 return value.
11077
7c97f91e
MM
110782013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11079
11080 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11081 (linux_btrace_h): New variable.
11082 (linux-btrace.o): New rule.
11083
be9a119c 110842013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
11085 Hafiz Abid Qadeer <abidh@codesourcery.com>
11086
11087 * tracepoint.c (trace_buffer_size): New global.
11088 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11089 (init_trace_buffer): Change to one-argument function. Allocate
11090 trace buffer memory.
11091 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11092 handle QTBuffer:size packet.
11093 (cmd_bigqtbuffer_size): New function.
11094 (initialize_tracepoint): Call init_trace_buffer with
11095 DEFAULT_TRACE_BUFFER_SIZE.
11096 * server.c (handle_query): Add QTBuffer:size in the
11097 supported packets.
11098
e64f7499
YQ
110992013-03-07 Yao Qi <yao@codesourcery.com>
11100
11101 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11102 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11103 of -1.
11104 (cmd_qtsp): Adjust condition. Do post increment.
11105 Set cur_action and cur_step_action back to 0.
11106
f0ae6fc3
PA
111072013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11108
11109 PR server/15236
11110 * linux-low.c (linux_write_memory): Return early success if LEN is
11111 zero.
11112
b5b0b0af
CV
111132013-03-05 Corinna Vinschen <vinschen@redhat.de>
11114
334ad4a8 11115 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 11116
589bc927
TT
111172013-02-28 Tom Tromey <tromey@redhat.com>
11118
11119 * configure.ac: Invoke AC_SYS_LARGEFILE.
11120 * configure, config.in: Rebuild.
11121
dfe07582
CV
111222013-02-28 Corinna Vinschen <vinschen@redhat.com>
11123
11124 * win32-low.c: Throughout, fix format strings and casts of
11125 printf-like functions to avoid type related warnings on all
11126 platforms.
11127 (get_child_debug_event): Print dwDebugEventCode as hex since
11128 that's how it's usually documented.
11129
736cd585
YQ
111302013-02-28 Yao Qi <yao@codesourcery.com>
11131
11132 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11133 pulongest.
11134
e1f58301
JW
111352013-02-27 Jiong Wang <jiwang@tilera.com>
11136
11137 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11138 (reg-tilegx32.c): New rule.
11139 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11140 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11141 different register info initializer according to elf class.
11142 (init_registers_tilgx32): New function. The tilegx32 register info
11143 initializer.
11144 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11145 (tile_store_gregset): Likewise.
11146
d171ca78
YQ
111472013-02-27 Yao Qi <yao@codesourcery.com>
11148
11149 * server.c (process_point_options): Print debug message when
11150 debug_threads is true.
11151
282bbdf3
YQ
111522013-02-26 Yao Qi <yao@codesourcery.com>
11153
11154 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11155
aca22551
PA
111562013-02-19 Pedro Alves <palves@redhat.com>
11157 Kai Tietz <ktietz@redhat.com>
11158
11159 PR gdb/15161
11160
11161 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11162 instead of strtoul to extract address from packet.
11163 (process_serial_event) <'z'>: Likewise.
11164
4f3cee1c
YQ
111652013-02-18 Yao Qi <yao@codesourcery.com>
11166
11167 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11168
8e1d55a3
PA
111692013-02-14 Pedro Alves <palves@redhat.com>
11170
11171 Plug memory leak.
11172
11173 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11174 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11175
458820da
PA
111762013-02-14 Pedro Alves <palves@redhat.com>
11177
11178 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11179
baea0dae
PA
111802013-02-14 Pedro Alves <palves@redhat.com>
11181
11182 * tracepoint.c (save_string): Delete.
11183 (add_tracepoint_action): Use savestring instead of save_string.
11184
0b1afbb3
PA
111852013-02-12 Pedro Alves <palves@redhat.com>
11186
11187 * linux-xtensa-low.c: Ditto.
11188 * xtensa-xtregs.c: Ditto.
11189
8a4ac37e
PA
111902013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11191
11192 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11193 thread_db.
11194
148de6bb
MS
111952013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11196
11197 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11198 aarch64_num_wp_regs and aarch64_num_bp_regs to
11199 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11200
55fac6e0
MS
112012013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11202
11203 * linux-aarch64-low.c (ps_get_thread_area): Replace
11204 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11205
176eb98c
MS
112062013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11207 Marcus Shawcroft <marcus.shawcroft@arm.com>
11208 Nigel Stephens <nigel.stephens@arm.com>
11209 Yufeng Zhang <yufeng.zhang@arm.com>
11210
11211 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11212 (aarch64.c, aarch64-without-fpu.c): New targets.
11213 * configure.srv (aarch64*-*-linux*): New.
11214 * linux-aarch64-low.c: New file.
11215
56f7af9c
MS
112162013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11217
43aaf8b6 11218 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
11219 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11220 (dequeue_one_deferred_signal, linux_resume_one_thread)
11221 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11222 (linux_tracefork_grandchild, linux_test_for_tracefork)
11223 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11224 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11225 where the argument is 0.
11226
60f662b0
YQ
112272013-01-25 Yao Qi <yao@codesourcery.com>
11228
11229 * event-loop.c: Include "queue.h".
11230 (gdb_event_p): New typedef.
11231 (struct gdb_event) <next_event>: Remove.
11232 (event_queue): Change to QUEUE(gdb_event_p).
11233 (async_queue_event): Remove.
11234 (gdb_event_xfree): New.
11235 (initialize_event_loop): New.
11236 (process_event): Use API from QUEUE.
11237 (wait_for_event): Likewise.
11238 * server.c (main): Call initialize_event_loop.
11239 * server.h (initialize_event_loop): Declare.
11240
5ae4861a
YQ
112412013-01-18 Yao Qi <yao@codesourcery.com>
11242
11243 * ax.h (struct eval_agent_expr_context): New.
11244 (gdb_eval_agent_expr): Update declaration.
11245 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11246 TFRAME. Add new argument CTX.
11247 * server.h (struct eval_agent_expr_context): Declare.
11248 (agent_mem_read, agent_tsv_read): Update declaration.
11249 (agent_mem_read_string): Likewise.
11250 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11251 (add_traceframe_block): Add new argument TPOINT.
11252 Increase TPOINT->traceframe_usage.
11253 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11254 eval_tracepoint_agent_expr.
11255 (condition_true_at_tracepoint): Likewise.
11256 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11257 (agent_mem_read_string, agent_tsv_read): Likewise.
11258
85e00e85
YQ
112592013-01-16 Yao Qi <yao@codesourcery.com>
11260
11261 * linux-low.c (linux_resume_one_lwp): Don't check
11262 'lwp->bp_reinsert != 0'.
11263
4039cf45
JB
112642013-01-07 Joel Brobecker <brobecker@adacore.com>
11265 Pedro Alves <palves@redhat.com>
11266
11267 * lynx-low.c (ptrace_request_to_str): Define a temporary
11268 macro and use it to simplify this function's implementation.
11269
9044dee2
JB
112702013-01-07 Joel Brobecker <brobecker@adacore.com>
11271
11272 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11273 sets errno.
11274
e6352c8f
JB
112752013-01-07 Joel Brobecker <brobecker@adacore.com>
11276
11277 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11278
50681a27
JB
112792013-01-07 Joel Brobecker <brobecker@adacore.com>
11280
11281 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11282
3f6e77ef
JB
112832013-01-07 Joel Brobecker <brobecker@adacore.com>
11284
11285 * lynx-low.c (lynx_resume): Use the resume_info parameter
11286 to determine the ptid for the lynx_ptrace call, unless
11287 it is equal to minus_one_ptid, in which case we use the
11288 ptid of the current_inferior.
11289 (lynx_wait_1): After having received a thread create/exit
11290 event, resume the inferior's execution using the signaling
11291 thread's ptid, rather than the old ptid.
11292
7fda33ae
JB
112932013-01-07 Joel Brobecker <brobecker@adacore.com>
11294
11295 * lynx-low.c (lynx_resume): Delete variable ret.
11296
b9786c74
JB
112972013-01-01 Joel Brobecker <brobecker@adacore.com>
11298
11299 * gdbreplay.c (gdbreplay_version): Update copyright year.
11300 * server.c (gdbserver_version): Likewise.
11301
8b93d60f
JB
113022012-12-17 Joel Brobecker <brobecker@adacore.com>
11303
11304 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11305 new thread.
11306
037335a7
JB
113072012-12-17 Joel Brobecker <brobecker@adacore.com>
11308
11309 * lynx-low.c (ptrace_request_to_str): Add handling for
11310 PTRACE_GETTRACESIG.
11311
52d4cbd8
JB
113122012-12-17 Joel Brobecker <brobecker@adacore.com>
11313
11314 * lynx-low.c (lynx_attach): Delete variable new_process.
11315
ab8f6ca9
JB
113162012-12-17 Joel Brobecker <brobecker@adacore.com>
11317
11318 * lynx-low.c (lynx_create_inferior): Delete variable
11319 new_process.
11320
78cbc024
JB
113212012-12-17 Joel Brobecker <brobecker@adacore.com>
11322
11323 * lynx-low.c (ptrace_request_to_str): Do not handle
11324 PTRACE_GETTHREADLIST if this macro does not exist.
11325
14a00470
YQ
113262012-12-15 Yao Qi <yao@codesourcery.com>
11327
11328 * Makefile.in (OBS): Add notif.o.
11329 * notif.c, notif.h: New.
11330 * server.c: Include "notif.h".
11331 (struct vstop_notif) <next>: Remove.
11332 <base>: New field.
11333 (queue_stop_reply): Update.
11334 (push_event, send_next_stop_reply): Remove.
11335 (discard_queued_stop_replies): Update.
11336 (notif_stop): New variable.
11337 (handle_v_stopped): Remove.
11338 (handle_v_requests): Don't call handle_v_stopped. Call
11339 handle_ack_notif instead.
11340 (queue_stop_reply_callback): Call notif_event_enque instead
11341 of queue_stop_reply.
11342 (handle_status): Don't call send_next_stop_reply, call
11343 notif_write_event instead.
11344 (kill_inferior_callback): Likewise.
11345 (detach_or_kill_inferior_callback): Likewise.
11346 (main): Call initialize_notif.
11347 (process_serial_event): Call QUEUE_is_empty.
11348 (handle_target_event): Call notif_push instead of push event.
11349 * server.h (push_event): Remove declaration.
11350
61c125b9
TT
113512012-12-10 Tom Tromey <tromey@redhat.com>
11352
11353 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11354 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11355 macros.
11356 (.c.o): Rewrite.
11357 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11358 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11359 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11360 (amd64-linux-ipa.o, ax.o): Rewrite.
11361 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11362 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11363 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11364 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11365 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11366 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11367 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11368 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11369 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11370 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11371 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11372 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11373 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11374 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11375 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11376 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11377 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11378 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11379 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11380 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11381 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11382 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11383 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11384 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11385 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11386 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11387 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11388 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11389 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11390 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11391 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11392 (reg-tilegx.o): Remove.
11393 (all_object_files): New macro.
11394 Include .deps files.
11395 * aclocal.m4, configure: Rebuild.
11396 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11397 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11398 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11399
e90e9ad9
TT
114002012-12-05 Tom Tromey <tromey@redhat.com>
11401
11402 PR gdb/14917:
11403 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11404
02d403bf 114052012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
11406
11407 * configure.ac: Check for linux/perf_event.h.
11408 * config.in: Regenerated.
11409 * configure: Regenerated.
11410
0270a750
PA
114112012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11412
11413 * hostio.c (handle_readlink): Decrease buffer size
11414 parameter passed to readlink by one byte.
11415
8c29b58e
YQ
114162012-11-26 Yao Qi <yao@codesourcery.com>
11417
11418 * configure.ac (build_warnings): Append '-Wempty-body'.
11419 * configure: Regenerated.
11420 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11421 body.
11422
8bdce1ff
PM
114232012-11-15 Pierre Muller <muller@sourceware.org>
11424
11425 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11426 * config.in: Regenerate.
11427 * configure: Regenerate.
11428 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11429 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11430 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11431 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11432 header.
11433 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11434 instead of <sys/wait.h> header.
11435 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11436
02d403bf 114372012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11438
11439 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11440 (various make rules): Remove -DGDBSERVER
11441
fbd5db48
YQ
114422012-11-09 Yao Qi <yao@codesourcery.com>
11443
11444 * spu-low.c (current_ptid): Move it to ..
11445 * gdbthread.h: ... here. New.
11446 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11447 * server.c (myresume, process_serial_event): Likewise.
11448 * thread-db.c (thread_db_find_new_threads): Likewise.
11449 * tracepoint.c (run_inferior_command): Likewise.
11450
b3dc46ff
AB
114512012-10-01 Andrew Burgess <aburgess@broadcom.com>
11452
11453 * server.c (handle_search_memory_1): Include access length in
11454 warning message.
11455
07c04788
HPN
114562012-09-05 Michael Brandt <michael.brandt@axis.com>
11457
11458 * linux-crisv32-low.c: Fix compile errors.
11459
918d227b
YQ
114602012-09-04 Yao Qi <yao@codesourcery.com>
11461
11462 * tracepoint.c (cmd_qtsv): Adjust debug message.
11463 Don't check CUR_TPOINT.
11464
18c1b81a
YQ
114652012-08-28 Yao Qi <yao@codesourcery.com>
11466
11467 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11468 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11469 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11470 Remove declarations of xmalloc, xreallloc, xstrdup and
11471 freeargv.
11472 * Makefile.in (libiberty_h): New.
11473 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11474 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11475
dc82f37b
YQ
114762012-08-23 Yao Qi <yao@codesourcery.com>
11477
11478 * server.h: Remove declaration of 'xsnprintf'.
11479
406b1477
KS
114802012-08-22 Keith Seitz <keiths@redhat.com>
11481
11482 * server.h: Include build-gnulib-gbserver/config.h.
11483 * gdbreplay.c: Likewise.
11484
e6712ff1
DE
114852012-08-08 Doug Evans <dje@google.com>
11486
11487 * Makefile.in (SFILES): Add gdb_vecs.c.
11488 (OBS): Add gdb_vecs.o.
11489 (gdb_vecs_h, host_defs_h): New variables.
11490 (thread-db.o): Add $(gdb_vecs_h) dependency.
11491 (gdb_vecs.o): New rule.
11492 * thread-db.c: #include "gdb_vecs.h".
11493 (thread_db_load_search): Use a vector to iterate over path elements.
11494 Handle text appearing after "$pdir".
11495
11496 * configure.ac: Add check for strstr.
11497 * config.in: Regenerate.
11498 * configure: Regenerate.
11499
7c3270ae
UW
115002012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11501
11502 * hostio.c (handle_pread): If pread fails, fall back to attempting
11503 lseek/read.
11504 (handle_pwrite): Likewise for pwrite.
11505
b62e2b27
UW
115062012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11507
11508 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11509 between unsupported TYPE and unimplementable ADDR/LEN combination.
11510 (arm_insert_point): Act on new return value.
11511
78a99e91
PA
115122012-07-31 Pedro Alves <palves@redhat.com>
11513
11514 * server.c (process_point_options): Only skip tokens if we find
11515 one that is unrecognized. Don't treat 'X' specially while
11516 skipping unrecognized tokens.
11517
fcf303ab
UW
115182012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11519
11520 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11521 to 4-byte-align HW breakpoint addresses for Thumb.
11522
7255706c
YQ
115232012-07-27 Yao Qi <yao@codesourcery.com>
11524
11525 PR remote/14161.
11526
11527 * server.h: Declare gdb_agent_about_to_close.
11528 * target.c (kill_inferior): Include "agent.h".
11529 New. Send command 'kill'.
11530 * target.h (kill_inferior): Removed macro.
11531 * tracepoint.c (gdb_agent_about_to_close): New.
11532 (gdb_agent_helper_thread): Handle command 'close'.
11533 Wait endlessly until the inferior stops.
11534 Install gdb_agent_remove_socket to atexit hook.
11535 (agent_socket_name): New static variable.
11536 (gdb_agent_socket_init): Replace local variable 'name' with
11537 'agent_socket_name'.
11538 (gdb_agent_remove_socket): New.
11539
5a3f286f
YQ
115402012-07-27 Yao Qi <yao@codesourcery.com>
11541
11542 * server.c (process_point_options): Stop at 'X' when parsing.
11543
961bd387
ME
115442012-07-19 Michael Eager <eager@eagercon.com>
11545
a261b8f5 11546 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
11547 to hw_execute.
11548 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11549 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11550 hardware breakpoint.
11551
aa7c7447
JK
115522012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11553
11554 * gdbserver/linux-low.c (initialize_low): Call
11555 linux_ptrace_init_warnings.
11556
7f216e7c
DE
115572012-07-02 Doug Evans <dje@google.com>
11558
11559 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11560 pointer to int.
11561
d3ce09f5
SS
115622012-07-02 Stan Shebs <stan@codesourcery.com>
11563
11564 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11565 (ax.o): Add it to build rule.
11566 (ax-ipa.o): Ditto.
11567 (OBS): Add format.o.
11568 (IPA_OBS): Add format.o.
11569 * server.c (handle_query): Claim support for breakpoint commands.
11570 (process_point_options): Add command case.
11571 (process_serial_event): Leave running if there are printfs in
11572 effect.
11573 * mem-break.h (any_persistent_commands): Declare.
11574 (add_breakpoint_commands): Declare.
11575 (gdb_no_commands_at_breakpoint): Declare.
11576 (run_breakpoint_commands): Declare.
11577 * mem-break.c (struct point_command_list): New struct.
11578 (struct breakpoint): New field command_list.
11579 (any_persistent_commands): New function.
11580 (add_commands_to_breakpoint): New function.
11581 (add_breakpoint_commands): New function.
11582 (gdb_no_commands_at_breakpoint): New function.
11583 (run_breakpoint_commands): New function.
11584 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11585 locally.
11586 * ax.c: Include format.h.
11587 (ax_printf): New function.
11588 (gdb_eval_agent_expr): Add printf opcode.
11589
2f8f6aed
YQ
115902012-06-13 Yao Qi <yao@codesourcery.com>
11591
11592 * server.c (start_inferior): Remove duplicated writes to fields
11593 'last_resume_kind' and 'last_status' of 'current_inferior'.
11594
0c9070b3
YQ
115952012-06-12 Yao Qi <yao@codesourcery.com>
11596 Pedro Alves <palves@redhat.com>
11597
11598 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11599 comment.
11600 * server.c (handle_v_cont): Extend comment.
11601
c52daf70
YQ
116022012-06-11 Yao Qi <yao@codesourcery.com>
11603
11604 * linux-low.c (linux_attach): Add 'static'.
11605
d38bbb0a
YQ
116062012-06-06 Yao Qi <yao@codesourcery.com>
11607
11608 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11609
89dc0afd
JK
116102012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11611
11612 Fix gcc -flto compilation warning.
11613 * server.c (main): Make variable multi_mode and attach volatile.
11614
75f62ce7
TJB
116152012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11616
11617 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11618 if the platform doesn't know about it.
11619
65f479b6
PA
116202012-05-30 Jeff Kenton <jkenton@tilera.com>
11621
11622 * Makefile.in (SFILES): Add linux-tile-low.c.
11623 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11624 * configure.srv: Handle tilegx-*-linux*.
11625 * linux-tile-low.c: New file.
11626
0c5bf5a9
JK
116272012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11628
11629 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11630
a493e3e2
PA
116312012-05-24 Pedro Alves <palves@redhat.com>
11632
11633 PR gdb/7205
11634
43aaf8b6 11635 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11636
2ea28649
PA
116372012-05-24 Pedro Alves <palves@redhat.com>
11638
11639 PR gdb/7205
11640
11641 Replace target_signal with gdb_signal throughout.
11642
8d409d16
MR
116432012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11644
11645 * linux-low.c (linux_store_registers): Avoid the copying sequence
11646 when no data has been retrieved by ptrace.
11647
23512c01
MGD
116482012-05-22 Will Deacon <will.deacon@arm.com>
11649
11650 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11651 Include asm/ptrace.h.
11652 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11653 already defined.
11654
4934b29e
MR
116552012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11656
11657 * linux-low.c (linux_store_registers): Don't re-retrieve data
11658 with ptrace that has already been obtained from /proc. Always
11659 copy any data retrieved with ptrace to the buffer supplied.
11660
bde24c0a
PA
116612012-05-11 Yao Qi <yao@codesourcery.com>
11662 Pedro Alves <palves@redhat.com>
11663
11664 * linux-low.c (enum stopping_threads_kind): New.
11665 (stopping_threads): Change type to `enum stopping_threads_kind'.
11666 (handle_extended_wait): If stopping and suspending threads, leave
11667 the new_lwp suspended too.
11668 (linux_wait_for_event): Adjust.
11669 (stop_all_lwps): Set `stopping_threads' to
11670 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11671 whether we're suspending threads or just stopping them. Assert no
11672 recursion happens.
11673
623b6bdf
YQ
116742012-04-29 Yao Qi <yao@codesourcery.com>
11675
11676 * server.h: Move some code to ...
11677 * gdbthread.h: ... here. New.
11678 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11679 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11680 (nto-low.o, win32-low.o): Likewise.
11681 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11682 * regcache.c, remote-utils.c, server.c: Likewise.
11683 * target.c, tracepoint.c, win32-low.c: Likewise.
11684
f15f9948
TJB
116852012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11686
11687 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11688 (PTRACE_ARG4_TYPE): Likewise.
11689 (PTRACE_XFER_TYPE): Likewise.
11690 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11691 ptrace to PTRACE_ARG3_TYPE.
11692 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11693 (PTRACE_ARG4_TYPE): Likewise.
11694 (PTRACE_XFER_TYPE): Likewise.
11695 (linux_detach_one_lwp): Cast fourth argument of
11696 ptrace to long then PTRACE_ARG4_TYPE.
11697 (regsets_fetch_inferior_registers): Cast third argument of
11698 ptrace to long then PTRACE_ARG3_TYPE.
11699 (regsets_store_inferior_registers): Likewise.
11700
38ea300a
PA
117012012-04-20 Pedro Alves <palves@redhat.com>
11702
11703 * configure: Regenerate.
11704
c971b7fa
PA
117052012-04-19 Pedro Alves <palves@redhat.com>
11706
43aaf8b6 11707 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11708 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11709 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11710 (all, install-only, uninstall, clean-info, all-lib, clean): No
11711 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11712 (maintainer-clean realclean distclean): Use subdir_do.
11713 (subdir_do): New.
11714 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11715 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11716 * acinclude.m4: Include acx_configure_dir.m4.
11717 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11718 calls. Call AC_PROG_RANLIB. Configure gnulib using
11719 ACX_CONFIGURE_DIR.
11720 (GNULIB): New.
11721 (GNULIB_STDINT_H): Adjust.
11722 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11723 * gdbreplay.c: Include build-gnulib/config.h.
11724 * server.h: Likewise.
11725 * aclocal.m4: Regenerate.
11726 * config.in: Regenerate.
11727 * configure: Regenerate.
c971b7fa 11728
809277f8
PA
117292012-04-19 Pedro Alves <palves@redhat.com>
11730
11731 * Makefile.in (LIBGNU, INCGNU): Adjust.
11732 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11733 (all, install-only, uninstall, clean-info, all-lib, clean)
11734 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11735 * configure.ac: Adjust AC_OUTPUT output.
11736 * aclocal.m4: Regenerate.
11737 * configure: Regenerate.
11738
fd9bb8b8
PA
117392012-04-19 Pedro Alves <palves@redhat.com>
11740
11741 * Makefile.in (generated_files): New.
11742 (server_h): Remove the explicit dependency on config.h, and depend
11743 on $generated_files.
11744
1c298c66
PA
117452012-04-19 Pedro Alves <palves@redhat.com>
11746
11747 * Makefile.in (INCGNU): Add -Ignulib.
11748
57c4b50b
PA
117492012-04-19 Pedro Alves <palves@redhat.com>
11750
11751 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11752 (INCGNU): ... this, and spell out -I here.
11753 (GNULIB_LIB): Rename to ...
11754 (LIBGNU): ... this.
11755 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11756
1030e047
PA
117572012-04-19 Pedro Alves <palves@redhat.com>
11758
11759 * config.in: Regenerate.
11760
447d4319
PA
117612012-04-19 Pedro Alves <palves@redhat.com>
11762
11763 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11764 * server.h (memmem): Remove declaration.
11765 * config.in: Regenerate.
11766 * configure: Regenerate.
11767
aad9eab9
YQ
117682012-04-19 Yao Qi <yao@codesourcery.com>
11769
11770 * Makefile.in (SFILES): Add common/vec.c.
11771 (OBS): Add vec.o.
11772 (vec.o): New rule.
11773
3e10640f
YQ
117742012-04-19 Yao Qi <yao@codesourcery.com>
11775
11776 * remote-utils.c (prepare_resume_reply): Replace with macro
11777 target_core_of_thread.
11778 * server.c (handle_qxfer_threads_proper): Likewise.
11779 * target.h (traget_core_of_thread): New macro.
11780
71622373
PA
117812012-04-18 Pedro Alves <palves@redhat.com>
11782
11783 * aclocal.m4: Regenerate.
11784 * configure: Regenerate.
11785
80d26939
YQ
117862012-04-16 Yao Qi <yao@codesourcery.com>
11787
11788 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11789 duplicated on address.
11790
42476b70
YQ
117912012-04-16 Yao Qi <yao@codesourcery.com>
11792
11793 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11794 (struct tracepoint_action_ops) <send>: New field.
11795 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11796 (agent_expr_send, x_tracepoint_action_send): New.
11797 (l_tracepoint_action_send): New.
11798 (cmd_qtdp): Download and install tracepoint
11799 according to `use_agent'.
11800 (run_inferior_command): Add one more parameter `len'.
11801 Update callers.
11802 (tracepoint_send_agent): New.
11803 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11804
7bc83639
YQ
118052012-04-16 Yao Qi <yao@codesourcery.com>
11806
11807 * tracepoint.c (download_tracepoints): Moved to ...
11808 (cmd_qtstart): ... here.
11809
5f18041e
YQ
118102012-04-14 Yao Qi <yao@codesourcery.com>
11811
11812 * tracepoint.c: Include inttypes.h.
11813 (struct collect_memory_action): Use sized types.
11814 (struct tracepoint): Likewise.
11815 (cmd_qtdp, stop_tracing): Update print specifiers.
11816 (cmd_qtp, response_tracepoint): Likewise.
11817 (collect_data_at_tracepoint): Likewise.
11818 (collect_data_at_step): Likewise.
11819
55a8c076
YQ
118202012-04-14 Yao Qi <yao@codesourcery.com>
11821
11822 Import gnulib module inttypes.
11823 * aclocal.m4, config.in, configure: Regenerated.
11824
dc750257
YQ
118252012-04-14 Yao Qi <yao@codesourcery.com>
11826
11827 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11828 Makefile and config.status at last.
11829
0ab5faf9
YQ
118302012-04-13 Yao Qi <yao@codesourcery.com>
11831
11832 * tracepoint.c: Include stdint.h unconditionally.
11833
18f5fd81
TJB
118342012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11835
11836 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11837 on BFD_HAVE_SYS_PROCFS_TYPE.
11838 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11839 * configure: Regenerate.
11840 * config.in: Likewise.
11841
4d47af5c
L
118422012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11843
11844 * Makefile.in (clean): Also remove x32.c x32-linux.c
11845 x32-avx.c x32-avx-linux.c.
11846 (x32.o): New target.
11847 (x32.c): Likewise.
11848 (x32-linux.o): Likewise.
11849 (x32-linux.c): Likewise.
11850 (x32-avx.o): Likewise.
11851 (x32-avx.c): Likewise.
11852 (x32-avx-linux.o): Likewise.
11853 (x32-avx-linux.c): Likewise.
11854
11855 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11856 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11857 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11858 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11859 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11860 i386/x32-avx-linux.xml.
11861
11862 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11863 (init_registers_x32_avx_linux): Likwise.
11864 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11865 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11866
ecedbe58
PA
118672012-04-13 Pedro Alves <palves@redhat.com>
11868
11869 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11870 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11871 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11872 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11873 the sub-make.
11874
c92b5177
L
118752012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11876
11877 * linux-x86-low.c (compat_x32_clock_t): New.
11878 (compat_x32_siginfo_t): Likewise.
11879 (compat_x32_siginfo_from_siginfo): Likewise.
11880 (siginfo_from_compat_x32_siginfo): Likewise.
11881 (linux_is_elf64): Likewise.
11882 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11883 and siginfo_from_compat_x32_siginfo for x32.
11884 (x86_arch_setup): Set linux_is_elf64.
11885
214d508e
L
118862012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11887
11888 PR gdb/13969
11889 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11890 e_machine field.
11891 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11892 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11893 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11894 compatible with process.
11895
c9a1864a
YQ
118962012-04-12 Yao Qi <yao@codesourcery.com>
11897
11898 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11899 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11900 (install-only, install-info, clean): Handle sub dir gnulib.
11901 (all-lib, am--refresh): New targets.
11902 (memmem.o): Remove target.
11903 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11904 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11905 (AC_REPLACE_FUNCS): Remove memmem.
11906 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11907 (AC_OUTPUT): Generate Makefile in gnulib/.
11908 * aclocal.m4, config.in, configure: Regenerated.
11909
367ba2c2
MR
119102012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11911
11912 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11913
9d236627
PA
119142012-04-05 Pedro Alves <palves@redhat.com>
11915
11916 -Werror=strict-aliasing
11917
11918 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11919 pointer.
11920
111217b3
PA
119212012-04-04 Pedro Alves <palves@redhat.com>
11922
11923 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11924 (sparc_store_gregset_from_stack, sparc_store_gregset)
11925 (sparc_breakpoint_at): Fix formatting.
11926
8365dcf5
TJB
119272012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11928
11929 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11930 are available.
11931 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11932 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11933 * config.in: Regenerate.
11934 * configure: Likewise.
11935
689cc2ae
PA
119362012-03-29 Pedro Alves <palves@redhat.com>
11937
11938 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11939 Correct ptrace arguments.
11940
c14dfd32
PA
119412012-03-28 Pedro Alves <palves@redhat.com>
11942
11943 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11944 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11945 (IA64_FR1_REGNUM): New defines.
11946 (ia64_fetch_register): New.
11947 (the_low_target): Install it.
11948 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11949 field.
11950 * linux-low.c (linux_fetch_registers): Try the
11951 the_low_target.fetch_register hook first.
11952
11953 * linux-arm-low.c (the_low_target): Adjust.
11954 * linux-bfin-low.c (the_low_target): Adjust.
11955 * linux-cris-low.c (the_low_target): Adjust.
11956 * linux-crisv32-low.c (the_low_target): Adjust.
11957 * linux-m32r-low.c (the_low_target): Adjust.
11958 * linux-m68k-low.c (the_low_target): Adjust.
11959 * linux-mips-low.c (the_low_target): Adjust.
11960 * linux-ppc-low.c (the_low_target): Adjust.
11961 * linux-s390-low.c (the_low_target): Adjust.
11962 * linux-sh-low.c (the_low_target): Adjust.
11963 * linux-sparc-low.c (the_low_target): Adjust.
11964 * linux-tic6x-low.c (the_low_target): Adjust.
11965 * linux-x86-low.c (the_low_target): Adjust.
11966 * linux-xtensa-low.c (the_low_target): Adjust.
11967
63c88e13
PA
119682012-03-26 Pedro Alves <palves@redhat.com>
11969
11970 * server.c (handle_qxfer_libraries): Don't bail early if
11971 the_target->qxfer_libraries_svr4 is not NULL.
11972
fb723180
PA
119732012-03-26 Pedro Alves <palves@redhat.com>
11974
11975 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11976
0afae3cf
PA
119772012-03-23 Pedro Alves <palves@redhat.com>
11978
11979 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11980 "library-list-svr4" element's start tag when the the DSO list is
11981 empty.
11982
485f1ee4
PA
119832012-03-23 Pedro Alves <palves@redhat.com>
11984
11985 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11986 a variable whose type size is the same as the inferior's pointer
11987 size.
11988
a5362b9a
TS
119892012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11990
11991 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11992 struct siginfo.
11993 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11994 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11995 * linux-low.h: Include <signal.h>.
11996 (struct siginfo): Remove forward declaration.
11997 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11998 struct siginfo.
11999
d226c142
MF
120002012-03-21 Mike Frysinger <vapier@gentoo.org>
12001
12002 * .gitignore: Ignore more files.
12003
122f36ef
PA
120042012-03-19 Pedro Alves <palves@redhat.com>
12005 Jan Kratochvil <jan.kratochvil@redhat.com>
12006
12007 * server.c (cont_thread, general_thread): Add describing comments.
12008 (start_inferior): Clear `cont_thread'.
12009 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12010 of a process.
12011
fc3e5175
YQ
120122012-03-15 Yao Qi <yao@codesourcery.com>
12013
12014 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12015 handling to ...
12016 (cmd_qtdp): ... here.
12017
8d0d92cd
YQ
120182012-03-15 Yao Qi <yao@codesourcery.com>
12019
12020 * tracepoint.c (struct tracepoint_action_ops): New.
12021 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12022 (m_tracepoint_action_download): New.
12023 (r_tracepoint_action_download): New.
12024 (x_tracepoint_action_download): New.
12025 (l_tracepoint_action_download): New.
12026 (add_tracepoint_action): Install `action->ops' according type.
12027 (download_tracepoint_1): Move code `download' function pointer
12028 of various tracepoint_action_ops.
12029
87b0bb13
JK
120302012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12031
12032 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12033 linux_ptrace_attach_warnings.
12034
5f572dec
JK
120352012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12036
12037 * Makefile.in (linux-ptrace.o): New.
12038 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12039 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12040 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12041 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12042 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12043 of these targets.
12044 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12045
f4647387
YQ
120462012-03-08 Yao Qi <yao@codesourcery.com>
12047 Pedro Alves <palves@redhat.com>
12048
12049 Fix PR server/13392.
12050 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12051 offset of JMP insn.
12052 * tracepoint.c (remove_tracepoint): New.
12053 (cmd_qtdp): Call remove_tracepoint when failed to install.
12054
9b224c5e
PA
120552012-03-07 Pedro Alves <palves@redhat.com>
12056
12057 * linux-low.c (get_detach_signal): New.
12058 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12059 Pass on pending signals to PTRACE_DETACH. Check the result of the
12060 ptrace call.
12061 * server.c (program_signals, program_signals_p): New.
12062 (handle_general_set): Handle QProgramSignals.
12063 * server.h (program_signals, program_signals_p): Declare.
12064
e237a7e2
JK
120652012-03-05 Pedro Alves <palves@redhat.com>
12066 Jan Kratochvil <jan.kratochvil@redhat.com>
12067
12068 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12069 New comment why.
12070
5808517f
YQ
120712012-03-03 Yao Qi <yao@codesourcery.com>
12072
12073 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12074 agent_look_up_symbols.
12075
58b4daa5
YQ
120762012-03-03 Yao Qi <yao@codesourcery.com>
12077
12078 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12079 (linux-x86-low.o): Likewise.
12080 * server.h: Remove in_process_agent_loaded.
12081 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12082 common/agent.c.
12083 Update callers.
12084
8ffcbaaf
YQ
120852012-03-03 Yao Qi <yao@codesourcery.com>
12086
12087 * tracepoint.c (gdb_agent_capability): New global.
12088 (in_process_agent_loaded_ust): Renamed to
12089 `in_process_agent_supports_ust'.
12090 Update callers.
12091 (in_process_agent_supports_ust): Call agent_capability_check.
12092 (clear_installed_tracepoints): Assert that agent supports
12093 agent.
12094
d1feda86
YQ
120952012-03-03 Yao Qi <yao@codesourcery.com>
12096
12097 * linux-low.c (linux_supports_agent): New.
12098 (linux_target_ops): Initialize field `supports_agent' with
12099 linux_supports_agent.
12100 * target.h (struct target_ops) <supports_agent>: New.
12101 (target_supports_agent): New macro.
12102 * server.c (handle_general_set): Handle packet 'QAgent'.
12103 (handle_query): Send `QAgent+'.
12104 * Makefile.in (server.o): Depends on agent.h.
12105
2fa291ac
YQ
121062012-03-03 Yao Qi <yao@codesourcery.com>
12107
12108 * Makefile.in (OBS): Add agent.o.
12109 Add new rule for agent.o.
12110 Track dependence of tracepoint.c on agent.h.
12111 * tracepoint.c (run_inferior_command_1):
12112 (run_inferior_command): Call agent_run_command.
12113 (gdb_ust_connect_sync_socket): Deleted. Move it to
12114 common/agent.c.
12115 (resume_thread, stop_thread): Likewise.
12116 (gdb_ust_socket_init): Renamed to ...
12117 (gdb_agent_socket_init): ... New.
12118 (gdb_ust_thread): Renamed to ...
12119 (gdb_agent_helper_thread): ... New.
12120 (gdb_ust_init): Move some code to ...
12121 (gdb_agent_init): ... here. New.
12122 [HAVE_UST]: Call gdb_ust_init.
12123 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12124 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12125 * config.in, configure: Regenerated.
12126
05044653
PA
121272012-03-02 Pedro Alves <palves@redhat.com>
12128
12129 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12130 * linux-low.c (struct simple_pid_list): New.
12131 (stopped_pids): New a struct simple_pid_list pointer.
12132 (add_to_pid_list, pull_pid_from_list): New.
12133 (handle_extended_wait): Don't assume the first signal new children
12134 report is SIGSTOP. Adjust call to pull_pid_from_list.
12135 (linux_wait_for_lwp): Adjust.
12136
8d00225b
YQ
121372012-03-02 Yao Qi <yao@codesourcery.com>
12138
12139 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12140 debug log.
12141
19560ba5
YQ
121422012-03-02 Yao Qi <yao@codesourcery.com>
12143
12144 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12145 `stop_pc' and `tpoint'. Update caller.
12146
1faeff08
MR
121472012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12148
12149 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12150 * linux-low.c (use_linux_regsets): New macro.
12151 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12152 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12153 (linux_register_in_regsets): New function.
12154 (usr_fetch_inferior_registers): Skip registers covered by
12155 regsets.
12156 (usr_store_inferior_registers): Likewise.
12157 (usr_fetch_inferior_registers): New macro.
12158 (usr_store_inferior_registers): Likewise.
12159 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12160 (linux_store_registers): Likewise.
12161 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12162 prototype.
12163 (init_registers_mips64_dsp_linux): Likewise.
12164 (init_registers_mips_linux): New macro.
12165 (init_registers_mips_dsp_linux): Likewise.
12166 (mips_dsp_num_regs): Likewise.
12167 (DSP_BASE, DSP_CONTROL): New fallback macros.
12168 (mips_base_regs): New macro.
12169 (mips_regmap): Use it. Fix the size.
12170 (mips_dsp_regmap): New variable.
12171 (mips_dsp_regset_bitmap): Likewise.
12172 (mips_arch_setup): New function.
12173 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12174 than mips_regmap.
12175 (mips_cannot_store_register): Likewise.
12176 (the_low_target): Update .arch_setup, .num_regs and .regmap
12177 initializers. Add .regset_bitmap initializer.
12178 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12179 initializer.
12180 * linux-bfin-low.c (the_low_target): Likewise.
12181 * linux-cris-low.c (the_low_target): Likewise.
12182 * linux-crisv32-low.c (the_low_target): Likewise.
12183 * linux-ia64-low.c (the_low_target): Likewise.
12184 * linux-m32r-low.c (the_low_target): Likewise.
12185 * linux-m68k-low.c (the_low_target): Likewise.
12186 * linux-ppc-low.c (the_low_target): Likewise.
12187 * linux-s390-low.c (the_low_target): Likewise.
12188 * linux-sh-low.c (the_low_target): Likewise.
12189 * linux-sparc-low.c (the_low_target): Likewise.
12190 * linux-tic6x-low.c (the_low_target): Likewise.
12191 * linux-x86-low.c (the_low_target): Likewise.
12192 * linux-xtensa-low.c (the_low_target): Likewise.
12193 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12194 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12195 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12196 srv_xmlfiles.
12197 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12198 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12199
c03e6ccc
YQ
122002012-02-29 Yao Qi <yao@codesourcery.com>
12201 Pedro Alves <palves@redhat.com>
12202
12203 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12204 `step_over_finished' is true.
12205
644cebc9
PA
122062012-02-27 Pedro Alves <palves@redhat.com>
12207
12208 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12209 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12210
c14d7ab2
PA
122112012-02-27 Pedro Alves <palves@redhat.com>
12212
12213 PR server/9684
12214 * linux-low.c (pid_is_stopped): New.
12215 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12216
412c89dd
LM
122172012-02-25 Luis Machado <lgustavo@codesourcery.com>
12218
12219 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12220 of conditions.
12221
b745defe
MR
122222012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12223
12224 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12225
9f3a5c85
LM
122262012-02-24 Luis Machado <lgustavo@codesourcery>
12227
12228 * server.c (handle_query): Advertise support for target-side
12229 breakpoint condition evaluation.
12230 (process_point_options): New function.
12231 (process_serial_event): When inserting a breakpoint, check for
12232 a target-side condition that should be evaluated.
12233
12234 * mem-break.c: Include regcache.h and ax.h.
12235 (point_cond_list_t): New data structure.
12236 (breakpoint) <cond_list>: New field.
12237 (find_gdb_breakpoint_at): Make non-static.
12238 (delete_gdb_breakpoint_at): Clear any target-side
12239 conditions.
12240 (clear_gdb_breakpoint_conditions): New function.
12241 (add_condition_to_breakpoint): Likewise.
12242 (add_breakpoint_condition): Likewise.
12243 (gdb_condition_true_at_breakpoint): Likewise.
12244 (gdb_breakpoint_here): Return result directly instead
12245 of going through a local variable.
12246
12247 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12248 (clear_gdb_breakpoint_conditions): Likewise.
12249 (add_breakpoint_condition): Likewise.
12250 (gdb_condition_true_at_breakpoint): Likewise.
12251
12252 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12253 (need_step_over_p): Take target-side breakpoint condition into
12254 consideration.
12255
5e1dc496
LM
122562012-02-24 Luis Machado <lgustavo@codesourcery>
12257
12258 * server.h: Include tracepoint.h.
12259 (agent_mem_read, agent_get_trace_state_variable_value,
12260 agent_set_trace_state_variable_value,
12261 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12262 get_set_tsv_func_addr): New prototypes.
12263
12264 * ax.h: New include file.
12265 * ax.c: New source file.
12266
12267 * tracepoint.c: Include ax.h.
12268 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12269 agent_expr, eval_result_type): Move to ax.h.
12270 (parse_agent_expr): Rename to ...
12271 (gdb_parse_agent_expr): ... this, make it non-static and move
12272 to ax.h.
12273 (unparse_agent_expr) Rename to ...
12274 (gdb_unparse_agent_expr): ... this, make it non-static and move
12275 to ax.h.
12276 (eval_agent_expr): Rename to ...
12277 (eval_tracepoint_agent_expr): ... this.
12278 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12279 forward declarations.
12280 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12281 (agent_get_trace_state_variable_value): New function.
12282 (agent_set_trace_state_variable_value): New function.
12283 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12284 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12285 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12286 (condition_true_at_tracepoint): Likewise.
12287 (parse_agent_expr): Rename to ...
12288 (gdb_parse_agent_expr): ... this and move to ax.c.
12289 (unparse_agent_expr): Rename to ...
12290 (gdb_unparse_agent_expr): ... this and move to ax.c.
12291 (gdb_agent_op_name): Move to ax.c.
12292 (eval_agent_expr): Rename to ...
12293 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12294 and move to ax.c.
12295 (eval_tracepoint_agent_expr): New function.
12296 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 12297 non-static.
5e1dc496
LM
12298 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12299 ax.c.
12300 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12301 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12302 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12303 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12304 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12305 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12306 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12307 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12308 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12309 (compile_bytecodes): Remove forward declaration.
12310 (is_goto_target): Move to ax.c.
12311 (compile_bytecodes): Move to ax.c and call
12312 agent_get_trace_state_variable_value (...) and
12313 agent_set_trace_state_variable_value (...).
12314
12315 * Makefile.in: Update ax.c and IPA dependencies.
12316
277e4e52
PA
123172012-02-24 Pedro Alves <palves@redhat.com>
12318
12319 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12320 (cmd_bigqtbuffer_circular): ... this. Only handle
12321 'QTBuffer:circular:'.
12322 (handle_tracepoint_general_set): Adjust.
12323
bf4c19f7
YQ
123242012-02-16 Yao Qi <yao@codesourcery.com>
12325
12326 * inferiors.c: Move code to ...
12327 * dll.c: .... here. New.
12328 * server.h: Declare clear_dlls.
12329 * Makefile.in (SFILES): Add dll.c.
12330 (OBS): Add dll.o
12331 (dll.o): New rule.
12332
d73f2619
YQ
123332012-02-11 Yao Qi <yao@codesourcery.com>
12334
12335 * server.c: (handle_monitor_command): Add a new parameter
12336 `own_buf'.
12337 (handle_query): Update caller.
12338
f8255c2a
JB
123392012-02-09 Joel Brobecker <brobecker@adacore.com>
12340
12341 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12342 * configure, config.in: Regenerate.
12343 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12344 is not defined.
12345
da84f473
PA
123462012-02-02 Pedro Alves <palves@redhat.com>
12347
12348 Try SIGKILL first, then PTRACE_KILL.
12349 * linux-low.c (linux_kill_one_lwp): New.
12350 (linux_kill_one_lwp): Rename to ...
12351 (kill_one_lwp_callback): ... this. Use the new
12352 linux_kill_one_lwp.
12353
e886a173
PA
123542012-02-02 Pedro Alves <palves@redhat.com>
12355
12356 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12357 inferior.
12358
be07f1a2
PA
123592012-01-27 Pedro Alves <palves@redhat.com>
12360
12361 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12362 (elf_64_file_p): Make static.
12363 (linux_pid_exe_is_elf_64_file): New.
12364 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12365 Delete declarations.
12366 (linux_pid_exe_is_elf_64_file): Declare.
12367 * linux-x86-low.c (x86_arch_setup): Use
12368 linux_pid_exe_is_elf_64_file.
12369
d8301ad1
JK
123702012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12371
12372 * linux-low.c (linux_wait_for_event_1): Rename to ...
12373 (linux_wait_for_event): ... here and merge it with former
12374 linux_wait_for_event - new variable wait_ptid, use it.
12375 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12376
01b17894
PA
123772012-01-23 Pedro Alves <palves@redhat.com>
12378
12379 * server.c (main): Avoid yet another case of infinite loop while
12380 detaching/killing after a longjmp.
12381
e825046f
JK
123822012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12383
12384 Code cleanup.
12385 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12386
b9e7b9c3
UW
123872012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12388
12389 * hostio.c (handle_readlink): New function.
12390 (handle_vFile): Call it to handle "vFile:readlink" packets.
12391
901f9912
UW
123922012-01-20 Pedro Alves <palves@redhat.com>
12393 Ulrich Weigand <ulrich.weigand@linaro.org>
12394
12395 * server.c (handle_v_requests): Only support vAttach and vRun to
12396 start multiple processes when in extended protocol mode.
12397
fc1ab1a0
PA
123982012-01-17 Pedro Alves <palves@redhat.com>
12399
12400 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12401 memalign plus mprotect to allocate the scratch buffer.
12402
7d5d4e98
PA
124032012-01-13 Pedro Alves <palves@redhat.com>
12404
12405 * server.c (attach_inferior): Clear `cont_thread'.
12406
f128d5e9
PA
124072012-01-13 Pedro Alves <palves@redhat.com>
12408
12409 * server.c (main): Avoid infinite loop while detaching/killing
12410 after a longjmp.
12411
06db92f0
DE
124122012-01-09 Doug Evans <dje@google.com>
12413
12414 * server.c (start_inferior): Set last_ptid in --wrapper case.
12415
32d92999
YQ
124162012-01-06 Yao Qi <yao@codesourcery.com>
12417
12418 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12419 defined.
12420 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12421
5e0a92a9
YQ
124222012-01-04 Yao Qi <yao@codesourcery.com>
12423
12424 * tracepoint.c (cmd_qtdp): Print debug message
12425 for static tracepoint.
12426
ae639e8c
YQ
124272012-01-04 Yao Qi <yao@codesourcery.com>
12428
12429 * tracepoint.c (trace_vdebug): Differentiate debug message
12430 between gdbserver and IPA.
12431
f72429c5
YQ
124322012-01-03 Yao Qi <yao@codesourcery.com>
12433
12434 * tracepoint.c (tracepoint_was_hit): Don't collect for
12435 static tracepoint.
12436
12c3e59c
JB
124372012-01-02 Joel Brobecker <brobecker@adacore.com>
12438
12439 * terminal.h: Reformat copyright header.
12440
67827812
JB
124412012-01-02 Joel Brobecker <brobecker@adacore.com>
12442
12443 * server.c (gdbserver_version): Update copyright year.
12444 * gdbreplay.c (gdbreplay_version): Likewise.
12445
3e52c33d
JK
124462011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12447
12448 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12449
12450 Revert:
12451 2011-12-18 Hui Zhu <teawater@gmail.com>
12452 * linux-low.c (linux_create_inferior): Save return value to ret.
12453
66f1260e
HZ
124542011-12-18 Hui Zhu <teawater@gmail.com>
12455
12456 * linux-low.c (linux_create_inferior): Save return value to ret.
12457
e77616d7
DE
124582011-12-16 Doug Evans <dje@google.com>
12459
e7b06c57
DE
12460 * linux-low.c (linux_create_inferior): If stdio connection,
12461 redirect stdin from /dev/null, stdout to stderr.
12462 * remote-utils.c (remote_is_stdio): New static global.
12463 (remote_connection_is_stdio): New function.
12464 (remote_prepare): Handle stdio connection.
12465 (remote_open): Ditto.
12466 (remote_close): Don't close stdin for stdio connections.
12467 (read_prim,write_prim): New functions. Replace all calls to
12468 read/write to these.
12469 * server.c (main): Watch for "-" argument. Move call to
12470 remote_prepare before start_inferior.
12471 * server.h (STDIO_CONNECTION_NAME): New macro.
12472 (remote_connection_is_stdio): Declare.
12473
e77616d7
DE
12474 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12475 in debugging output.
12476
82067193
YQ
124772011-12-15 Yao Qi <yao@codesourcery.com>
12478
12479 * tracepoint.c: Include sys/syscall.h.
12480 (gdb_ust_thread): Remove preprocessor conditional.
12481
82bfbe7e
PA
124822011-12-14 Pedro Alves <pedro@codesourcery.com>
12483
12484 * linux-low.c (linux_detach_one_lwp): Call
12485 the_low_target.prepare_to_resume before detaching.
12486
712c6575
YQ
124872011-12-14 Yao Qi <yao@codesourcery.com>
12488
12489 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12490 of write.
12491
d54d1edf
YQ
124922011-12-14 Yao Qi <yao@codesourcery.com>
12493
12494 * i386-low.c (i386_low_stopped_data_address): Initialize local
12495 variable `control'.
12496
6210a125
PA
124972011-12-13 Pedro Alves <pedro@codesourcery.com>
12498
12499 PR remote/13492
12500
12501 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12502 DR_CONTROL unless necessary. Extend comments.
12503 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12504 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12505
2ece8244
YQ
125062011-12-13 Yao Qi <yao@codesourcery.com>
12507
12508 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12509 macros.
12510 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12511
784867a5
JK
125122011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12513
12514 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12515 Print new debug message for such case.
12516
6bf36717
JK
125172011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12518
12519 Fix overlapping memcpy.
12520 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12521 the read_inferior_memory transfer.
12522 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12523 write_inferior_memory transfer.
12524 (set_fast_tracepoint_jump): New variable buf. Use it for the
12525 read_inferior_memory and write_inferior_memory transfers.
12526 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12527 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12528 Use it for the write_inferior_memory transfer.
12529 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12530 buffers.
12531
50275556
MR
125322011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12533
12534 * linux-low.c (fetch_register, store_register): Make code
12535 consistent, fix formatting.
12536
7325beb4
MR
125372011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12538
12539 * linux-low.c (usr_store_inferior_registers): Factor out code
12540 to handle individual registers into...
12541 (store_register): ... this new function.
12542
c642a434
UW
125432011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12544
12545 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12546 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12547 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12548 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12549 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12550 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12551 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12552 (srv_xmlfiles): Add new XML files.
12553
12554 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12555 and <sys/uio.h>.
12556 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12557 (init_registers_s390_linux32v1): Add prototype.
12558 (init_registers_s390_linux32v2): Likewise.
12559 (init_registers_s390_linux64v1): Likewise.
12560 (init_registers_s390_linux64v2): Likewise.
12561 (init_registers_s390x_linux64v1): Likewise.
12562 (init_registers_s390x_linux64v2): Likewise.
12563 (s390_num_regs): Increment to 52.
12564 (s390_regmap): Add orig_r2 register.
12565 (s390_num_regs_3264): Increment to 68.
12566 (s390_regmap_3264): Add orig_r2 register.
12567 (s390_collect_ptrace_register): Handle orig_r2 register.
12568 (s390_supply_ptrace_register): Likewise.
12569 (s390_fill_last_break): New function.
12570 (s390_store_last_break): Likewise.
12571 (s390_fill_system_call): New function.
12572 (s390_store_system_call): Likewise.
12573 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12574 register sets.
12575 (s390_check_regset): New function.
12576 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12577 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12578 Update target_regsets for available register sets.
12579
2268b414
JK
125802011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12581 Jan Kratochvil <jan.kratochvil@redhat.com>
12582
12583 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12584 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12585 New.
12586 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12587 * linux-low.h (struct process_info_private): New member r_debug.
12588 * server.c (handle_qxfer_libraries): Call
12589 the_target->qxfer_libraries_svr4.
12590 (handle_qxfer_libraries_svr4): New function.
12591 (qxfer_packets): New entry "libraries-svr4".
12592 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12593 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12594 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12595 PACKET_qXfer_libraries_svr4.
12596
d6db1fab
UW
125972011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12598
12599 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12600 PSW address/mask between 8-byte and 16-byte formats.
12601 (s390_supply_ptrace_register): Likewise.
12602 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12603 basic addressing mode bit.
12604
242f5f1c
SS
126052011-11-24 Stan Shebs <stan@codesourcery.com>
12606
12607 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12608
f196051f
SS
126092011-11-17 Stan Shebs <stan@codesourcery.com>
12610
12611 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12612 (tracing_start_time): New global.
12613 (tracing_stop_time): New global.
12614 (tracing_user_name): New global.
12615 (tracing_notes): New global.
12616 (tracing_stop_note): New global.
12617 (cmd_qtstart): Set traceframe_usage, start_time.
12618 (stop_tracing): Set stop_time.
12619 (cmd_qtstatus): Report additional status.
12620 (cmd_qtp): New function.
12621 (handle_tracepoint_query): Call it.
12622 (cmd_qtnotes): New function.
12623 (handle_tracepoint_general_set): Call it.
12624 (get_timestamp): Rename from tsv_get_timestamp.
12625
405f8e94
SS
126262011-11-14 Stan Shebs <stan@codesourcery.com>
12627 Kwok Cheung Yeung <kcy@codesourcery.com>
12628
12629 * linux-x86-low.c (small_jump_insn): New.
12630 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12631 trampoline and error message, build a trampoline and issue a small
12632 jump instruction to it.
12633 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12634 trampoline and error message.
12635 (x86_get_min_fast_tracepoint_insn_len): New.
12636 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12637 * linux-low.h (struct linux_target_ops): Add arguments to
12638 install_fast_tracepoint_jump_pad operation, add new operation.
12639 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12640 arguments.
12641 (linux_get_min_fast_tracepoint_insn_len): New function.
12642 (linux_target_op): Add new operation.
12643 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12644 (gdb_trampoline_buffer_end): Ditto.
12645 (gdb_trampoline_buffer_error): Ditto.
12646 (struct ipa_sym_addresses): Add fields for new IPA variables.
12647 (symbol_list): Add entries for new IPA variables.
12648 (struct tracepoint): Add fields to hold the address range of the
12649 trampoline used by the tracepoint.
12650 (trampoline_buffer_head): New static variable.
12651 (trampoline_buffer_tail): Ditto.
12652 (claim_trampoline_space): New function.
12653 (have_fast_tracepoint_trampoline_buffer): New function.
12654 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12655 structure.
12656 (install_fast_tracepoint): Ditto, also add error buffer argument.
12657 (cmd_qtminftpilen): New function.
12658 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12659 (fast_tracepoint_from_trampoline_address): New function.
12660 (fast_tracepoint_collecting): Handle trampoline as part of jump
12661 pad space.
12662 (set_trampoline_buffer_space): New function.
12663 (initialize_tracepoint): Initialize new IPA variables.
12664 * target.h (struct target_ops): Add arguments to
12665 install_fast_tracepoint_jump_pad operation, add new
12666 get_min_fast_tracepoint_insn_len operation.
12667 (target_get_min_fast_tracepoint_insn_len): New.
12668 (install_fast_tracepoint_jump_pad): Add arguments.
12669 * server.h (IPA_BUFSIZ): Define.
12670 * linux-i386-ipa.c: Include extra header files.
12671 (initialize_fast_tracepoint_trampoline_buffer): New function.
12672 (initialize_low_tracepoint): Call it.
12673 * server.h (set_trampoline_buffer_space): Declare.
12674 (claim_trampoline_space): Ditto.
12675 (have_fast_tracepoint_trampoline_buffer): Ditto.
12676
1e4d1764
YQ
126772011-11-14 Yao Qi <yao@codesourcery.com>
12678
12679 * server.c (handle_query): Handle InstallInTrace for qSupported.
12680 * tracepoint.c (add_tracepoint): Sort list.
12681 (install_tracepoint, download_tracepoint): New.
12682 (cmd_qtdp): Call them to install and download tracepoints.
12683 (sort_tracepoints): Removed.
12684 (cmd_qtstart): Update.
12685
5c73ff4e
YQ
126862011-11-14 Yao Qi <yao@codesourcery.com>
12687
12688 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12689 * mem-break.h: Declare.
12690 * tracepoint.c (cmd_qtstart): Move some code to ...
12691 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12692 New.
12693 (download_tracepoints): Move some code to ...
12694 (download_tracepoint_1): ... here. New.
12695
86a30030
YQ
126962011-11-08 Yao Qi <yao@codesourcery.com>
12697
12698 * remote-utils.c (relocate_instruction): A comment fix.
12699
8d26e50c
JB
127002011-11-07 Joel Brobecker <brobecker@adacore.com>
12701
12702 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12703 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12704 dr_status_mirror and dr_control_mirror from debug_reg_state.
12705 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12706 (i386_initial_stuff): Remove use of deleted globals.
12707 (i386_get_thread_context, i386_set_thread_context,
12708 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12709 from debug_reg_state.
12710
a59306a3
YQ
127112011-11-05 Yao Qi <yao@codesourcery.com>
12712
12713 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12714 address as TPOINT's.
12715
3065dfb6
SS
127162011-11-02 Stan Shebs <stan@codesourcery.com>
12717
12718 * tracepoint.c (agent_mem_read_string): New function.
12719 (eval_agent_expr): Call it for tracenz.
12720 * server.c (handle_query): Report support for tracenz.
12721
fd0d8c7c
YQ
127222011-11-02 Yao Qi <yao@codesourcery.com>
12723
12724 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12725
609086b1
YQ
127262011-11-02 Yao Qi <yao@codesourcery.com>
12727
12728 * target.h: Fix a typo in comment.
12729
b9fd1791
PA
127302011-10-31 Pedro Alves <pedro@codesourcery.com>
12731
12732 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12733 clobber the breakpoints' shadows with fast tracepoint jumps.
12734 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12735 * target.c (write_inferior_memory): Also pass MYADDR down to
12736 check_mem_write.
12737
03583c20
UW
127382011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12739
12740 * configure.ac: Check support for personality routine.
12741 * configure: Regenerate.
12742 * config.in: Likewise.
12743 * linux-low.c: Include <sys/personality.h>.
12744 Define ADDR_NO_RANDOMIZE if necessary.
12745 (linux_create_inferior): Disable address space randomization when
12746 forking inferior, if requested.
12747 (linux_supports_disable_randomization): New function.
12748 (linux_target_ops): Install it.
12749 * server.h (disable_randomization): Declare.
12750 * server.c (disable_randomization): New global variable.
12751 (handle_general_set): Handle QDisableRandomization.
12752 (handle_query): Likewise for qSupported.
12753 (main): Support --disable-randomization and --no-disable-randomization
12754 command line arguments.
12755 * target.h (struct target_ops): Add supports_disable_randomization.
12756 (target_supports_disable_randomization): New macro.
12757
723b724b
MF
127582011-09-29 Mike Frysinger <vapier@gentoo.org>
12759
12760 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12761 ifdef check.
12762 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12763 [!PT_GETDSBT] (target_loadmap): New definition.
12764 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12765 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12766 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12767 and PT_GETDSBT to LINUX_LOADMAP.
12768 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12769 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12770
55329a5c 127712011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12772
12773 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12774 (arm_linux_hwbp_cap): New static variable.
12775 (arm_linux_get_hwbp_cap): Replace by ...
12776 (arm_linux_init_hwbp_cap): ... this new function.
12777 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12778 (arm_linux_get_hw_watchpoint_count): Likewise.
12779 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12780 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12781 (arm_prepare_to_resume): Use perror_with_name instead of error.
12782
55329a5c 127832011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12784
12785 * linux-arm-low.c: Include <signal.h>.
12786 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12787 (struct arm_linux_hwbp_cap): New data type.
12788 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12789 (struct arm_linux_hw_breakpoint): New data type.
12790 (MAX_BPTS, MAX_WPTS): Define.
12791 (struct arch_process_info, struct arch_lwp_info): New data types.
12792 (arm_linux_get_hwbp_cap): New function.
12793 (arm_linux_get_hw_breakpoint_count): Likewise.
12794 (arm_linux_get_hw_watchpoint_count): Likewise.
12795 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12796 (arm_hwbp_control_initialize): Likewise.
12797 (arm_hwbp_control_is_enabled): Likewise.
12798 (arm_hwbp_control_is_initialized): Likewise.
12799 (arm_hwbp_control_disable): Likewise.
12800 (arm_linux_hw_breakpoint_equal): Likewise.
12801 (arm_linux_hw_point_initialize): Likewise.
12802 (struct update_registers_data): New data structure.
12803 (update_registers_callback: New function.
12804 (arm_insert_point): Likewise.
12805 (arm_remove_point): Likewise.
12806 (arm_stopped_by_watchpoint): Likewise.
12807 (arm_stopped_data_address): Likewise.
12808 (arm_new_process): Likewise.
12809 (arm_new_thread): Likewise.
12810 (arm_prepare_to_resume): Likewise.
12811 (the_low_target): Register arm_insert_point, arm_remove_point,
12812 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12813 arm_new_thread, and arm_prepare_to_resume.
12814
6b9801d4
SS
128152011-09-15 Stan Shebs <stan@codesourcery.com>
12816
12817 * server.h (struct emit_ops): Add compare-goto fields.
12818 * tracepoint.c (gdb_agent_op_sizes): New table.
12819 (emit_eq_goto): New function.
12820 (emit_ne_goto): New function.
12821 (emit_lt_goto): New function.
12822 (emit_le_goto): New function.
12823 (emit_gt_goto): New function.
12824 (emit_ge_goto): New function.
12825 (is_goto_target): New function.
12826 (compile_bytecodes): Recognize special cases of compare-goto
12827 combinations and call specialized emitters for them.
12828 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12829 (amd64_emit_ne_goto): New function.
12830 (amd64_emit_lt_goto): New function.
12831 (amd64_emit_le_goto): New function.
12832 (amd64_emit_gt_goto): New function.
12833 (amd64_emit_ge_goto): New function.
12834 (amd64_emit_ops): Add the new functions.
12835 (i386_emit_eq_goto): New function.
12836 (i386_emit_ne_goto): New function.
12837 (i386_emit_lt_goto): New function.
12838 (i386_emit_le_goto): New function.
12839 (i386_emit_gt_goto): New function.
12840 (i386_emit_ge_goto): New function.
12841 (i386_emit_ops): Add the new functions.
12842
bf15cbda
SS
128432011-09-08 Stan Shebs <stan@codesourcery.com>
12844
12845 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12846 (i386_emit_epilogue): Restore %ebx.
12847
943ca1dd
JZ
128482011-08-31 Jie Zhang <jzhang918@gmail.com>
12849
12850 * server.c (step_thread): Remove definition.
12851 (process_serial_event): Don't handle Hs.
12852 * server.h (step_thread): Remove declaration.
12853 * target.c (set_desired_inferior): Remove use of step_thread.
12854
e3deef73
LM
128552011-08-24 Luis Machado <lgustavo@codesourcery.com>
12856
12857 * linux-low.c: Include linux-procfs.h.
12858 (linux_attach_lwp_1): Update comments.
12859 (linux_attach): Scan for existing threads when attaching to a
12860 process that is the tgid.
12861 * Makefile.in: Update dependencies.
12862
13da1c97
LM
128632011-08-24 Luis Machado <lgustavo@codesourcery.com>
12864
12865 * configure.srv: Add linux-procfs.o dependencies.
12866
881127c9
YQ
128672011-08-14 Yao Qi <yao@codesourcery.com>
12868
12869 * target.h (struct target_ops): Fix indent.
12870 * win32-low.c (win32_target_ops): Fix comment.
12871
58dbd541
YQ
128722011-08-14 Andrew Jenner <andrew@codesourcery.com>
12873 Yao Qi <yao@codesourcery.com>
12874
12875 * Makefile.in (clean): Remove tic6x-*.c files.
12876 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12877 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12878 (tic6x-c64xp-linux.c): Likewise.
12879 * configure.srv: Add support for tic6x-*-uclinux.
12880 * linux-tic6x-low.c: New.
12881 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12882
78d85199
YQ
128832011-08-14 Andrew Stubbs <ams@codesourcery.com>
12884 Yao Qi <yao@codesourcery.com>
12885
12886 * target.h (struct target_ops): Add read_loadmap.
12887 * linux-low.c (struct target_loadseg): New type.
12888 (struct target_loadmap): New type.
12889 (linux_read_loadmap): New function.
12890 (linux_target_ops): Add linux_read_loadmap.
12891 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12892 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12893 to NULL.
78d85199 12894
a959a88d
EZ
128952011-08-05 Eli Zaretskii <eliz@gnu.org>
12896
12897 * win32-low.c: Include <stdint.h>.
12898
1ced966e
PA
128992011-07-22 Pedro Alves <pedro@codesourcery.com>
12900
12901 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12902 to the inferior here.
12903 (i386_remove_aligned_watchpoint): Ditto.
12904 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12905 fit part of the watchpoint in the debug registers.
12906 (i386_update_inferior_debug_regs): New.
12907 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12908 registers, and only update the inferior on success.
12909 (i386_low_remove_watchpoint): Ditto.
12910
d26e3629
KY
129112011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12912
12913 * linux-low.c (compare_ints, unique, list_threads, show_process,
12914 linux_core_of_thread): Delete.
12915 (linux_target_ops): Change linux_core_of_thread to
12916 linux_common_core_of_thread.
12917 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12918 * utils.c (malloc_failure): Change type of argument.
12919 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12920 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12921 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12922 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12923 (IPA_OBJS): Add common-utils-ipa.o.
12924 (ptid_h, linux_osdata_h): New macros.
12925 (server_h): Add common/common-utils.h, common/xml-utils.h,
12926 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12927 common/ptid.h.
12928 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12929 ptid.o, buffer.o): New rules.
12930 (linux-low.o): Add common/linux-osdata.h as a dependency.
12931 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12932 * configure.ac: Add AC_HEADER_DIRENT check.
12933 * config.in: Regenerate.
12934 * configure: Regenerate.
12935 * remote-utils.c (xml_escape_text): Delete.
12936 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12937 buffer_xml_printf): Move to common/buffer.c.
12938 * server.c (main): Remove call to initialize_inferiors.
12939 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12940 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12941 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12942 internal_error, gdb_assert, gdb_assert_fail): Delete.
12943 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12944 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12945 common/buffer.h.
12946 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12947 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12948 initialize_inferiors): Delete.
12949
2275a1a7
PA
129502011-07-20 Pedro Alves <pedro@codesourcery.com>
12951
12952 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12953 symbol error.
12954
0a5b1e09
PA
129552011-05-31 Pedro Alves <pedro@codesourcery.com>
12956
12957 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12958 assertion.
12959 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12960
6938fd34
YQ
129612011-05-26 Yao Qi <yao@codesourcery.com>
12962
12963 * Makefile.in (thread-db.o): Track dependence to
12964 common/gdb_thread_db.h.
12965 * thread-db.c: include gdb_thread_db.h from right place.
12966
b481f9e0
TT
129672011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12968
12969 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12970 __FILE__ and __LINE__ to internal_error.
12971
98a5dd13
DE
129722011-05-13 Doug Evans <dje@google.com>
12973
12974 * thread-db.c (try_thread_db_load_from_sdir): New function.
12975 (try_thread_db_load_from_dir): New function.
12976 (thread_db_load_search): Handle $sdir, ignore $pdir.
12977 Remove trying of system directories if search of
12978 libthread-db-search-path fails, that is now done via $sdir.
12979
d248b706
KY
129802011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12981
12982 * server.c (handle_query): Add EnableDisableTracepoints to the list
12983 of supported features.
43aaf8b6 12984 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12985 tracepoints.
43aaf8b6
PA
12986 (cmd_qtenable_disable): New.
12987 (cmd_qtstart): Install tracepoints even if disabled.
12988 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12989 receiving a QTEnable or QTDisable packet.
12990 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12991 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12992 tracepoints.
12993 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12994
84e578fb
DE
129952011-05-10 Doug Evans <dje@google.com>
12996
12997 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12998
71f55dd8
DE
129992011-05-04 Doug Evans <dje@google.com>
13000
13001 * linux-low.c (linux_join): Skip process lookup.
13002 * spu-low.c (spu_join): Ditto.
13003 * server.c (join_inferiors_callback): Delete.
13004 (process_serial_event): For 'D' packet (detach) call join_inferior
13005 directly.
13006
4d393d60
JM
130072011-05-04 Joseph Myers <joseph@codesourcery.com>
13008
13009 * README: Don't mention xscale*-*-linux*.
13010 * configure.srv (xscale*-*-linux*): Don't handle target.
13011
b00ad6ff
NF
130122011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13013
13014 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13015 casting pointers.
13016 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13017 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13018 (i386_emit_void_call_2): Likewise.
13019
af96c192
YQ
130202011-04-26 Yao Qi <yao@codesourcery.com>
13021
43aaf8b6
PA
13022 * linux-low.c: Move common macros to linux-ptrace.h.
13023 Include linux-ptrace.h.
af96c192
YQ
13024 * Makefile.in (linux_ptrace_h): New.
13025 (linux-low.o): Depends on linux-ptrace.h.
13026
03f2bd59
JK
130272011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13028
13029 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13030 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13031 (remote_prepare): New function with most of the TCP code from ...
13032 (remote_open): ... here. Detect PORT here unconditionally. Move also
13033 setting transport_is_reliable.
13034 * server.c (run_once): New variable.
13035 (gdbserver_usage): Document it.
13036 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13037 the first run if RUN_ONCE.
13038 * server.h (run_once, remote_prepare): New declarations.
13039
7a9dd1b2
TT
130402011-04-19 Tom Tromey <tromey@redhat.com>
13041
13042 * win32-low.c (handle_load_dll): Remove duplicate "the".
13043
81239425
PM
130442011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13045
13046 Remove support for old Cygwin 1.5 versions.
13047 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13048 function to avoid warning.
13049 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13050 warning.
13051
9e0627f1
PM
130522011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13053
13054 * gdbserver/server.h (Macro _): Define it if not available.
13055
588eebee
MS
130562011-03-14 Michael Snyder <msnyder@vmware.com>
13057
348af9f7 13058 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 13059
43f70d4c
JB
130602011-03-10 Joel Brobecker <brobecker@adacore.com>
13061
13062 * Makefile.in (maintainer-clean realclean distclean): Remove
13063 "make ... subdir_do" command.
13064
348af9f7
MS
130652011-03-10 Michael Snyder <msnyder@vmware.com>
13066
13067 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13068
13069 * server.c (handle_v_run): Free alloced buffer on early return.
13070
e637a4f5
YQ
130712011-03-09 Yao Qi <yao@codesourcery.com>
13072
13073 Revert:
13074 2011-03-04 Yao Qi <yao@codesourcery.com>
13075
13076 * Makefile.in: Remove GNU make feature --directory.
13077
13078 2011-03-05 Yao Qi <yao@codesourcery.com>
13079
13080 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13081 (subdir_do): New make target. Copied from gdb/Makefile.
13082 (maintainer-clean, realclean, distclean, clean): Call corresponding
13083 make targets in common/Makefile.
13084
13085 2011-02-11 Yao Qi <yao@codesourcery.com>
13086
13087 * configure.ac: Call AC_PROG_RANLIB.
13088 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13089 * configure: Regenerate.
13090
e6edda56
JK
130912011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13092
13093 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13094
e5141119
JB
130952011-03-06 Yao Qi <yao@codesourcery.com>
13096
13097 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13098
64794aa4
JB
130992011-03-05 Yao Qi <yao@codesourcery.com>
13100
13101 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13102 (subdir_do): New make target. Copied from gdb/Makefile.
13103 (maintainer-clean, realclean, distclean, clean): Call corresponding
13104 make targets in common/Makefile.
13105
7a762829
YQ
131062011-03-04 Yao Qi <yao@codesourcery.com>
13107
13108 * Makefile.in: Remove GNU make feature --directory.
13109
348af9f7
MS
131102011-03-04 Michael Snyder <msnyder@vmware.com>
13111
13112 * server.c (queue_stop_reply): Call xmalloc not malloc.
13113
131142011-03-02 Michael Snyder <msnyder@vmware.com>
13115
13116 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13117
9f72fee2
MS
131182011-02-28 Michael Snyder <msnyder@vmware.com>
13119
588eebee
MS
13120 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13121 (cmd_qtframe): Ditto.
13122 (cmd_qtbuffer): Ditto.
13123 (cmd_bigqtbuffer): Ditto.
13124
9f72fee2
MS
13125 * utils.c (decimal2str): Initialize 'width' to nine, then
13126 don't mess with it.
13127
8040bd49
UW
131282011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13129
13130 * hostio.c (require_data): Free *data, not data.
13131
7e52cbd0
JK
131322011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13133
13134 * hostio.c (require_data): Use free, not xfree.
13135
9130f83e
MS
131362011-02-27 Michael Snyder <msnyder@vmware.com>
13137
4b812f4e
MS
13138 * server.c (handle_query): Discard unused value.
13139
9130f83e
MS
13140 * hostio.c (require_data): Free malloc memory before returning
13141 error.
13142
69d37113
MS
131432011-02-26 Michael Snyder <msnyder@vmware.com>
13144
13145 * linux-low.c (list_threads): Call closedir for dirent.
13146
35f5825a
MS
131472011-02-27 Michael Snyder <msnyder@vmware.com>
13148
2a589cef
MS
13149 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13150 a case statement falls through.
13151
0adea5f7
MS
13152 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13153
35f5825a
MS
13154 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13155 in comparison.
13156
238f1c74
MS
131572011-02-26 Michael Snyder <msnyder@vmware.com>
13158
13159 * utils.c (decimal2str): Eliminate dead code and dead param.
13160 (pulongest): Drop dead param from call to decimal2str.
13161 (plongest): Ditto.
13162
633ff500
JB
131632011-02-24 Joel Brobecker <brobecker@adacore.com>
13164
13165 Revert the following patch (not approved yet):
13166 2011-02-21 Hui Zhu <teawater@gmail.com>
13167 * tracepoint.c (tp_printf): New function.
13168 (eval_agent_expr): Handle gdb_agent_op_printf.
13169
f9c6ff72
HZ
131702011-02-21 Hui Zhu <teawater@gmail.com>
13171
13172 * tracepoint.c (tp_printf): New function.
13173 (eval_agent_expr): Handle gdb_agent_op_printf.
13174
94d5e490
TT
131752011-02-18 Tom Tromey <tromey@redhat.com>
13176
13177 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13178 (tracepoint.o): Likewise.
13179 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13180 (gdb_agent_op_names): Likewise.
13181
c7f96d2b
TT
131822011-02-18 Tom Tromey <tromey@redhat.com>
13183
13184 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13185 gdb_agent_op_rot>: New constants.
13186 (gdb_agent_op_names): Add pick and roll.
13187 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13188 cases.
13189
0feedb2c
JK
131902011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13191
13192 * aclocal.m4: Regenerated with aclocal-1.11.1.
13193
b3b9301e
PA
131942011-02-14 Pedro Alves <pedro@codesourcery.com>
13195
13196 * server.c (handle_qxfer_traceframe_info): New.
13197 (qxfer_packets): Register "traceframe-info".
13198 (handle_query): Report support for qXfer:traceframe-info:read+.
13199 * tracepoint.c (match_blocktype): New.
13200 (traceframe_find_block_type): Rename to ...
13201 (traceframe_walk_blocks): ... this. Add callback filter argument,
13202 and use it.
13203 (traceframe_find_block_type): New, reimplemented on top of
13204 traceframe_walk_blocks.
13205 (build_traceframe_info_xml): New.
13206 (traceframe_read_info): New.
13207 * server.h (traceframe_read_info): Declare.
13208
4f3e6fb7
YQ
132092011-02-11 Yao Qi <yao@codesourcery.com>
13210
13211 * configure.ac: Call AC_PROG_RANLIB.
13212 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13213 * configure: Regenerate.
13214
764880b7
PA
132152011-02-07 Pedro Alves <pedro@codesourcery.com>
13216
13217 * server.c (gdb_read_memory): Change return semantics to allow
13218 partial transfers.
13219 (handle_search_memory_1): Adjust.
13220 (process_serial_event) <'m' packet>: Handle partial transfers.
13221 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13222
1c79eb8a
PA
132232011-01-28 Pedro Alves <pedro@codesourcery.com>
13224
13225 * regcache.c (init_register_cache): Initialize
13226 regcache->register_status.
13227 (free_register_cache): Release regcache->register_status.
13228 (regcache_cpy): Copy register_status.
13229 (registers_to_string): Print 'x's for unavailable registers.
13230 (supply_register): Mark the register's status valid or
13231 unavailable, depending on whether a buffer was passed in or not.
13232 (supply_register_zeroed): New.
13233 (supply_regblock): Mark the registers' status valid or
13234 unavailable, depending on whether a buffer was passed in or not.
13235 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13236 (struct regcache): New `register_status' field.
13237 (supply_register_zeroed): Declare.
13238 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13239 supply_register_zeroed, rather than passing a NULL buffer to
13240 supply_register.
13241 * tracepoint.c (fetch_traceframe_registers): Update comment.
13242
85724a0e
PA
132432011-01-28 Pedro Alves <pedro@codesourcery.com>
13244
13245 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13246 buffer explicit.
13247
d08aafef
PA
132482011-01-25 Pedro Alves <pedro@codesourcery.com>
13249
13250 * server.h (decode_xfer_write): Change prototype.
13251 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13252 and don't extract the annex here.
13253 * server.c (decode_xfer_read): Remove `annex' parameter,
13254 and don't extract the annex here.
13255 (decode_xfer): New.
13256 (struct qxfer): New.
13257 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13258 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13259 (handle_qxfer_statictrace): New functions, abstracted out from
13260 handle_query, and made to use the struct qxfer interface.
13261 (handle_threads_qxfer_proper): Rename to ...
13262 (handle_qxfer_threads_proper): ... this.
13263 (handle_threads_qxfer): Rename to ...
13264 (handle_qxfer_threads): ... this. Adjust.
13265 (qxfer_packets): New array.
13266 (handle_qxfer): New function.
13267 (handle_query): Use handle_qxfer.
13268
493e2a69
MS
132692011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13270
13271 * gdbreplay.c: Shorten lines of >= 80 columns.
13272 * linux-low.c: Ditto.
13273 * linux-ppc-low.c: Ditto.
13274 * linux-s390-low.c: Ditto.
13275 * linux-sparc-low.c: Ditto.
13276 * linux-x86-low.c: Ditto.
13277 * linux-xtensa-low.c: Ditto.
13278 * mem-break.c: Ditto.
13279 * nto-low.c: Ditto.
13280 * regcache.h: Ditto.
13281 * remote-utils.c: Ditto.
13282 * server.c: Ditto.
13283 * server.h: Ditto.
13284 * thread-db.c: Ditto.
13285 * tracepoint.c: Ditto.
13286 * utils.c: Ditto.
13287 * win32-low.h: Ditto.
13288
44944448
JB
132892011-01-05 Joel Brobecker <brobecker@adacore.com>
13290
13291 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13292 update.
13293
71ce852c
JB
132942011-01-01 Joel Brobecker <brobecker@adacore.com>
13295
13296 * server.c (gdbserver_version): Update copyright year in version
13297 output.
13298 * gdbreplay.c (gdbreplay_version): Ditto.
13299
eb826dc6
MF
133002010-12-29 Jie Zhang <jie.zhang@analog.com>
13301
13302 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13303 * linux-bfin-low.c: New file.
13304 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13305 PT_DATA_ADDR for BFIN targets.
13306 * Makefile.in (SFILES): Add linux-bfin-low.c.
13307 (clean): Remove reg-bfin.c.
13308 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13309 * README: Mention supported Blackfin targets.
13310
39ab222a
MF
133112010-12-23 Mike Frysinger <vapier@gentoo.org>
13312
13313 * .gitignore: New file.
13314
a1f2ce7d
MF
133152010-11-16 Mike Frysinger <vapier@gentoo.org>
13316
13317 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13318
f474844c
JZ
133192010-10-22 Jie Zhang <jie@codesourcery.com>
13320
13321 * Makefile.in: Add FLAGS_TO_PASS variable.
13322 (install): Remove dependency of install-only and recursively
13323 invoke make for install-only.
13324
f1048712
DE
133252010-10-04 Doug Evans <dje@google.com>
13326
13327 * Makefile.in (uninstall): Use $(DESTDIR).
13328
b53a1623
PA
133292010-09-24 Pedro Alves <pedro@codesourcery.com>
13330
e6ee044d
PA
13331 PR gdb/11842
13332
b53a1623
PA
13333 * linux-x86-low.c (compat_siginfo_from_siginfo)
13334 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13335 si_code is < 0. Check for si_code == SI_TIMER before checking for
13336 si_code < 0.
13337
fa1bd1e4
JB
133382010-09-13 Joel Brobecker <brobecker@adacore.com>
13339
13340 * lynx-i386-low.c: New file.
13341 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13342
47fac8f8
JB
133432010-09-13 Joel Brobecker <brobecker@adacore.com>
13344
13345 * lynx-low.c (ptrace_request_to_str): Remove handling for
13346 request values that have been removed in LynxOS 5.x.
13347
1adfc54d
JB
133482010-09-13 Joel Brobecker <brobecker@adacore.com>
13349
13350 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13351 <ptrace.h>
13352
c2a66c29
NS
133532010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13354
13355 * configure.ac: Add --enable-inprocess-agent option.
13356 * configure: Rebuilt.
13357
32fcada3
YQ
133582010-09-06 Yao Qi <yao@codesourcery.com>
13359
13360 * linux-low.c (linux_kill): Remove unused variable.
13361 (linux_stabilize_threads): Likewise.
13362 * server.c (start_inferior): Likewise.
13363 (queue_stop_reply_callback): Likewise.
13364 * tracepoint.c (do_action_at_tracepoint): Likewise.
13365
0cccb683
YQ
133662010-09-06 Yao Qi <yao@codesourcery.com>
13367
13368 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13369 on return.
13370
423ec54c
JK
133712010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13372
13373 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13374
12ac6819
PA
133752010-09-06 Pedro Alves <pedro@codesourcery.com>
13376
13377 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13378 "$(IPA_DEPFILES)".
13379
8ed54b31
JB
133802010-09-01 Joel Brobecker <brobecker@adacore.com>
13381
13382 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13383 gdbserver/lynx-ppc-low.c: New files.
13384 * Makefile.in (lynx_low_h): New variable.
13385 (lynx-low.o, lynx-ppc-low.o): New rules.
13386 * configure.ac: On LynxOS, link with -lnetinet.
13387 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13388 * configure: regenerate.
13389
bb0116a4
JB
133902010-09-01 Joel Brobecker <brobecker@adacore.com>
13391
13392 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13393 * configure.ac: Add check for vasprintf and vsnprintf.
13394 * configure, config.in: Regenerate.
13395 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13396
a778ab81 133972010-09-01 Joel Brobecker <brobecker@adacore.com>
13398
13399 * gdbreplay.c: Move include of alloca.h up, next to include of
13400 malloc.h.
13401 * server.h: Add include of malloc.h.
13402 * mem-break.c: Remove include of malloc.h.
13403 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13404
8b034a19 134052010-09-01 Joel Brobecker <brobecker@adacore.com>
13406
13407 * Makefile.in (memmem.o): Build with -Wno-error.
13408
134092010-09-01 Joel Brobecker <brobecker@adacore.com>
13410
13411 * utils.c (xsnprintf): Make non-static.
13412 * server.h: Add xsnprintf declaration.
13413 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13414 replace calls to snprintf by calls to xsnprintf throughout.
13415
134162010-09-01 Joel Brobecker <brobecker@adacore.com>
13417
13418 * configure.ac: Add configure check for alloca.
13419 * configure, config.in: Regenerate.
13420 * server.h: Include alloca.h if it exists.
13421 * gdbreplay.c: Include alloca.h if it exists.
13422
1a981360
PA
134232010-08-28 Pedro Alves <pedro@codesourcery.com>
13424
13425 * linux-low.c (__SIGRTMIN): Define if not already defined.
13426 (linux_create_inferior): Check for __ANDROID__ rather than
13427 __SIGRTMIN.
13428 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13429 are already deferred.
13430 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13431 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13432 stopped and already has a pending signal to report.
13433 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13434 a pending signal to report or is moving out of a jump pad.
13435 (linux_init_signals): Check for __ANDROID__ rather than
13436 __SIGRTMIN.
13437
b4d51a55
PA
134382010-08-28 Pedro Alves <pedro@codesourcery.com>
13439
13440 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13441 debug_threads check. Avoid a linear search when not doing debug
13442 output.
13443
ec48365d
PA
134442010-08-27 Pedro Alves <pedro@codesourcery.com>
13445
13446 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13447 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13448 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13449 (process_event): Change local fd's type to gdb_fildes_t.
13450 (create_file_handler): Adjust prototype.
13451 (delete_file_handler): Adjust prototype.
13452 (handle_file_event): Adjust prototype. Use pfildes.
13453 (create_file_event): Adjsut prototype.
13454 * remote-utils.c (remote_desc, listen_desc): Change type to
13455 gdb_fildes_t.
13456 * server.h: New gdb_fildes_t typedef.
13457 [USE_WIN32API]: Include winsock2.h.
13458 (delete_file_handler, add_file_handler): Adjust prototypes.
13459 (pfildes): Declare.
13460 * utils.c (pfildes): New.
13461
854d88f0
PA
134622010-08-27 Pedro Alves <pedro@codesourcery.com>
13463
13464 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13465 * configure: Regenerate.
13466
0146f85b
PA
134672010-08-27 Pedro Alves <pedro@codesourcery.com>
13468
13469 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13470 (linux_done_accessing_memory): ... this.
13471 (linux_target_ops): Adjust.
13472 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13473 * nto-low.c (nto_target_ops): Adjust comment.
13474 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13475 * spu-low.c (spu_target_ops): Adjust comment.
13476 * target.h (target_ops): Rename unprepare_to_access_memory field
13477 to done_accessing_memory.
13478 (unprepare_to_access_memory): Rename to ...
13479 (done_accessing_memory): ... this.
13480
90d74c30
PA
134812010-08-26 Pedro Alves <pedro@codesourcery.com>
13482
13483 * linux-low.c (linux_prepare_to_access_memory): New.
13484 (linux_unprepare_to_access_memory): New.
13485 (linux_target_ops): Install them.
13486 * server.c (read_memory): Rename to ...
13487 (gdb_read_memory): ... this. Use
13488 prepare_to_access_memory/prepare_to_access_memory.
13489 (write_memory): Rename to ...
13490 (gdb_write_memory): ... this. Use
13491 prepare_to_access_memory/prepare_to_access_memory.
13492 (handle_search_memory_1): Adjust.
13493 (process_serial_event): Adjust.
13494 * target.h (struct target_ops): New fields
13495 prepare_to_access_memory and unprepare_to_access_memory.
13496 (prepare_to_access_memory, unprepare_to_access_memory): New.
13497 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13498 prepare_to_access_memory/prepare_to_access_memory.
13499 * nto-low.c (nto_target_ops): Adjust.
13500 * spu-low.c (spu_target_ops): Adjust.
13501 * win32-low.c (win32_target_ops): Adjust.
13502
fd467969
PA
135032010-08-26 Pedro Alves <pedro@codesourcery.com>
13504
13505 * Makefile.in (WARN_CFLAGS): Get it from configure.
13506 (WERROR_CFLAGS): New.
13507 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13508 * configure.ac: Introduce --enable-werror, which adds -Werror to
13509 the compiler command line. Enabled by default. Disable with
13510 --disable-werror. Add -Wdeclaration-after-statement
13511 Wpointer-arith and -Wformat-nonliteral to warning flags.
13512 * configure: Regenerate.
13513
331e2f5f
PA
135142010-08-26 Pedro Alves <pedro@codesourcery.com>
13515
13516 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13517
e581f2b4
PA
135182010-08-26 Pedro Alves <pedro@codesourcery.com>
13519
13520 * gdbreplay.c (remote_error): New.
13521 (gdbchar): New.
13522 (expect): Use gdbchar. Check for error reading from GDB.
13523 Clarify sync error output.
13524 (play): Check for errors writing to GDB.
13525 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13526 * remote-utils.c (getpkt): Check for errors writing to the remote
13527 descriptor.
13528
3c11dd79
PA
135292010-08-25 Pedro Alves <pedro@codesourcery.com>
13530
13531 * linux-low.c (linux_wait_1): Move non-debugging code out of
13532 `debug_threads' control.
13533
d20a8ad9
PA
135342010-08-25 Pedro Alves <pedro@codesourcery.com>
13535
13536 * linux-low.c (linux_wait_1): Don't set last_status here.
13537 * server.c (push_event, queue_stop_reply_callback): Assert we're
13538 not pushing a TARGET_WAITKIND_IGNORE event.
13539 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13540 (myresume, handle_target_event): Set the thread's last_resume_kind
13541 and last_status from the target returned status.
13542
964e4306
PA
135432010-08-25 Pedro Alves <pedro@codesourcery.com>
13544
13545 PR threads/10729
13546
13547 * linux-x86-low.c (update_debug_registers_callback): New.
13548 (i386_dr_low_set_addr): Use it.
13549 (i386_dr_low_get_addr): New.
13550 (i386_dr_low_set_control): Use update_debug_registers_callback.
13551 (i386_dr_low_get_control): New.
13552 (i386_dr_low_get_status): Adjust.
13553 * linux-low.c (linux_stop_lwp): New.
13554 * linux-low.h (linux_stop_lwp): Declare.
13555
13556 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13557 argument instead of a i386_debug_reg_state.
13558 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13559 a i386_debug_reg_state.
13560 (i386_insert_aligned_watchpoint): Adjust.
13561 (i386_remove_aligned_watchpoint): Adjust.
13562 (i386_low_stopped_data_address): Read the debug registers from the
13563 inferior instead of from the mirrors.
13564 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13565 (i386_dr_low_get_addr): Declare.
13566 (i386_dr_low_get_control): Declare.
13567 (i386_dr_low_get_status): Change prototype.
13568
13569 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13570 (i386_dr_low_get_addr): New.
13571 (i386_dr_low_get_control): New.
13572 (i386_dr_low_get_status): Adjust prototype. Return
13573 dr_status_mirror.
13574 (i386_initial_stuff): Clear dr_status_mirror and
13575 dr_control_mirror.
13576 (i386_get_thread_context): Adjust.
13577 (i386_set_thread_context): Adjust.
13578 (i386_thread_added): Adjust.
13579
5f21a75b
PA
135802010-08-24 Pedro Alves <pedro@codesourcery.com>
13581
13582 * linux-low.h (linux_thread_area): Delete declaration.
13583
3e4c1235
TS
135842010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13585
13586 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13587 after its termination.
13588
1971b033
PA
135892010-08-09 Pedro Alves <pedro@codesourcery.com>
13590
13591 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13592 (gdb_wants_all_stopped): Delete.
13593 (linux_wait_1): Don't call them.
13594 * server.c (handle_v_cont): Tag all threads as want-stopped.
13595 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13596 stopped as "client-wants-stopped".
13597
310444ac
PA
135982010-07-31 Pedro Alves <pedro@codesourcery.com>
13599
13600 * Makefile.in (signals_h): New.
13601 (server_h): Depend on it.
13602 (server.o): Don't depend on $(signals_def).
13603 (signals.o): Depend on $(signals_def).
13604
a19cae16
JK
136052010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13606
13607 * Makefile.in (signals_def): New.
13608 (server_h): Append include/gdb/signals.h and signals_def.
13609 (server.o): Append signals_def.
13610
30d50328
JK
136112010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13612
13613 * server.c (handle_target_event): Use target_signal_to_host for
13614 resume_info.sig initialization.
13615 * target.h (struct thread_resume) <sig>: New comment.
13616
5c3216e2
OS
136172010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13618
c6f46ca0
OS
13619 * server.c (handle_query): strcpy() the returned string from paddress()
13620 instead of sprintf().
5c3216e2
OS
13621 * utils.c (paddress): Return phex_nz().
13622
6bd31874
JB
136232010-07-07 Joel Brobecker <brobecker@adacore.com>
13624
13625 * server.c (handle_v_cont): Call mourn_inferior if process
13626 just exited.
13627 (myresume): Likewise.
13628
0fb4aa4b
PA
136292010-07-01 Pedro Alves <pedro@codesourcery.com>
13630
13631 Static tracepoints, and integration with UST.
13632
13633 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13634 * mem-break.c (uninsert_all_breakpoints)
13635 (reinsert_all_breakpoints): New.
13636 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13637 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13638 (gdb_agent_ust_loaded, helper_thread_id)
13639 (gdb_agent_helper_thread_id): New macros.
13640 (struct ipa_sym_addresses): Add addr_ust_loaded,
13641 addr_helper_thread_id, addr_cmd_buf.
13642 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13643 (in_process_agent_loaded_ust): New.
13644 (write_e_ust_not_loaded): New.
13645 (maybe_write_ipa_ust_not_loaded): New.
13646 (struct collect_static_trace_data_action): New.
13647 (enum tracepoint_type) <static_tracepoint>: New.
13648 (struct tracepoint) <handle>: Mention static tracepoints.
13649 (struct static_tracepoint_ctx): New.
13650 (CMD_BUF_SIZE): New.
13651 (add_tracepoint_action): Handle static tracepoint actions.
13652 (unprobe_marker_at): New.
13653 (clear_installed_tracepoints): Handle static tracepoints.
13654 (cmd_qtdp): Handle static tracepoints.
13655 (probe_marker_at): New.
13656 (cmd_qtstart): Handle static tracepoints.
13657 (response_tracepoint): Handle static tracepoints.
13658 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13659 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13660 (get_context_regcache): Handle static tracepoints.
13661 (do_action_at_tracepoint): Handle static tracepoint actions.
13662 (traceframe_find_block_type): Handle static trace data blocks.
13663 (traceframe_read_sdata): New.
13664 (download_tracepoints): Download static tracepoint actions.
13665 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13666 (GDB_PROBE_NAME): New.
13667 (ust_ops): New.
13668 (GET_UST_SYM): New.
13669 (USTF): New.
13670 (dlsym_ust): New.
13671 (ust_marker_to_static_tracepoint): New.
13672 (gdb_probe): New.
13673 (collect_ust_data_at_tracepoint): New.
13674 (gdb_ust_probe): New.
13675 (UNIX_PATH_MAX, SOCK_DIR): New.
13676 (gdb_ust_connect_sync_socket): New.
13677 (resume_thread, stop_thread): New.
13678 (run_inferior_command): New.
13679 (init_named_socket): New.
13680 (gdb_ust_socket_init): New.
13681 (cstr_to_hexstr): New.
13682 (next_st): New.
13683 (first_marker, next_marker): New.
13684 (response_ust_marker): New.
13685 (cmd_qtfstm, cmd_qtsstm): New.
13686 (unprobe_marker_at, probe_marker_at): New.
13687 (cmd_qtstmat, gdb_ust_thread): New.
13688 (gdb_ust_init): New.
13689 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13690 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13691 (ST_REGENTRY): New.
13692 (x86_64_st_collect_regmap): New.
13693 (X86_64_NUM_ST_COLLECT_GREGS): New.
13694 (AMD64_RIP_REGNUM): New.
13695 (supply_static_tracepoint_registers): New.
13696 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13697 (ST_REGENTRY): New.
13698 (i386_st_collect_regmap): New.
13699 (i386_NUM_ST_COLLECT_GREGS): New.
13700 (supply_static_tracepoint_registers): New.
13701 * server.c (handle_query): Handle qXfer:statictrace:read.
13702 <qSupported>: Report support for StaticTracepoints, and
13703 qXfer:statictrace:read features.
13704 * server.h (traceframe_read_sdata)
13705 (supply_static_tracepoint_registers): Declare.
13706 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13707 (unpack_varlen_hex): Include in IPA build.
13708 * Makefile.in (ustlibs, ustinc): New.
13709 (IPA_OBJS): Add remote-utils-ipa.o.
13710 ($(IPA_LIB)): Link -ldl and -lpthread.
13711 (UST_CFLAGS): New.
13712 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13713 * config.in, configure: Regenerate.
13714
9e4344e5
PA
137152010-06-20 Ian Lance Taylor <iant@google.com>
13716 Pedro Alves <pedro@codesourcery.com>
13717
13718 * linux-x86-low.c (always_true): Delete.
13719 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13720 trying to fool the compiler with always_true.
13721
c6beb2cb
PA
137222010-06-20 Pedro Alves <pedro@codesourcery.com>
13723
13724 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13725 conditions in gdbserver.
13726
d2ed6730
UW
137272010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13728
13729 * spu-low.c (spu_read_memory): Wrap around local store limit.
13730 (spu_write_memory): Likewise.
13731
4e29fb54
PA
137322010-06-15 Pedro Alves <pedro@codesourcery.com>
13733
13734 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13735 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13736 LONGEST uses.
13737 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13738 uses.
13739 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13740 uses with LONGEST uses.
13741
6a271cae
PA
137422010-06-14 Stan Shebs <stan@codesourcery.com>
13743 Pedro Alves <pedro@codesourcery.com>
13744
13745 Bytecode compiler.
13746
13747 * linux-x86-low.c: Include limits.h.
13748 (add_insns): New.
13749 (always_true): New.
13750 (EMIT_ASM): New.
13751 (EMIT_ASM32): New.
13752 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13753 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13754 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13755 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13756 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13757 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13758 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13759 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13760 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13761 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13762 (amd64_emit_void_call_2): New.
13763 (amd64_emit_ops): New.
13764 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13765 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13766 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13767 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13768 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13769 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13770 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13771 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13772 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13773 (i386_emit_stack_adjust, i386_emit_int_call_1)
13774 (i386_emit_void_call_2): New.
13775 (i386_emit_ops): New.
13776 (x86_emit_ops): New.
13777 (the_low_target): Install x86_emit_ops.
13778 * server.h (struct emit_ops): New.
13779 (get_raw_reg_func_addr): Declare.
13780 (current_insn_ptr, emit_error): Declare.
13781 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13782 (set_trace_state_variable_value): New defines.
13783 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13784 addr_get_trace_state_variable_value and
13785 addr_set_trace_state_variable_value.
13786 (symbol_list): New fields for get_raw_reg,
13787 get_trace_state_variable_value and set_trace_state_variable_value.
13788 (condfn): New typedef.
13789 (struct tracepoint): New field `compiled_cond'.
13790 (do_action_at_tracepoint): Clear compiled_cond.
13791 (get_trace_state_variable_value, set_trace_state_variable_value):
13792 Export in the IPA.
13793 (condition_true_at_tracepoint): If there's a compiled condition,
13794 run that.
13795 (current_insn_ptr, emit_error): New globals.
13796 (struct bytecode_address): New.
13797 (get_raw_reg_func_addr): New.
13798 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13799 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13800 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13801 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13802 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13803 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13804 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13805 (compile_tracepoint_condition, compile_bytecodes): New.
13806 * target.h (emit_ops): Forward declare.
13807 (struct target_ops): New field emit_ops.
13808 (target_emit_ops): New.
13809 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13810 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13811 * linux-low.c (linux_emit_ops): New.
13812 (linux_target_ops): Install it.
13813 * linux-low.h (struct linux_target_ops): New field emit_ops.
13814
92b72907
UW
138152010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13816
13817 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13818 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13819
fa593d66
PA
138202010-06-01 Pedro Alves <pedro@codesourcery.com>
13821 Stan Shebs <stan@codesourcery.com>
13822
13823 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13824 (all): Depend on $(extra_libraries).
13825 (install-only): Install the IPA.
13826 (IPA_OBJS, IPA_LIB): New.
13827 (clean): Remove the IPA lib.
13828 (IPAGENT_CFLAGS): New.
13829 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13830 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13831 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13832 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13833 * configure.ac: Check for atomic builtins support in the compiler.
13834 (IPA_DEPFILES, extra_libraries): Define.
13835 * configure.srv (ipa_obj): Add description.
13836 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13837 (i[34567]86-*-linux*): Set ipa_obj.
13838 (x86_64-*-linux*): Set ipa_obj.
13839 * linux-low.c (stabilizing_threads): New.
13840 (supports_fast_tracepoints): New.
13841 (linux_detach): Stabilize threads before detaching.
13842 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13843 the lwp is either not stabilizing, or is moving out of a jump pad.
13844 (linux_fast_tracepoint_collecting): New.
13845 (maybe_move_out_of_jump_pad): New.
13846 (enqueue_one_deferred_signal): New.
13847 (dequeue_one_deferred_signal): New.
13848 (linux_wait_for_event_1): If moving out of a jump pad, defer
13849 pending signals to later.
13850 (linux_stabilize_threads): New.
13851 (linux_wait_1): Check if threads need moving out of jump pads, and
13852 do it if so.
13853 (stuck_in_jump_pad_callback): New.
13854 (move_out_of_jump_pad_callback): New.
13855 (lwp_running): New.
13856 (linux_resume_one_lwp): Handle moving out of jump pads.
13857 (linux_set_resume_request): Dequeue deferred signals.
13858 (need_step_over_p): Also step over fast tracepoint jumps.
13859 (start_step_over): Also uninsert fast tracepoint jumps.
13860 (finish_step_over): Also reinsert fast tracepoint jumps.
13861 (linux_install_fast_tracepoint_jump): New.
13862 (linux_target_ops): Install linux_stabilize_threads and
13863 linux_install_fast_tracepoint_jump_pad.
13864 * linux-low.h (linux_target_ops) <get_thread_area,
13865 install_fast_tracepoint_jump_pad>: New fields.
13866 (struct lwp_info) <collecting_fast_tracepoint,
13867 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13868 (linux_get_thread_area): Declare.
13869 * linux-x86-low.c (jump_insn): New.
13870 (x86_get_thread_area): New.
13871 (append_insns): New.
13872 (push_opcode): New.
13873 (amd64_install_fast_tracepoint_jump_pad): New.
13874 (i386_install_fast_tracepoint_jump_pad): New.
13875 (x86_install_fast_tracepoint_jump_pad): New.
13876 (the_low_target): Install x86_get_thread_area and
13877 x86_install_fast_tracepoint_jump_pad.
13878 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13879 (struct fast_tracepoint_jump): New.
13880 (fast_tracepoint_jump_insn): New.
13881 (fast_tracepoint_jump_shadow): New.
13882 (find_fast_tracepoint_jump_at): New.
13883 (fast_tracepoint_jump_here): New.
13884 (delete_fast_tracepoint_jump): New.
13885 (set_fast_tracepoint_jump): New.
13886 (uninsert_fast_tracepoint_jumps_at): New.
13887 (reinsert_fast_tracepoint_jumps_at): New.
13888 (set_breakpoint_at): Use write_inferior_memory.
13889 (uninsert_raw_breakpoint): Use write_inferior_memory.
13890 (check_mem_read): Mask out fast tracepoint jumps.
13891 (check_mem_write): Mask out fast tracepoint jumps.
13892 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13893 (set_fast_tracepoint_jump): Declare.
13894 (delete_fast_tracepoint_jump)
13895 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13896 (reinsert_fast_tracepoint_jumps_at): Declare.
13897 * regcache.c: Don't compile many functions when building the
13898 in-process agent library.
13899 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13900 the register buffer in the heap.
13901 (free_register_cache): If the register buffer isn't owned by the
13902 regcache, don't free it.
13903 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13904 pre-existing register caches.
13905 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13906 type.
13907 (convert_ascii_to_int): : Constify `from' parameter type.
13908 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13909 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13910 the needed buffer in-place.
13911 (relocate_instruction): New.
13912 * server.c (handle_query) <qSymbols>: If the target supports
13913 tracepoints, give it a chance of looking up symbols. Report
13914 support for fast tracepoints.
13915 (handle_status): Stabilize threads.
13916 (process_serial_event): Adjust.
13917 * server.h (struct fast_tracepoint_jump): Forward declare.
13918 (struct process_info) <fast_tracepoint_jumps>: New field.
13919 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13920 (decode_X_packet, decode_M_packet): Adjust.
13921 (relocate_instruction): Declare.
13922 (in_process_agent_loaded): Declare.
13923 (tracepoint_look_up_symbols): Declare.
13924 (struct fast_tpoint_collect_status): Declare.
13925 (fast_tracepoint_collecting): Declare.
13926 (force_unlock_trace_buffer): Declare.
13927 (handle_tracepoint_bkpts): Declare.
13928 (initialize_low_tracepoint)
13929 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13930 * target.h (struct target_ops) <stabilize_threads,
13931 install_fast_tracepoint_jump_pad>: New fields.
13932 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13933 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13934 [HAVE_STDINT_H]: Include stdint.h.
13935 (trace_debug_1): Rename to ...
13936 (trace_vdebug): ... this.
13937 (trace_debug): Rename to ...
13938 (trace_debug_1): ... this. Add `level' parameter.
13939 (trace_debug): New.
13940 (ATTR_USED, ATTR_NOINLINE): New.
13941 (IP_AGENT_EXPORT): New.
13942 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13943 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13944 (about_to_request_buffer_space, trace_buffer_is_full)
13945 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13946 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13947 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13948 (traceframe_write_count, traceframes_created)
13949 (trace_state_variables)
13950 New renaming defines.
13951 (struct ipa_sym_addresses): New.
13952 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13953 (symbol_list): New.
13954 (ipa_sym_addrs): New.
13955 (all_tracepoint_symbols_looked_up): New.
13956 (in_process_agent_loaded): New.
13957 (write_e_ipa_not_loaded): New.
13958 (maybe_write_ipa_not_loaded): New.
13959 (tracepoint_look_up_symbols): New.
13960 (debug_threads) [IN_PROCESS_AGENT]: New.
13961 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13962 (UNKNOWN_SIDE_EFFECTS): New.
13963 (stop_tracing): New.
13964 (flush_trace_buffer): New.
13965 (stop_tracing_bkpt): New.
13966 (flush_trace_buffer_bkpt): New.
13967 (read_inferior_integer): New.
13968 (read_inferior_uinteger): New.
13969 (read_inferior_data_pointer): New.
13970 (write_inferior_data_pointer): New.
13971 (write_inferior_integer): New.
13972 (write_inferior_uinteger): New.
13973 (struct collect_static_trace_data_action): Delete.
13974 (enum tracepoint_type): New.
13975 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13976 <actions_str, step_actions, step_actions_str>: Only include in
13977 GDBserver.
fa593d66
PA
13978 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13979 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13980 (tracepoints): Use IP_AGENT_EXPORT.
13981 (last_tracepoint): Don't include in the IPA.
13982 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13983 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13984 (alloced_trace_state_variables): New.
13985 (trace_state_variables): Use IP_AGENT_EXPORT.
13986 (traceframe_t): Delete unused variable.
13987 (circular_trace_buffer): Don't include in the IPA.
13988 (trace_buffer_start): Delete.
13989 (struct trace_buffer_control): New.
13990 (trace_buffer_free): Delete.
13991 (struct ipa_trace_buffer_control): New.
13992 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13993 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13994 New.
13995 (trace_buffer_ctrl): New.
13996 (TRACE_BUFFER_CTRL_CURR): New.
13997 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13998 Reimplement as macros.
13999 (trace_buffer_wrap): Delete.
14000 (traceframe_write_count, traceframe_read_count)
14001 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14002 (struct tracepoint_hit_ctx) <type>: New field.
14003 (struct fast_tracepoint_ctx): New.
14004 (memory_barrier): New.
14005 (cmpxchg): New.
14006 (record_tracepoint_error): Update atomically in the IPA.
14007 (clear_inferior_trace_buffer): New.
14008 (about_to_request_buffer_space): New.
14009 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14010 updating the same buffer.
14011 (add_tracepoint): Default the tracepoint's type to trap
14012 tracepoint, and orig_size to -1.
14013 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14014 internal variables.
14015 (create_trace_state_variable): New parameter `gdb'. Handle it.
14016 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14017 (cmd_qtdp): Handle fast tracepoints.
14018 (cmd_qtdv): Adjust.
14019 (max_jump_pad_size): New.
14020 (gdb_jump_pad_head): New.
14021 (get_jump_space_head): New.
14022 (claim_jump_space): New.
14023 (sort_tracepoints): New.
14024 (MAX_JUMP_SIZE): New.
14025 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14026 IPA.
14027 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14028 support. Upload fast traceframes, and delete internal IPA
14029 breakpoints.
14030 (stop_tracing_handler): New.
14031 (flush_trace_buffer_handler): New.
14032 (cmd_qtstop): Upload fast tracepoints.
14033 (response_tracepoint): Handle fast tracepoints.
14034 (tracepoint_finished_step): Upload fast traceframes. Set the
14035 tracepoint hit context's tracepoint type.
14036 (handle_tracepoint_bkpts): New.
14037 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14038 type. Add comment about fast tracepoints.
14039 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14040 non-existing action_str field.
14041 (get_context_regcache): Handle fast tracepoints.
14042 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14043 to the regcache.
14044 (fast_tracepoint_from_jump_pad_address): New.
14045 (fast_tracepoint_from_ipa_tpoint_address): New.
14046 (collecting_t): New.
14047 (force_unlock_trace_buffer): New.
14048 (fast_tracepoint_collecting): New.
14049 (collecting): New.
14050 (gdb_collect): New.
14051 (write_inferior_data_ptr): New.
14052 (target_tp_heap): New.
14053 (target_malloc): New.
14054 (download_agent_expr): New.
14055 (UALIGN): New.
14056 (download_tracepoints): New.
14057 (download_trace_state_variables): New.
14058 (upload_fast_traceframes): New.
14059 (IPA_FIRST_TRACEFRAME): New.
14060 (IPA_NEXT_TRACEFRAME_1): New.
14061 (IPA_NEXT_TRACEFRAME): New.
14062 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14063 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14064 (gdb_jump_pad_buffer_end): New.
14065 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14066 (initialize_tracepoint): Adjust.
14067 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14068 buffer. Initialize the low module.
14069 * utils.c (PREFIX, TOOLNAME): New.
14070 (malloc_failure): Use PREFIX.
14071 (error): In the IPA, an error causes an exit.
14072 (fatal, warning): Use PREFIX.
14073 (internal_error): Use TOOLNAME.
14074 (NUMCELLS): Increase to 10.
14075 * configure, config.in: Regenerate.
14076
d149dd1d
PA
140772010-06-01 Pedro Alves <pedro@codesourcery.com>
14078
14079 * server.c (handle_query) <qSupported>: Do two passes over the
14080 qSupported string to avoid nesting strtok.
14081
f6528abd
JK
140822010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14083
14084 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14085 (CDEPS): New.
14086 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14087 -Wl,--dynamic-list.
14088 * configure: Regenerate.
14089 * proc-service.list: New.
14090
ca2a87a0
JK
140912010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14092
14093 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14094 New comment.
14095
363a6e9f
OS
140962010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14097
14098 * gdbreplay.c (remote_open): Check error return from socket() call by
14099 its equality to -1 not by it being negative.
14100 * remote-utils.c (remote_open): Likewise.
14101
d23b6cb1
PA
141022010-05-23 Pedro Alves <pedro@codesourcery.com>
14103
14104 * config.h: Regenerate.
14105
28d3cf85
MK
141062010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14107
14108 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14109 doesn't provide PTRACE_GET_THREAD_AREA.
14110
fea36a59
MK
141112010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14112
14113 * linux-m68k-low.c: Include <asm/ptrace.h>
14114 (ps_get_thread_area): Implement.
14115
24b066ba
DE
141162010-05-03 Doug Evans <dje@google.com>
14117
14118 * event-loop.c (struct callback_event): New struct.
14119 (callback_list): New global.
14120 (append_callback_event, delete_callback_event): New functions.
14121 (process_callback): New function.
14122 (start_event_loop): Call it.
14123 * remote-utils.c (NOT_SCHEDULED): Define.
14124 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14125 moved out of readchar.
14126 (readchar): Rewrite. Call reschedule before returning.
14127 (reset_readchar): New function.
14128 (remote_close): Call it.
14129 (process_remaining, reschedule): New functions.
14130 * server.h (callback_handler_func): New typedef.
14131 (append_callback_event, delete_callback_event): Declare.
14132
9836d6ea
PA
141332010-05-03 Pedro Alves <pedro@codesourcery.com>
14134
14135 * proc-service.c (ps_pglobal_lookup): Use
14136 thread_db_look_up_one_symbol.
14137 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14138 parameter. Use it instead of all_symbols_looked_up.
14139 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14140 field.
14141 (all_symbols_looked_up): Don't declare.
14142 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14143 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14144 field.
14145 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14146 Set all_symbols_looked_up here.
14147 (thread_db_look_up_one_symbol): New.
14148 (thread_db_get_tls_address): Adjust.
14149 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14150 thread_db object on the heap, and tentatively set it in the
14151 process structure.
14152 (thread_db_init): Don't set all_symbols_looked_up here.
14153 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14154
7984d532
PA
141552010-05-03 Pedro Alves <pedro@codesourcery.com>
14156
14157 * linux-low.c (linux_kill, linux_detach): Adjust.
14158 (status_pending_p_callback): Remove redundant statement. Check
14159 for !TARGET_WAITIKIND_IGNORE, instead of
14160 TARGET_WAITKIND_STOPPED.
14161 (handle_tracepoints): Make sure LWP is locked. Adjust.
14162 (linux_wait_for_event_1): Adjust.
14163 (linux_cancel_breakpoints): New.
14164 (unsuspend_one_lwp): New.
14165 (unsuspend_all_lwps): New.
14166 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14167 (send_sigstop_callback): Change return type to int, add new
14168 `except' parameter and handle it.
14169 (suspend_and_send_sigstop_callback): New.
14170 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14171 pass them down. If SUSPEND, also increment the lwp's suspend
14172 count.
14173 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14174 (need_step_over_p): Don't consider suspended LWPs.
14175 (start_step_over): Adjust.
14176 (proceed_one_lwp): Change return type to int, add new `except'
14177 parameter and handle it.
14178 (unsuspend_and_proceed_one_lwp): New.
14179 (proceed_all_lwps): Use find_inferior instead of
14180 for_each_inferior.
14181 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14182 also decrement the suspend count of LWPs. Pass `except' down,
14183 instead of hacking its suspend count.
14184 (linux_pause_all): Add `freeze' parameter. Adjust.
14185 (linux_unpause_all): New.
14186 (linux_target_ops): Install linux_unpause_all.
14187 * server.c (handle_status): Adjust.
14188 * target.h (struct target_ops): New fields `unpause_all' and
14189 `cancel_breakpoints'. Add new parameter to `pause_all'.
14190 (pause_all): Add new `freeze' parameter.
14191 (unpause_all): New.
14192 (cancel_breakpoints): New.
14193 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14194 cancel breakpoints.
14195 (cmd_qtstart): Pause threads.
14196 (stop_tracing): Pause threads, and cancel breakpoints.
14197 * win32-low.c (win32_target_ops): Adjust.
14198
e471f25b
PA
141992010-05-03 Pedro Alves <pedro@codesourcery.com>
14200
14201 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14202 the inferior right away from here...
14203 (linux_wait_1): ... to here, and adjust to check the thread's
14204 last_resume_kind instead of the lwp's step or stop_expected flags.
14205
1915ef4f
PA
142062010-05-02 Pedro Alves <pedro@codesourcery.com>
14207
14208 * README: Use consistent `GDB' and `GDBserver' spellings.
14209
f9e39928
PA
142102010-05-02 Pedro Alves <pedro@codesourcery.com>
14211
14212 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14213 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14214 (linux_detach_one_lwp): Assume the lwp is stopped.
14215 (any_thread_of): Delete.
14216 (linux_detach): Stop all lwps here. Don't blindly delete all
14217 breakpoints.
14218 (delete_lwp_callback): New.
14219 (linux_mourn): Delete all lwps of the process that is gone.
14220 (linux_wait_1): Don't delete the last lwp of the process here.
14221 * mem-break.h (mark_breakpoints_out): Declare.
14222 * mem-break.c (mark_breakpoints_out): New.
14223 (free_all_breakpoints): Use it.
14224 * server.c (handle_target_event): If the process is gone, mark
14225 breakpoints out.
14226 * thread-db.c (struct thread_db) <create_bp>: New field.
14227 (thread_db_enable_reporting): Fix prototype. Store a thread event
14228 breakpoint reference in the thread_db struct.
14229 (thread_db_load_search): Clear the thread_db object.
14230 (try_thread_db_load_1): Ditto.
14231 (switch_to_process): New.
14232 (disable_thread_event_reporting): Use it.
14233 (remove_thread_event_breakpoints): New.
14234 (thread_db_detach, thread_db_mourn): Use it.
14235
1e7fc18c
PA
142362010-05-01 Pedro Alves <pedro@codesourcery.com>
14237
14238 * linux-low.c (linux_enable_event_reporting): New.
14239 (linux_wait_for_event_1, handle_extended_wait): Use it.
14240
02fc4de7
PA
142412010-04-30 Pedro Alves <pedro@codesourcery.com>
14242
14243 * linux-low.c (linux_kill_one_lwp, linux_kill)
14244 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14245 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14246 SIGSTOP even if the LWP is stopped.
14247 (send_sigstop_callback): New.
14248 (stop_all_lwps): Use send_sigstop_callback instead.
14249 (linux_resume_one_thread): Adjust.
14250 (proceed_one_lwp): Still proceed an LWP that the client has
14251 requested to stop, if we haven't reported it as stopped yet. Make
14252 sure that LWPs the client want stopped, have a pending SIGSTOP.
14253
bc3b5632
DE
142542010-04-26 Doug Evans <dje@google.com>
14255
ae1ada35
DE
14256 * server.c (handle_general_set): Make static.
14257
bc3b5632
DE
14258 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14259 Print received char after testing for error/eof instead of before.
14260 (input_interrupt): Tweak comment.
14261
65730243
DE
142622010-04-23 Doug Evans <dje@google.com>
14263
14264 * server.c (start_inferior): Print inferior argv if --debug.
14265
a8ae7dc0
AR
142662010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14267
14268 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14269 * nto-x86-low.c: Include server.h
14270
1c07cc19
PM
142712010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14272
14273 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14274 be consistent with other sources of this directory.
14275 (init_registers_amd64): Correct name of source file of this function
14276 in the comment.
14277
e0a61e09
PM
142782010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14279
14280 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14281 64-bit executables.
14282
54709339
PM
142832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14284
14285 * win32-i386-low.c: Add 64-bit support.
14286 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14287 (init_registers_amd64): Declare.
14288 (mappings): Add 64-bit version of array.
14289 (init_windows_x86): New function.
14290 (the_low_target): Change init_arch field to init_windows_x86.
14291
e8f0053d
PM
142922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14293
14294 * win32-low.c: Adapt to support also 64-bit architecture.
14295 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14296 (get_image_name): Use SIZE_T type for local variable `done'.
14297 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14298 (toolhelp_get_dll_name): Idem.
14299 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14300 Use uintptr_t typecast to avoid warning.
14301 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14302 (handle_exception): Use phex_nz to avoid warning.
14303 (win32_wait): Remove unused local variable `process'.
14304
c481e77e
PM
143052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14306
14307 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14308 `amd64-avx.o'.
14309
12ea4b69
PM
143102010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14311
14312 * configure.ac: Use `ws2_32' library for srv_mingw.
14313 * configure: Regenerate.
14314 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14315 * remote-utils.c: Likewise.
14316
f6d1620c
L
143172010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14318
14319 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14320 if __x86_64__ is defined.
14321
8e642873
PM
143222010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14323
14324 * configure: Regenerate.
14325
711e434b
PM
143262010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14327
14328 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14329 * target.h (target_ops): New get_tib_address field.
14330 * win32-low.h (win32_thread_info): Add thread_local_base field.
14331 * win32-low.c (child_add_thread): Add tlb argument.
14332 Set thread_local_base field to TLB.
14333 (get_child_debug_event): Adapt to child_add_thread change.
14334 (win32_get_tib_address): New function.
14335 (win32_target_ops): Set get_tib_address field to
14336 win32_get_tib_address.
14337 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14338
505106cd
PA
143392010-04-12 Pedro Alves <pedro@codesourcery.com>
14340
505106cd
PA
14341 * linux-low.c (linux_mourn): Also remove the process.
14342 * server.c (handle_target_event): Don't remove the process here.
14343 * nto-low.c (nto_mourn): New.
14344 (nto_target_ops): Install it.
14345 * spu-low.c (spu_mourn): New.
14346 (spu_target_ops): Install it.
14347 * win32-low.c (win32_mourn): New.
14348 (win32_target_ops): Install it.
14349
e8470a06
PA
143502010-04-12 Pedro Alves <pedro@codesourcery.com>
14351
14352 * server.h (buffer_xml_printf): Remove redundant `;'.
14353
45ba0d02
PA
143542010-04-12 Pedro Alves <pedro@codesourcery.com>
14355
14356 * regcache.c (set_register_cache): Invalidate regcaches before
14357 changing the register cache layout.
14358 (regcache_invalidate_one): Allow a NULL regcache.
14359 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14360 regcaches before changing the register cache layout or the target
14361 regsets.
14362
59e04013
L
143632010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14364
14365 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14366 variable warning on Linux/x86-64.
14367
8336d594
PA
143682010-04-11 Pedro Alves <pedro@codesourcery.com>
14369
14370 GDBserver disconnected tracing support.
14371
14372 * linux-low.c (linux_remove_process): Delete.
14373 (add_lwp): Don't set last_resume_kind here.
14374 (linux_kill): Use `mourn'.
14375 (linux_detach): Use `thread_db_detach', and `mourn'.
14376 (linux_mourn): New.
14377 (linux_attach_lwp_1): Adjust comment.
14378 (linux_attach): last_resume_kind moved the thread_info; adjust.
14379 (status_pending_p_callback): Adjust.
14380 (linux_wait_for_event_1): Adjust.
14381 (count_events_callback, select_singlestep_lwp_callback)
14382 (select_event_lwp_callback, cancel_breakpoints_callback)
14383 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14384 (proceed_one_lwp): Adjust.
14385 (linux_async): Add debug output.
14386 (linux_thread_stopped): New.
14387 (linux_pause_all): New.
14388 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14389 linux_pause_all.
14390 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14391 (thread_db_free): Delete declaration.
14392 (thread_db_detach, thread_db_mourn): Declare.
14393 * thread-db.c (thread_db_init): Use thread_db_mourn.
14394 (thread_db_free): Delete, split in two.
14395 (disable_thread_event_reporting): New.
14396 (thread_db_detach): New.
14397 (thread_db_mourn): New.
14398
14399 * server.h (struct thread_info) <last_resume_kind>: New field.
14400 <attached>: Add comment.
14401 <gdb_detached>: New field.
14402 (handler_func): Change return type to int.
14403 (handle_serial_event, handle_target_event): Ditto.
14404 (gdb_connected): Declare.
14405 (tracing): Delete.
14406 (disconnected_tracing): Declare.
14407 (stop_tracing): Declare.
14408
14409 * server.c (handle_query) <qSupported>: Report support for
14410 disconnected tracing.
14411 (queue_stop_reply_callback): Account for running threads.
14412 (gdb_wants_thread_stopped): New.
14413 (gdb_wants_all_threads_stopped): New.
14414 (gdb_reattached_process): New.
14415 (handle_status): Clear the `gdb_detached' flag of all processes.
14416 In all-stop, stop all threads.
14417 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14418 (process_serial_event): If the remote connection breaks, or if an
14419 exit was forced with "monitor exit", force an event loop exit.
14420 Handle disconnected tracing on detach.
14421 (handle_serial_event): Adjust.
14422 (handle_target_event): If GDB isn't connected, forward events back
14423 to the inferior, unless the last process exited, in which case,
14424 exit gdbserver. Adjust interface.
14425
14426 * remote-utils.c (remote_open): Don't block in accept. Instead
14427 register an event loop source on the listen socket file
14428 descriptor. Refactor bits into ...
14429 (listen_desc): ... this new global.
14430 (gdb_connected): ... this new function.
14431 (enable_async_notification): ... this new function.
14432 (handle_accept_event): ... this new function.
14433 (remote_close): Clear remote_desc.
14434
14435 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14436
14437 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14438 New fields.
14439 (mourn_inferior): Define.
14440 (target_process_qsupported): Avoid the dangling else problem.
14441 (thread_stopped): Define.
14442 (pause_all): Define.
14443 (target_waitstatus_to_string): Declare.
14444 * target.c (target_waitstatus_to_string): New.
14445
14446 * tracepoint.c (tracing): Make extern.
14447 (disconnected_tracing): New.
14448 (stop_tracing): Make extern. Handle tracing stops due to GDB
14449 disconnecting.
14450 (cmd_qtdisconnected): New.
14451 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14452 (handle_tracepoint_general_set): Handle QTDisconnected.
14453
14454 * event-loop.c (event_handler_func): Change return type to int.
14455 (process_event): Bail out if the event handler wants the event
14456 loop to stop.
14457 (handle_file_event): Ditto.
14458 (start_event_loop): Bail out if the event handler wants the event
14459 loop to stop.
14460
14461 * nto-low.c (nto_target_ops): Adjust.
14462 * spu-low.c (spu_wait): Don't remove the process here.
14463 (spu_target_ops): Adjust.
14464 * win32-low.c (win32_wait): Don't remove the process here.
14465 (win32_target_ops): Adjust.
14466
5d267c4c
PA
144672010-04-11 Pedro Alves <pedro@codesourcery.com>
14468
14469 * regcache.c (realloc_register_cache): Invalidate inferior's
14470 regcache before recreating it.
14471
623ccd72
PA
144722010-04-09 Pedro Alves <pedro@codesourcery.com>
14473
14474 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14475
219f2f23
PA
144762010-04-09 Stan Shebs <stan@codesourcery.com>
14477 Pedro Alves <pedro@codesourcery.com>
14478
14479 * server.h (LONGEST): New.
14480 (struct thread_info) <while_stepping>: New field.
14481 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14482 Declare.
14483 (initialize_tracepoint, handle_tracepoint_general_set)
14484 (handle_tracepoint_query, tracepoint_finished_step)
14485 (tracepoint_was_hit, release_while_stepping_state_list):
14486 (current_traceframe): Declare.
14487 * server.c (handle_general_set): Handle tracepoint packets.
14488 (read_memory): New.
14489 (write_memory): New.
14490 (handle_search_memory_1): Use read_memory.
14491 (handle_query): Report support for conditional tracepoints, trace
14492 state variables, and tracepoint sources. Handle tracepoint
14493 queries.
14494 (main): Initialize the tracepoints module.
14495 (process_serial_event): Handle traceframe reads/writes.
14496
14497 * linux-low.c (handle_tracepoints): New.
14498 (linux_wait_1): Call it.
14499 (linux_resume_one_lwp): Handle while-stepping.
14500 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14501 (linux_target_ops): Install them.
14502 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14503 New field.
14504 * linux-x86-low.c (x86_supports_tracepoints): New.
14505 (the_low_target). Install it.
14506
14507 * mem-break.h (delete_breakpoint): Declare.
14508 * mem-break.c (delete_breakpoint): Make external.
14509
14510 * target.h (struct target_ops): Add `supports_tracepoints',
14511 `read_pc', and `write_pc' fields.
14512 (target_supports_tracepoints): Define.
14513 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14514 (phex_nz): New.
14515
14516 * regcache.h (struct regcache) <registers_owned>: New field.
14517 (init_register_cache, regcache_cpy): Declare.
14518 (regcache_read_pc, regcache_write_pc): Declare.
14519 (register_cache_size): Declare.
14520 (supply_regblock): Declare.
14521 * regcache.c (init_register_cache): New.
14522 (new_register_cache): Use it.
14523 (regcache_cpy): New.
14524 (register_cache_size): New.
14525 (supply_regblock): New.
14526 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 14527
219f2f23
PA
14528 * tracepoint.c: New.
14529
14530 * Makefile.in (OBS): Add tracepoint.o.
14531 (tracepoint.o): New rule.
14532
3a13a53b
L
145332010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14534
14535 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14536 (i386-mmx.o): New.
14537 (i386-mmx.c): Likewise.
14538 (i386-mmx-linux.o): Likewise.
14539 (i386-mmx-linux.c): Likewise.
14540
14541 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14542 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14543 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14544 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14545
14546 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14547 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14548 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14549
1570b33e
L
145502010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14551
14552 * Makefile.in (clean): Updated.
14553 (i386-avx.o): New.
14554 (i386-avx.c): Likewise.
14555 (i386-avx-linux.o): Likewise.
14556 (i386-avx-linux.c): Likewise.
14557 (amd64-avx.o): Likewise.
14558 (amd64-avx.c): Likewise.
14559 (amd64-avx-linux.o): Likewise.
14560 (amd64-avx-linux.c): Likewise.
14561
14562 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14563 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14564 (srv_amd64_regobj): Add amd64-avx.o.
14565 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14566 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14567 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14568 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14569 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14570 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14571 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14572
14573 * i387-fp.c: Include "i386-xstate.h".
14574 (i387_xsave): New.
14575 (i387_cache_to_xsave): Likewise.
14576 (i387_xsave_to_cache): Likewise.
14577 (x86_xcr0): Likewise.
14578
14579 * i387-fp.h (i387_cache_to_xsave): Likewise.
14580 (i387_xsave_to_cache): Likewise.
14581 (x86_xcr0): Likewise.
14582
14583 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14584 * linux-crisv32-low.c (target_regsets): Likewise.
14585 * linux-m68k-low.c (target_regsets): Likewise.
14586 * linux-mips-low.c (target_regsets): Likewise.
14587 * linux-ppc-low.c (target_regsets): Likewise.
14588 * linux-s390-low.c (target_regsets): Likewise.
14589 * linux-sh-low.c (target_regsets): Likewise.
14590 * linux-sparc-low.c (target_regsets): Likewise.
14591 * linux-xtensa-low.c (target_regsets): Likewise.
14592
14593 * linux-low.c: Include <sys/uio.h>.
14594 (regsets_fetch_inferior_registers): Support nt_type.
14595 (regsets_store_inferior_registers): Likewise.
14596 (linux_process_qsupported): New.
14597 (linux_target_ops): Add linux_process_qsupported.
14598
14599 * linux-low.h (regset_info): Add nt_type.
14600 (linux_target_ops): Add process_qsupported.
14601
14602 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14603 and <sys/uio.h>.
14604 (init_registers_i386_avx_linux): New.
14605 (init_registers_amd64_avx_linux): Likewise.
14606 (xmltarget_i386_linux_no_xml): Likewise.
14607 (xmltarget_amd64_linux_no_xml): Likewise.
14608 (PTRACE_GETREGSET): Likewise.
14609 (PTRACE_SETREGSET): Likewise.
14610 (x86_fill_xstateregset): Likewise.
14611 (x86_store_xstateregset): Likewise.
14612 (use_xml): Likewise.
14613 (x86_linux_update_xmltarget): Likewise.
14614 (x86_linux_process_qsupported): Likewise.
14615 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14616 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14617 init_registers_i386_linux here. Call
14618 x86_linux_update_xmltarget.
14619 (the_low_target): Add x86_linux_process_qsupported.
14620
14621 * server.c (handle_query): Call target_process_qsupported.
14622
14623 * target.h (target_ops): Add process_qsupported.
14624 (target_process_qsupported): New.
14625
fc7238bb
PA
146262010-04-03 Pedro Alves <pedro@codesourcery.com>
14627
14628 * inferiors.c (add_thread): Set last_status kind to
14629 TARGET_WAITKIND_IGNORE.
14630 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14631 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14632 (linux_wait_1): Move `thread' local definition to block that uses
14633 it. Don't NULL initialize `event_child'.
14634 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14635 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14636 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14637
bdabb078
PA
146382010-04-01 Pedro Alves <pedro@codesourcery.com>
14639
14640 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14641 an extended waitstatus, or by a watchpoint.
14642 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14643 thread was stepping or has been stopped by a watchpoint.
14644
d3bbe7a0
PA
146452010-04-01 Pedro Alves <pedro@codesourcery.com>
14646
14647 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14648 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14649 of another, then delete the previous, and validate all
14650 breakpoints.
14651 (validate_inserted_breakpoint): New.
14652 (delete_disabled_breakpoints): New.
14653 (validate_breakpoints): New.
14654 (check_mem_read): Validate breakpoints before trusting their
14655 shadow. Delete disabled breakpoints.
14656 (check_mem_write): Validate breakpoints before trusting they
14657 should be inserted. Delete disabled breakpoints.
14658 * mem-break.h (validate_breakpoints):
14659 * server.c (handle_query): Validate breakpoints when we see a
14660 qSymbol query.
14661
8b07ae33
PA
146622010-04-01 Pedro Alves <pedro@codesourcery.com>
14663
14664 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14665 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14666 if we could tell there's a GDB breakpoint at stop_pc.
14667 (need_step_over_p): Don't do a step over if we find a GDB
14668 breakpoint at the resume PC.
14669
14670 * mem-break.c (struct raw_breakpoint): New.
14671 (enum bkpt_type): New type `gdb_breakpoint'.
14672 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14673 fields. New field `raw'.
14674 (find_raw_breakpoint_at): New.
14675 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14676 breakpoint instead.
14677 (set_breakpoint_at): Adjust.
14678 (delete_raw_breakpoint): New.
14679 (release_breakpoint): New.
14680 (delete_breakpoint): Rename to...
14681 (delete_breakpoint_1): ... this. Add proc parameter. Use
14682 release_breakpoint. Return ENOENT.
14683 (delete_breakpoint): Reimplement.
14684 (find_breakpoint_at): Delete.
14685 (find_gdb_breakpoint_at): New.
14686 (delete_breakpoint_at): Delete.
14687 (set_gdb_breakpoint_at): New.
14688 (delete_gdb_breakpoint_at): New.
14689 (gdb_breakpoint_here): New.
14690 (set_reinsert_breakpoint): Use release_breakpoint.
14691 (uninsert_breakpoint): Rename to ...
14692 (uninsert_raw_breakpoint): ... this.
14693 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14694 (reinsert_raw_breakpoint): Change parameter type to
14695 raw_breakpoint.
14696 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14697 instead.
14698 (check_breakpoints): Adjust. Use release_breakpoint.
14699 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14700 (breakpoint_inserted_here): Ditto.
14701 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14702 Don't trust the breakpoint's shadow if it is not inserted.
14703 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14704 (delete_all_breakpoints): Adjust.
14705 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14706 use delete_breakpoint_1.
14707
14708 * mem-break.h (breakpoints_supported): Delete declaration.
14709 (set_gdb_breakpoint_at): Declare.
14710 (gdb_breakpoint_here): Declare.
14711 (delete_breakpoint_at): Delete.
14712 (delete_gdb_breakpoint_at): Declare.
14713
14714 * server.h (struct raw_breakpoint): Forward declare.
14715 (struct process_info): New field `raw_breakpoints'.
14716
14717 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14718 breakpoints.
14719
6bf5e0ba
PA
147202010-03-24 Pedro Alves <pedro@codesourcery.com>
14721
14722 * linux-low.c (status_pending_p_callback): Fix comment.
14723 (linux_wait_for_event_1): Move most of the internal breakpoint
14724 handling from here...
14725 (linux_wait_1): ... to here.
14726 (count_events_callback): New.
14727 (select_singlestep_lwp_callback): New.
14728 (select_event_lwp_callback): New.
14729 (cancel_breakpoints_callback): New.
14730 (select_event_lwp): New.
14731 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14732 priority to all LWPs that have had events that should be reported
14733 to the client. Cancel breakpoints when about to reporting the
14734 event to the client, not while stopping lwps. No longer cancel
14735 finished single-steps here.
14736 (cancel_finished_single_step): Delete.
14737 (cancel_finished_single_steps): Delete.
14738
414a389f
PA
147392010-03-24 Pedro Alves <pedro@codesourcery.com>
14740
14741 * mem-break.c (enum bkpt_type): New.
14742 (struct breakpoint): New field `type'.
14743 (set_breakpoint_at): Change return type to struct breakpoint
14744 pointer. Set type to `other_breakpoint' by default.
14745 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14746 in the breakpoint list.
14747 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14748 (reinsert_breakpoint): Rename to ...
14749 (reinsert_raw_breakpoint): ... this.
14750 (reinsert_breakpoints_at): Adjust.
14751 * mem-break.h (struct breakpoint): Declare.
14752 (set_breakpoint_at): Change return type to struct breakpoint
14753 pointer.
14754
2280c721
PA
147552010-03-24 Pedro Alves <pedro@codesourcery.com>
14756
14757 * server.c (handle_query): Assign, not compare.
14758
d50171e4
PA
147592010-03-24 Pedro Alves <pedro@codesourcery.com>
14760
14761 Teach linux gdbserver to step-over-breakpoints.
14762
14763 * linux-low.c (can_hardware_single_step): New.
14764 (supports_breakpoints): New.
14765 (handle_extended_wait): If stopping threads, read the stop pc of
14766 the new cloned LWP.
14767 (get_pc): New.
14768 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14769 low target doesn't support retrieving the PC.
14770 (add_lwp): Set last_resume_kind to resume_continue.
14771 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14772 (linux_attach): Don't clear stop_expected. Set the lwp's
14773 last_resume_kind to resume_stop.
14774 (linux_detach_one_lwp): Don't check for removed breakpoints.
14775 (check_removed_breakpoint): Delete.
14776 (status_pending_p): Rename to ...
14777 (status_pending_p_callback): ... this. Don't check for removed
14778 breakpoints. Don't consider threads that are stopped from GDB's
14779 perspective.
14780 (linux_wait_for_lwp): Always read the stop_pc here.
14781 (cancel_breakpoint): New.
14782 (step_over_bkpt): New global.
14783 (linux_wait_for_event_1): Implement stepping over breakpoints.
14784 (gdb_wants_lwp_stopped): New.
14785 (gdb_wants_all_stopped): New.
14786 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14787 single-step traps here. Store the thread's last reported target
14788 wait status.
14789 (send_sigstop): Don't clear stop_expected. Always set it,
14790 instead.
14791 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14792 (cancel_finished_single_step): New.
14793 (cancel_finished_single_steps): New.
14794 (wait_for_sigstop): Don't cancel finished single-step traps here.
14795 (linux_resume_one_lwp): Don't check for removed breakpoints.
14796 Don't set `step' on non-hardware step archs.
14797 (linux_set_resume_request): Ignore resume_stop requests if already
14798 stopping or stopped. Set the lwp's last_resume_kind.
14799 (resume_status_pending_p): Don't check for removed breakpoints.
14800 (need_step_over_p): New.
14801 (start_step_over): New.
14802 (finish_step_over): New.
14803 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14804 requests. Clear the thread's last reported target waitstatus.
14805 Don't use the `suspended' flag. Don't consider pending breakpoints.
14806 (linux_resume): Start a step-over if necessary.
14807 (proceed_one_lwp): New.
14808 (proceed_all_lwps): New.
14809 (unstop_all_lwps): New.
14810 * linux-low.h (struct lwp_info): Rewrite comment for the
14811 `suspended' flag. Add the `stop_pc' field. Delete the
14812 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14813 Add `'last_resume_kind' and `need_step_over' fields.
14814 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14815 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14816 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14817 (set_raw_breakpoint_at): New.
14818 (set_breakpoint_at): Rewrite to use it.
14819 (reinsert_breakpoint_handler): Delete.
14820 (set_reinsert_breakpoint): New.
14821 (reinsert_breakpoint_by_bp): Delete.
14822 (delete_reinsert_breakpoints): New.
14823 (uninsert_breakpoint): Rewrite.
14824 (uninsert_breakpoints_at): New.
14825 (reinsert_breakpoint): Rewrite.
14826 (reinsert_breakpoints_at): New.
14827 (check_breakpoints): Rewrite.
14828 (breakpoint_here): New.
14829 (breakpoint_inserted_here): New.
14830 (check_mem_read): Adjust.
14831 * mem-break.h (breakpoints_supported, breakpoint_here)
14832 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14833 (reinsert_breakpoint_by_bp): Delete declaration.
14834 (delete_reinsert_breakpoints): Declare.
14835 (reinsert_breakpoint): Delete declaration.
14836 (reinsert_breakpoints_at): Declare.
14837 (uninsert_breakpoint): Delete declaration.
14838 (uninsert_breakpoints_at): Declare.
14839 (check_breakpoints): Adjust prototype.
14840 * server.h: Adjust include order.
14841 (struct thread_info): Declare here. Add a `last_status' field.
14842
30ba68cb
MS
148432010-03-23 Michael Snyder <msnyder@vmware.com>
14844
14845 * server.c (crc32): New function.
14846 (handle_query): Add handling for 'qCRC:' request.
14847
b9a881c2
PA
148482010-03-23 Pedro Alves <pedro@codesourcery.com>
14849
14850 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14851 lwp had been stopped by a watchpoint.
14852
e92d13d5
PA
148532010-03-16 Pedro Alves <pedro@codesourcery.com>
14854
14855 * server.h (internal_error): Declare.
14856 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14857 * utils.c (internal_error): New function.
14858
64daa791
AS
148592010-03-15 Andreas Schwab <schwab@redhat.com>
14860
14861 * configure.srv: Fix typo setting srv_regobj.
14862
f52cd8cd
PA
148632010-03-15 Pedro Alves <pedro@codesourcery.com>
14864
14865 * linux-low.c (fetch_register): Avoid passing a non string literal
14866 format to `error'.
14867 (usr_store_inferior_registers): Ditto.
14868
93ae6fdc
PA
148692010-03-14 Pedro Alves <pedro@codesourcery.com>
14870
14871 * linux-low.c (linux_write_memory): Bail out early if peeking
14872 memory failed.
14873
c3adc08c
PA
148742010-03-14 Pedro Alves <pedro@codesourcery.com>
14875
14876 * linux-low.h (struct lwp_info): New fields
14877 `stopped_by_watchpoint' and `stopped_data_address'.
14878 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14879 here, and cache them in the lwp object.
14880 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14881 directly.
14882 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14883 field.
14884 (linux_stopped_by_watchpoint): Rewrite.
14885 (linux_stopped_data_address): Rewrite.
14886
bce522a2
PA
148872010-03-06 Simo Melenius <simo.melenius@iki.fi>
14888
14889 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14890 switching the current inferior, not before.
14891
90884b2b
L
148922010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14893
14894 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14895 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14896 i386-linux.c and amd64-linux.c.
14897 (reg-i386.o): Removed.
14898 (reg-i386.c): Likewise.
14899 (reg-i386-linux.o): Likewise.
14900 (reg-i386-linux.c): Likewise.
14901 (reg-x86-64.o): Likewise.
14902 (reg-x86-64.c): Likewise.
14903 (reg-x86-64-linux.o): Likewise.
14904 (reg-x86-64-linux.c): Likewise.
14905 (i386.o): New.
14906 (i386.c): Likewise.
14907 (i386-linux.o): Likewise.
14908 (i386-linux.c): Likewise.
14909 (amd64.o): Likewise.
14910 (amd64.c): Likewise.
14911 (amd64-linux.o): Likewise.
14912 (amd64-linux.c): Likewise.
14913
14914 * configure.srv (srv_i386_regobj): New.
14915 (srv_i386_linux_regobj): Likewise.
14916 (srv_amd64_regobj): Likewise.
14917 (srv_amd64_linux_regobj): Likewise.
14918 (srv_i386_32bit_xmlfiles): Likewise.
14919 (srv_i386_64bit_xmlfiles): Likewise.
14920 (srv_i386_xmlfiles): Likewise.
14921 (srv_amd64_xmlfiles): Likewise.
14922 (srv_i386_linux_xmlfiles): Likewise.
14923 (srv_amd64_linux_xmlfiles): Likewise.
14924 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14925 srv_xmlfiles to $srv_i386_xmlfiles.
14926 (i[34567]86-*-mingw32ce*): Likewise.
14927 (i[34567]86-*-mingw*): Likewise.
14928 (i[34567]86-*-nto*): Likewise.
14929 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14930 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14931 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14932 (x86_64-*-linux*): Likewise.
14933
14934 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14935 (init_registers_amd64_linux): New.
14936 (x86_arch_setup): Replace init_registers_x86_64_linux with
14937 init_registers_amd64_linux.
14938
193f13e6
MK
149392010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14940
14941 * configure.ac: Check for libdl. If it is not available link against
14942 static libthread_db.
14943 * configure: Regenerate.
14944
85d721b8
PA
149452010-02-22 Pedro Alves <pedro@codesourcery.com>
14946
14947 PR9605
14948
14949 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14950 handing a read watchpoint.
14951 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14952
6076632b
DE
149532010-02-12 Doug Evans <dje@google.com>
14954
14955 * linux-low.c (linux_supports_tracefork_flag): Document.
14956 (linux_look_up_symbols): Add comment.
14957
3327ccf7
L
149582010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14959
14960 * regcache.c (supply_register): Clear regcache if buf is NULL.
14961
0718675c 149622010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14963 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14964
14965 * inferiors.c (find_inferior): Add function documentation.
14966 (unloaded_dll): Handle the case where the unloaded dll has not
14967 been previously registered in the dll list.
14968
177321bd
DJ
149692010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14970
14971 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14972 (thumb2_breakpoint): New.
14973 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14974
2b009048
DJ
149752010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14976
14977 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14978 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14979 breakpoints.
14980
3be029c7
PA
149812010-01-21 Pedro Alves <pedro@codesourcery.com>
14982
14983 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14984
18f5de3b
JK
149852010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14986
14987 * linux-s390-low.c (s390_collect_ptrace_register)
14988 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14989
3743bb4f
DE
149902010-01-21 Doug Evans <dje@google.com>
14991
14ce3065
DE
14992 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14993 (PTRACE_ARG4_TYPE): New macro.
14994 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14995 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14996 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14997 (usr_store_inferior_registers): Ditto.
14998 (linux_read_memory, linux_write_memory): Ditto.
14999 (linux_test_for_tracefork): Ditto.
15000
3743bb4f
DE
15001 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15002 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15003
8b315be5
PA
150042010-01-21 Pedro Alves <pedro@codesourcery.com>
15005
15006 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15007 target.
15008
85492558
PA
150092010-01-21 Pedro Alves <pedro@codesourcery.com>
15010
15011 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15012 prototype to take a regcache. Adjust.
15013
442ea881
PA
150142010-01-20 Pedro Alves <pedro@codesourcery.com>
15015
15016 * regcache.h (struct thread_info): Forward declare.
15017 (struct regcache): New.
15018 (new_register_cache): Adjust prototype.
15019 (get_thread_regcache): Declare.
15020 (free_register_cache): Adjust prototype.
15021 (registers_to_string, registers_from_string): Ditto.
15022 (supply_register, supply_register_by_name, collect_register)
15023 (collect_register_as_string, collect_register_by_name): Ditto.
15024 * regcache.c (struct inferior_regcache_data): Delete.
15025 (get_regcache): Rename to ...
15026 (get_thread_regcache): ... this. Adjust. Switch inferior before
15027 fetching registers.
15028 (regcache_invalidate_one): Adjust.
15029 (regcache_invalidate): Fix prototype.
15030 (new_register_cache): Return the new register cache.
15031 (free_register_cache): Change prototype.
15032 (realloc_register_cache): Adjust.
15033 (registers_to_string): Change prototype to take a regcache. Adjust.
15034 (registers_from_string): Ditto.
15035 (register_data): Ditto.
15036 (supply_register): Ditto.
15037 (supply_register_by_name): Ditto.
15038 (collect_register): Ditto.
15039 (collect_register_as_string): Ditto.
15040 (collect_register_by_name): Ditto.
15041 * server.c (process_serial_event): Adjust.
15042 * linux-low.h (regset_fill_func, regset_store_func): Change
15043 prototype.
15044 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15045 Change prototype.
15046 * linux-low.c (get_stop_pc): Adjust.
15047 (check_removed_breakpoint): Adjust.
15048 (linux_wait_for_event): Adjust.
15049 (linux_resume_one_lwp): Adjust.
15050 (fetch_register): Add regcache parameter. Adjust.
15051 (usr_store_inferior_registers): Ditto.
15052 (regsets_fetch_inferior_registers): Ditto.
15053 (regsets_store_inferior_registers): Ditto.
15054 (linux_fetch_registers, linux_store_registers): Ditto.
15055 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15056 regcache. Adjust.
43aaf8b6
PA
15057 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15058 Ditto.
442ea881
PA
15059 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15060 prototype to take a regcache.
15061 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15062 * remote-utils.c (convert_ascii_to_int, outreg)
15063 (prepare_resume_reply): Change prototype to take a regcache.
15064 Adjust.
15065 * target.h (struct target_ops) <fetch_registers, store_registers>:
15066 Change prototype to take a regcache.
15067 (fetch_inferior_registers, store_inferior_registers): Change
15068 prototype to take a regcache. Adjust.
15069 * proc-service.c (ps_lgetregs): Adjust.
15070 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15071 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15072 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15073 take a regcache. Adjust.
15074 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15075 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15076 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15077 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15078 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15079 (cris_cannot_fetch_register):
15080 (cris_breakpoint_at): Change prototype to take a regcache.
15081 Adjust.
15082 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15083 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15084 to take a regcache. Adjust.
15085 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15086 Adjust.
15087 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15088 take a regcache. Adjust.
15089 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15090 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15091 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15092 * linux-mips-low.c (mips_get_pc):
15093 (mips_set_pc): Change prototype to take a regcache. Adjust.
15094 (mips_reinsert_addr): Adjust.
15095 (mips_collect_register): Change prototype to take a regcache.
15096 Adjust.
15097 (mips_supply_register):
15098 (mips_collect_register_32bit, mips_supply_register_32bit)
15099 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15100 (mips_store_fpregset): Ditto.
43aaf8b6
PA
15101 * linux-ppc-low.c (ppc_supply_ptrace_register)
15102 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
15103 (parse_spufs_run): Adjust.
15104 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15105 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15106 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15107 take a regcache. Adjust.
15108 * linux-s390-low.c (s390_collect_ptrace_register)
15109 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15110 (s390_set_pc): Change prototype to take a regcache. Adjust.
15111 (s390_arch_setup): Adjust.
15112 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15113 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15114 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15115 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15116 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15117 regcache. Adjust.
15118 (sparc_breakpoint_at): Adjust.
15119 * linux-xtensa-low.c (xtensa_fill_gregset):
15120 (xtensa_store_gregset):
15121 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15122 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15123 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15124 prototype to take a regcache. Adjust.
15125 * win32-arm-low.c (arm_fetch_inferior_register)
15126 (arm_store_inferior_register): Change prototype to take a
15127 regcache. Adjust.
15128 * win32-i386-low.c (i386_fetch_inferior_register)
15129 (i386_store_inferior_register): Change prototype to take a
15130 regcache. Adjust.
15131 * win32-low.c (child_fetch_inferior_registers)
15132 (child_store_inferior_registers): Change prototype to take a
15133 regcache. Adjust.
15134 (win32_wait): Adjust.
15135 (win32_fetch_inferior_registers): Change prototype to take a
15136 regcache. Adjust.
15137 (win32_store_inferior_registers): Adjust.
15138 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15139 store_inferior_register>: Change prototype to take a regcache.
15140
60c3d7b0
DE
151412010-01-20 Doug Evans <dje@google.com>
15142
15143 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15144 #ifdef.
15145 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 15146 (W_STOPCODE): Provide definition if missing.
60c3d7b0 15147
dc146f7c
VP
151482010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15149
15150 * linux-low.c (linux_core_of_thread): New.
15151 (compare_ints, show_process, list_threads): New.
15152 (linux_qxfer_osdata): Report threads and cores.
15153 (linux_target_op): Register linux_core_of_thread.
15154 * remote-utils.c (prepare_resume_reply): Report the core.
15155 (buffer_xml_printf): Support %d specifier.
15156 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15157 New.
15158 (handle_query): Handle qXfer:threads. Announce availability
15159 thereof.
15160 * target.h (struct target_ops): New field core_of_thread.
15161
7803799a
UW
151622010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15163
15164 * Makefile.in (clean): Remove new generated files.
15165 (reg-s390.o, reg-s390.c): Remove rules.
15166 (reg-s390x.o, reg-s390x.c): Likewise.
15167 (s390-linux32.o, s390-linux32.c): Add rules.
15168 (s390-linux64.o, s390-linux64.c): Likewise.
15169 (s390x-linux64.o, s390x-linux64.c): Likewise.
15170 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15171 * linux-s390-low.c: Include <elf.h>.
15172 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15173 (init_registers_s390): Remove prototype.
15174 (init_registers_s390x): Likewise.
15175 (init_registers_s390_linux32): Add prototype.
15176 (init_registers_s390_linux64): Likewise.
15177 (init_registers_s390x_linux64): Likewise.
15178 (s390_num_regs_3264): New define.
15179 (s390_regmap_3264): New global variable.
15180 (s390_cannot_fetch_register): Remove obsolete check.
15181 (s390_cannot_store_register): Likewise.
15182 (s390_collect_ptrace_register): Handle upper/lower register halves.
15183 (s390_supply_ptrace_register): Likewise.
15184 (s390_fill_gregset): Update to register number changes.
15185 (s390_get_hwcap): New routine.
15186 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15187 Install appropriate regmap and register set.
15188
6e7ffa39
JB
151892010-01-01 Joel Brobecker <brobecker@adacore.com>
15190
15191 * server.c (gdbserver_version): Update copyright year to 2010.
15192 * gdbreplay.c (gdbreplay_version): Likewise.
15193
957f3f49
DE
151942009-12-28 Doug Evans <dje@google.com>
15195
15196 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15197 elf/external.h. Include <elf.h> instead but only if necessary.
15198
ca5c370d
PA
151992009-12-28 Pedro Alves <pedro@codesourcery.com>
15200
15201 * linux-low.c (linux_remove_process): Remove `detaching'
15202 parameter. Don't release/detach from thread_db here.
15203 (linux_kill): Release/detach from thread_db here, ...
15204 (linux_detach): ... and here, before actually detaching.
15205 (linux_wait_1): ... and here, when a process exits.
15206 * thread-db.c (any_thread_of): New.
15207 (thread_db_free): Switch the current inferior to a thread of the
15208 passed in process.
15209
4ee62156
DE
152102009-12-21 Doug Evans <dje@google.com>
15211
d90e6a88
DE
15212 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15213
c5f62d5f
DE
15214 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15215 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15216 warning ifndef __NR_tkill. Move setting of errno there too.
15217 Delete unnecessary resetting of errno after syscall.
15218 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15219
10e86dd7
DE
15220 * configure.ac: Check for dladdr.
15221 * config.in: Regenerate.
15222 * configure: Regenerate.
15223 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15224 (try_thread_db_load): Update.
15225
4ee62156
DE
15226 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15227
00f515da
DE
152282009-12-18 Doug Evans <dje@google.com>
15229
e9464885
DE
15230 * event-loop.c: Include unistd.h if it exists.
15231
07d4f67e
DE
15232 * linux-low.c (my_waitpid): Move definition away from being in
15233 between linux_tracefork_child/linux_test_for_tracefork.
15234
00f515da
DE
15235 * gdb_proc_service.h (psaddr_t): Fix type.
15236 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15237 signature to match glibc.
15238
1de1badb
DE
152392009-12-16 Doug Evans <dje@google.com>
15240
15241 * linux-low.c (linux_read_memory): Fix argument to read.
15242
aeeb81d1
PA
152432009-11-26 Pedro Alves <pedro@codesourcery.com>
15244
15245 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15246 events, don't leave current_inferior pointing at null.
15247
10357975
PA
152482009-11-26 Pedro Alves <pedro@codesourcery.com>
15249
15250 * win32-low.c (LOG): Delete.
15251 (OUTMSG): Output to stderr.
15252 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15253 on compile time LOG macro.
15254 (win32_wait): Fix debug output.
15255
cf6e3471
PA
152562009-11-26 Pedro Alves <pedro@codesourcery.com>
15257
15258 * win32-low.c (win32_add_one_solib): If the dll name is
15259 "ntdll.dll", prepend the system directory to the dll path.
15260
0c85e18e
MK
152612009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15262
15263 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15264
9ac544ce 152652009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 15266 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
15267
15268 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15269 * configure.ac: Check for __mcoldfire__ and set
15270 gdb_cv_m68k_is_coldfire.
15271 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15272 reg-cf.o and reg-m68k.o.
15273 * configure: Regenerated.
15274
fd7dd3e6
PA
152752009-11-16 Pedro Alves <pedro@codesourcery.com>
15276
15277 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15278 Pass it to thread_db_free.
15279 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15280 proper `detaching' argument to linux_remove_process.
15281 * linux-low.h (thread_db_free): Add `detaching' parameter.
15282 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15283 to thread_db_free.
15284 (thread_db_free): Add `detaching' parameter. Only
15285 call td_ta_clear_event if detaching from process.
15286
75aa492e
MK
152872009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15288
15289 * thread-db.c (thread_db_free): Fix typo.
15290
21e1bee4
PP
152912009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15292
15293 PR gdb/10838
15294 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15295
8838b45e
NS
152962009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15297
15298 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15299 with an i686 compiler.
15300 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15301 needed.
15302 * configure: Rebuilt.
15303
8a35fb51
SL
153042009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15305
15306 PR gdb/10783
15307
15308 * server.c (handle_search_memory_1): Correct read_addr initialization
15309 in loop for searching subsequent chunks.
15310
96f15937
PP
153112009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15312
15313 * configure.ac: New --with-libthread-db option.
15314 * thread-db.c: Allow direct dependence on libthread_db.
15315 (thread_db_free): Adjust.
15316 * config.in: Regenerate.
15317 * configure: Likewise.
889bf7c5 15318
5f7d1694
PP
153192009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15320
15321 PR gdb/10757
15322 * thread-db.c (attach_thread): New function.
15323 (maybe_attach_thread): Return success/failure.
15324 (find_new_threads_callback): Adjust.
889bf7c5
PA
15325 (thread_db_find_new_threads): Loop until no new threads.
15326
88e3b899
PA
153272009-10-13 Pedro Alves <pedro@codesourcery.com>
15328
15329 * proc-service.c (ps_lgetregs): Formatting.
15330
cdbfd419
PP
153312009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15332
15333 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15334 * configure.ac: Adjust.
15335 * linux-low.h (struct process_info_private): Move members to struct
15336 thread_db.
15337 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15338 * linux-low.c (linux_remove_process): Adjust.
15339 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15340 * server.c (handle_query): Move code ...
15341 (handle_monitor_command): ... here. New function.
15342 * target.h (struct target_ops): New member.
15343 * thread-db.c (struct thread_db): New.
15344 (libthread_db_search_path): New variable.
15345 (thread_db_create_event, thread_db_enable_reporting)
15346 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15347 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15348 (try_thread_db_load_1, dladdr_to_soname): New functions.
15349 (try_thread_db_load, thread_db_load_search): New functions.
15350 (thread_db_init): Search for libthread_db.
15351 (thread_db_free): New function.
15352 (thread_db_handle_monitor_command): Likewise.
15353 * config.in: Regenerate.
15354 * configure: Regenerate.
889bf7c5 15355
4168d2d6
UW
153562009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15357
15358 * spu-low.c (spu_kill): Wait for inferior to terminate.
15359 Call clear_inferiors.
15360 (spu_detach): Call clear_inferiors.
15361
81ecdfbb
RW
153622009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15363
15364 * aclocal.m4: Regenerate.
15365 * config.in: Likewise.
15366 * configure: Likewise.
15367
0b9ff2c0
UW
153682009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15369
15370 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15371 (parse_spufs_run): New function.
15372 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15373 (ppc_breakpoint_at): Handle SPU breakpoints.
15374
efcbbd14
UW
153752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15376
15377 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15378 (SPUFS_MAGIC): Define.
15379 (spu_enumerate_spu_ids): New function.
15380 (linux_qxfer_spu): New function.
15381 (linux_target_ops): Install linux_qxfer_spu.
15382
f4d9bade
UW
153832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15384
15385 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15386 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15387 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15388 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15389 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15390 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15391 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15392 (init_registers_powerpc_cell32l): Add prototype.
15393 (init_registers_powerpc_cell64l): Likewise.
15394 (ppc_arch_setup): Detect Cell/B.E. architecture.
15395
96e946ca
RW
153962009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15397
15398 * Makefile.in (datarootdir): New variable.
15399
58d6951d
DJ
154002009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * linux-low.c (linux_write_memory): Update debugging output.
15403 * Makefile.in (clean): Add new descriptions.
15404 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15405 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15406 * configure.srv: Add new files for arm*-*-linux*.
15407 * linux-arm-low.c: Add new declarations.
15408 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15409 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15410 (HWCAP_VFPv3D16): New.
15411 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15412 instead of __IWMMXT__.
15413 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15414 (arm_arch_setup): New.
15415 (target_regsets): Remove #ifdef. Add VFP regset.
15416 (the_low_target): Use arm_arch_setup.
15417
12b42a12
DJ
154182009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15419
15420 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15421 the main thread again.
15422
ac8c974e
AR
154232009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15424
15425 Adding Neutrino gdbserver.
15426 * configure: Regenerated.
15427 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15428 * configure.srv (i[34567]86-*-nto*): New target.
15429 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15430 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15431 (nto_comctrl) [__QNX__]: New function.
15432 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15433
4424e0c3 154342009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
15435
15436 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15437 srv_tgtobj.
15438
912cf4ba
PA
154392009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15440 Pedro Alves <pedro@codesourcery.com>
15441
15442 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15443 don't support CONTEXT_EXTENDED_REGISTERS.
15444 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15445 (the_low_target): Install them.
15446 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15447 failing with ERROR_PIPE_NOT_CONNECTED.
15448
aa5ca48f
DE
154492009-06-30 Doug Evans <dje@google.com>
15450 Pierre Muller <muller@ics.u-strasbg.fr>
15451
15452 Add h/w watchpoint support to x86-linux, win32-i386.
15453 * Makefile.in (SFILES): Add i386-low.c
15454 (i386_low_h): Define.
15455 (i386-low.o): Add dependencies.
15456 (linux-x86-low.o): Add i386-low.h dependency.
15457 (win32-i386-low.o): Ditto.
15458 * i386-low.c: New file.
15459 * i386-low.h: New file.
15460 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15461 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15462 * linux-low.c (linux_add_process): Initialize arch_private.
15463 (linux_remove_process): Free arch_private.
15464 (add_lwp): Initialize arch_private.
15465 (delete_lwp): Free arch_private.
15466 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15467 provided.
15468 * linux-low.h (process_info_private): New member arch_private.
15469 (lwp_info): New member arch_private.
15470 (linux_target_ops): New members new_process, new_thread,
15471 prepare_to_resume.
15472 (ptid_of): New macro.
15473 * linux-x86-low.c: Include stddef.h, i386-low.h.
15474 (arch_process_info): New struct.
15475 (arch_lwp_info): New struct.
15476 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15477 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15478 (i386_dr_low_get_status): New function.
15479 (x86_insert_point, x86_remove_point): New functions.
15480 (x86_stopped_by_watchpoint): New function.
15481 (x86_stopped_data_address): New function.
15482 (x86_linux_new_process, x86_linux_new_thread): New functions.
15483 (x86_linux_prepare_to_resume): New function.
15484 (the_low_target): Add entries for insert_point, remove_point,
15485 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15486 prepare_to_resume.
15487 * server.c (debug_hw_points): New global.
15488 (monitor_show_help): Document set debug-hw-points.
15489 (handle_query): Process "set debug-hw-points".
15490 * server.h (debug_hw_points): Declare.
15491 (paddress): Declare.
15492 * utils.c (NUMCELLS, CELLSIZE): New macros.
15493 (get_sell, xsnprintf, paddress): New functions.
15494 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15495 remove_point, stopped_by_watchpoint, stopped_data_address.
15496 * win32-i386-low.c: Include i386-low.h.
15497 (debug_reg_state): Replaces dr.
15498 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15499 (i386_dr_low_get_status): New function.
15500 (i386_insert_point, i386_remove_point): New functions.
15501 (i386_stopped_by_watchpoint): New function.
15502 (i386_stopped_data_address): New function.
15503 (i386_initial_stuff): Update.
15504 (get_thread_context,set_thread_context,i386_thread_added): Update.
15505 (the_low_target): Add entries for insert_point,
15506 remove_point, stopped_by_watchpoint, stopped_data_address.
15507 * win32-low.c (win32_insert_watchpoint): New function.
15508 (win32_remove_watchpoint): New function.
15509 (win32_stopped_by_watchpoint): New function.
15510 (win32_stopped_data_address): New function.
15511 (win32_target_ops): Add entries for insert_watchpoint,
15512 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15513 * win32-low.h (win32_target_ops): New members insert_point,
15514 remove_point, stopped_by_watchpoint, stopped_data_address.
15515
d993e290
PA
155162009-06-25 Pedro Alves <pedro@codesourcery.com>
15517
15518 * server.c (process_serial_event): Re-return unsupported, not
15519 error, if the type isn't recognized. Re-allow supporting only
15520 insert or remove packets. Also call require_running for
15521 breakpoints. Add missing break statement to default case. Tidy.
15522 * target.h (struct target_ops): Rename insert_watchpoint to
15523 insert_point, and remove_watchpoint to remove_point.
15524
15525 * linux-low.h (struct linux_target_ops): Likewise.
15526 * linux-low.c (linux_insert_watchpoint): Rename to ...
15527 (linux_insert_point): ... this. Adjust.
15528 (linux_remove_watchpoint): Rename to ...
15529 (linux_remove_point): ... this. Adjust.
15530 (linux_target_ops): Adjust.
15531 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15532 (cris_insert_point): ... this.
15533 (cris_remove_watchpoint): Rename to ...
15534 (cris_remove_point): ... this.
15535 (the_low_target): Adjust.
15536
0f54c268
PM
155372009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15538
15539 * server.c (handle_v_kill): Pass signal_pid to
15540 kill_inferior if multi_process is zero.
15541
c6314022
AR
155422009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15543
15544 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15545 * target.h (target_ops): Comment for *_watchpoint to make it clear
15546 the functions can get types '0' and '1'.
15547
4463ce24
AR
155482009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15549
15550 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15551 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15552 * regcache.c (get_regcache): Likewise.
15553 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15554 * win32-low.c (child_fetch_inferior_registers): Remove check for
15555 regno 0.
15556
cf8fd78b
PA
155572009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15558 Pedro Alves <pedro@codesourcery.com>
15559
15560 * target.h (struct target_ops) <supports_multi_process>: New
15561 callback.
15562 (target_supports_multi_process): New.
15563 * server.c (handle_query): Even if GDB reports support, only
15564 enable multi-process if the target also supports it. Report
15565 multi-process support only if the target backend supports it.
15566 * linux-low.c (linux_supports_multi_process): New function.
15567 (linux_target_ops): Install it as target_supports_multi_process
15568 callback.
15569
47c0c975
DE
155702009-05-24 Doug Evans <dje@google.com>
15571
e09875d4
DE
15572 Global renaming of find_thread_pid to find_thread_ptid.
15573 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15574 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15575 All callers updated.
15576
e27d73f6
DE
15577 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15578 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15579 directly.
15580
47c0c975
DE
15581 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15582 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15583 (linux_resume_one_lwp): Ditto.
15584
2acc282a
DE
155852009-05-23 Doug Evans <dje@google.com>
15586
15587 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15588 from struct inferior_list_entry * to struct lwp_info *.
15589 All callers updated.
15590
9f1036c1
DE
155912009-05-13 Doug Evans <dje@google.com>
15592
15593 * linux-x86-low.c: Don't include assert.h.
15594 (x86_siginfo_fixup): Use fatal, not assert.
15595 (x86_arch_setup): Fix comment.
15596
d0722149
DE
155972009-05-12 Doug Evans <dje@google.com>
15598
15599 Biarch support for i386/amd64 gdbserver.
15600 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15601 Add linux-x86-low.c.
15602 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15603 (linux-x86-low.o): Add.
15604 * linux-x86-64-low.c: Delete.
15605 * linux-i386-low.c: Delete.
15606 * linux-x86-low.c: New file.
15607 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15608 linux-x86-low.o.
15609 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15610 linux-x86-low.o.
15611 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15612 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15613 (linux_child_pid_to_exec_file): New function.
15614 (elf_64_header_p, elf_64_file_p): New functions.
15615 (siginfo_fixup): New function.
15616 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15617 give target a chance to convert layout.
15618 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15619 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15620
fdeb2a12
DE
156212009-05-07 Doug Evans <dje@google.com>
15622
15623 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15624 (regsets_store_inferior_registers): Ditto.
15625
a6dbe5df
PA
156262009-05-06 Pedro Alves <pedro@codesourcery.com>
15627
15628 PR server/10048
15629
15630 * linux-low.c (must_set_ptrace_flags): Delete.
15631 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15632 of the global.
15633 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15634 `lwp->must_set_ptrace_flags' instead.
ba42693b 15635 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15636 (linux_wait_1): ... not here.
15637
5091eb23
DE
156382009-04-30 Doug Evans <dje@google.com>
15639
9f767825
DE
15640 * inferiors.c (started_inferior_callback): New function.
15641 (attached_inferior_callback): New function.
15642 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15643 * server.c (print_started_pid, print_attached_pid): New functions.
15644 (detach_or_kill_for_exit): New function.
15645 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15646 * server.h (have_started_inferiors_p): Declare.
15647 (have_attached_inferiors_p): Declare.
15648
5091eb23
DE
15649 * inferiors.c (remove_process): Fix memory leak, free process.
15650 * linux-low.c (linux_remove_process): New function.
15651 (linux_kill): Call it instead of remove_process.
15652 (linux_detach, linux_wait_1): Ditto.
15653
155c8968
PA
156542009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15655
15656 * configure.srv: Add x86 Windows CE target.
15657
7fe519cb
UW
156582009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15659
15660 * inferiors.c (get_thread_process): Make global.
15661 * server.h (get_thread_process): Add prototype.
15662 * thread-db.c (find_one_thread): Use get_thread_process
15663 instead of current_process.
15664 (thread_db_get_tls_address): Do not crash if called when
15665 thread layer is not yet initialized.
15666
5472f405
UW
156672009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15668
15669 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15670 * spu-low.c (current_tid): Rename to ...
15671 (current_ptid): ... this.
15672 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15673 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15674 ptid_get_lwp (current_ptid) instead of current_tid.
15675 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15676 instead of current_tid. Use find_process_pid to verify pid
15677 argument is valid. Pass proper argument to remove_process.
15678 (spu_thread_alive): Compare current_ptid instead of current_tid.
15679 (spu_resume): Likewise.
15680
55ac2b99
PA
156812009-04-02 Pedro Alves <pedro@codesourcery.com>
15682
15683 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15684 variable.
15685
95954743
PA
156862009-04-01 Pedro Alves <pedro@codesourcery.com>
15687
15688 Implement the multiprocess extensions, and add linux multiprocess
15689 support.
15690
15691 * server.h (ULONGEST): Declare.
15692 (struct ptid, ptid_t): New.
15693 (minus_one_ptid, null_ptid): Declare.
15694 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15695 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15696 (struct inferior_list_entry): Change `id' type from unsigned from
15697 to ptid_t.
15698 (struct sym_cache, struct breakpoint, struct
15699 process_info_private): Forward declare.
15700 (struct process_info): Declare.
15701 (current_process): Declare.
15702 (all_processes): Declare.
15703 (initialize_inferiors): Declare.
15704 (add_thread): Adjust to use ptid_t.
15705 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15706 (add_process, remove_process, find_thread_pid): Declare.
15707 (find_inferior_id): Adjust to use ptid_t.
15708 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15709 (multi_process): Declare.
15710 (push_event): Adjust to use ptid_t.
15711 (read_ptid, write_ptid): Declare.
15712 (prepare_resume_reply): Adjust to use ptid_t.
15713 (clear_symbol_cache): Declare.
15714 * inferiors.c (all_processes): New.
15715 (null_ptid, minus_one_ptid): New.
15716 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15717 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15718 (add_thread): Change unsigned long to ptid. Remove gdb_id
15719 parameter. Adjust.
15720 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15721 (gdb_id_to_thread): Rename to ...
15722 (find_thread_pid): ... this. Change unsigned long to ptid.
15723 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15724 (loaded_dll, pull_pid_from_list): Adjust.
15725 (add_process, remove_process, find_process_pid)
15726 (get_thread_process, current_process, initialize_inferiors): New.
15727 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15728 (struct target_waitstatus) <related_pid>: Ditto.
15729 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15730 return type to int.
15731 (struct target_ops) <join>: Add `pid' argument.
15732 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15733 (struct target_ops) <wait>: Add `ptid' field. Change return type
15734 to ptid.
15735 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15736 (mywait): Add `ptid' argument. Change return type to ptid_t.
15737 (target_pid_to_str): Declare.
15738 * target.c (set_desired_inferior): Adjust to use ptids.
15739 (mywait): Add new `ptid' argument. Adjust.
15740 (target_pid_to_str): New.
15741 * mem-break.h (free_all_breakpoints): Declare.
15742 * mem-break.c (breakpoints): Delelete.
15743 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15744 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15745 to use per-process breakpoint list.
15746 (free_all_breakpoints): New.
15747 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15748 (symbol_cache, all_symbols_looked_up): Delete.
15749 (hexchars): New.
15750 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15751 read_ptid): New.
15752 (prepare_resume_reply): Change ptid argument's type from unsigned
15753 long to ptid_t. Adjust. Implement W;process and X;process.
15754 (free_sym_cache, clear_symbol_cache): New.
15755 (look_up_one_symbol): Adjust to per-process symbol cache. *
15756 * server.c (cont_thread, general_thread, step_thread): Change type
15757 to ptid_t.
15758 (attached): Delete.
15759 (multi_process): New.
15760 (last_ptid): Change type to ptid_t.
15761 (struct vstop_notif) <ptid>: Change type to ptid_t.
15762 (queue_stop_reply, push_event): Change `ptid' argument's type to
15763 ptid_t.
15764 (discard_queued_stop_replies): Add `pid' argument.
15765 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15766 changes. Don't reference the `attached' global.
15767 (attach_inferior): Adjust to mywait interface changes.
15768 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15769 features. Handle and report "multiprocess+". Handle
15770 "qAttached:PID".
15771 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15772 changes.
15773 (handle_v_kill): New.
15774 (handle_v_stopped): Adjust to use target_pid_to_str.
15775 (handle_v_requests): Allow multiple attaches and runs when
15776 multiprocess extensions are in effect. Handle "vKill".
15777 (myresume): Adjust to use ptids.
15778 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15779 (handle_status): Adjust to discard_queued_stop_replies interface
15780 change.
15781 (first_thread_of, kill_inferior_callback)
15782 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15783 (main): Call initialize_inferiors. Adjust to use ptids, killing
15784 and detaching from all inferiors. Handle multiprocess packet
15785 variants.
15786 * linux-low.h: Include gdb_proc_service.h.
15787 (struct process_info_private): New.
15788 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15789 <lwpid_of>: Use ptid_get_lwp.
15790 (get_lwp_thread): Adjust.
15791 (struct lwp_info): Add `dead' member.
15792 (find_lwp_pid): Declare.
15793 * linux-low.c (thread_db_active): Delete.
15794 (new_inferior): Adjust comment.
15795 (inferior_pid): Delete.
15796 (linux_add_process): New.
15797 (handle_extended_wait): Adjust.
15798 (add_lwp): Change unsigned long to ptid.
15799 (linux_create_inferior): Add process to processes table. Adjust
15800 to use ptids. Don't set new_inferior here.
15801 (linux_attach_lwp): Rename to ...
15802 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15803 it. Adjust to use ptids.
15804 (linux_attach_lwp): New.
15805 (linux_attach): Add process to processes table. Don't set
15806 new_inferior here.
15807 (struct counter): New.
15808 (second_thread_of_pid_p, last_thread_of_process_p): New.
15809 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15810 multiple processes.
15811 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15812 processes. Remove process from process table.
15813 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15814 to multiple processes.
15815 (any_thread_of): New.
15816 (linux_detach): Add `pid' argument, and handle it. Remove process
15817 from processes table.
15818 (linux_join): Add `pid' argument. Handle it.
15819 (linux_thread_alive): Change unsighed long argument to ptid_t.
15820 Consider dead lwps as not being alive.
15821 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15822 threads we're not interested in.
15823 (same_lwp, find_lwp_pid): New.
15824 (linux_wait_for_lwp): Change `pid' argument's type from int to
15825 ptid_t. Adjust.
15826 (linux_wait_for_event): Rename to ...
15827 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15828 from int to ptid_t. Adjust.
15829 (linux_wait_for_event): New.
15830 (linux_wait_1): Add `ptid' argument. Change return type to
15831 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15832 that exit from the process table.
15833 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15834 Adjust.
15835 (mark_lwp_dead): New.
15836 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15837 stopping all threads, mark its main lwp as dead.
15838 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15839 ptids.
15840 (fetch_register, usr_store_inferior_registers)
15841 (regsets_fetch_inferior_registers)
15842 (regsets_store_inferior_registers, linux_read_memory)
15843 (linux_write_memory): Inline `inferior_pid'.
15844 (linux_look_up_symbols): Adjust to use per-process
15845 `thread_db_active'.
15846 (linux_request_interrupt): Adjust to use ptids.
15847 (linux_read_auxv): Inline `inferior_pid'.
15848 (initialize_low): Don't reference thread_db_active.
15849 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15850 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15851 (ps_getpid): Return the pid of the current inferior.
15852 * thread-db.c (proc_handle, thread_agent): Delete.
15853 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15854 per-process data.
15855 (find_one_thread): Change argument type to ptid_t. Adjust to
15856 per-process data.
15857 (maybe_attach_thread): Adjust to per-process data and ptids.
15858 (thread_db_find_new_threads): Ditto.
15859 (thread_db_init): Ditto.
15860 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15861 processes table. Adjust to use ptids.
15862 (spu_kill, spu_detach): Adjust interface. Remove process from
15863 processes table.
15864 (spu_join, spu_thread_alive): Adjust interface.
15865 (spu_wait): Adjust interface. Remove process from processes
15866 table. Adjust to use ptids.
15867 * win32-low.c (current_inferior_tid): Delete.
15868 (current_inferior_ptid): New.
15869 (debug_event_ptid): New.
15870 (thread_rec): Take a ptid. Adjust.
15871 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15872 (child_delete_thread): Ditto.
15873 (do_initial_child_stuff): Add `attached' argument. Add process to
15874 processes table.
15875 (child_fetch_inferior_registers, child_store_inferior_registers):
15876 Adjust.
15877 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15878 (win32_attach): Pass 1 to do_initial_child_stuff.
15879 (win32_kill): Adjust interface. Remove process from processes
15880 table.
15881 (win32_detach): Ditto.
15882 (win32_join): Adjust interface.
15883 (win32_thread_alive): Take a ptid.
15884 (win32_resume): Adjust to use ptids.
15885 (get_child_debug_event): Ditto.
15886 (win32_wait): Adjust interface. Remove exiting process from
15887 processes table.
15888
bd99dc85
PA
158892009-04-01 Pedro Alves <pedro@codesourcery.com>
15890
15891 Non-stop mode support.
15892
15893 * server.h (non_stop): Declare.
15894 (gdb_client_data, handler_func): Declare.
15895 (delete_file_handler, add_file_handler, start_event_loop):
15896 Declare.
15897 (handle_serial_event, handle_target_event, push_event)
15898 (putpkt_notif): Declare.
15899 * target.h (enum resume_kind): New.
15900 (struct thread_resume): Replace `step' field by `kind' field.
15901 (TARGET_WNOHANG): Define.
15902 (struct target_ops) <wait>: Add `options' argument.
15903 <supports_non_stop, async, start_non_stop>: New fields.
15904 (target_supports_non_stop, target_async): New.
15905 (start_non_stop): Declare.
15906 (mywait): Add `options' argument.
15907 * target.c (mywait): Add `options' argument. Print child exit
15908 notifications here.
15909 (start_non_stop): New.
15910 * server.c (non_stop, own_buf, mem_buf): New globals.
15911 (struct vstop_notif): New.
15912 (notif_queue): New global.
15913 (queue_stop_reply, push_event, discard_queued_stop_replies)
15914 (send_next_stop_reply): New.
15915 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15916 interface changes.
15917 (attach_inferior): In non-stop mode, don't wait for the target
15918 here.
15919 (handle_general_set): Handle QNonStop.
15920 (handle_query): When handling qC, return the current general
15921 thread, instead of the first thread of the list.
15922 (handle_query): If the backend supports non-stop mode, include
15923 QNonStop+ in the qSupported query response.
15924 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15925 and non-stop mode.
15926 (handle_v_attach, handle_v_run): Handle non-stop mode.
15927 (handle_v_stopped): New.
15928 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15929 (myresume): Adjust to use resume_kind. Handle non-stop.
15930 (queue_stop_reply_callback): New.
15931 (handle_status): Handle non-stop mode.
15932 (main): Clear non_stop flag on reconnection. Use the event-loop.
15933 Refactor serial protocol handling from here ...
15934 (process_serial_event): ... to this new function. When GDB
15935 selects any thread, select one here. In non-stop mode, wait until
15936 GDB acks all pending events before exiting.
15937 (handle_serial_event, handle_target_event): New.
15938 * remote-utils.c (remote_open): Install remote_desc in the event
15939 loop.
15940 (remote_close): Remove remote_desc from the event loop.
15941 (putpkt_binary): Rename to...
15942 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15943 (putpkt_binary): New as wrapper around putpkt_binary_1.
15944 (putpkt_notif): New.
15945 (prepare_resume_reply): In non-stop mode, don't change the
15946 general_thread.
15947 * event-loop.c: New.
15948 * Makefile.in (OBJ): Add event-loop.o.
15949 (event-loop.o): New rule.
15950
15951 * linux-low.h (pid_of): Moved here.
15952 (lwpid_of): New.
15953 (get_lwp_thread): Use lwpid_of.
15954 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15955 * linux-low.c (pid_of): Delete.
15956 (inferior_pid): Use lwpid_of.
15957 (linux_event_pipe): New.
15958 (target_is_async_p): New.
15959 (delete_lwp): New.
15960 (handle_extended_wait): Use lwpid_of.
15961 (add_lwp): Don't set lwpid field.
15962 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15963 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15964 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15965 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15966 first. Adjust to linux_wait_for_event interface changes. Use
15967 lwpid_of.
15968 (linux_detach): Don't delete the main lwp here.
15969 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15970 (status_pending_p): Don't consider explicitly suspended lwps.
15971 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15972 pointer. Add OPTIONS argument. Change return type to int. Use
15973 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15974 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15975 pointer. Add status pointer argument. Return a pid instead of a
15976 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15977 changes. In non-stop mode, don't switch to a random thread.
15978 (linux_wait): Rename to...
15979 (linux_wait_1): ... this. Add target_options argument, and handle
15980 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15981 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15982 clean exit and signal exit code. Don't stop all threads in
15983 non-stop mode. In all-stop mode, only stop all threads when
15984 reporting a stop to GDB. Handle explicit thread stop requests.
15985 (async_file_flush, async_file_mark): New.
15986 (linux_wait): New.
15987 (send_sigstop): Use lwpid_of.
15988 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15989 interface changes. In non-stop mode, don't switch to a random
15990 thread.
15991 (linux_resume_one_lwp): Use lwpid_of.
15992 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15993 (linux_resume_one_thread): ... this. Handle resume_stop. In
15994 non-stop mode, don't look for pending flag in all threads.
15995 (resume_status_pending_p): Don't consider explicitly suspended
15996 threads.
15997 (my_waitpid): Reimplement. Emulate __WALL.
15998 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15999 Use lwpid_of.
16000 (sigchld_handler, linux_supports_non_stop, linux_async)
16001 (linux_start_non_stop): New.
16002 (linux_target_ops): Register linux_supports_non_stop, linux_async
16003 and linux_start_non_stop.
16004 (initialize_low): Install SIGCHLD handler.
16005 * thread-db.c (thread_db_create_event, find_one_thread)
16006 (thread_db_get_tls_address): Use lwpid_of.
16007 * win32-low.c (win32_detach): Adjust to use resume_kind.
16008 (win32_wait): Add `options' argument.
16009 * spu-low.c (spu_resume): Adjust to use resume_kind.
16010 (spu_wait): Add `options' argument.
16011
5b1c542e
PA
160122009-04-01 Pedro Alves <pedro@codesourcery.com>
16013
16014 Decouple target code from remote protocol.
16015
16016 * target.h (enum target_waitkind): New.
16017 (struct target_waitstatus): New.
16018 (struct target_ops) <wait>: Return an unsigned long. Take a
16019 target_waitstatus pointer instead of a char pointer.
16020 (mywait): Likewise.
16021 * target.c (mywait): Change prototype to return an unsigned long.
16022 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16023 * server.h (thread_from_wait, old_thread_from_wait): Delete
16024 declarations.
16025 (prepare_resume_reply): Change prototype to take a
16026 target_waitstatus.
16027 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16028 (last_status, last_ptid): New.
16029 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16030 pid instead of a signal.
16031 (attach_inferior): Remove "status" and "signal" parameters.
16032 Adjust.
16033 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16034 not as an address.
16035 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16036 (handle_v_requests, myresume): Remove "status" and "signal"
16037 parameters. Adjust.
16038 (handle_status): New.
16039 (main): Delete local `status'. Adjust.
16040 * remote-utils.c: Include target.h.
16041 (prepare_resume_reply): Change prototype to take a
16042 target_waitstatus. Adjust.
16043
16044 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16045 interface.
16046 * spu-low.c (spu_wait): Adjust.
16047 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16048 Delete.
16049 (win32_wait): Adjust.
16050
2bd7c093
PA
160512009-04-01 Pedro Alves <pedro@codesourcery.com>
16052
16053 * target.h (struct thread_resume): Delete leave_stopped member.
16054 (struct target_ops): Add a `n' argument to the `resume' callback.
16055 * server.c (start_inferior): Adjust.
16056 (handle_v_cont, myresume): Adjust.
16057 * linux-low.c (check_removed_breakpoint): Adjust to resume
16058 interface change, and to removed leave_stopped field.
16059 (resume_ptr): Delete.
16060 (struct thread_resume_array): New.
16061 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16062 resume interface change.
16063 (linux_continue_one_thread, linux_queue_one_thread)
16064 (resume_status_pending_p): Check if the resume field is NULL
16065 instead of checking the leave_stopped member.
16066 (linux_resume): Adjust to the target resume interface change.
16067 * spu-low.c (spu_resume): Adjust to the target resume interface
16068 change.
16069 * win32-low.c (win32_detach, win32_resume): Ditto.
16070
c35fafde
PA
160712009-04-01 Pedro Alves <pedro@codesourcery.com>
16072
16073 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16074 flag.
16075 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16076 pending.
16077 (linux_continue_one_thread): Only preserve the stepping flag if
16078 there's a pending breakpoint.
16079
0a59d50b
PA
160802009-03-31 Pedro Alves <pedro@codesourcery.com>
16081
16082 * server.c (main): After the inferior having exited, call
16083 remote_close before exiting gdbserver.
16084
f04c6d38
TJB
160852009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16086
16087 Fix size of FPSCR in Power 7 processors.
16088 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16089 (PPC_FEATURE_HAS_DFP): New #define.
16090 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16091 size of the FPSCR.
16092
78e5cee6
PA
160932009-03-23 Pedro Alves <pedro@codesourcery.com>
16094
16095 * server.c (handle_query) Whitespace and formatting.
16096
1b3f6016
PA
160972009-03-22 Pedro Alves <pedro@codesourcery.com>
16098
16099 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16100 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16101 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16102 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16103 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16104 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16105 Makefile.in, configure.ac: Fix whitespace throughout.
16106 * configure: Regenerate.
16107
a07b2135
PA
161082009-03-22 Pedro Alves <pedro@codesourcery.com>
16109
16110 * inferiors.c (find_inferior): Make it safe for the callback
16111 function to delete the currently iterated inferior.
16112
67cc2626
PA
161132009-03-22 Pedro Alves <pedro@codesourcery.com>
16114
16115 * Makefile.in (linuw_low_h): Move higher.
16116 (thread-db.o): Depend on $(linux_low_h).
16117
54a0b537
PA
161182009-03-17 Pedro Alves <pedro@codesourcery.com>
16119
16120 Rename "process" to "lwp" throughout.
16121
16122 * linux-low.c (all_processes): Rename to...
16123 (all_lwps): ... this.
16124 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16125 (add_process): Rename to ...
16126 (add_lwp): ... this. Adjust.
16127 (linux_create_inferior): Adjust.
16128 (linux_attach_lwp): Adjust.
16129 (linux_attach): Adjust.
16130 (linux_kill_one_process): Rename to ...
16131 (linux_kill_one_lwp): ... this. Adjust.
16132 (linux_kill): Adjust.
16133 (linux_detach_one_process): Rename to ...
16134 (linux_detach_one_lwp): ... this. Adjust.
16135 (linux_detach): Adjust.
16136 (check_removed_breakpoint): Adjust.
16137 (status_pending_p): Adjust.
16138 (linux_wait_for_process): Rename to ...
16139 (linux_wait_for_lwp): ... this. Adjust.
16140 (linux_wait_for_event): Adjust.
16141 (send_sigstop): Adjust.
16142 (wait_for_sigstop): Adjust.
16143 (stop_all_processes): Rename to ...
16144 (stop_all_lwps): ... this.
16145 (linux_resume_one_process): Rename to ...
16146 (linux_resume_one_lwp): ... this. Adjust.
16147 (linux_set_resume_request, linux_continue_one_thread)
16148 (linux_queue_one_thread, resume_status_pending_p)
16149 (usr_store_inferior_registers, regsets_store_inferior_registers)
16150 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16151 Adjust.
16152 * linux-low.h (get_process): Rename to ...
16153 (get_lwp): ... this. Adjust.
16154 (get_thread_process): Rename to ...
16155 (get_thread_lwp): ... this. Adjust.
16156 (get_process_thread): Rename to ...
16157 (get_lwp_thread): ... this. Adjust.
16158 (struct process_info): Rename to ...
16159 (struct lwp_info): ... this.
16160 (all_processes): Rename to ...
16161 (all_lwps): ... this.
16162 * proc-service.c (ps_lgetregs): Adjust.
16163 * thread-db.c (thread_db_create_event, find_one_thread)
16164 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16165
0b16c5cf
PA
161662009-03-14 Pedro Alves <pedro@codesourcery.com>
16167
16168 * server.c (handle_query): Handle "qAttached".
16169
32de4b9d
NS
161702009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16171
16172 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16173 GPLv3, update license URL.
16174
2aecd87f
DE
161752009-03-01 Doug Evans <dje@google.com>
16176
93efd302 16177 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
16178 (server_h): Add gdb_signals.h.
16179 (signals.o): Update.
16180 * server.h (target_signal_from_host,target_signal_to_host_p)
16181 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16182
86b1f9c5
PM
161832009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16184
16185 * remote-utils.c (getpkt): Also generate remote-debug
16186 information if noack_mode is set.
16187
4aa995e1
PA
161882009-02-06 Pedro Alves <pedro@codesourcery.com>
16189
16190 * server.c (handle_query): Report qXfer:siginfo:read and
16191 qXfer:siginfo:write as supported and handle them.
16192 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16193 * linux-low.c (linux_xfer_siginfo): New.
16194 (linux_target_ops): Set it.
16195
62709adf
PA
161962009-01-26 Pedro Alves <pedro@codesourcery.com>
16197
16198 * server.c (gdbserver_usage): Mention --remote-debug.
16199 (main): Accept '--remote-debug' switch.
16200
aef93bd7
DE
162012009-01-18 Doug Evans <dje@google.com>
16202
16203 * regcache.c (new_register_cache): No need to check result of xcalloc.
16204 * server.c (handle_search_memory): Back out calls to xmalloc,
16205 result is checked and error is returned to user upon failure.
16206 (handle_query): Ditto. Add more checks for result of malloc.
16207 (handle_v_cont): Check result of malloc, report error back to
16208 user upon failure.
16209 (handle_v_run): Ditto. Call freeargv.
16210 * server.h (freeargv): Declare.
16211 * utils.c (freeargv): New fn.
16212
54363045
DE
162132009-01-15 Doug Evans <dje@google.com>
16214
f626972c
DE
16215 * gdbreplay.c (perror_with_name): Make arg const char *.
16216 * server.h (target_signal_to_name): Make return type const char *.
0842e787 16217 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 16218 * utils.c (perror_with_name): Make arg const char *.
54363045 16219
18aae699
PA
162202009-01-14 Pedro Alves <pedro@codesourcery.com>
16221
16222 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16223 when handling a EXIT_PROCESS_DEBUG_EVENT.
16224
ff703abe
JB
162252009-01-06 Joel Brobecker <brobecker@adacore.com>
16226
16227 * gdbreplay.c (gdbreplay_version): Update copyright year.
16228 * server.c (gdbserver_version): Likewise.
16229
f21cc1a2 162302009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
16231
16232 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 16233 (handle_extended_wait): Improve comment.
0e21c1ec 16234
bca929d3
DE
162352008-12-13 Doug Evans <dje@google.com>
16236
16237 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16238 * server.h (ATTR_MALLOC): New macro.
16239 (xmalloc,xcalloc,xstrdup): Declare.
16240 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16241 * inferiors.c: Ditto.
16242 * linux-low.c: Ditto.
16243 * mem-break.c: Ditto.
16244 * regcache.c: Ditto.
16245 * remote-utils.c: Ditto.
16246 * server.c: Ditto.
16247 * target.c: Ditto.
16248 * win32-low.c: Ditto.
16249
97438e3f
DE
162502008-12-12 Doug Evans <dje@google.com>
16251
896c7fbb
DE
16252 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16253 in debugging printf.
16254
97438e3f
DE
16255 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16256
e3b886f8
DE
162572008-12-09 Doug Evans <dje@google.com>
16258
16259 * linux-low.h (struct process_info): Delete member tid, unused.
16260 * thread-db.c (find_one_thread): Update.
16261 (maybe_attach_thread): Update.
16262
07e059b5
VP
162632008-12-02 Pedro Alves <pedro@codesourcery.com>
16264
889bf7c5
PA
16265 * target.h (struct target_ops): Add qxfer_osdata member.
16266 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16267 and dirent.h.
16268 (linux_qxfer_osdata): New functions.
16269 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16270 callback.
16271 * server.c (handle_query): Handle "qXfer:osdata:read:".
16272 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16273 (buffer_xml_printf): New functions.
16274 * server.h (struct buffer): New.
16275 (buffer_grow_str, buffer_grow_str0): New macros.
16276 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16277 (buffer_xml_printf): Declare.
07e059b5 16278
4cab47ab
DE
162792008-11-24 Doug Evans <dje@google.com>
16280
16281 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16282
f142445f
DJ
162832008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16284
16285 * server.c (handle_v_run): Always use the supplied argument list.
16286
d0107bb6 162872008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 16288
d0107bb6
BW
16289 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16290 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 16291
2c4ad781
TJB
162922008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16293
16294 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16295 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16296 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16297 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16298 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16299 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16300 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16301 XML target descriptions.
16302 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16303 when inferior is running on an ISA 2.05 or later processor. Add
16304 special case to return offset for full 64-bit slot of FPSCR when
16305 in 32-bits.
16306
dfb64f85
DJ
163072008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16308
16309 * Makefile.in (SFILES, clean): Added sparc64 files.
16310 (reg-sparc64.o, reg-sparc64.c): New.
16311 * configure.srv (sparc*-*-linux*): New configuration.
16312 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16313 syscall arguments for SPARC.
16314 (regsets_store_inferior_registers): Likewise.
16315 * linux-sparc-low.c: New file.
16316
66b6e1dd
DE
163172008-10-21 Doug Evans <dje@google.com>
16318
16319 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16320 (READLINE_DIR,READLINE_DEP): Delete.
16321 (INTERNAL_CFLAGS): Update.
16322 (LINTFLAGS): Update.
16323
9b710a42
PA
163242008-10-10 Pedro Alves <pedro@codesourcery.com>
16325
16326 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16327 whole argv from the last run, not just argv[0].
16328
5822d809
PA
163292008-09-08 Pedro Alves <pedro@codesourcery.com>
16330
16331 * regcache.c (new_register_cache): Return NULL if the register
16332 cache size isn't known yet.
16333 (free_register_cache): Avoid dereferencing a NULL regcache.
16334
74aac56f
DJ
163352008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16336
16337 * configure.srv: Merge MIPS and MIPS64.
16338
400b20f5
MR
163392008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16340
16341 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16342
677c5bb1
LM
163432008-08-18 Luis Machado <luisgpm@br.ibm.com>
16344
16345 * Makefile.in: Add required vsx dependencies.
16346
16347 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16348 Declare init_registers_powerpc_vsx32l.
16349 Declare init_registers_powerpc_vsx64l.
16350 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16351 (ppc_arch_setup): Check for VSX in hwcap.
16352 (ppc_fill_vsxregset): New function.
16353 (ppc_store_vsxregset): New function.
16354 Add new VSX entry in regset_info target_regsets.
16355
16356 * configure.srv: Add new VSX dependencies.
16357
a6f3e723
SL
163582008-08-12 Pedro Alves <pedro@codesourcery.com>
16359
16360 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16361 (remote_open): Set or clear transport_is_reliable.
16362 (putpkt_binary): Don't expect acks in noack mode.
16363 (getpkt): Don't send ack/nac in noack mode.
16364 * server.c (handle_general_set): Handle QStartNoAckMode.
16365 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16366 qSupported.
16367 (main): Reset noack_mode on every connection.
16368 * server.h (noack_mode): Declare.
16369
a417dc56
RW
163702008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16371
16372 * Makefile.in (GDBREPLAY_OBS): New variable.
16373 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16374
3221518c
UW
163752008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16376 Daniel Jacobowitz <dan@codesourcery.com>
16377
16378 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16379 (usr_store_inferior_registers): Likewise.
16380 (regsets_store_inferior_registers): Likewise.
16381
ec56be1b
PA
163822008-07-31 Rolf Jansen <rj@surtec.com>
16383 Pedro Alves <pedro@codesourcery.com>
16384
16385 * configure.ac: Check for memmem declaration.
16386 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16387 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16388 (disable_packet_qfThreadInfo): Unconditionally compile.
16389 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16390 * configure, config.in: Regenerate.
16391
2fe5e3ff
DE
163922008-07-28 Doug Kwan <dougkwan@google.com>
16393
16394 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16395 (linux_write_memory): Remove declaration of errno.
16396
836acd6d
UW
163972008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16398
16399 * linux-low.c (handle_extended_wait): Do not use "status"
16400 variable uninitialized.
16401
aeba519e
PA
164022008-07-07 Pedro Alves <pedro@codesourcery.com>
16403
16404 * server.c (handle_v_attach): Inhibit reporting dll changes.
16405
db42f210
PA
164062008-06-27 Pedro Alves <pedro@codesourcery.com>
16407
16408 * remote-utils.c (prepare_resume_reply): If requested, don't
16409 output "thread:TID" in the T stop reply.
16410
16411 * server.c (disable_packet_vCont, disable_packet_Tthread)
16412 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16413 (handle_query): If requested, disable support for qC, qfThreadInfo
16414 and qsThreadInfo.
16415 (handle_v_requests): If requested, disable support for vCont.
16416 (gdbserver_show_disableable): New.
16417 (main): Handle --disable-packet and --disable-packet=LIST.
16418
16419 * server.h (disable_packet_vCont, disable_packet_Tthread)
16420 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16421
8e4c5421
CD
164222008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16423
16424 * server.c (gdbserver_usage): Mention --version.
16425
6e23a804
DJ
164262008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16427
16428 * Makefile.in (gdbreplay.o): New rule.
16429
90aa6a40
JM
164302008-06-06 Joseph Myers <joseph@codesourcery.com>
16431
16432 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16433 message, not gdbserver.
16434
c16158bc 164352008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
16436 Nathan Sidwell <nathan@codesourcery.com>
16437 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16438
16439 * acinclude.m4: Include ../../config/acx.m4.
16440 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16441 * configure, config.in: Regenerate.
16442 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16443 * server.c (gdbserver_version): Print PKGVERSION.
16444 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16445 (main): Adjust gdbserver_usage calls.
16446 * gdbreplay.c (version, host_name): Add declarations.
16447 (gdbreplay_version, gdbreplay_usage): New.
16448 (main): Accept --version and --help options.
16449
aeb75bf5
DJ
164502008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16453 (arm_breakpoint_at): Handle Thumb.
16454 (the_low_target): Add comment.
16455
76b233dd
UW
164562008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16457
16458 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16459
08388c79
DE
164602008-05-09 Doug Evans <dje@google.com>
16461
a3c83fae
DE
16462 * server.h (decode_search_memory_packet): Declare.
16463 * remote-utils.c (decode_search_memory_packet): New fn.
16464 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16465 (handle_search_memory): New fn.
16466 (handle_query): Process qSearch:memory packets.
16467
bb9c3d36
UW
164682008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16469
16470 * regcache.c (registers_length): Remove.
16471 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16472 full register packet.
16473 * regcache.h (registers_length): Remove prototype.
16474 * server.h (PBUFSIZ): Define to 16384.
16475
7284e1be
UW
164762008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16477
16478 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16479 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16480 powerpc-64l.o, and powerpc-altivec64l.o.
16481 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16482 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16483 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16484 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16485 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16486 to srv_xmlfiles.
16487
16488 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16489 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16490 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16491 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16492 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16493 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16494 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16495 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16496 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16497 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16498 (clean): Update.
16499
16500 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16501 (init_registers_powerpc_32l): ... this new prototype.
16502 (init_registers_powerpc_32): Remove, replace by ...
16503 (init_registers_powerpc_altivec32l): ... this new prototype.
16504 (init_registers_powerpc_e500): Remove, replace by ...
16505 (init_registers_powerpc_e500l): ... this new prototype.
16506 (init_registers_ppc64): Remove, replace by ...
16507 (init_registers_powerpc_64l): ... this new prototype.
16508 (init_registers_powerpc_64): Remove, replace by ...
16509 (init_registers_powerpc_altivec64l): ... this new prototype.
16510 (ppc_num_regs): Set to 73.
16511 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16512 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16513 (ppc_cannot_store_register): Handle orig_r3 and trap.
16514 (ppc_arch_setup): Update init_registers_... calls.
16515 (ppc_fill_gregset): Handle orig_r3 and trap.
16516
16517 * inferiors.c (clear_inferiors): Reset current_inferior.
16518
fdc59709
PB
165192008-04-23 Paolo Bonzini <bonzini@gnu.org>
16520
889bf7c5
PA
16521 * acinclude.m4: Add override.m4.
16522 * configure: Regenerate.
fdc59709 16523
c9b2f845
UW
165242008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16525
16526 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16527 initial call to init_register_ppc64.
16528
550512b8
UW
165292008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16530
43aaf8b6
PA
16531 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16532 single powerpc*-*-linux* case.
550512b8
UW
16533 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16534
b6430ec3
UW
165352008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16536
16537 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 16538 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
16539 from reg_xmlfiles.
16540 * linux-ppc-low.c: Include <elf.h>.
16541 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16542 (ppc_hwcap): New global variable.
16543 (ppc_regmap): Remove __SPE__ #ifdef sections.
16544 (ppc_regmap_e500): New global variable.
16545 (ppc_cannot_store_register): Update __SPE__ special case.
16546 (ppc_get_hwcap): New function.
16547 (ppc_arch_setup): Use it to determine whether inferior supports
16548 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16549 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16550 Do not access registers if target does not support AltiVec.
16551 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16552 Do not access registers if target does not support SPE.
16553 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16554
52fa2412
UW
165552008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16556
16557 * linux-low.c (disabled_regsets, num_regsets): New.
16558 (use_regsets_p): Delete.
16559 (linux_wait_for_process): Clear disabled_regsets.
16560 (regsets_fetch_inferior_registers): Check and set it.
16561 (regsets_store_inferior_registers): Likewise.
16562 (linux_fetch_registers, linux_store_registers): Do not use
16563 use_regsets_p.
16564 (initialize_low): Allocate disabled_regsets.
16565
e28b3332
DJ
165662008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16567
16568 * Makefile.in (LIBOBJS): New.
16569 (OBS): Use LIBOBJS.
16570 (memmem.o): New rule.
16571 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16572 * configure: Regenerated.
16573
4536995d
UW
165742008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16575
16576 * server.c (handle_query): Never return "unsupported" for
16577 qXfer:features:read queries.
16578
221c031f
UW
165792008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16580
16581 * server.c (get_features_xml): Fix inverted condition.
16582 (handle_query): Always support qXfer:feature:read.
16583
ccd213ac
DJ
165842008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16585
16586 * server.c (wrapper_argv): New.
16587 (start_inferior): Handle wrapper_argv. If set, expect an extra
16588 trap.
16589 (gdbserver_usage): Document --wrapper.
16590 (main): Parse --wrapper.
16591
6fe305f7
UW
165922008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16593
16594 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16595 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16596 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16597 (ppc_set_pc): Likewise.
16598 (ppc_arch_setup): New function.
16599 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16600 of collect_register.
889bf7c5 16601 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16602
5b0a002e
UW
166032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16604
16605 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16606 instead of linux-ppc64-low.o.
16607 * linux-ppc64-low.c: Remove file.
16608 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16609 (linux-ppc64-low.o): Remove rule.
16610
16611 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16612 (init_registers_powerpc_64): Likewise.
16613 (ppc_regmap): Conditionally define depending on __powerpc64__.
16614 (ppc_cannot_store_register): Do not special-case "fpscr" when
16615 compiled on __powerpc64__.
16616 (ppc_collect_ptrace_register): New function.
16617 (ppc_supply_ptrace_register): New function.
16618 (ppc_breakpoint): Change type to "unsigned int".
16619 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16620 (the_low_target): Conditionally provide initializers for the
889bf7c5 16621 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16622 collect_ptrace_register and supply_ptrace_register members.
16623
9b4b61c8
UW
166242008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16625
16626 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16627 * server.c (gdbserver_xmltarget): Define.
16628 (get_features_xml): Use it to replace "target.xml" and arch_string.
16629
16630 * configure.srv: Remove srv_xmltarget. Add XML files that were
16631 mentioned there to srv_xmlfiles instead. Remove conditional tests
16632 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16633 srv_xmlfiles and srv_regobj to include all possible choices.
16634 * configure.ac (srv_xmltarget): Remove.
16635 (srv_xmlfiles): Do not add "target.xml".
16636 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16637 checks for supplementary target information.
16638 * configure: Regenerate.
16639 * Makefile.in (XML_TARGET): Remove.
16640 (target.xml): Remove rule.
16641 (clean): Do not clean up target.xml.
16642 (.PRECIOUS): Do not mention target.xml.
16643
16644 * target.h (struct target_ops): Remove arch_string member.
16645 * linux-low.c (linux_arch_string): Remove.
16646 (linux_target_ops): Remove arch_string initializer.
16647 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16648 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16649 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16650 * spu-low.c (spu_arch_string): Remove.
16651 (spu_target_ops): Remove arch_string initializer.
16652 * win32-low.c (win32_arch_string): Remove.
16653 (win32_target_ops): Remove arch_string initializer.
16654 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16655 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16656 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16657
ee1a7ae4
UW
166582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16659
16660 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16661 by collect_ptrace_register and supply_ptrace_register hooks.
16662 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16663 instead of checking for the_low_target.left_pad_xfer.
16664 (usr_store_inferior_registers): Use collect_ptrace_register callback
16665 instead of checking for the_low_target.left_pad_xfer.
16666
16667 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16668 (s390_supply_ptrace_register): Likewise.
16669 (s390_fill_gregset): Call s390_collect_ptrace_register.
16670 (the_low_target): Update.
16671
16672 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16673 (ppc_supply_ptrace_register): Likewise.
16674 (the_low_target): Update.
16675
16676 * linux-i386-low.c (the_low_target): Update.
16677 * linux-x86-64-low.c (the_low_target): Update.
16678
d61ddec4
UW
166792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16680
16681 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16682 reg-s390.o and reg-s390x.o.
16683
16684 * linux-low.c (new_inferior): New global variable.
16685 (linux_create_inferior, linux_attach): Set it.
16686 (linux_wait_for_process): Call the_low_target.arch_setup after the
16687 target has stopped for the first time.
16688 (initialize_low): Do not call the_low_target.arch_setup.
16689
16690 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16691 (s390_set_pc): Likewise.
16692 (s390_arch_setup): New function.
16693 (the_low_target): Use s390_arch_setup as arch_setup routine.
16694
16695 * regcache.c (realloc_register_cache): New function.
16696 (set_register_cache): Call it for each existing regcache.
16697
d05b4ac3
UW
166982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16699
16700 * server.h (init_registers): Remove prototype.
16701
16702 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16703 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16704 instead of init_registers ().
16705 * linux-arm-low.c (init_registers_arm): Add prototype.
16706 (init_registers_arm_with_iwmmxt): Likewise.
16707 (the_low_target): Add initializer for arch_setup field.
16708 * linux-cris-low.c (init_registers_cris): Add prototype.
16709 (the_low_target): Add initializer for arch_setup field.
16710 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16711 (the_low_target): Add initializer for arch_setup field.
16712 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16713 (the_low_target): Add initializer for arch_setup field.
16714 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16715 (the_low_target): Add initializer for arch_setup field.
16716 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16717 (the_low_target): Add initializer for arch_setup field.
16718 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16719 (the_low_target): Add initializer for arch_setup field.
16720 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16721 (init_registers_mips64_linux): Likewise.
16722 (the_low_target): Add initializer for arch_setup field.
16723 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16724 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16725 (the_low_target): Add initializer for arch_setup field.
16726 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16727 (init_registers_powerpc_64): Likewise.
16728 (the_low_target): Add initializer for arch_setup field.
16729 * linux-s390-low.c (init_registers_s390): Add prototype.
16730 (init_registers_s390x): Likewise.
16731 (the_low_target): Add initializer for arch_setup field.
16732 * linux-sh-low.c (init_registers_sh): Add prototype.
16733 (the_low_target): Add initializer for arch_setup field.
16734 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16735 (the_low_target): Add initializer for arch_setup field.
16736 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16737 (the_low_target): Add initializer for arch_setup field.
16738
16739 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16740 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16741 instead of init_registers ().
16742 * win32-arm-low.c (init_registers_arm): Add prototype.
16743 (the_low_target): Add initializer for arch_setup field.
16744 * win32-i386-low.c (init_registers_i386): Add prototype.
16745 (the_low_target): Add initializer for arch_setup field.
16746
16747 * spu-low.c (init_registers_spu): Add prototype.
16748 (initialize_low): Call initialie_registers_spu () instead of
16749 initialize_registers ().
16750
fd96d250
PA
167512008-02-19 Pedro Alves <pedro@codesourcery.com>
16752
16753 * server.c (handle_v_requests): When handling the vRun and vAttach
16754 packets, if already debugging a process, don't kill it. Return an
16755 error instead.
16756
d41b6bb4
DJ
167572008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16758
16759 * server.c (handle_query): Correct length check.
16760
5ac588cf
PA
167612008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16762
16763 * win32-low.c (do_initial_child_stuff): Add process handle
16764 parameter. Set current_process_handle and current_process_id from the
16765 parameters. Clear globals.
16766 (win32_create_inferior): Don't set current_process_handle and
16767 current_process_id here. Instead pass them on the call to
16768 do_initial_child_stuff.
16769 (win32_attach): Likewise.
16770 (win32_clear_inferiors): New.
16771 (win32_kill): Don't close the current process handle or the
16772 current thread handle here. Instead call win32_clear_inferiors.
16773 (win32_detach): Don't open a new handle to the process. Call
16774 win32_clear_inferiors.
16775 (win32_join): Don't rely on current_process_handle; open a new
16776 handle using the process id.
16777 (win32_wait): Call win32_clear_inferiors when the inferior process
16778 has exited.
16779
ecd7ecbc
DJ
167802008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16781
16782 * server.c (monitor_show_help): Add "exit".
16783
1525d545
MG
167842008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16785
ecd7ecbc 16786 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16787 (clean): Add reg-xtensa.c.
16788 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16789 * configure.srv (xtensa*-*-linux*) New target.
16790 * linux-xtensa-low.c: New.
16791 * xtensa-xtregs.c: New.
1525d545 16792
59a016f0
PA
167932008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16794
16795 * hostio.c: Don't include errno.h.
16796 (errno_to_fileio_errno): Move to hostio-errno.
16797 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16798 error number outputting to the target->hostio_last_error callback.
16799 (hostio_packet_error): Use FILEIO_EINVAL directly.
16800 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16801 calls to hostio_error.
16802 * hostio-errno.c: New.
16803 * server.h (hostio_last_error_from_errno): Declare.
16804 * target.h (target_ops): Add hostio_last_error member.
16805 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16806 as hostio_last_error handler.
889bf7c5 16807 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16808 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16809 (wince_hostio_last_error): New functions.
16810 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16811 as hostio_last_error handler.
16812 (win32_target_ops) [!_WIN32_WCE]: Register
16813 hostio_last_error_from_errno as hostio_last_error handler.
16814 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16815 (hostio-errno.o): New rule.
16816 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16817 * configure.srv (srv_hostio_err_objs): New variable. Default to
16818 hostio-errno.o.
16819 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16820 * configure: Regenerate.
16821
2d717e4f
DJ
168222008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16823
16824 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16825 (linux_kill, linux_detach): Clean up the process list.
16826 * remote-utils.c (remote_open): Improve port number parsing.
16827 (putpkt_binary, input_interrupt): Only send interrupts if the target
16828 is running.
16829 * server.c (extended_protocol): Make static.
16830 (attached): Define earlier.
16831 (exit_requested, response_needed, program_argv): New variables.
16832 (target_running): New.
16833 (start_inferior): Clear attached here.
16834 (attach_inferior): Set attached here.
16835 (require_running): Define.
16836 (handle_query): Use require_running and target_running. Implement
16837 "monitor exit".
16838 (handle_v_attach, handle_v_run): New.
16839 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16840 (gdbserver_usage): Update.
16841 (main): Redo argument parsing. Handle --debug and --multi. Handle
16842 --attach along with other options or after the port. Save
16843 program_argv. Support no initial program. Resynchronize
16844 communication with GDB after an error. Handle "monitor exit".
16845 Use require_running and target_running. Always allow the extended
16846 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16847 restart in extended mode.
16848 * README: Refer to the GDB manual. Update --attach usage.
16849
7407e2de
AS
168502007-12-20 Andreas Schwab <schwab@suse.de>
16851
16852 * linux-low.c (STACK_SIZE): Define.
16853 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16854 (linux_test_for_tracefork): Likewise.
16855
b65d95c5
DJ
168562007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16857
16858 * linux-low.c (linux_wait_for_event): Update messages. Do not
16859 reinsert auto-delete breakpoints.
16860 * mem-break.c (struct breakpoint): Change return type of handler to
16861 int.
16862 (set_breakpoint_at): Update handler type.
16863 (reinsert_breakpoint_handler): Return 1 instead of calling
16864 delete_breakpoint.
16865 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16866 setting a new one.
16867 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16868 * mem-break.h (set_breakpoint_at): Update handler type.
16869 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16870 * win32-low.c (auto_delete_breakpoint): New.
16871 (get_child_debug_event): Use it.
16872
4e799345
DJ
168732007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16874
16875 * configure.ac: Check for pread and pwrite.
16876 * hostio.c (handle_pread): Fall back to lseek and read.
16877 (handle_pwrite): Fall back to lseek and write.
16878 * config.in, configure: Regenerated.
16879
27524b67
DJ
168802007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16881
16882 * server.c (myresume): Add own_buf argument.
16883 (main): Update calls.
16884
a20d5e98
DJ
168852007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16886
16887 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16888 * remote-utils.c (remote_open): Do not call disable_async_io.
16889 (block_async_io): Delete.
16890 (unblock_async_io): Make static.
16891 (initialize_async_io): New.
16892 * server.c (handle_v_cont): Handle async I/O here.
16893 (myresume): Likewise. Move other common resume tasks here...
16894 (main): ... from here. Call initialize_async_io. Disable async
16895 I/O before the main loop.
16896 * server.h (initialize_async_io): Declare.
16897 (block_async_io, unblock_async_io): Delete prototypes.
16898 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16899
b79d787e
DJ
169002007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16901
16902 * remote-utils.c (readchar): Allow binary data in received messages.
16903
d97903b2
PA
169042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16905
16906 * win32-low.c (attaching): New global.
16907 (win32_create_inferior): Clear the `attaching' global.
16908 (win32_attach): Set the `attaching' global.
16909 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16910 attaching. Only set a breakpoint at the entry point if not
16911 attaching.
16912
311de423
PA
169132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16914
16915 * server.c (main): Don't report dll events on the initial
16916 connection on attaches.
16917
6c2d16d2
PA
169182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16919
16920 * server.c (main): Relax numerical bases supported for the pid of
16921 the --attach command line argument.
16922
5ca906e6
PA
169232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16924
16925 * win32-low.c (win32_attach): Call OpenProcess before
16926 DebugActiveProcess, not after. Add last error output to error
16927 call.
16928
9c6c8194
PA
169292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16930
16931 * win32-low.c (win32_get_thread_context)
16932 (win32_set_thread_context): New functions.
16933 (thread_rec): Use win32_get_thread_context.
16934 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16935 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16936 field.
16937
4d5d1aaa
PA
169382007-12-03 Leo Zayas
16939 Pedro Alves <pedro_alves@portugalmail.pt>
16940
16941 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16942 global variables.
16943 (child_add_thread): Minor cleanup.
16944 (child_continue): Resume artificially suspended threads before
16945 calling ContinueDebugEvent.
16946 (suspend_one_thread): New.
16947 (fake_breakpoint_event): New.
16948 (get_child_debug_event): Change return type to int. Check here if
16949 gdb sent an interrupt request. If a soft interrupt was requested,
16950 fake a breakpoint event. Return 0 if there is no event to handle,
16951 and 1 otherwise.
16952 (win32_wait): Don't check here if gdb sent an interrupt request.
16953 Ensure there is a valid event to handle.
16954 (win32_request_interrupt): Add soft interruption method as last
16955 resort.
16956
c436e841
PA
169572007-12-03 Leo Zayas
16958 Pedro Alves <pedro_alves@portugalmail.pt>
16959
16960 * win32-low.h (win32_thread_info): Add descriptions to the
16961 structure members. Replace `suspend_count' counter by a
16962 `suspended' flag.
16963 * win32-low.c (thread_rec): Update condition of when to get the
16964 context from the inferior. Rely on ContextFlags being set if it
16965 has already been retrieved. Only suspend the inferior thread if
16966 we haven't already. Warn if that fails.
16967 (continue_one_thread): s/suspend_count/suspended/. Only call
16968 ResumeThread once. Warn if that fails.
16969
e7b5fa67
PA
169702007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16971
16972 * win32-low.c (win32_wait): Don't read from the inferior when it
16973 has already exited.
16974
a385171d
PA
169752007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16976
16977 * Makefile.in (win32_low_h): New variable.
16978 (win32-low.o): Add dependency on $(win32_low_h).
16979 (win32-arm-low.o, win32-i386-low.o): New rules.
16980
f80c84b3
DJ
169812007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16982
16983 * hostio.c: Correct copyright year.
16984
a6b151f1
DJ
169852007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16986
16987 * Makefile.in (OBS): Add hostio.o.
16988 (hostio.o): New rule.
16989 * server.h (handle_vFile): Declare.
16990 * hostio.c: New file.
16991 * server.c (handle_v_requests): Take packet_len and new_packet_len
16992 for binary packets. Call handle_vFile.
16993 (main): Update call to handle_v_requests.
16994
f9387fc3
DJ
169952007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16996
16997 * linux-low.c: Include <sched.h>.
16998
51c2684e
DJ
169992007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17000
17001 * linux-low.c (linux_tracefork_grandchild): New.
17002 (linux_tracefork_child): Use clone.
17003 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17004
75f83163
JB
170052007-10-31 Joel Brobecker <brobecker@adacore.com>
17006
17007 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17008
da5898ce
DJ
170092007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17010
17011 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17012
24a09b5f
DJ
170132007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17014
17015 * inferiors.c (change_inferior_id): Delete.
17016 (add_pid_to_list, pull_pid_from_list): New.
17017 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17018 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17019 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17020 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17021 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17022 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17023 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17024 (using_threads): Always set to 1.
17025 (handle_extended_wait): New.
17026 (add_process): Do not set TID.
17027 (linux_create_inferior): Set must_set_ptrace_flags.
17028 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17029 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17030 (linux_thread_alive): Rename TID argument to LWPID.
17031 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17032 (linux_wait_for_event): Do not use TID or check using_threads. Update
17033 call to dead_thread_notify. Call handle_extended_wait.
17034 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17035 (send_sigstop): Delete sigstop_sent.
17036 (wait_for_sigstop): Avoid TID.
17037 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17038 (linux_test_for_tracefork): New.
17039 (linux_lookup_signals): Use thread_db_active and
17040 linux_supports_tracefork_flag.
17041 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17042 * linux-low.h (get_process_thread): Avoid TID.
17043 (struct process_ifo): Move thread_known and tid to the end. Remove
17044 sigstop_sent.
17045 (linux_attach_lwp, thread_db_init): Update prototypes.
17046 * server.h (change_inferior_id): Delete prototype.
17047 (add_pid_to_list, pull_pid_from_list): New prototypes.
17048 * thread-db.c (thread_db_use_events): New.
17049 (find_first_thread): Rename to...
17050 (find_one_thread): ...this. Update callers and messages. Do not
17051 call fatal. Check thread_db_use_events. Do not call
17052 change_inferior_id or new_thread_notify.
17053 (maybe_attach_thread): Update. Do not call new_thread_notify.
17054 (thread_db_init): Set thread_db_use_events. Check use_events.
17055 * utils.c (fatal, warning): Correct message prefix.
17056
30ed0a8f
DJ
170572007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17058
17059 * Makefile.in (clean): Remove new files.
17060 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17061 (powerpc-64.o, powerpc-64.c): New rules.
17062 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17063 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17064 with SPE.
17065 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17066 SPE targets.
17067 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17068 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17069 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17070 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17071 (target_regsets): Add AltiVec and SPE register sets.
17072 * configure.ac: Check for AltiVec and SPE.
17073 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17074 (ppc_fill_vrregset, ppc_store_vrregset): New.
17075 (target_regsets): Add AltiVec register set.
17076 * configure: Regenerated.
17077
fd462a61
DJ
170782007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17079
17080 * linux-low.c (O_LARGEFILE): Define.
17081 (linux_read_memory): Use /proc/PID/mem.
17082 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17083 * configure, config.in: Regenerated.
17084
69f223ed
DJ
170852007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17086
17087 * linux-low.c (linux_wait_for_event): Do not pass signals while
17088 single-stepping.
17089
aec18585
PA
170902007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17091
17092 * win32-low.c (create_process): New.
17093 (win32_create_inferior): Use create_process instead of
17094 CreateProcess. If create_process failed retry appending an ".exe"
17095 suffix. Store the GetLastError result immediatelly after
17096 create_process calls and use it on the call to error.
17097
34d86ddd
PA
170982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17099
17100 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17101
5a0e3bd0
JB
171022007-08-23 Joel Brobecker <brobecker@adacore.com>
17103
17104 * configure.ac: Switch license to GPLv3.
17105
f88c79e6
MS
171062007-08-01 Michael Snyder <msnyder@access-company.com>
17107
17108 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17109
6b3d9b83
PA
171102007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17111
17112 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17113 typedef.
17114 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17115 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17116 CloseToolhelp32Snapshot.
17117 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17118 CloseToolhelp32Snapshot.
17119
c588c53c
MS
171202007-07-27 Michael Snyder <michael.snyder@access-company.com>
17121
17122 * server.c (main): Check for inferior exit before main loop.
17123
aa0403d9
PA
171242007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17125
17126 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17127 instead of on tmp_desc.
17128
255e7678
DJ
171292007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17130 Daniel Jacobowitz <dan@codesourcery.com>
17131
17132 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17133 (add_thread): Minor cleanups.
17134 (clear_inferiors): Move lower in the file. Clear the DLL
17135 list.
17136 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17137 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17138 (xml_escape_text): New.
17139 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17140 for qSupported.
17141 (handle_v_cont): Report errors.
17142 (gdbserver_version): Update.
17143 (main): Correct size of own_buf. Do not report initial DLL events.
17144 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17145 (unloaded_dll, xml_escape_text): New.
17146 * win32-low.c (enum target_waitkind): Update comments.
17147 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17148 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17149 (win32_EnumProcessModules, win32_GetModuleInformation)
17150 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17151 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17152 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17153 (win32_Module32First, win32_Module32Next, load_toolhelp)
17154 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17155 (get_child_debug_event): Handle DLL events.
17156 (win32_wait): Likewise.
17157
0d37add9
DJ
171582007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17159
17160 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17161 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17162
45e2715e
PA
171632007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17164
17165 * win32-low.c (handle_output_debug_string): Ignore event if not
17166 waiting.
17167
c5674cf1
PA
171682007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17169
17170 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17171
2bbe3cc1
DJ
171722007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17173
17174 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17175
ae13219e
DJ
171762007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17177
17178 * inferiors.c (change_inferior_id): Add comment.
17179 * linux-low.c (check_removed_breakpoint): Add an early
17180 prototype. Improve debug output.
17181 (linux_attach): Doc update.
17182 (linux_detach_one_process, linux_detach): Clean up before releasing
17183 each process.
17184 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17185 * linux-low.h (struct process_info): Doc improvement.
17186 * mem-break.c (delete_all_breakpoints): New.
17187 * mem-break.h (delete_all_breakpoints): New prototype.
17188 * thread-db.c (find_first_thread): New.
17189 (thread_db_create_event): Call it instead of
17190 thread_db_find_new_threads. Clean up unused variables.
17191 (maybe_attach_thread): Remove first thread handling.
17192 (thread_db_find_new_threads): Use find_first_thread.
17193 (thread_db_get_tls_address): Likewise.
17194
4105de34
DJ
171952007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17196
17197 * thread-db.c (thread_db_find_new_threads): Add prototype.
17198 (thread_db_create_event): Check for the main thread before adding
17199 a new thread.
17200 (maybe_attach_thread): Only enable event reporting if TID == 0.
17201 (thread_db_get_tls_address): Check for new threads.
17202
2b876972
DJ
172032007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17204
17205 * linux-low.c (linux_create_inferior): Try execv before execvp.
17206 * spu-low.c (spu_create_inferior): Likewise.
17207
7a245884
DJ
172082007-06-13 Mike Frysinger <vapier@gentoo.org>
17209
17210 * linux-low.c (linux_create_inferior): Change execv to execvp.
17211 * spu-low.c (spu_create_inferior): Likewies.
17212
117ce543
DJ
172132007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17214
17215 * Makefile.in (clean): Clean new files instead of deleted ones.
17216 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17217 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17218 rules.
17219 * configure.srv: Specify XML files and new regformats for MIPS and
17220 MIPS64 GNU/Linux.
17221 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17222 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17223 an entry for the restart register.
17224 (mips_cannot_fetch_register, mips_cannot_store_register)
17225 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17226 register names to match the XML descriptions.
17227 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17228 restart register instead of $0.
17229
0e7f50da
UW
172302007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17231 Markus Deuling <deuling@de.ibm.com>
17232
17233 * remote-utils.c (decode_xfer_write): New function.
17234 * server.h (decode_xfer_write): Add prototype.
17235 * server.c (handle_query): Add PACKET_LEN argument. Support
17236 qXfer:spu:read and qXfer:spu:write packets.
17237 (main): Pass packet_len to handle_query.
17238 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17239 * target.h (target_ops): Add qxfer_spu.
17240
374c1d38
UW
172412007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17242
17243 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17244 accessing non-seekable spufs files.
17245
bb63802a
UW
172462007-05-16 Markus Deuling <deuling@de.ibm.com>
17247
889bf7c5 17248 * server.c (handle_query): Add reply for qC packet.
bb63802a 17249
7390519e
PA
172502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17251 Leo Zayas <lerele@champenstudios@com>
17252
17253 * server.h (check_remote_input_interrupt_request): New function.
17254 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17255 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17256 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17257 (check_remote_input_interrupt_request): New function.
17258 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 17259 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
17260 winapi_GenerateConsoleCtrlEvent): New typedefs.
17261 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17262 to 250 ms.
17263 (win32_wait): Check for remote interrupt request
17264 with check_remote_input_interrupt_request.
17265 (win32_request_interrupt): New function.
17266 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17267
34b34921
PA
172682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17269
17270 * win32-low.c (debug_registers_changed,
17271 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17272 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17273 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17274 (thread_rec): Get context using the low target.
17275 (child_add_thread): Call thread_added on the low target,
17276 which does the same thing.
17277 (regptr): Delete.
17278 (do_initial_child_stuff): Remove debug registers references.
17279 Set context using the low target. Resume threads after
17280 setting the contexts.
17281 (child_continue): Remove dead variable. Remove debug
17282 registers references.
17283 (child_fetch_inferior_registers): Go through the low target.
17284 (do_child_store_inferior_registers): Remove.
17285 (child_store_inferior_registers): Go through the low target.
17286 (win32_resume): Remove debug registers references.
17287 Set context using the low target.
17288 (handle_exception): Change return type to void. Don't record
17289 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17290 first chance exception.
889bf7c5 17291 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
17292 goto loop. Always return after waiting for debug event.
17293 (win32_wait): Convert to switch statement. Handle spurious
17294 events.
17295
17296 * win32-i386-low.c (debug_registers_changed,
17297 debug_registers_used): New.
17298 (initial_stuff): Rename to ...
17299 (i386_initial_stuff): ... this. Clear debug registers
17300 state variables.
17301 (store_debug_registers): Delete.
17302 (i386_get_thread_context): New.
17303 (load_debug_registers): Delete.
17304 (i386_set_thread_context): New.
17305 (i386_thread_added): New.
17306 (single_step): Rename to ...
17307 (i386_single_step): ... this.
17308 (do_fetch_inferior_registers): Rename to ...
17309 (i386_fetch_inferior_register): ... this.
17310 (i386_store_inferior_register): New.
17311 (the_low_target): Adapt to new interface.
17312
17313 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17314 (arm_get_thread_context): New.
17315 (arm_set_thread_context): New.
17316 (regptr): New.
17317 (do_fetch_inferior_registers): Rename to ...
17318 (arm_fetch_inferior_register): ... this.
17319 (arm_store_inferior_register): New.
17320 (arm_wince_breakpoint): Reimplement as unsigned long.
17321 (arm_wince_breakpoint_len): Define.
17322 (the_low_target): Adapt to new interface.
17323
17324 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17325 load_debug_registers. Add get_thread_context, set_thread_context,
17326 thread_added and store_inferior_register. Rename
17327 fetch_inferior_registers to fetch_inferior_register.
17328 (regptr): Remove declaration.
17329
dd6953e1
PA
173302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17331
17332 * linux-low.c (linux_detach): Change return type to int. Return 0.
17333 * spu-low.c (spu_detach): Likewise.
17334
444d6139
PA
173352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17336
17337 * target.h (target_ops): Change return type of detach to int.
17338 Add join.
17339 (join_inferior): New.
17340 * server.c (main): Don't skip detach support on mingw32.
17341 If the inferior doesn't support detaching return error.
17342 Call join_inferior instead of using waitpid.
17343 * linux-low.c (linux_join): New.
17344 (linux_target_op): Add linux_join.
17345 * spu-low.c (spu_join): New.
17346 (spu_target_ops): Add spu_join.
17347 * win32-low.c (win32_detach): Adapt to new interface.
17348 Reopen current_process_handle before detaching. Issue a child
17349 resume before detaching.
17350 (win32_join): New.
17351 (win32_target_op): Add win32_join.
17352
1d5315fe
PA
173532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17354
17355 * win32-low.c (win32-attach): Fix return value.
17356 * target.h (target_ops): Describe ATTACH return values.
17357
bf914831
PA
173582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17359
17360 * win32-low.c (GETPROCADDRESS): Define.
17361 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17362 (winapi_DebugSetProcessKillOnExit): Likewise.
17363 (win32_create_inferior): Force usage of ansi CreateProcessA.
17364 (win32_attach): Use GETPROCADDRESS.
17365 (win32_detach): Likewise.
17366
f72f3e60
PA
173672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17368
17369 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17370
ed50f18f
PA
173712007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17372
17373 * win32-low.c: Commit leftover changes from 2007-03-29.
17374
0c2ead7e
DJ
173752007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17376
17377 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17378 fields short instead of int. Add explicit padding.
17379 (i387_cache_to_fsave): Remove unnecessary casts.
17380 (i387_fsave_to_cache): Doc fix.
17381 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17382
73725ff3
DJ
173832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17384
17385 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17386 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17387
d99f33d8
PA
173882007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17389
17390 * configure.srv (arm*-*-mingw32ce*): Move near the other
17391 arm targets.
17392
68070c10
PA
173932007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17394
2482afc6 17395 * configure.ac: Add errno checking.
68070c10
PA
17396 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17397 sys/file.h and malloc.h.
17398 (AC_CHECK_DECLS): Add perror.
17399 (srv_mingwce): Handle.
2482afc6 17400 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
17401 win32-i386-low.o to srv_tgtobj.
17402 (i[34567]86-*-mingw*): Likewise.
17403 (arm*-*-mingw32ce*): Add case.
17404 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17405 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17406 [__MINGW32CE__] (strerror): New function.
17407 [__MINGW32CE__] (errno): Define to GetLastError.
17408 [__MINGW32CE__] (COUNTOF): New macro.
17409 (remote_open): Remove extra close call.
17410 * mem-break.c (delete_breakpoint_at): New function.
17411 * mem-break.h (delete_breakpoint_at): Declare.
17412 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17413 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17414 [USE_WIN32API] (read, write): Add char* casts.
17415 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17416 * server.h: Include wincecompat.h on Windows CE.
17417 [HAVE_ERRNO_H]: Check.
17418 (perror): Declare if not declared.
17419 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17420 (perror_with_name): Remove errno declaration.
17421 * wincecompat.h: New.
17422 * wincecompat.c: New.
17423 * win32-low.h: New.
17424 * win32-arm-low.c: New.
17425 * win32-i386-low.c: New.
17426 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17427 (OUTMSG2): Make it safe.
17428 (_T): New macro.
17429 (COUNTOF): New macro.
17430 (NUM_REGS): Get it from the low target.
17431 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17432 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17433 (thread_rec): Let low target handle debug registers.
17434 (child_add_thread): Likewise.
17435 (child_init_thread_list): Likewise.
17436 (continue_one_thread): Likewise.
17437 (regptr): New.
17438 (do_child_fetch_inferior_registers): Move to ...
17439 * win32-i386-low.c: ... here, and rename to ...
17440 (do_fetch_inferior_registers): ... this.
889bf7c5 17441 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17442 Go through the low target.
17443 (do_child_store_inferior_registers): Use regptr.
17444 (strwinerror): New function.
17445 (win32_create_inferior): Handle Windows CE.
17446 Use strwinerror instead of strerror on Windows error
17447 codes. Add program to the error output.
17448 Don't close the main thread handle on Windows CE.
17449 (win32_attach): Use coredll.dll on Windows CE.
17450 (win32_kill): Close current process and current
17451 thread handles.
17452 (win32_detach): Use coredll.dll on Windows CE.
17453 (win32_resume): Let low target handle debug registers, and
17454 step request.
17455 (handle_exception): Add/Remove initial breakpoint. Avoid
17456 non-existant WSTOPSIG on Windows CE.
17457 (win32_read_inferior_memory): Cast to remove warning.
17458 (win32_arch_string): Go through the low target.
17459 (initialize_low): Call set_breakpoint_data with the low
17460 target's breakpoint.
17461 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17462 FOP_REGNUM, mappings): Move to ...
17463 * win32-i386-low.c: ... here.
17464 * win32-low.c (win32_thread_info): Move to ...
17465 * win32-low.h: ... here.
17466 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17467 win32-arm-low.c and wincecompat.c.
17468 (all:): Add $EXEEXT.
17469 (install-only:): Likewise.
17470 (gdbserver:): Likewise.
17471 (gdbreplay:): Likewise.
17472 * config.in: Regenerate.
17473 * configure: Regenerate.
17474
41093d81
PA
174752007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17476
17477 * win32-low.c: Rename typedef thread_info to
17478 win32_thread_info throughout.
17479
544afa54
PA
174802007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17481
17482 * win32-i386-low.c: Rename to ...
17483 * win32-low.c: ... this.
17484 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17485 * Makefile.in: Likewise.
17486
bce7165d
PA
174872007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17488
17489 * remote-utils.c (monitor_output): Constify msg parameter.
17490 * server.h (monitor_output): Likewise.
17491 * win32-i386-low.c (handle_output_debug_string): New.
17492 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17493 handle_output_debug_string.
17494 (get_child_debug_event): Likewise.
17495
506c7aa0
DJ
174962007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17497
17498 * server.c (main): Correct strtoul check.
17499
42c81e2a
DJ
175002007-03-27 Jon Ringle <jon@ringle.org>
17501
17502 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17503
9453113a
DJ
175042007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17505
17506 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17507
64a69107
DJ
175082007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17509
17510 * terminal.h: Check HAVE_SGTTY_H.
17511
175122007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
17513
17514 * remote-utils.c (remote_open): Print out the assigned port number.
17515
c74d0ad8
DJ
175162007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17517
17518 * remote-utils.c (monitor_output): New function.
17519 * server.c (debug_threads): Define here.
17520 (monitor_show_help): New function.
17521 (handle_query): Handle qRcmd.
17522 (main): Do not handle 'd' packet.
17523 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17524 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17525 of debug_threads.
17526
de7c3b4a
PA
175272007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17528
17529 * Makefile.in (EXEEXT): New.
17530 (clean): Use $(EXEEXT).
17531
ef57601b
PA
175322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17533
17534 * target.h (target_ops): Rename send_signal to request_interrupt,
17535 and remove enum target_signal parameter.
17536 * linux-low.c (linux_request_interrupt): Rename from
17537 linux_send_signal, and always send SIGINT.
17538 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17539 and always send SIGINT.
17540 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17541 of send_signal.
17542 (input_interrupt): Likewise.
17543
820f2bda
PA
175442007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17545
17546 * server.c (get_features_xml): Check if target implemented
17547 arch_string.
17548 * win32-i386-low.c (win32_arch_string): New.
17549 (win32_target_ops): Add win32_arch_string as arch_string member.
17550
ab39bf24
UW
175512007-02-22 Markus Deuling <deuling@de.ibm.com>
17552
17553 * spu-low.c (spu_arch_string): New.
17554 (spu_target_ops): Add spu_arch_string.
17555
61ff6e04
DJ
175562007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17557
17558 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17559 * configure.ac: Do not check for terminal.h.
17560 * configure, config.in: Regenerated.
17561
fb1e4ffc
DJ
175622007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17563
17564 * Makefile.in (OBS): Add $(XML_BUILTIN).
17565 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17566 (clean): Update.
17567 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17568 (arm-with-iwmmxt.c): New.
17569 * config.in, configure: Regenerate.
17570 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17571 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17572 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17573 (arm*-*-linux*): Add iWMMXt and regset support.
17574 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17575 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17576 (arm_store_wmmxregset, target_regsets): New.
17577 * server.c (get_features_xml): Take annex argument. Check builtin
17578 XML documents.
17579 (handle_query): Handle multiple annexes.
17580
0f48aa01
DJ
175812007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17582
17583 * remote-utils.c [USE_WIN32API] (read, write): Define.
17584 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17585 write.
17586
23181151
DJ
175872007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17588
17589 * linux-i386-low.c (the_low_target): Set arch_string.
17590 * linux-x86-64-low.c (the_low_target): Likewise.
17591 * linux-low.c (linux_arch_string): New.
17592 (linux_target_ops): Add it.
17593 * linux-low.h (struct linux_target_ops): Add arch_string.
17594 * server.c (write_qxfer_response): Use const void * for DATA.
17595 (get_features_xml): New.
17596 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17597 * target.h (struct target_ops): Add arch_string method.
17598
9d606399
DJ
175992007-01-03 Denis Pilat <denis.pilat@st.com>
17600 Daniel Jacobowitz <dan@codesourcery.com>
17601
17602 * linux-low.c (linux_kill): Handle being called with no threads.
17603 * win32-i386-low.c (win32_kill): Likewise.
17604 (get_child_debug_event): Clear current_process_handle.
17605
176062006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17607 Daniel Jacobowitz <dan@codesourcery.com>
17608
17609 * remote-utils.c (remote_open): Check the type of specified
17610 serial port devices before opening them.
17611 * server.c (main): Kill the inferior if an error occurs during
17612 the first remote_open.
17613
a5e13d24
DJ
176142006-12-05 Markus Deuling <deuling@de.ibm.com>
17615
17616 * README: Update supported targets.
17617
186947f7
DJ
176182006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17619
17620 * Makefile.in (clean): Remove reg-mips64.c.
17621 (reg-mips64.c, reg-mips64.o): New rules.
17622 * configure.srv: Handle mips64. Include regset support for mips.
17623 * linux-mips-low.c (union mips_register): New.
17624 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17625 (mips_breakpoint, mips_breakpoint_at): Use int.
17626 (mips_collect_register, mips_supply_register)
17627 (mips_collect_register_32bit, mips_supply_register_32bit)
17628 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17629 (mips_store_fpregset, target_regsets): New.
17630 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17631
a13e2c95
UW
176322006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17633
17634 * configure.srv: Add target "spu*-*-*".
17635 * Makefile.in (clean): Remove reg-spu.c.
17636 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17637 * spu-low.c: New file.
17638
cb7283db
DJ
176392006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17640
17641 * configure.ac: Correct td_thr_tls_get_addr test.
17642 * configure: Regenerated.
17643
89be2091
DJ
176442006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17645
17646 * linux-low.c (linux_wait_for_event): Reformat. Use the
17647 pass_signals array.
17648 * remote-utils.c (decode_address_to_semicolon): New.
17649 * server.c (pass_signals, handle_general_set): New.
17650 (handle_query): Mention QPassSignals for qSupported.
17651 (main): Call handle_general_set.
17652 * server.h (pass_signals, decode_address_to_semicolon): New.
17653
000ef4f0
DJ
176542006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17655
17656 * server.c (handle_query): Correct error handling for read_auxv.
17657
b7149293
UW
176582005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17659
17660 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17661 and srv_linux_thread_db to yes.
17662 * linux-s390-low.c (s390_fill_gregset): New function.
17663 (target_regsets): Define data structure.
17664
dae5f5cf
DJ
176652006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17666
17667 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17668 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17669 * config.in, configure: Regenerated.
17670 * inferiors.c (gdb_id_to_thread): New function.
17671 (gdb_id_to_thread_id): Use it.
17672 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17673 * linux-low.h (struct process_info): Add th member.
17674 (thread_db_get_tls_address): New prototype.
17675 * remote-utils.c (decode_address): Make non-static.
17676 * server.c (handle_query): Handle qGetTLSAddr.
17677 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17678 * target.h (struct target_ops): Add get_tls_address.
17679 * thread-db.c (maybe_attach_thread): Save the thread handle.
17680 (thread_db_get_tls_address): New.
17681
32ca6d61
DJ
176822006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17683
17684 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17685 (linux_resume_one_process): Take a siginfo_t *. Update all
17686 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17687 (struct pending_signals): Add a siginfo_t.
17688 (linux_wait_for_process): Always set last_status.
17689 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17690 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17691 * linux-low.h (struct process_info): Add last_status.
17692
5ffff7c1
DJ
176932006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17694
17695 * remote-utils.c (try_rle): New function.
17696 (putpkt_binary): Use it.
17697
8695c747
DJ
176982006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17699
17700 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17701 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17702 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17703 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17704 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17705 point registers.
17706
290fadea
RS
177072006-08-08 Richard Sandiford <richard@codesourcery.com>
17708
17709 * server.c (terminal_fd): New variable.
17710 (old_foreground_pgrp): Likewise.
17711 (restore_old_foreground_pgrp): New function.
17712 (start_inferior): Record the terminal file descriptor in terminal_fd
17713 and its original foreground group in old_foreground_pgrp. Register
17714 restore_old_foreground_pgrp with atexit().
17715
9f2e1e63
DJ
177162006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17717
17718 * server.c (handle_query): Correct qPart to qXfer.
17719
b80864fb
DJ
177202006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17721
17722 * configure.ac: Check for more headers which are missing on
17723 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17724 * configure.srv: Add Cygwin and mingw32.
17725 * remote-utils.c: Don't include headers unconditionally which
17726 are missing on mingw32. Include <winsock.h> for mingw32.
17727 (remote_open): Adjust for mingw32 support. Flush
17728 standard error after writing to it.
17729 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17730 (unblock_async_io, enable_async_io, disable_async_io)
17731 (readchar, getpkt): Update for Winsock support.
17732 (prepare_resume_reply): Expect a protocol signal number.
17733 * server.c: Disable <sys/wait.h> on mingw32.
17734 (start_inferior): Adjust for mingw32 support. Flush
17735 standard error after writing to it.
17736 (attach_inferior): Likewise. Use protocol signal
17737 numbers.
17738 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17739 and names.
17740 * win32-i386-low.c: New file.
17741 * Makefile.in (XM_CLIBS): Set.
17742 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17743 (win32-i386-low.o): New dependency rule.
17744 * linux-low.c (linux_wait): Use target signal numbers.
17745 * target.h (struct target_ops): Doc fix.
17746 * server.h (target_signal_to_name): New prototype.
17747 * gdbreplay.c: Don't include headers unconditionally which
17748 are missing on mingw32. Include <winsock.h> for mingw32.
17749 (remote_close, remote_open): Adjust for Winsock support.
17750 * configure, config.in: Regenerated.
17751
0876f84a
DJ
177522006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17753
17754 * server.c (decode_xfer_read, write_qxfer_response): New.
17755 (handle_query): Take a packet length argument. Handle
17756 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17757 the qSupported response.
17758 (main): Update call to handle_query.
17759
01f9e8fa
DJ
177602006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17761
17762 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17763 (putpkt_binary): Renamed from putpkt and adjusted for binary
17764 data.
17765 (putpkt): New wrapper for putpkt_binary.
17766 (readchar): Don't mask off the high bit.
17767 (decode_X_packet): New function.
17768 * server.c (main): Call putpkt_binary if a handler sets the packet
17769 length. Save the length of the incoming packet. Handle 'X'.
17770 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17771
be2a5f71
DJ
177722006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17773
17774 * server.c (handle_query): Handle qSupported.
17775
ea025f5f
DJ
177762006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17777
17778 * remote-utils.c (all_symbols_looked_up): New variable.
17779 (look_up_one_symbol): Check it.
17780 * server.h (look_up_one_symbol): New declaration.
17781 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17782
9308fc88
DJ
177832006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17784
17785 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17786 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17787 (PTRACE_GET_THREAD_AREA): Define.
17788 (ps_get_thread_area): New function.
17789
52fb6437
NS
177902006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17791
17792 * configure.srv (m68k*-*-uclinux*): New target.
17793 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17794 (linux_resume_one_process): Remove extraneous cast.
17795 (linux_read_offsets): New.
17796 (linux_target_op): Add linux_read_offsets on mmuless systems.
17797 * server.c (handle_query): Add qOffsets logic.
17798 * target.h (struct target_ops): Add read_offsets.
17799
21b0f40c
DJ
178002006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17801
17802 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17803 (PTRACE_GET_THREAD_AREA): Define.
17804 (ps_get_thread_area): New function.
17805 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17806 (linux-x86-64-low.o): Update.
17807
0050a760
DJ
178082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17809
17810 * configure.ac: Remove checks for prfpregset_t.
17811 * gdb_proc_service.h: New file.
17812 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17813 new "gdb_proc_service.h".
17814 * proc-service.c: Likewise.
17815 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17816 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17817 * Makefile.in (gdb_proc_service_h): Updated.
17818 * configure, config.in: Regenerated.
17819
b92a518e
DJ
178202006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * remote-utils.c (prepare_resume_reply): Move declaration
17823 of gdb_id_from_wait to the top of the block.
17824
545587ee
DJ
178252006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17826
17827 * linux-low.c (regsets_store_inferior_registers): Read the regset
17828 from the target before filling it.
17829
9db87ebd
DJ
178302006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17831
17832 * server.c (attach_inferior): Return SIGTRAP for a successful
17833 attach.
17834
dd24457d
DJ
178352006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17836
17837 * Makefile.in (OBS): Add version.o.
17838 (STAGESTUFF): Delete.
17839 (version.o): Add dependencies.
17840 (version.c): Replace rule.
17841 (clean): Remove version.c.
17842 * server.c (gdbserver_version): New.
17843 (gdbserver_usage): Use printf.
17844 (main): Handle --version and --help.
17845 * server.h (version, host_name): Add declarations.
17846
6f0f660e
EZ
178472005-12-23 Eli Zaretskii <eliz@gnu.org>
17848
889bf7c5
PA
17849 * linux-arm-low.c:
17850 * linux-arm-low.c:
17851 * inferiors.c:
17852 * i387-fp.h:
17853 * i387-fp.c:
17854 * gdbreplay.c:
17855 * regcache.c:
17856 * proc-service.c:
17857 * mem-break.h:
17858 * mem-break.c:
17859 * linux-x86-64-low.c:
17860 * linux-sh-low.c:
17861 * linux-s390-low.c:
17862 * linux-ppc64-low.c:
17863 * linux-ppc-low.c:
17864 * linux-mips-low.c:
17865 * linux-m68k-low.c:
17866 * linux-m32r-low.c:
17867 * linux-low.h:
17868 * linux-low.c:
17869 * linux-ia64-low.c:
17870 * linux-i386-low.c:
17871 * linux-crisv32-low.c:
17872 * thread-db.c:
17873 * terminal.h:
17874 * target.h:
17875 * target.c:
17876 * server.h:
17877 * server.c:
17878 * remote-utils.c:
17879 * regcache.h:
17880 * utils.c:
17881 * Makefile.in:
17882 * configure.ac:
6f0f660e
EZ
17883 * gdbserver.1: Add (C) after Copyright. Update the FSF
17884 address.
17885
9d1fb177
DJ
178862005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17887
17888 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17889 (arm_breakpoint_at): Recognize both breakpoints.
17890 (the_low_target): Use the correct breakpoint instruction.
17891
011a70c2
DJ
178922005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17893
17894 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17895 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17896 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17897 (the_low_target): Update.
17898
7fb85e41
AS
178992005-10-25 Andreas Schwab <schwab@suse.de>
17900
17901 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17902
17903 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17904 (ia64_num_regs): Reduce to 462.
17905
3db0444b
DJ
179062005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17907
17908 * acinclude.m4: Correct quoting.
17909 * aclocal.m4: Regenerated.
17910
17911 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17912 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17913 (thread_db_init): Call thread_db_err_str.
17914 * configure.ac: Check for TD_VERSION.
17915 * config.in, configure: Regenerated.
17916
bee0189a
DJ
179172005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17918
17919 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17920
e9d25b98
DJ
179212005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17922
17923 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17924 is not available. Define HAVE_PTRACE_GETREGS if it is.
17925 * config.in, configure: Regenerated.
17926 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17927 * linux-i386-low.c, linux-m68k-low.c: Update to use
17928 HAVE_PTRACE_GETREGS.
17929 * linux-low.c (regsets_fetch_inferior_registers)
17930 (regsets_store_inferior_registers): Only return 0 if we processed
17931 GENERAL_REGS.
17932 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17933 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17934
a06660f7
DJ
179352005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17936
17937 * inferiors.c (struct thread_info): Add gdb_id.
17938 (add_thread): Add gdb_id argument.
17939 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17940 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17941 calls to add_thread.
17942 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17943 * server.c (handle_query): Use thread_to_gdb_id.
17944 (handle_v_cont, main): Use gdb_id_to_thread_id.
17945 * server.h (add_thread): Update prototype.
17946 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17947 prototypes.
17948
5a1f5858
DJ
179492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17950
17951 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17952 left-padded registers.
17953 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17954 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17955
e122f1f5
SE
179562005-07-01 Steve Ellcey <sje@cup.hp.com>
17957
17958 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17959 * configure: Regenerate.
17960 * config.in: Regenerate.
17961 * server.h (NEED_DECLARATION_STRERROR):
17962 Replace with !HAVE_DECL_STRERROR.
17963
d592fa2f
DJ
179642005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17965
17966 * linux-low.c (linux_wait, linux_send_signal): Don't test
17967 an unsigned long variable for > 0 if it could be MAX_ULONG.
17968 * server.c (myresume): Likewise.
17969 * target.c (set_desired_inferior): Likewise.
17970
ccbd4912
MK
179712005-06-13 Mark Kettenis <kettenis@gnu.org>
17972
17973 * configure.ac: Simplify and improve check for socklen_t.
17974 * configure, config.in: Regenerate.
17975
f450004a
DJ
179762005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17977
17978 * acconfig.h: Remove.
17979 * configure.ac: Add a test for socklen_t. Use three-argument
17980 AC_DEFINE throughout.
17981 * config.in: Regenerated using autoheader 2.59.
17982 * configure: Regenerated.
17983
17984 * gdbreplay.c (socklen_t): Provide a default.
17985 (remote_open): Use socklen_t.
17986 * remote-utils.c (socklen_t): Provide a default.
17987 (remote_open): Use socklen_t.
17988 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17989 unsigned char.
17990
17991 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17992 char for buffers.
17993 * linux-low.c (linux_read_memory, linux_write_memory)
17994 (linux_read_auxv): Likewise.
17995 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17996 (check_mem_write): Likewise.
17997 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17998 Likewise.
17999 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18000 (registers_from_string, register_data): Likewise.
18001 * server.c (handle_query, main): Likewise.
18002 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18003 (decode_M_packet): Likewise.
18004 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18005 * target.h (struct target_ops): Update read_memory, write_memory,
18006 and read_auxv.
18007 (read_inferior_memory, write_inferior_memory): Update.
18008 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18009 to unsigned char *.
18010 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18011 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18012 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18013 linux-s390-low.c, linux-sh-low.c: Update for changes in
18014 read_inferior_memory and the_low_target->breakpoint.
18015
eee84df1
DJ
180162005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18017
18018 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18019 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18020 * configure.srv: Add powerpc64-*-linux*.
18021 * linux-ppc64-low.c: New file.
18022
45b134e5
OF
180232005-05-23 Orjan Friberg <orjanf@axis.com>
18024
18025 * linux-cris-low.c: New file with support for CRIS.
18026 * linux-crisv32-low.c: Ditto for CRISv32.
18027 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18028 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 18029 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
18030 reg-crisv32.o, and reg-crisv32.c to make rules.
18031 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18032 recognized targets.
18033
48d93c75
UW
180342005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18035
18036 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18037 of sizeof (PTRACE_XFER_TYPE).
18038 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18039
e013ee27
OF
180402005-05-12 Orjan Friberg <orjanf@axis.com>
18041
889bf7c5 18042 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
18043 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18044 pointers for hardware watchpoint support.
18045 * linux-low.h (struct linux_target_ops): Ditto.
18046 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18047 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18048 to linux_target_ops.
18049 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18050 reply packet.
18051 * server.c (main): Recognize 'Z' and 'z' packets.
18052
b0ded00b
UW
180532005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18054
18055 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18056 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18057 (the_low_target): Add new members.
18058
8643e2ad
DJ
180592005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18060
18061 * proc-service.c (ps_lgetregs): Search all_processes instead of
18062 all_threads.
18063
fc620387
DJ
180642005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18065
18066 * server.c (start_inferior): Change return type to int.
18067 (attach_inferior): Change sigptr to int *.
18068 (handle_v_cont, handle_v_requests): Change signal to int *.
18069 (main): Change signal to int.
18070
180712005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
18072
18073 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18074 * configure.srv: Add m32r*-*-linux*.
18075 * linux-m32r-low.c: New file.
18076
e0e76420
DJ
180772005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18078
18079 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18080
a1928bad
DJ
180812005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18082
18083 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18084 Take unsigned long arguments for PIDs.
18085 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18086 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18087 (wait_for_sigstop, linux_resume_one_process)
18088 (regsets_fetch_inferior_registers, linux_send_signal)
18089 (linux_read_auxv): Likewise. Update the types of variables holding
18090 PIDs. Update format string specifiers.
18091 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18092 * remote-utils.c (prepare_resume_reply): Likewise.
18093 * server.c (cont_thread, general_thread, step_thread)
18094 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18095 unsigned long.
18096 (handle_query): Update format specifiers.
18097 (handle_v_cont, main): Use strtoul for thread IDs.
18098 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18099 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18100 (general_thread, step_thread, thread_from_wait)
18101 (old_thread_from_wait): Update.
18102 * target.h (struct thread_resume): Use unsigned long for THREAD.
18103 (struct target_ops): Use unsigned long for arguments to attach and
18104 thread_alive.
18105
dcdb98d2
DJ
181062005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18107
18108 * acinclude.m4: Include bfd/bfd.m4 directly.
18109 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18110 <agriffis@toolchain.org>.
18111 * aclocal.m4, configure: Regenerated.
18112
bec39cab
AC
181132005-01-07 Andrew Cagney <cagney@gnu.org>
18114
18115 * configure.ac: Rename configure.in, require autoconf 2.59.
18116 * configure: Re-generate.
18117
434c4c77
DJ
181182004-12-08 Daniel Jacobowitz <dan@debian.org>
18119
18120 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18121 LIBS when finished.
18122 * aclocal.m4: Regenerated.
18123 * configure: Regenerated.
18124
db1d3e1b
AS
181252004-11-21 Andreas Schwab <schwab@suse.de>
18126
18127 * linux-m68k-low.c (m68k_num_gregs): Define.
18128 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18129 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18130 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18131 (m68k_breakpoint_at): New. Add to the_low_target.
18132
18133 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18134 srv_linux_thread_db to yes.
18135
43360365
JB
181362004-10-20 Joel Brobecker <brobecker@gnat.com>
18137
18138 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18139 (ARCH_SET_FS): Likewise.
18140 (ARCH_GET_FS): Likewise.
18141 (ARCH_GET_GS): Likewise.
18142
fd500816
DJ
181432004-10-16 Daniel Jacobowitz <dan@debian.org>
18144
18145 * linux-i386-low.c (ps_get_thread_area): New.
18146 * linux-x86-64-low.c (ps_get_thread_area): New.
18147 * linux-low.c: Include <sys/syscall.h>.
18148 (linux_kill_one_process): Don't kill the first thread here.
18149 (linux_kill): Kill the first thread here.
18150 (kill_lwp): New function.
18151 (send_sigstop, linux_send_signal): Use it.
18152 * proc-service.c: Clean up #ifdefs.
18153 (fpregset_info): Delete.
18154 (ps_lgetregs): Update and enable implementation.
18155 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18156 implementations.
18157 * remote-utils.c (struct sym_cache, symbol_cache): New.
18158 (input_interrupt): Print a clearer message.
18159 (async_io_enabled): New variable.
18160 (enable_async_io, disable_async_io): Use it. Update comments.
18161 (look_up_one_symbol): Use the symbol cache.
18162 * thread-db.c (thread_db_look_up_symbols): New function.
18163 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18164
f6de3c42
DJ
181652004-10-16 Daniel Jacobowitz <dan@debian.org>
18166
18167 * configure.in: Test for -rdynamic.
18168 * configure: Regenerated.
18169 * Makefile (INTERNAL_LDFLAGS): New.
18170 (gdbserver, gdbreplay): Use it.
18171
2c0fc042
AC
181722004-09-02 Andrew Cagney <cagney@gnu.org>
18173
18174 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18175
075b3282
DJ
181762004-03-23 Daniel Jacobowitz <drow@mvista.com>
18177
18178 * linux-low.c (linux_wait): Clear all_processes list also.
18179
fa6a77dc
DJ
181802004-03-12 Daniel Jacobowitz <drow@mvista.com>
18181
18182 * linux-low.c: Include <errno.h>. Remove extern declaration of
18183 errno.
18184
6d782a97
DJ
181852004-03-12 Daniel Jacobowitz <drow@mvista.com>
18186
18187 * gdbreplay.c, server.h, utils.c: Update copyright years.
18188
3a7fb99b
DJ
181892004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18190
18191 * server.c (main): Print child status or termination signal from
18192 variable 'signal', not 'sig'.
18193
c3e735a6
DJ
181942004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18195
18196 * linux-low.c (linux_read_memory): Change return type to
18197 int. Check for and return error from ptrace().
18198 * target.c (read_inferior_memory): Change return type to int. Pass
18199 back return status from the_target->read_memory().
18200 * target.h (struct target_ops): Adapt *read_memory() prototype.
18201 Update comment.
18202 (read_inferior_memory): Adapt prototype.
18203 * server.c (main): Return an error packet if
18204 read_inferior_memory() returns an error.
18205
a59d1c82
DJ
182062004-03-04 Daniel Jacobowitz <drow@mvista.com>
18207
18208 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18209 Unify with other clean targets.
18210
dc3f8883
DJ
182112004-02-29 Daniel Jacobowitz <drow@mvista.com>
18212
18213 * server.c (handle_v_cont): Call set_desired_inferior.
18214
89a208da
DJ
182152004-02-29 Daniel Jacobowitz <drow@mvista.com>
18216
18217 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18218
62ea82f5
DJ
182192004-02-29 Daniel Jacobowitz <drow@mvista.com>
18220
18221 * linux-low.c (linux_wait): Unblock async I/O.
18222 (linux_resume): Block and enable async I/O.
18223 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18224 * server.h (block_async_io, unblock_async_io): Add prototypes.
18225
6910d122
DJ
182262004-02-29 Daniel Jacobowitz <drow@mvista.com>
18227
18228 * remote-utils.c (remote_open): Print a status notice after
18229 opening a TCP port.
18230 * server.c (attach_inferior): Print a status notice after
18231 attaching.
18232
182332004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
18234
18235 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18236
c89dc5d4
DJ
182372004-02-26 Daniel Jacobowitz <drow@mvista.com>
18238
18239 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18240 error packet.
18241 * server.c, target.h: Update copyright years.
18242
4b8dad4a
RM
182432004-02-25 Roland McGrath <roland@redhat.com>
18244
18245 * target.h (struct target_ops): New member `read_auxv'.
18246 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18247 * linux-low.c (linux_read_auxv): New function.
18248 (linux_target_ops): Initialize `read_auxv' member to that.
18249
d7446758
JB
182502004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18251
18252 Committed by Jim Blandy <jimb@redhat.com>.
18253
18254 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 18255 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
18256 instead of GPR_SIZE to distiguish s390 and s390x targets.
18257
5544ad89
DJ
182582004-01-31 Daniel Jacobowitz <drow@mvista.com>
18259
18260 * linux-low.c: Update copyright year.
18261 (check_removed_breakpoint): Clear pending_is_breakpoint.
18262 (linux_set_resume_request, linux_queue_one_thread)
18263 (resume_status_pending_p): New functions.
18264 (linux_continue_one_thread): Use process->resume.
18265 (linux_resume): Only resume threads if there are no pending events.
18266 * linux-low.h (struct process_info): Add resume request
18267 pointer.
18268
2a68b70e
DJ
182692004-01-30 Daniel Jacobowitz <drow@mvista.com>
18270
18271 * regcache.c (new_register_cache): Clear the allocated register
18272 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18273
64386c31
DJ
182742003-10-13 Daniel Jacobowitz <drow@mvista.com>
18275
18276 * linux-low.c (linux_resume): Take a struct thread_resume *
18277 argument.
18278 (linux_wait): Update call.
18279 (resume_ptr): New static variable.
18280 (linux_continue_one_thread): Renamed from
18281 linux_continue_one_process. Use resume_ptr.
18282 (linux_resume): Use linux_continue_one_thread.
18283 * server.c (handle_v_cont, handle_v_requests): New functions.
18284 (myresume): New function.
18285 (main): Handle 'v' case.
18286 * target.h (struct thread_resume): New type.
18287 (struct target_ops): Change argument of "resume" to struct
18288 thread_resume *.
18289 (myresume): Delete macro.
18290
c938e9b0
L
182912003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18292
18293 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18294 (uninstall): Support DESTDIR.
18295
7f313d07
BC
18296Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18297
18298 * configure.srv: Add xscale*linux copy of arm*linux entry.
18299
3b2fc2ea
DJ
183002003-07-24 Daniel Jacobowitz <drow@mvista.com>
18301
18302 * linux-arm-low.c (arm_reinsert_addr): New function.
18303 (the_low_target): Add arm_reinsert_addr.
18304
1c0a559e
MK
183052003-07-08 Mark Kettenis <kettenis@gnu.org>
18306
18307 * mem-break.c: Remove whitespace at end of file.
18308
43d5792c
DJ
183092003-06-28 Daniel Jacobowitz <drow@mvista.com>
18310
18311 * configure.in: Check whether we need to prototype strerror.
18312 * server.h: Optionally prototype strerror.
18313 * gdbreplay.c (perror_with_name): Use strerror.
18314 * linux-low.c (linux_attach_lwp): Use strerror.
18315 * utils.c (perror_with_name): Use strerror.
18316 * config.in, configure: Regenerated.
18317
c8a86edf
DJ
183182003-06-28 Daniel Jacobowitz <drow@mvista.com>
18319
18320 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18321 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18322
73d37363
DJ
183232003-06-20 Daniel Jacobowitz <drow@mvista.com>
18324
18325 * Makefile.in (SFILES): Update.
18326 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18327 low-sun3.c: Remove files.
18328
6ad8ae5c
DJ
183292003-06-17 Daniel Jacobowitz <drow@mvista.com>
18330
18331 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18332 (linux_detach_one_process, linux_detach): New functions.
18333 (linux_target_ops): Add linux_detach.
18334 * server.c (main): Handle 'D' packet.
18335 * target.h (struct target_ops): Add "detach" member.
18336 (detach_inferior): Define.
18337
1581182a
MK
183382003-06-13 Mark Kettenis <kettenis@gnu.org>
18339
18340 From Kelley Cook <kelleycook@wideopenwest.com>:
18341 * configure.srv: Accept i[34567]86 variants.
18342
e5379b03
DJ
183432003-06-05 Daniel Jacobowitz <drow@mvista.com>
18344
18345 * linux-low.c (linux_wait_for_event): Correct comment typos.
18346 (linux_resume_one_process): Call check_removed_breakpoint.
18347 (linux_send_signal): New function.
18348 (linux_target_ops): Add linux_send_signal.
18349 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18350 of kill.
18351 * target.h (struct target_ops): Add send_signal.
18352
2ff29de4
JB
183532003-05-29 Jim Blandy <jimb@redhat.com>
18354
18355 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18356 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18357 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18358 away part of the register's value.
18359
254787d4
DJ
183602003-03-26 Daniel Jacobowitz <drow@mvista.com>
18361
18362 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18363 (linux_wait_for_event, linux_init_signals): Likewise.
18364
94e10508
DJ
183652003-03-17 Daniel Jacobowitz <drow@mvista.com>
18366
18367 * configure.in: Check for stdlib.h.
18368 * configure: Regenerated.
18369 * config.in: Regenerated.
18370
4c0711e0
DJ
183712003-01-04 Andreas Schwab <schwab@suse.de>
18372
18373 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18374
ef66e766
AC
183752003-01-02 Andrew Cagney <ac131313@redhat.com>
18376
18377 * Makefile.in: Remove obsolete code.
18378
a1358604
DJ
183792002-11-20 Daniel Jacobowitz <drow@mvista.com>
18380
18381 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18382 defined(PT_FPR0_HI).
18383
23ce3b1c
DJ
183842002-11-17 Stuart Hughes <seh@zee2.com>
18385
18386 * linux-arm-low.c (arm_num_regs): Increase.
18387 (arm_regmap): Include status register.
18388
183892002-11-17 Daniel Jacobowitz <drow@mvista.com>
18390
18391 * linux-low.c (register_addr): Remove incorrect -1 check.
18392
a9fa9f7d
DJ
183932002-08-29 Daniel Jacobowitz <drow@mvista.com>
18394
18395 * linux-low.c (linux_create_inferior): Call setpgid. Return
18396 the new PID.
18397 (unstopped_p, linux_signal_pid): Remove.
18398 (linux_target_ops): Remove linux_signal_pid.
18399 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18400 global instead of target method.
18401 * target.h (struct target_ops): Remove signal_pid. Update comment
18402 for create_inferior.
18403 * server.c (signal_pid): New variable.
18404 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 18405 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
18406 (attach_inferior): Set signal_pid.
18407
17574093
DJ
184082002-08-23 Daniel Jacobowitz <drow@mvista.com>
18409
18410 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18411
184122002-08-20 Jim Blandy <jimb@redhat.com>
18413
18414 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18415 default for this.
18416
184172002-08-01 Andrew Cagney <cagney@redhat.com>
18418
18419 * Makefile.in: Make chill references obsolete.
18420
184212002-07-24 Kevin Buettner <kevinb@redhat.com>
18422
18423 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18424 * configure: Regenerate.
18425 * config.in: Regenerate.
18426
184272002-07-09 David O'Brien <obrien@FreeBSD.org>
18428
18429 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18430 (perror_with_name, remote_close, remote_open, expect, play): Static.
18431
184322002-07-04 Michal Ludvig <mludvig@suse.cz>
18433
4b8dad4a 18434 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
18435 byte offsets instead of an array of indexes.
18436 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18437
184382002-06-13 Daniel Jacobowitz <drow@mvista.com>
18439
18440 * regcache.c: Add comment.
18441
184422002-06-11 Daniel Jacobowitz <drow@mvista.com>
18443
18444 * thread-db.c: New file.
18445 * proc-service.c: New file.
18446 * acinclude.m4: New file.
18447 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18448 proc-service.o, and thread-db.o.
18449 (linux-low.o): Add USE_THREAD_DB.
18450 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18451 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18452 * aclocal.m4: Regenerated.
18453 * config.in: Regenerated.
18454 * configure: Regenerated.
18455 * configure.in: Check for proc_service.h, sys/procfs.h,
18456 thread_db.h, and linux/elf.h headrs.
18457 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18458 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18459 Check for -lthread_db and thread support.
18460 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18461 PowerPC, and SuperH.
18462 * i387-fp.c: Constify arguments.
18463 * i387-fp.h: Likewise.
18464 * inferiors.c: (struct thread_info): Renamed from
18465 `struct inferior_info'. Remove PID member. Use generic inferior
18466 list header. All uses updated.
18467 (inferiors, signal_pid): Removed.
18468 (all_threads): New variable.
18469 (get_thread): Define.
18470 (add_inferior_to_list): New function.
18471 (for_each_inferior): New function.
18472 (change_inferior_id): New function.
18473 (add_inferior): Removed.
18474 (remove_inferior): New function.
18475 (add_thread): New function.
18476 (free_one_thread): New function.
18477 (remove_thread): New function.
18478 (clear_inferiors): Use for_each_inferior and free_one_thread.
18479 (find_inferior): New function.
18480 (find_inferior_id): New function.
18481 (inferior_target_data): Update argument type.
18482 (set_inferior_target_data): Likewise.
18483 (inferior_regcache_data): Likewise.
18484 (set_inferior_regcache_data): Likewise.
18485 * linux-low.c (linux_bp_reinsert): Remove.
18486 (all_processes, stopping_threads, using_thrads)
18487 (struct pending_signals, debug_threads, pid_of): New.
18488 (inferior_pid): Replace with macro.
18489 (struct inferior_linux_data): Remove.
18490 (get_stop_pc, add_process): New functions.
18491 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18492 Use add_process and add_thread.
18493 (linux_attach_lwp): New function, based on old linux_attach. Use
18494 add_process and add_thread. Set stop_expected for new threads.
18495 (linux_attach): New function.
18496 (linux_kill_one_process): New function.
18497 (linux_kill): Kill all LWPs.
18498 (linux_thread_alive): Use find_inferior_id.
18499 (check_removed_breakpoints, status_pending_p): New functions.
18500 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18501 Update. Use WNOHANG. Wait for cloned processes also. Update process
18502 struct for the found process.
18503 (linux_wait_for_event): New function.
18504 (linux_wait): Use it. Support LWPs.
18505 (send_sigstop, wait_for_sigstop, stop_all_processes)
18506 (linux_resume_one_process, linux_continue_one_process): New functions.
18507 (linux_resume): Support LWPs.
18508 (REGISTER_RAW_SIZE): Remove.
18509 (fetch_register): Use register_size instead. Call supply_register.
18510 (usr_store_inferior_registers): Likewise. Call collect_register.
18511 Fix recursive case.
18512 (regsets_fetch_inferior_registers): Improve error message.
18513 (regsets_store_inferior_registers): Add debugging.
18514 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18515 (unstopped_p, linux_signal_pid): New functions.
18516 (linux_target_ops): Add linux_signal_pid.
18517 (linux_init_signals): New function.
18518 (initialize_low): Call it. Initialize using_threads.
18519 * regcache.c (inferior_regcache_data): Add valid
18520 flag.
18521 (get_regcache): Fetch registers lazily. Add fetch argument
18522 and update all callers.
18523 (regcache_invalidate_one, regcache_invalidate): New
18524 functions.
18525 (new_register_cache): Renamed from create_register_cache.
18526 Return the new regcache.
18527 (free_register_cache): Change argument to a void *.
18528 (registers_to_string, registers_from_string): Call get_regcache
18529 with fetch flag set.
18530 (register_data): Make static. Pass fetch flag to get_regcache.
18531 (supply_register): Call get_regcache with fetch flag clear.
18532 (collect_register): Call get_regcache with fetch flag set.
18533 (collect_register_as_string): New function.
18534 * regcache.h: Update.
18535 * remote-utils.c (putpkt): Flush after debug output and use
18536 stderr.
18537 Handle input interrupts while waiting for an ACK.
18538 (input_interrupt): Use signal_pid method.
18539 (getpkt): Flush after debug output and use stderr.
18540 (outreg): Use collect_register_as_string.
18541 (new_thread_notify, dead_thread_notify): New functions.
18542 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18543 and general_thread.
18544 (look_up_one_symbol): Flush after debug output.
18545 * server.c (step_thread, server_waiting): New variables.
18546 (start_inferior): Don't use signal_pid. Update call to mywait.
18547 (attach_inferior): Update call to mywait.
18548 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18549 (main): Don't fetch/store registers explicitly. Use
18550 set_desired_inferior. Support proposed ``Hs'' packet. Update
18551 calls to mywait.
18552 * server.h: Update.
18553 (struct inferior_list, struct_inferior_list_entry): New.
18554 * target.c (set_desired_inferior): New.
18555 (write_inferior_memory): Constify.
18556 (mywait): New function.
18557 * target.h: Update.
18558 (struct target_ops): New signal_pid method.
18559 (mywait): Removed macro, added prototype.
18560
18561 * linux-low.h (regset_func): Removed.
18562 (regset_fill_func, regset_store_func): New.
18563 (enum regset_type): New.
18564 (struct regset_info): Add type field. Use new operation types.
18565 (struct linux_target_ops): stop_pc renamed to get_pc.
18566 Add decr_pc_after_break and breakpoint_at.
18567 (get_process, get_thread_proess, get_process_thread)
18568 (strut process_info, all_processes, linux_attach_lwp)
18569 (thread_db_init): New.
18570
18571 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18572 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18573 (the_low_target): Add new members.
18574 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18575 (i386_store_fpxregset): Constify.
18576 (target_regsets): Add new kind identifier.
18577 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18578 (i386_set_pc): Add debugging.
18579 (i386_breakpoint_at): New function.
18580 (the_low_target): Add new members.
18581 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18582 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18583 (mips_breakpoint_at): New.
18584 (the_low_target): Add new members.
18585 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18586 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18587 (the_low_target): Add new members.
18588 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18589 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18590 (the_low_target): Add new members.
18591 * linux-x86-64-low.c (target_regsets): Add new kind
18592 identifier.
18593
185942002-05-15 Daniel Jacobowitz <drow@mvista.com>
18595
18596 From Martin Pool <mbp@samba.org>:
18597 * server.c (gdbserver_usage): New function.
18598 (main): Call it.
18599
186002002-05-14 Daniel Jacobowitz <drow@mvista.com>
18601
18602 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18603 stop_at -> stop_pc.
18604
186052002-05-04 Andrew Cagney <ac131313@redhat.com>
18606
18607 * Makefile.in: Remove obsolete code.
18608
186092002-04-24 Michal Ludvig <mludvig@suse.cz>
18610
18611 * linux-low.c (regsets_fetch_inferior_registers),
18612 (regsets_store_inferior_registers): Removed cast to int from
18613 ptrace() calls.
18614 * regcache.h: Added declaration of struct inferior_info.
18615
186162002-04-20 Daniel Jacobowitz <drow@mvista.com>
18617
18618 * inferiors.c (struct inferior_info): Add regcache_data.
18619 (add_inferior): Call create_register_cache.
18620 (clear_inferiors): Call free_register_cache.
18621 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18622 * regcache.c (struct inferior_regcache_data): New.
18623 (registers): Remove.
18624 (get_regcache): New function.
18625 (create_register_cache, free_register_cache): New functions.
18626 (set_register_cache): Don't initialize the register cache here.
18627 (registers_to_string, registers_from_string, register_data): Call
18628 get_regcache.
18629 * regcache.h: Add prototypes.
18630 * server.h: Likewise.
18631
186322002-04-20 Daniel Jacobowitz <drow@mvista.com>
18633
18634 * mem-break.c: New file.
18635 * mem-break.h: New file.
18636 * Makefile.in: Add mem-break.o rule; update server.h
18637 dependencies.
18638 * inferiors.c (struct inferior_info): Add target_data
18639 member.
18640 (clear_inferiors): Free target_data member if set.
18641 (inferior_target_data, set_inferior_target_data): New functions.
18642 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18643 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18644 * linux-low.c (linux_bp_reinsert): New variable.
18645 (struct inferior_linux_data): New.
18646 (linux_create_inferior): Use set_inferior_target_data.
18647 (linux_attach): Likewise. Call add_inferior.
18648 (linux_wait_for_one_inferior): New function.
18649 (linux_wait): Call it.
18650 (linux_write_memory): Add const.
18651 (initialize_low): Call set_breakpoint_data.
18652 * linux-low.h (struct linux_target_ops): Add breakpoint
18653 handling members.
18654 * server.c (attach_inferior): Remove extra add_inferior
18655 call.
18656 * server.h: Include mem-break.h. Update inferior.c
18657 prototypes.
18658 * target.c (read_inferior_memory)
18659 (write_inferior_memory): New functions.
18660 * target.h (read_inferior_memory)
18661 (write_inferior_memory): Change macros to prototypes.
18662 (struct target_ops): Update comments. Add const to write_memory
18663 definition.
18664
186652002-04-11 Daniel Jacobowitz <drow@mvista.com>
18666
18667 * linux-low.c (usr_store_inferior_registers): Support
18668 registers which are allowed to fail to store.
18669 * linux-low.h (linux_target_ops): Likewise.
18670 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18671 (ppc_cannot_store_register): FPSCR may not be storable.
18672
186732002-04-09 Daniel Jacobowitz <drow@mvista.com>
18674
18675 * server.h: Include <string.h> if HAVE_STRING_H.
18676 * ChangeLog: Correct paths in last ChangeLog entry.
18677
186782002-04-09 Daniel Jacobowitz <drow@mvista.com>
18679
18680 * linux-low.h: Remove obsolete prototypes.
18681 (struct linux_target_ops): New.
18682 (extern the_low_target): New.
18683 * linux-low.c (num_regs, regmap): Remove declarations.
18684 (register_addr): Use the_low_target explicitly.
18685 (fetch_register): Likewise.
18686 (usr_fetch_inferior_registers): Likewise.
18687 (usr_store_inferior_registers): Likewise.
18688 * linux-arm-low.c (num_regs): Remove.
18689 (arm_num_regs): Define.
18690 (arm_regmap): Renamed from regmap, made static.
18691 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18692 made static.
18693 (arm_cannot_store_register): Renamed from cannot_store_register,
18694 made static.
18695 (the_low_target): New.
18696 * linux-i386-low.c (num_regs): Remove.
18697 (i386_num_regs): Define.
18698 (i386_regmap): Renamed from regmap, made static.
18699 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18700 made static.
18701 (i386_cannot_store_register): Renamed from cannot_store_register,
18702 made static.
18703 (the_low_target): New.
18704 * linux-ia64-low.c (num_regs): Remove.
18705 (ia64_num_regs): Define.
18706 (ia64_regmap): Renamed from regmap, made static.
18707 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18708 made static.
18709 (ia64_cannot_store_register): Renamed from cannot_store_register,
18710 made static.
18711 (the_low_target): New.
18712 * linux-m68k-low.c (num_regs): Remove.
18713 (m68k_num_regs): Define.
18714 (m68k_regmap): Renamed from regmap, made static.
18715 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18716 made static.
18717 (m68k_cannot_store_register): Renamed from cannot_store_register,
18718 made static.
18719 (the_low_target): New.
18720 * linux-mips-low.c (num_regs): Remove.
18721 (mips_num_regs): Define.
18722 (mips_regmap): Renamed from regmap, made static.
18723 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18724 made static.
18725 (mips_cannot_store_register): Renamed from cannot_store_register,
18726 made static.
18727 (the_low_target): New.
18728 * linux-ppc-low.c (num_regs): Remove.
18729 (ppc_num_regs): Define.
18730 (ppc_regmap): Renamed from regmap, made static.
18731 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18732 made static.
18733 (ppc_cannot_store_register): Renamed from cannot_store_register,
18734 made static.
18735 (the_low_target): New.
18736 * linux-s390-low.c (num_regs): Remove.
18737 (s390_num_regs): Define.
18738 (s390_regmap): Renamed from regmap, made static.
18739 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18740 made static.
18741 (s390_cannot_store_register): Renamed from cannot_store_register,
18742 made static.
18743 (the_low_target): New.
18744 * linux-sh-low.c (num_regs): Remove.
18745 (sh_num_regs): Define.
18746 (sh_regmap): Renamed from regmap, made static.
18747 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18748 made static.
18749 (sh_cannot_store_register): Renamed from cannot_store_register,
18750 made static.
18751 (the_low_target): New.
18752 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18753 (the_low_target): New.
18754
187552002-04-09 Daniel Jacobowitz <drow@mvista.com>
18756
18757 * Makefile.in: Add stamp-h target.
18758 * configure.in: Create stamp-h.
18759 * configure: Regenerated.
18760
187612002-04-09 Daniel Jacobowitz <drow@mvista.com>
18762
18763 * inferiors.c: New file.
18764 * target.c: New file.
18765 * target.h: New file.
18766 * Makefile.in: Add target.o and inferiors.o. Update
18767 dependencies.
18768 * linux-low.c (inferior_pid): New static variable,
18769 moved from server.c.
18770 (linux_create_inferior): Renamed from create_inferior.
18771 Call add_inferior. Return 0 on success instead of a PID.
18772 (linux_attach): Renamed from myattach.
18773 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18774 (linux_thread_alive): Renamed from mythread_alive.
18775 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18776 child dies.
18777 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18778 (regsets_store_inferior_registers): Correct error message.
18779 Add missing ``return 0''.
18780 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18781 (linux_store_registers): Renamed from store_inferior_registers.
18782 (linux_read_memory): Renamed from read_inferior_memory.
18783 (linux_write_memory): Renamed from write_inferior_memory.
18784 (linux_target_ops): New structure.
18785 (initialize_low): Call set_target_ops ().
18786 * remote-utils.c (unhexify): New function.
18787 (hexify): New function.
18788 (input_interrupt): Send signals to ``signal_pid''.
18789 * server.c (inferior_pid): Remove.
18790 (start_inferior): Update create_inferior call.
18791 (attach_inferior): Call add_inferior.
18792 (handle_query): New function.
18793 (main): Call handle_query for `q' packets.
18794 * server.h: Include "target.h". Remove obsolete prototypes.
18795 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18796
187972002-04-09 Daniel Jacobowitz <drow@mvista.com>
18798
18799 * Makefile.in: Add WARN_CFLAGS. Update configury
18800 dependencies.
18801 * configure.in: Check for <string.h>
18802 * configure: Regenerate.
18803 * config.in: Regenerate.
18804 * gdbreplay.c: Include needed system headers.
18805 (remote_open): Remove strchr prototype.
18806 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18807 * regcache.c (supply_register): Change buf argument to const void *.
18808 (supply_register_by_name): Likewise.
18809 (collect_register): Change buf argument to void *.
18810 (collect_register_by_name): Likewise.
18811 * regcache.h: Add missing prototypes.
18812 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18813 * server.c (handle_query): New function.
18814 (attached): New static variable, moved out of main.
18815 (main): Quiet longjmp clobber warnings.
18816 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18817 * utils.c (error): Remove NORETURN.
18818 (fatal): Likewise.