gdbserver: turn target op 'get_tls_address' into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
6e3fd7e9
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's get_tls_address op into a method of
4 process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op. Also add
8 'supports_get_tls_address'.
9 * target.cc (process_target::get_tls_address): Define.
10 (process_target::supports_get_tls_address): Define.
11
12 Update the derived classes and callers below.
13
14 * server.cc (handle_query): Update.
15 * linux-low.cc (linux_target_ops): Update.
16 (linux_process_target::supports_get_tls_address): Define.
17 (linux_process_target::get_tls_address): Define.
18 * linux-low.h (class linux_process_target): Update.
19 * lynx-low.cc (lynx_target_ops): Update.
20 * nto-low.cc (nto_target_ops): Update.
21 * win32-low.cc (win32_target_ops): Update.
22
5203ae1e
TBA
232020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
24
25 Turn process_stratum_target's read_offsets 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_read_offsets'.
31 * target.cc (process_target::read_offsets): Define.
32 (process_target::supports_read_offsets): Define.
33
34 Update the derived classes and callers below.
35
36 * server.cc (handle_query): Update.
37 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
38 (linux_target_ops): Update.
39 (linux_process_target::supports_read_offsets): Define.
40 (linux_read_offsets): Turn into ...
41 (linux_process_target::read_offsets): ... this.
42 * linux-low.h (class linux_process_target): Update.
43 * lynx-low.cc (lynx_target_ops): Update.
44 * nto-low.cc (nto_target_ops): Update.
45 * win32-low.cc (win32_target_ops): Update.
46
6eeb5c55
TBA
472020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
48
49 Turn process_stratum_target's stopped_by_watchpoint and
50 stopped_data_address ops into methods of process_target.
51
52 * target.h (struct process_stratum_target): Remove the target ops.
53 (class process_target): Add the target ops.
54 * target.cc (process_target::stopped_by_watchpoint): Define.
55 (process_target::stopped_data_address): Define.
56
57 Update the derived classes and callers below.
58
59 * remote-utils.cc (prepare_resume_reply): Update.
60 * linux-low.cc (linux_target_ops): Update.
61 (linux_stopped_by_watchpoint): Turn into ...
62 (linux_process_target::stopped_by_watchpoint): ... this.
63 (linux_stopped_data_address): Turn into ...
64 (linux_process_target::stopped_data_address): ... this.
65 * linux-low.h (class linux_process_target): Update.
66 * lynx-low.cc (lynx_target_ops): Update.
67 * nto-low.cc (nto_target_ops): Update.
68 (nto_stopped_by_watchpoint): Turn into ...
69 (nto_process_target::stopped_by_watchpoint): ... this.
70 (nto_stopped_data_address): Turn into ...
71 (nto_process_target::stopped_data_address): ... this.
72 * nto-low.h (class nto_process_target): Update.
73 * win32-low.cc (win32_target_ops): Update.
74 (win32_stopped_by_watchpoint): Turn into ...
75 (win32_process_target::stopped_by_watchpoint): ... this.
76 (win32_stopped_data_address): Turn into ...
77 (win32_process_target::stopped_data_address): ... this.
78 * win32-low.h (class win32_process_target): Update.
79
22aa6223
TBA
802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
81
82 Turn process_stratum_target's supports_hardware_single_step op into
83 a method of process_target.
84
85 * target.h (struct process_stratum_target): Remove the target op.
86 (class process_target): Add the target op.
87 (target_supports_hardware_single_step): Update the macro.
88 (target_can_do_hardware_single_step): Remove declaration.
89 * target.cc (process_target::supports_hardware_single_step): Define.
90 (target_can_do_hardware_single_step): Remove.
91
92 Update the derived classes and callers below.
93
94 * linux-low.h (class linux_process_target): Update.
95 * linux-low.cc (linux_target_ops): Update.
96 (linux_supports_hardware_single_step): Turn into ...
97 (linux_process_target::supports_hardware_single_step): ... this.
98 * lynx-low.h (class lynx_process_target): Update.
99 * lynx-low.cc (lynx_target_ops): Update.
100 (lynx_process_target::supports_hardware_single_step): Define.
101 * nto-low.h (class nto_process_target): Update.
102 * nto-low.cc (nto_target_ops): Update.
103 (nto_process_target::supports_hardware_single_step): Define.
104 * win32-low.h (class win32_process_target): Update.
105 * win32-low.cc (win32_target_ops): Update.
106 (win32_process_target::supports_hardware_single_step): Define.
107
93fe88b2
TBA
1082020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
109
110 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
111 ops into methods of process_target.
112
113 * target.h (struct process_stratum_target): Remove the target ops.
114 (class process_target): Add the target ops.
115 (target_stopped_by_hw_breakpoint): Update the macro.
116 (target_supports_stopped_by_hw_breakpoint): Update the macro.
117 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
118 (process_target::supports_stopped_by_hw_breakpoint): Define.
119
120 Update the derived classes and callers below.
121
122 * linux-low.cc (linux_target_ops): Update.
123 (linux_stopped_by_hw_breakpoint): Turn into ...
124 (linux_process_target::stopped_by_hw_breakpoint): ... this.
125 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
126 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
127 * linux-low.h (class linux_process_target): Update.
128 * lynx-low.cc (lynx_target_ops): Update.
129 * nto-low.cc (nto_target_ops): Update.
130 * win32-low.cc (win32_target_ops): Update.
131
84320c4e
TBA
1322020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
133
134 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
135 ops into methods of process_target.
136
137 * target.h (struct process_stratum_target): Remove the target ops.
138 (class process_target): Add the target ops.
139 (target_stopped_by_sw_breakpoint): Update the macro.
140 (target_supports_stopped_by_sw_breakpoint): Update the macro.
141 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
142 (process_target::supports_stopped_by_sw_breakpoint): Define.
143
144 Update the derived classes and callers below.
145
146 * linux-low.cc (linux_target_ops): Update.
147 (linux_stopped_by_sw_breakpoint): Turn into ...
148 (linux_process_target::stopped_by_sw_breakpoint): ... this.
149 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
150 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
151 * linux-low.h (class linux_process_target): Update.
152 * lynx-low.cc (lynx_target_ops): Update.
153 * nto-low.cc (nto_target_ops): Update.
154 * win32-low.cc (win32_target_ops): Update.
155
7e0bde70
TBA
1562020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
157
158 Turn process_stratum_target's insert_point and remove_point ops
159 into methods of process_target.
160
161 * target.h (struct process_stratum_target): Remove the target ops.
162 (class process_target): Add the target ops.
163 * target.cc (process_target::insert_point): Define.
164 (process_target::remove_point): Define.
165
166 Update the derived classes and callers below.
167
168 * mem-break.cc (set_raw_breakpoint_at): Update.
169 (delete_raw_breakpoint): Update.
170 (uninsert_raw_breakpoint): Update.
171 (reinsert_raw_breakpoint): Update.
172 * linux-low.cc (linux_target_ops): Update.
173 (linux_insert_point): Turn into ...
174 (linux_process_target::insert_point): ... this.
175 (linux_remove_point): Turn into ...
176 (linux_process_target::remove_point): ... this.
177 * linux-low.h (class linux_process_target): Update.
178 * lynx-low.cc (lynx_target_ops): Update.
179 * nto-low.cc (nto_target_ops): Update.
180 (nto_insert_point): Turn into ...
181 (nto_process_target::insert_point): ... this.
182 (nto_remove_point): Turn into ...
183 (nto_process_target::remove_point): ... this.
184 * nto-low.h (class nto_process_target): Update.
185 * win32-low.cc (win32_target_ops): Update.
186 (win32_insert_point): Turn into ...
187 (win32_process_target::insert_point): ... this.
188 (win32_remove_point): Turn into ...
189 (win32_process_target::remove_point): ... this.
190 * win32-low.h (class win32_process_target): Update.
191
a2b2297a
TBA
1922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
193
194 Turn process_stratum_target's supports_z_point_type op into a
195 method of process_target.
196
197 * target.h (struct process_stratum_target): Remove the target op.
198 (class process_target): Add the target op.
199 * target.cc (process_target::supports_z_point_type): Define.
200
201 Update the derived classes and callers below.
202
203 * mem-break.cc (z_type_supported): Update.
204 * linux-low.cc (linux_target_ops): Update.
205 (linux_supports_z_point_type): Turn into ...
206 (linux_process_target::supports_z_point_type): ... this.
207 * linux-low.h (class linux_process_target): Update.
208 * lynx-low.cc (lynx_target_ops): Update.
209 * nto-low.cc (nto_target_ops): Update.
210 (nto_supports_z_point_type): Turn into ...
211 (nto_process_target::supports_z_point_type): ... this.
212 * nto-low.h (class nto_process_target): Update.
213 * win32-low.cc (win32_target_ops): Update.
214 (win32_supports_z_point_type): Turn into ...
215 (win32_process_target::supports_z_point_type): ... this.
216 * win32-low.h (class win32_process_target): Update.
217
eac215cc
TBA
2182020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
219
220 Turn process_stratum_target's read_auxv op into a method of
221 process_target.
222
223 * target.h (class process_stratum_target): Remove the target op.
224 (struct process_target): Add the target op. Also add
225 'supports_read_auxv'.
226 * target.cc (process_target::read_auxv): Define.
227 (process_target::supports_read_auxv): Define.
228
229 Update the derived classes and callers below.
230
231 * server.cc (handle_qxfer_auxv): Update.
232 (handle_query): Update.
233 * linux-low.cc (linux_target_ops): Update.
234 (linux_process_target::supports_read_auxv): Define.
235 (linux_read_auxv): Turn into ...
236 (linux_process_target::read_auxv): ... this.
237 * linux-low.h (class linux_process_target): Update.
238 * lynx-low.cc (lynx_target_ops): Update.
239 * nto-low.cc (nto_target_ops): Update.
240 (nto_process_target::supports_read_auxv): Define.
241 (nto_read_auxv): Turn into ...
242 (nto_process_target::read_auxv): ... this.
243 * nto-low.h (class nto_process_target): Update.
244 * win32-low.cc (win32_target_ops): Update.
245
eb497a2a
TBA
2462020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
247
248 Turn process_stratum_target's request_interrupt op into a method of
249 process_target.
250
251 * target.h (struct process_stratum_target): Remove the target op.
252 (class process_target): Add the target op.
253
254 Update the derived classes and callers below.
255
256 * remote-utils.cc (putpkt_binary_1): Update.
257 (input_interrupt): Update.
258 (getpkt): Update.
259 * server.cc (handle_v_requests): Update.
260 * linux-low.cc (linux_target_ops): Update.
261 (linux_request_interrupt): Turn into ...
262 (linux_process_target::request_interrupt): ... this.
263 * linux-low.h (class linux_process_target): Update.
264 * lynx-low.cc (lynx_target_ops): Update.
265 (lynx_request_interrupt): Turn into ...
266 (lynx_process_target::request_interrupt): ... this.
267 * lynx-low.h (class lynx_process_target): Update.
268 * nto-low.cc (nto_target_ops): Update.
269 (nto_request_interrupt): Turn into ...
270 (nto_process_target::request_interrupt): ... this.
271 * nto-low.h (class nto_process_target): Update.
272 * win32-low.cc (win32_target_ops): Update.
273 (win32_request_interrupt): Turn into ...
274 (win32_process_target::request_interrupt): ... this.
275 * win32-low.h (class win32_process_target): Update.
276
2a31c7aa
TBA
2772020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
278
279 Turn process_stratum_target's look_up_symbols op into a method of
280 process_target.
281
282 * target.h (struct process_stratum_target): Remove the target op.
283 (class process_target): Add the target op.
284 * target.cc (process_target::look_up_symbols): Define.
285
286 Update the derived classes and callers below.
287
288 * server.cc (handle_query): Update.
289 * linux-low.cc (linux_target_ops): Update.
290 (linux_look_up_symbols): Turn into ...
291 (linux_process_target::look_up_symbols): ... this.
292 * linux-low.h (class linux_process_target): Update.
293 * lynx-low.cc (lynx_target_ops): Update.
294 * nto-low.cc (nto_target_ops): Update.
295 * win32-low.cc (win32_target_ops): Update.
296
e2558df3
TBA
2972020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
298
299 Turn process_stratum_target's read_memory and write_memory
300 ops into methods of process_target.
301
302 * target.h (struct process_stratum_target): Remove the target ops.
303 (class process_target): Add the target ops.
304
305 Update the derived classes and callers below.
306
307 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
308 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
309 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
310 (arm_get_syscall_trapinfo): Update.
311 * linux-cris-low.cc (cris_breakpoint_at): Update.
312 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
313 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
314 * linux-mips-low.cc (mips_breakpoint_at): Update.
315 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
316 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
317 * linux-sh-low.cc (sh_breakpoint_at): Update.
318 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
319 (sparc_store_gregset_from_stack): Update.
320 (sparc_breakpoint_at): Update.
321 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
322 * linux-tile-low.cc (tile_breakpoint_at): Update.
323 * linux-x86-low.cc (x86_breakpoint_at): Update.
324 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
325 * mem-brea.cc (insert_memory_breakpoint): Update.
326 (validate_inserted_breakpoint): Update.
327 * target.cc (read_inferior_memory): Update.
328 (target_write_memory): Update.
329 * linux-low.cc (linux_target_ops): Update.
330 (linux_read_memory): Make a wrapper around the read_memory target
331 op call.
332 (linux_process_target::read_memory): Rename from linux_read_memory.
333 (linux_write_memory): Turn into ...
334 (linux_process_target::write_memory): ... this.
335 * linux-low.h (class linux_process_target): Update.
336 * lynx-low.cc (lynx_target_ops): Update.
337 (lynx_read_memory): Turn into ...
338 (lynx_process_target::read_memory): ... this.
339 (lynx_write_memory): Turn into ...
340 (lynx_process_target::write_memory): ... this.
341 * lynx-low.h (class lynx_process_target): Update.
342 * nto-low.cc (nto_target_ops): Update.
343 (nto_read_memory): Turn into ...
344 (nto_process_target::read_memory): ... this.
345 (nto_write_memory): Turn into ...
346 (nto_process_target::write_memory): ... this.
347 * nto-low.h (class nto_process_target): Update.
348 * win32-low.cc (win32_target_ops): Update.
349 (win32_read_inferior_memory): Turn into ...
350 (win32_process_target::read_memory): ... this.
351 (win32_write_inferior_memory): Turn into ...
352 (win32_process_target::write_memory): ... this.
353 * win32-low.h (class win32_process_target): Update.
354
79b44087
TBA
3552020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
356
357 Turn process_stratum_target's prepare_to_access_memory and
358 done_accessing_memory ops into methods of process_target.
359
360 * target.h (struct process_stratum_target): Remove the target ops.
361 (class process_target): Add the target ops.
362 * target.cc (process_target::prepare_to_access_memory): Define.
363 (process_target::done_accessing_memory): Define.
364 (prepare_to_access_memory): Update.
365 (done_accessing_memory): Update.
366
367 Update the derived classes and callers below.
368
369 * linux-low.cc (linux_target_ops): Update.
370 (linux_prepare_to_access_memory): Turn into ...
371 (linux_process_target::prepare_to_access_memory): ... this.
372 (linux_done_accessing_memory): Turn into ...
373 (linux_process_target::done_accessing_memory): ... this.
374 * linux-low.h (class linux_process_target): Update.
375 * lynx-low.cc (lynx_target_ops): Update.
376 * nto-low.cc (nto_target_ops): Update.
377 * win32-low.cc (win32_target_ops): Update.
378
a5a4d4cd
TBA
3792020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
380
381 Turn process_stratum_target's fetch_registers and store_registers
382 ops into methods of process_target.
383
384 * target.h (struct process_stratum_target): Remove the target ops.
385 (class process_target): Add the target ops.
386 (fetch_inferior_registers): Update the macro.
387 (store_inferior_registers): Update the macro.
388
389 Update the derived classes and callers below.
390
391 * linux-low.cc (linux_target_ops): Update.
392 (linux_fetch_registers): Turn into ...
393 (linux_process_target::fetch_registers): ... this.
394 (linux_store_registers): Turn into ...
395 (linux_process_target::store_registers): ... this.
396 * linux-low.h (class linux_process_target): Update.
397 * lynx-low.cc (lynx_target_ops): Update.
398 (lynx_fetch_registers): Turn into ...
399 (lynx_process_target::fetch_registers): ... this.
400 (lynx_store_registers): Turn into ...
401 (lynx_process_target::store_registers): ... this.
402 * lynx-low.h (class lynx_process_target): Update.
403 * nto-low.cc (nto_target_ops): Update.
404 (nto_fetch_registers): Turn into ...
405 (nto_process_target::fetch_registers): ... this.
406 (nto_store_registers): Turn into ...
407 (nto_process_target::store_registers): ... this.
408 * nto-low.h (class nto_process_target): Update.
409 * win32-low.cc (win32_target_ops): Update.
410 (win32_fetch_inferior_registers): Turn into ...
411 (win32_process_target::fetch_registers): ... this.
412 (win32_store_inferior_registers): Turn into ...
413 (win32_process_target::store_registers): ... this.
414 * win32-low.h (class win32_process_target): Update.
415
6532e7e3
TBA
4162020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
417
418 Turn process_stratum_target's wait op into a method of
419 process_target.
420
421 * target.h (struct process_stratum_target): Remove the target op.
422 (class process_target): Add the target op.
423
424 Update the derived classes and callers below.
425
426 * target.cc (target_wait): Update.
427 * linux-low.cc (linux_target_ops): Update.
428 (linux_wait): Turn into ...
429 (linux_process_target::wait): ... this.
430 * linux-low.h (class linux_process_target): Update.
431 * lynx-low.cc (lynx_target_ops): Update.
432 (lynx_wait): Turn into ...
433 (lynx_process_target::wait): ... this.
434 * lynx-low.h (class lynx_process_target): Update.
435 * nto-low.cc (nto_target_ops): Update.
436 (nto_wait): Turn into ...
437 (nto_process_target::wait): ... this.
438 * nto-low.h (class nto_process_target): Update.
439 * win32-low.cc (win32_target_ops): Update.
440 (win32_wait): Turn into ...
441 (win32_process_target::wait): ... this.
442 (do_initial_child_stuff): Update.
443 * win32-low.h (class win32_process_target): Update.
444
0e4d7e35
TBA
4452020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
446
447 Turn process_stratum_target's resume op into a method of
448 process_target.
449
450 * target.h (struct process_stratum_target): Remove the target op.
451 (class process_target): Add the target op.
452
453 Update the derived classes and callers below.
454
455 * server.cc (resume): Update.
456 * target.cc (target_stop_and_wait): Update.
457 (target_continue_no_signal): Update.
458 (target_continue): Update.
459 * linux-low.cc (linux_target_ops): Update.
460 (linux_resume): Turn into ...
461 (linux_process_target::resume): ... this.
462 * linux-low.h (class linux_process_target): Update.
463 * lynx-low.cc (lynx_target_ops): Update.
464 (lynx_resume): Turn into ...
465 (lynx_process_target::resume): ... this.
466 * lynx-low.h (class lynx_process_target): Update.
467 * nto-low.cc (nto_target_ops): Update.
468 (nto_resume): Turn into ...
469 (nto_process_target::resume): ... this.
470 * nto-low.h (class nto_process_target): Update.
471 * win32-low.cc (win32_target_ops): Update.
472 (win32_resume): Turn into ...
473 (win32_process_target::resume): ... this.
474 (win32_process_target::detach): Update.
475 (do_initial_child_stuff): Update.
476 * win32-low.h (class win32_process_target): Update.
477
13d3d99b
TBA
4782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
479
480 Turn process_stratum_target's thread_alive op into a method of
481 process_target.
482
483 * target.h (struct process_stratum_target): Remove the target op.
484 (class process_target): Add the target op.
485 (mythread_alive): Update the macro.
486
487 Update the derived classes and callers below.
488
489 * linux-low.cc (linux_target_ops): Update.
490 (linux_thread_alive): Turn into ...
491 (linux_process_target::thread_alive): ... this.
492 (wait_for_sigstop): Update.
493 * linux-low.h (class linux_process_target): Update.
494 * lynx-low.cc (lynx_target_ops): Update.
495 (lynx_thread_alive): Turn into ...
496 (lynx_process_target::thread_alive): ... this.
497 * lynx-low.h (class lynx_process_target): Update.
498 * nto-low.cc (nto_target_ops): Update.
499 (nto_thread_alive): Turn into ...
500 (nto_process_target::thread_alive): ... this.
501 * nto-low.h (class nto_process_target): Update.
502 * win32-low.cc (win32_target_ops): Update.
503 (win32_thread_alive): Turn into ...
504 (win32_process_target::thread_alive): ... this.
505 * win32-low.h (class win32_process_target): Update.
506
95a49a39
TBA
5072020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
508
509 Turn process_stratum_target's join op into a method of
510 process_target.
511
512 * target.h (struct process_stratum_target): Remove the target op.
513 (class process_target): Add the target op.
514 (join_inferior): Update the macro.
515
516 Update the derived classes and callers below.
517
518 * linux-low.cc (linux_target_ops): Update.
519 (linux_join): Turn into ...
520 (linux_process_target::join): ... this.
521 * linux-low.h (class linux_process_target): Update.
522 * lynx-low.cc (lynx_target_ops): Update.
523 (lynx_join): Turn into ...
524 (lynx_process_target::join): ... this.
525 * lynx-low.h (class lynx_process_target): Update.
526 * nto-low.cc (nto_target_ops): Update.
527 (nto_process_target::join): Define.
528 * nto-low.h (class nto_process_target): Update.
529 * win32-low.cc (win32_target_ops): Update.
530 (win32_join): Turn into ...
531 (win32_process_target::join): ... this.
532 * win32-low.h (class win32_process_target): Update.
533
8adb37b9
TBA
5342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
535
536 Turn process_stratum_target's mourn op into a method of
537 process_target.
538
539 * target.h (struct process_stratum_target): Remove the target op.
540 (class process_target): Add the target op.
541
542 Update the derived classes and callers below.
543
544 * target.cc (target_mourn_inferior): Update.
545 * linux-low.cc (linux_target_ops): Update.
546 (linux_mourn): Turn into ...
547 (linux_process_target::mourn): ... this.
548 (handle_extended_wait): Update.
549 (linux_process_target::kill): Update.
550 (linux_process_target::detach): Update.
551 * linux-low.h (class linux_process_target): Update.
552 * lynx-low.cc (lynx_target_ops): Update.
553 (lynx_mourn): Turn into ...
554 (lynx_process_target::mourn): ... this.
555 * lynx-low.h (class lynx_process_target): Update.
556 * nto-low.cc (nto_target_ops): Update.
557 (nto_mourn): Turn into ...
558 (nto_process_target::mourn): ... this.
559 * nto-low.h (class nto_process_target): Update.
560 * win32-low.cc (win32_target_ops): Update.
561 (win32_mourn): Turn into ...
562 (win32_process_target::mourn): ... this.
563 * win32-low.h (class win32_process_target): Update.
564
9061c9cf
TBA
5652020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
566
567 Turn process_stratum_target's detach op into a method of
568 process_target.
569
570 * target.h (struct process_stratum_target): Remove the target op.
571 (class process_target): Add the target op.
572 (detach_inferior): Update the macro.
573
574 Update the derived classes and callers below.
575
576 * linux-low.cc (linux_target_ops): Update.
577 (linux_detach): Turn into ...
578 (linux_process_target::detach): ... this.
579 * linux-low.h (class linux_process_target): Update.
580 * lynx-low.cc (lynx_target_ops): Update.
581 (lynx_detach): Turn into ...
582 (lynx_process_target::detach): ... this.
583 * lynx-low.h (class lynx_process_target): Update.
584 * nto-low.cc (nto_target_ops): Update.
585 (nto_detach): Turn into ...
586 (nto_process_target::detach): ... this.
587 * nto-low.h (class nto_process_target): Update.
588 * win32-low.cc (win32_target_ops): Update.
589 (win32_detach): Turn into ...
590 (win32_process_target::detach): ... this.
591 * win32-low.h (class win32_process_target): Update.
592
c6885a57
TBA
5932020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
594
595 Turn process_stratum_target's kill op into a method of
596 process_target.
597
598 * target.h (struct process_stratum_target): Remove the target op.
599 (class process_target): Add the target op.
600
601 Update the derived classes and callers below.
602
603 * target.cc (kill_inferior): Update.
604 * linux-low.cc (linux_target_ops): Update.
605 (linux_kill): Turn into ...
606 (linux_process_target::kill): ... this.
607 * linux-low.h (class linux_process_target): Update.
608 * lynx-low.cc (lynx_target_ops): Update.
609 (lynx_kill): Turn into ...
610 (lynx_process_target::kill): ... this.
611 * lynx-low.h (class lynx_process_target): Update.
612 * nto-low.cc (nto_target_ops): Update.
613 (nto_kill): Turn into ...
614 (nto_process_target::kill): ... this.
615 * nto-low.h (class nto_process_target): Update.
616 * win32-low.cc (win32_target_ops): Update.
617 (win32_kill): Turn into ...
618 (win32_process_target::kill): ... this.
619 * win32-low.h (class win32_process_target): Update.
620
ef03dad8
TBA
6212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
622
623 Turn process_stratum_target's attach op into a method of
624 process_target.
625
626 * target.h (struct process_stratum_target): Remove the target op.
627 (class process_target): Add the target op.
628 (myattach): Update the macro.
629
630 Update the derived classes and callers below.
631
632 * linux-low.cc (linux_target_ops): Update.
633 (linux_attach): Turn into ...
634 (linux_process_target::attach): ... this.
635 * linux-low.h (class linux_process_target): Update.
636 * lynx-low.cc (lynx_target_ops): Update.
637 (lynx_attach): Turn into ...
638 (lynx_process_target::attach): ... this.
639 * lynx-low.h (class lynx_process_target): Update.
640 * nto-low.cc (nto_target_ops): Update.
641 (nto_attach): Turn into ...
642 (nto_process_target::attach): ... this.
643 * nto-low.h (class nto_process_target): Update.
644 * win32-low.cc (win32_target_ops): Update.
645 (win32_attach): Turn into ...
646 (win32_process_target::attach): ... this.
647 * win32-low.h (class win32_process_target): Update.
648
6dee9afb
TBA
6492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
650
651 Turn process_stratum_target's post_create_inferior op into a method
652 of process_target.
653
654 * target.h (struct process_stratum_target): Remove the target op.
655 (class process_target): Add the target op.
656 (target_post_create_inferior): Update the macro.
657 * target.cc (process_target::post_create_inferior): Define.
658
659 Update the derived classes and callers below.
660
661 * linux-low.cc (linux_target_ops): Update.
662 (linux_post_create_inferior): Turn into ...
663 (linux_process_target::post_create_inferior): ... this.
664 * linux-low.h (class linux_process_target): Update.
665 * lynx-low.cc (lynx_target_ops): Update.
666 * nto-low.cc (nto_target_ops): Update.
667 * win32-low.cc (win32_target_ops): Update.
668
15295543
TBA
6692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
670
671 Turn process_stratum_target's create_inferior op into a method of
672 process_target.
673
674 * target.h (struct process_stratum_target): Remove the target op.
675 (class process_target): Add the target op.
676 (create_inferior): Rename the macro to ...
677 (target_create_inferior): ... this.
678
679 Update the derived classes and callers below.
680
681 * server.cc (handle_v_run): Update.
682 (captured_main): Update.
683 (process_serial_event): Update.
684 * linux-low.cc (linux_target_ops): Update.
685 (linux_create_inferior): Turn into ...
686 (linux_process_target::create_inferior): ... this.
687 * linux-low.h (class linux_process_target): Update.
688 * lynx-low.cc (lynx_target_ops): Update.
689 (lynx_create_inferior): Turn into ...
690 (lynx_process_target::create_inferior): ... this.
691 * lynx-low.h (class lynx_process_target): Update.
692 * nto-low.cc (nto_target_ops): Update.
693 (nto_create_inferior): Turn into ...
694 (nto_process_target::create_inferior): ... this.
695 * nto-low.h (class nto_process_target): Update.
696 * win32-low.cc (win32_target_ops): Update.
697 (win32_create_inferior): Turn into ...
698 (win32_process_target::create_inferior): ... this.
699 * win32-low.h (class win32_process_target): Update.
700
5ef9273d
TBA
7012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
702
703 * target.h (class process_target): New class definition.
704 (struct process_stratum_target) <pt>: New field with type
705 'process_target*'.
706 * linux-low.h (class linux_process_target): Define as a derived
707 class of 'process_target'.
708 * linux-low.cc (linux_target_ops): Add a linux_process_target*
709 as the 'pt' field.
710 * lynx-low.h (class lynx_process_target): Define as a derived
711 class of 'process_target'.
712 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
713 as the 'pt' field.
714 * nto-low.h (class nto_process_target): Define as a derived
715 class of 'process_target'.
716 * nto-low.cc (nto_target_ops): Add an nto_process_target*
717 as the 'pt' field.
718 * win32-low.h (class win32_process_target): Define as a derived
719 class of 'process_target'.
720 * win32-low.cc (win32_target_ops): Add a win32_process_target*
721 as the 'pt' field.
722
9f1528a1
AB
7232020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
724
725 * configure: Regenerate.
726
bf84f706
MR
7272020-02-19 Maciej W. Rozycki <macro@wdc.com>
728 Andrew Burgess <andrew.burgess@embecosm.com>
729
730 * linux-riscv-low.cc: New file.
731 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
732 and nat/riscv-linux-tdesc.c.
733 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
734 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
735 Define.
736
1a627e7e
TT
7372020-02-14 Tom Tromey <tom@tromey.com>
738
739 * acinclude.m4: Don't include acx_configure_dir.m4.
740 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
741 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
742 (all, install-only, uninstall, clean-info, clean)
743 (maintainer-clean): Don't recurse.
744 (subdir_do, all-lib): Remove.
745 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
746 (GNULIB_H): Remove.
747 (generated_files): Update.
748 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
749 * configure: Rebuild.
750 * configure.ac: Don't configure gnulib or libiberty.
751 (GNULIB): Update.
752
a9b34532
EZ
7532020-02-14 Eli Zaretskii <eliz@gnu.org>
754
755 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
756 preparing the command line for CreateProcess.
757 (win32_create_inferior): Reflect the program name in debugging
758 output that shows the process and its command line.
759
feacfcac
SM
7602020-02-13 Simon Marchi <simon.marchi@efficios.com>
761
762 * Makefile.in: Rename source files from .c to .cc.
763 * %.c: Rename to %.cc.
764 * configure.ac: Rename server.c to server.cc.
765 * configure: Re-generate.
766
06b3c5bd
SM
7672020-02-13 Simon Marchi <simon.marchi@efficios.com>
768
769 * Makefile.in: Rename gdbsupport source files from .c to .cc.
770
052793ad
HD
7712020-02-12 Hannes Domani <ssbssa@yahoo.de>
772
773 * win32-low.c (win32_create_inferior): Set signal_pid.
774
f20e3e82
MR
7752020-02-12 Maciej W. Rozycki <macro@wdc.com>
776 Pedro Alves <palves@redhat.com>
777
778 Skip building gdbserver in a cross-configuration.
779 * configure.srv: Set $gdbserver_host depending on whether $target
780 is $host. Use $gdbserver_host instead of $host.
781
8ddd8e0e
SM
7822020-02-11 Simon Marchi <simon.marchi@efficios.com>
783
784 * configure: Re-generate.
785
898e7f60
SM
7862020-02-11 Simon Marchi <simon.marchi@efficios.com>
787
788 * configure: Re-generate.
789
58df732b
SM
7902020-02-11 Simon Marchi <simon.marchi@efficios.com>
791
792 * acinclude.m4: Update warning.m4 path.
793
7928d571
HD
7942020-02-09 Hannes Domani <ssbssa@yahoo.de>
795
796 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
797 (handle_exception): Set siginfo_er.
798 (win32_xfer_siginfo): New function.
799
919adfe8
TT
8002020-02-07 Tom Tromey <tom@tromey.com>
801 Pedro Alves <palves@redhat.com>
802
803 * README: Update build documentation.
804 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
805 host, not target.
806 * configure.ac: Update paths.
807 * configure: Rebuild.
808 * acinclude.m4: Update paths.
809 * Makefile.in: Update include paths.
810 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
811 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
812 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
813 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
814 (%-generated.c): Update paths.
815 * Move entire directory from ../gdb/gdbserver.
816
287c844a
MR
8172020-01-29 Maciej W. Rozycki <macro@wdc.com>
818
819 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
820
548a204f
PFC
8212020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
822
823 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
824 assignment instead of srv_linux_obj.
825
a2236a08
HD
8262020-01-28 Hannes Domani <ssbssa@yahoo.de>
827
828 * server.c (handle_qxfer_libraries): Write segment-address with
829 paddress.
830
bdaed379
HD
8312020-01-24 Hannes Domani <ssbssa@yahoo.de>
832
833 * Makefile.in (install-strip): New target.
834 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
835 * aclocal.m4: Regenerate.
836 * configure: Regenerate.
837 * configure.ac: Add AM_PROG_INSTALL_STRIP.
838
42cd72aa
MR
8392020-01-24 Maciej W. Rozycki <macro@wdc.com>
840
841 * Makefile.in (SFILES): Adjust paths to point to real files.
842 (OBS): Move waitstatus.o to target/waitstatus.o.
843 (TAGS): Transform paths appropriately.
844 (%.o): Rename to...
845 (nat/%.o): ... this pattern rule.
846 (%.o): Rename to...
847 (target/%.o): ... this pattern rule.
848 * configure.srv: Adjust paths throughout to include nat/ prefix
849 with the revant files.
850 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
851 * configure: Regenerate.
852
42ba50ec
MR
8532020-01-24 Maciej W. Rozycki <macro@wdc.com>
854
855 * Makefile.in (TAGS): Remove config files from the recipe.
856
05ea2a05
TT
8572020-01-14 Tom Tromey <tom@tromey.com>
858
859 * configure: Rebuild.
860 * configure.ac: Remove any checks that were added to common.m4.
861 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
862 lib-link.m4.
863
01027315
TT
8642020-01-14 Tom Tromey <tom@tromey.com>
865
866 * server.h: Include config.h.
867 * gdbreplay.c: Include config.h.
868 * configure: Rebuild.
869 * configure.ac: Don't source common.host.
870 * acinclude.m4: Update path.
871 * Makefile.in (INCSUPPORT): New variable.
872 (INCLUDE_CFLAGS): Add INCSUPPORT.
873 (SFILES): Update paths.
874 (version-generated.c): Update path to create-version.sh.
875 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
876
b2ceabe8
TT
8772020-01-14 Tom Tromey <tom@tromey.com>
878
879 * configure.ac (LIBS): Use WIN32APILIBS.
880 (USE_WIN32API): Don't define.
881 * configure: Rebuild.
882
25c51f71
TT
8832020-01-14 Tom Tromey <tom@tromey.com>
884
885 * configure: Rebuild.
886
c0bd321d
SM
8872020-01-13 Simon Marchi <simon.marchi@efficios.com>
888
889 * Makefile.in (%-generated.c): Remove rule for files from
890 regformats/i386.
891
bb564c58
SM
8922020-01-13 Simon Marchi <simon.marchi@efficios.com>
893
894 * configure: Re-generate.
895
6e37c371
SM
8962020-01-13 Simon Marchi <simon.marchi@efficios.com>
897
898 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
899 Define to static.
900 * tracepoint.c (stop_tracing, flush_trace_buffer,
901 about_to_request_buffer_space, get_trace_state_variable_value,
902 set_trace_state_variable_value, gdb_collect): Add declaration.
903
df4a0200
SM
9042020-01-13 Simon Marchi <simon.marchi@efficios.com>
905
906 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
907 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
908 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
909 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
910 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
911 static.
912
89e94ec9
SM
9132020-01-13 Simon Marchi <simon.marchi@efficios.com>
914
915 * inferiors.c: Include gdbsupport/common-inferior.h.
916
2552728a
SM
9172020-01-13 Simon Marchi <simon.marchi@efficios.com>
918
919 * hostio-errno.c: Include hostio.h.
920
4025fa09
SM
9212020-01-13 Simon Marchi <simon.marchi@efficios.com>
922
923 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
924 prerequisite.
925
c0b0a142
SM
9262020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
927
928 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
929 * linux-arm-tdesc.h: Include arch/arm.h.
930
bb1183e2
SM
9312020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
932
933 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
934
f5df0b5f
SM
9352020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
936
937 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
938 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
939
5b6d1e4f
PA
9402020-01-10 Pedro Alves <palves@redhat.com>
941
942 * fork-child.c (post_fork_inferior): Pass target down to
943 startup_inferior.
944 * inferiors.c (switch_to_thread): Add process_stratum_target
945 parameter.
946 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
947 * nto-low.c (nto_target_ops): Now a process_stratum_target.
948 * linux-low.c (linux_target_ops): Now a process_stratum_target.
949 * remote-utils.c (prepare_resume_reply): Pass the target to
950 switch_to_thread.
951 * target.c (the_target): Now a process_stratum_target.
952 (done_accessing_memory): Pass the target to switch_to_thread.
953 (set_target_ops): Ajust to use process_stratum_target.
954 * target.h (struct target_ops): Rename to ...
955 (struct process_stratum_target): ... this.
956 (the_target, set_target_ops): Adjust.
957 (prepare_to_access_memory): Adjust comment.
958 * win32-low.c (child_xfer_memory): Adjust to use
959 process_stratum_target.
960 (win32_target_ops): Now a process_stratum_target.
961
559e7e50
EZ
9622020-01-06 Eli Zaretskii <eliz@gnu.org>
963 Pedro Alves <palves@redhat.com>
964
965 * win32-low.c (get_child_debug_event): Extract the fatal exception
966 from the exit status and convert to the equivalent Posix signal
967 number.
968 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
969 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
970
48189bec
HD
9712020-01-01 Hannes Domani <ssbssa@yahoo.de>
972
973 * Makefile.in: Use INSTALL_PROGRAM_ENV.
974
5dd8bf88
JB
9752020-01-01 Joel Brobecker <brobecker@adacore.com>
976
977 * server.c (gdbserver_version): Change copyright year to 2020.
978 * gdbreplay.c (gdbreplay_version): Likewise.
979
0ad6b8ee
CB
9802019-12-19 Christian Biesinger <cbiesinger@google.com>
981
982 * configure: Regenerate.
983 * configure.ac: Quote variable arguments of test.
984
1ee7b812
BE
9852019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
986
987 * Makefile.in: Fix build with GNU Make 3.81
988
d9fa87f4
TT
9892019-12-16 Tom Tromey <tromey@adacore.com>
990
991 * server.c (get_exec_file): Constify result.
992
ab7d13f0
CB
9932019-12-10 Christian Biesinger <cbiesinger@google.com>
994
995 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
996 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
997 * config.in: Regenerate.
998 * configure: Regenerate.
999 * configure.ac: Don't check for strerror.
1000 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1001 Call safe_strerror instead of strerror.
1002 * server.h (strerror): Remove this now-unnecessary declaration.
1003 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1004 strerror.
1005 (gdb_agent_helper_thread): Likewise.
1006 * utils.c (perror_with_name): Likewise.
1007
4da8c3a8
TT
10082019-11-26 Tom Tromey <tom@tromey.com>
1009
1010 * configure, config.in: Rebuild.
1011
21987b9c
TT
10122019-11-26 Tom Tromey <tom@tromey.com>
1013
1014 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1015 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1016 gdb_sigmask.
1017 * configure, config.in: Rebuild.
1018
5e030278
TT
10192019-11-26 Tom Tromey <tom@tromey.com>
1020
1021 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1022 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1023 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1024 * acinclude.m4: Include ax_pthread.m4.
1025 * config.in, configure: Rebuild.
1026
6d91ce9a
CB
10272019-11-26 Christian Biesinger <cbiesinger@google.com>
1028
1029 * debug.c (debug_set_output): Call safe_strerror instead of
1030 strerror.
1031 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1032 (linux_kill_one_lwp): Likewise.
1033 (linux_detach_one_lwp): Likewise.
1034 (linux_wait_for_event_filtered): Likewise.
1035 (store_register): Likewise.
1036 * lynx-low.c (lynx_attach): Likewise.
1037 * mem-break.c (insert_memory_breakpoint): Likewise.
1038 (remove_memory_breakpoint): Likewise.
1039 (delete_fast_tracepoint_jump): Likewise.
1040 (set_fast_tracepoint_jump): Likewise.
1041 (uninsert_fast_tracepoint_jumps_at): Likewise.
1042 (reinsert_fast_tracepoint_jumps_at): Likewise.
1043 * nto-low.c (nto_xfer_memory): Likewise.
1044 (nto_resume): Likewise.
1045
6cdd651f
LM
10462019-11-20 Luis Machado <luis.machado@linaro.org>
1047
1048 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1049 instead of register count.
1050 * tdesc.c (tdesc_contains_feature): New function.
1051 * tdesc.h (tdesc_contains_feature): New prototype.
1052
cd850b40
CB
10532019-11-15 Christian Biesinger <cbiesinger@google.com>
1054
1055 * Makefile.in: Add safe-strerror.c.
1056 * configure: Regenerate.
1057 * configure.ac: Don't source common.host.
1058
5abebf3c
CB
10592019-11-15 Christian Biesinger <cbiesinger@google.com>
1060
1061 * config.in: Regenerate.
1062 * configure: Regenerate.
1063
e06f3d6e
AB
10642019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1065
1066 * ax.c (ax_printf): Handle size_t_arg.
1067
ca3a04f6
CB
10682019-11-06 Christian Biesinger <cbiesinger@google.com>
1069
1070 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1071 * mi/mi-main.c (output_cores): Likewise.
1072 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1073 (linux_xfer_osdata_modules): Likewise.
1074 * remote.c (register_remote_support_xml): Likewise.
1075 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1076 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1077
e48f6033
CB
10782019-11-01 Christian Biesinger <cbiesinger@google.com>
1079
1080 * configure: Regenerate.
1081 * configure.ac: Remove check for strerror_r.
1082
e7e97a2e
CB
10832019-10-31 Christian Biesinger <cbiesinger@google.com>
1084
1085 * config.in: Regenerate.
1086 * configure: Regenerate.
1087 * configure.ac: Also check for strerror_r.
1088
75cafaa6
CB
10892019-10-31 Christian Biesinger <cbiesinger@google.com>
1090
1091 * ax.h (debug_agent): Remove duplicate declaration.
1092
30baf67b
TV
10932019-10-26 Tom de Vries <tdevries@suse.de>
1094
1095 * linux-aarch64-low.c: Fix typos in comments.
1096 * linux-arm-low.c: Same.
1097 * linux-low.c: Same.
1098 * linux-ppc-low.c: Same.
1099 * proc-service.c: Same.
1100 * regcache.h: Same.
1101 * server.c: Same.
1102 * tracepoint.c: Same.
1103 * win32-low.c: Same.
1104
52c64cf7
TT
11052019-10-25 Tom Tromey <tromey@adacore.com>
1106
1107 * utils.c (xstrdup): Remove.
1108
c12d372d
TT
11092019-10-23 Tom Tromey <tom@tromey.com>
1110
1111 * configure, config.in: Rebuild.
1112
4d0b984b
TT
11132019-10-23 Tom Tromey <tom@tromey.com>
1114
1115 * configure: Rebuild.
1116 * acinclude.m4: Use m4_include, not sinclude.
1117
c5adaa19
TT
11182019-10-17 Tom Tromey <tromey@adacore.com>
1119
1120 * configure: Rebuild.
1121 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1122 in AC_CONFIG_FILES invocation.
1123 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1124 invocation.
1125
fec4e896
CB
11262019-10-16 Christian Biesinger <cbiesinger@google.com>
1127
1128 * server.c: Include xml-builtin.h.
1129 (get_xml_features): Don't declare xml_builtins here.
1130
00975ff6
AB
11312019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1132
1133 * Makefile.in: Remove references to vec-ipa.o.
1134
0dc32745
AB
11352019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1136
1137 * Makefile.in: Remove references to vec.c.
1138
3e6ec53a
CB
11392019-10-02 Christian Biesinger <cbiesinger@google.com>
1140
1141 * server.c (server_waiting): Change to bool.
1142 (extended_protocol): Likewise.
1143 (response_needed): Likewise.
1144 (exit_requested): Likewise.
1145 (run_once): Likewise.
1146 (report_no_resumed): Likewise.
1147 (non_stop): Likewise.
1148 (disable_packet_vCont): Likewise.
1149 (disable_packet_Tthread): Likewise.
1150 (disable_packet_qC): Likewise.
1151 (disable_packet_qfThreadInfo): Likewise.
1152 (handle_general_set): Update.
1153 (handle_detach): Update.
1154 (handle_monitor_command): Update.
1155 (handle_query): Update.
1156 (captured_main): Update.
1157 (process_serial_event): Update.
1158 * server.h (server_waiting): Change to bool.
1159 (disable_packet_vCont): Likewise.
1160 (disable_packet_Tthread): Likewise.
1161 (disable_packet_qC): Likewise.
1162 (disable_packet_qfThreadInfo): Likewise.
1163 (run_once): Likewise.
1164 (non_stop): Likewise.
1165 * target.c (target_stop_and_wait): Update.
1166
80fd2826
TT
11672019-10-02 Tom Tromey <tromey@adacore.com>
1168
1169 * Makefile.in (SFILES): Add common-inferior.c.
1170 (OBS): Add common-inferior.o.
1171 * server.c (startup_with_shell): Don't define.
1172
46f29a9a
AB
11732019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1174
1175 * linux-low.c (linux_low_read_btrace): Update for change to
1176 std::vector.
1177
f9d949fb
CB
11782019-09-20 Christian Biesinger <cbiesinger@google.com>
1179
1180 * debug.c (debug_threads): Remove comment in favor of the header.
1181 * debug.h (using_threads): Add declaration.
1182 (debug_threads): Add comment.
1183 * linux-aarch64-low.c: Include debug.h and remove declaration of
1184 debug_threads.
1185 * nto-low.c: Likewise.
1186 * remote-utils.c: Likewise.
1187 * thread-db.c: Likewise.
1188
abf516c6
UW
11892019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1190
1191 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1192 and powerpc-cell64l-ipa.o.
1193 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1194 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1195 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1196 (spu*-*-*): Remove.
1197
1198 * spu-low.c: Remove file.
1199
1200 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1201 (parse_spufs_run): Remove.
1202 (ppc_get_pc): Remove Cell/B.E. support.
1203 (ppc_set_pc): Likewise.
1204 (ppc_breakpoint_at): Likewise.
1205 (ppc_arch_setup): Likewise.
1206 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1207 tdesc_powerpc_cell32l.
1208 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1209 or init_registers_powerpc_cell32l.
1210 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1211 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1212 or init_registers_powerpc_cell32l.
1213 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1214 (init_registers_powerpc_cell32l): Remove prototype.
1215 (init_registers_powerpc_cell64l): Likewise.
1216
1217 * target.h (struct target_ops): Remove qxfer_spu member.
1218 * server.c (handle_qxfer_spu): Remove.
1219 (qxfer_packets): Remove entry for "spu".
1220 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1221 * linux-low.c (SPUFS_MAGIC): Remove.
1222 (spu_enumerate_spu_ids): Remove.
1223 (linux_qxfer_spu): Remove.
1224 (linux_target_ops): Remove qxfer_spu member.
1225 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1226 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1227 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1228
2d41fa11
SDJ
12292019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1230
1231 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1232 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1233 * config.in: Regenerate.
1234 * configure: Regenerate.
1235
d59b55f0
TT
12362019-08-15 Tom Tromey <tromey@adacore.com>
1237
1238 * target.c (target_write_memory): Use gdb::byte_vector.
1239
4196ab2a
TT
12402019-08-15 Tom Tromey <tromey@adacore.com>
1241
1242 * tracepoint.c (write_inferior_data_pointer)
1243 (write_inferior_integer, write_inferior_int8)
1244 (write_inferior_uinteger, m_tracepoint_action_download)
1245 (r_tracepoint_action_download, x_tracepoint_action_download)
1246 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1247 (download_agent_expr, download_tracepoint_1)
1248 (download_trace_state_variables, upload_fast_traceframes): Update.
1249 * server.c (gdb_write_memory): Update.
1250 * remote-utils.c (relocate_instruction): Update.
1251 * proc-service.c (ps_pdwrite): Update.
1252 * mem-break.c (remove_memory_breakpoint)
1253 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1254 (uninsert_fast_tracepoint_jumps_at)
1255 (reinsert_fast_tracepoint_jumps_at): Update.
1256 * linux-x86-low.c (append_insns)
1257 (i386_install_fast_tracepoint_jump_pad)
1258 (amd64_write_goto_address, i386_write_goto_address): Update.
1259 * linux-s390-low.c (append_insns, s390_write_goto_address):
1260 Update.
1261 * linux-ppc-low.c (ppc_relocate_instruction)
1262 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1263 (ppc_write_goto_address): Update.
1264 * linux-aarch64-low.c (append_insns): Update.
1265 * target.h (struct target_ops): Update.
1266 (write_inferior_memory): Don't declare.
1267 * target.c (target_write_memory): Rename from
1268 write_inferior_memory. Remove old target_write_memory.
1269
c6778d00
TT
12702019-08-15 Tom Tromey <tromey@adacore.com>
1271
1272 * target.c (write_inferior_memory): Use std::vector.
1273
404f2902
FCE
12742019-08-06 Frank Ch. Eigler <fche@redhat.com>
1275
1276 PR build/24886
1277 * configure.ac: Drop enable-libmcheck support.
1278 * configure, config.in: Rebuild.
1279 * acinclude.m4: Don't include it.
1280
4c5aa8e0
AH
12812019-07-19 Alan Hayward <alan.hayward@arm.com>
1282
1283 * configure.srv: Remove Arm xml files.
1284
7cc17433
AH
12852019-07-19 Alan Hayward <alan.hayward@arm.com>
1286
1287 * configure.srv: Add new files. Remove xml generated files.
1288 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1289 registers.
1290 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1291 * linux-aarch32-tdesc.c: New file.
1292 * linux-aarch32-tdesc.h: New file.
1293 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1294 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1295 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1296 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1297 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1298 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1299 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1300 (arm_read_description): Call arm_linux_read_description.
1301 (initialize_low_arch): Don't init registers.
1302 * linux-arm-tdesc.c: New file.
1303 * linux-arm-tdesc.h: New file.
1304
166a82be
AH
13052019-07-10 Alan Hayward <alan.hayward@arm.com>
1306
1307 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1308 Move counter inside for.
1309 (arm_read_description): Check ptrace earlier.
1310 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1311
268a13a5
TT
13122019-07-09 Tom Tromey <tom@tromey.com>
1313
1314 * configure: Rebuild.
1315 * configure.ac: Change common to gdbsupport.
1316 * acinclude.m4: Change common to gdbsupport.
1317 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1318 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1319 common to gdbsupport.
1320 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1321 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1322 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1323 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1324 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1325 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1326 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1327 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1328 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1329 common to gdbsupport.
1330
350fab54
AH
13312019-07-04 Alan Hayward <alan.hayward@arm.com>
1332
1333 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1334 defines.
1335 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1336
2b40fda7
AH
13372019-07-04 Alan Hayward <alan.hayward@arm.com>
1338
1339 * configure.srv: Remove legacy xml.
1340 * linux-aarch64-low.c (initialize_low_arch): Remove
1341 initialize_low_tdesc call.
1342 * linux-aarch64-tdesc-selftest.c: Remove file.
1343 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1344 * linux-x86-low.c (initialize_low_arch): Remove
1345 initialize_low_tdesc call.
1346 * linux-x86-tdesc-selftest.c: Remove file.
1347 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1348
7d10623d
TV
13492019-06-20 Tom de Vries <tdevries@suse.de>
1350
1351 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1352 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1353
8d6a48df
TV
13542019-06-19 Tom de Vries <tdevries@suse.de>
1355
1356 * debug.h (debug_write): Change return type to ssize_t.
1357 * debug.c (debug_write): Same.
1358
73cc7272
TT
13592019-06-14 Tom Tromey <tom@tromey.com>
1360
1361 * configure.ac: Use new path to gnulib.
1362 * configure: Rebuild.
1363 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1364 to gnulib.
1365
08f10e02
TT
13662019-06-11 Tom Tromey <tom@tromey.com>
1367
1368 * Makefile.in (SFILES): Add alloc.c.
1369 (OBS): Add alloc.o.
1370 (IPA_OBJS): Add alloc-ipa.o.
1371 (alloc-ipa.o): New target.
1372 (%.o: ../%.c): New pattern rule.
1373
422186a9
TT
13742019-06-10 Tom Tromey <tromey@adacore.com>
1375
1376 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1377 end warning with a newline.
1378 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1379 newline.
1380 * thread-db.c (attach_thread): Don't end warning with a newline.
1381 (thread_db_notice_clone): Likewise.
1382 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1383 newline.
1384 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1385 end warning with a newline.
1386
b02f78f9
PA
13872019-06-04 Pedro Alves <palves@redhat.com>
1388
1389 * server.c (captured_main): Use make_unique_xstrdup.
1390
88ed7edb
TT
13912019-06-02 Tom Tromey <tom@tromey.com>
1392
1393 * gdbreplay.c (fromhex): Remove.
1394 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1395
33a6bc35
TT
13962019-05-29 Tom Tromey <tromey@adacore.com>
1397
1398 * configure: Rebuild.
1399
e90a813d
KB
14002019-05-06 Kevin Buettner <kevinb@redhat.com>
1401
1402 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1403 sign extension code on 32-bit builds.
1404
353ea2d1
EZ
14052019-05-03 Eli Zaretskii <eliz@gnu.org>
1406
1407 * remote-utils.c:
1408 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1409
b494cdff
TT
14102019-04-19 Tom Tromey <tom@tromey.com>
1411
1412 * server.c (struct vstop_notif): Derive from notif_event.
1413 <base>: Remove.
1414 (queue_stop_reply): Update.
1415 (remove_all_on_match_ptid): Change type. Rewrite.
1416 (discard_queued_stop_replies): Rewrite.
1417 (in_queued_stop_replies_ptid): Change type.
1418 (in_queued_stop_replies): Rewrite.
1419 (notif_stop): Update.
1420 (queue_stop_reply_callback): Update.
1421 (captured_main): Don't call initialize_notif.
1422 (push_stop_notification): Update.
1423 * notif.c (notif_write_event, handle_notif_ack)
1424 (notif_event_enque, notif_push): Update.
1425 (notif_event_xfree, initialize_notif): Remove.
1426 * notif.h (struct notif_event): Include <list>, not
1427 "common/queue.h".
1428 (struct notif_server) <queue>: Now a std::list.
1429 (notif_event_p): Remove typedef.
1430 (initialize_notif): Don't declare.
1431 (struct notif_event): Add virtual destructor.
1432
a7e559cc
AH
14332019-04-17 Alan Hayward <alan.hayward@arm.com>
1434
1435 * ax.c (ax_vdebug): Call debug_printf.
1436 * debug.c (debug_write): New function.
1437 * debug.h (debug_write): New declaration.
1438 * linux-low.c (sigchld_handler): Call debug_write.
1439
aeb2e706
AH
14402019-04-17 Alan Hayward <alan.hayward@arm.com>
1441
1442 * debug.c (debug_set_output): New function.
1443 (debug_vprintf): Send output to debug_file.
1444 (debug_flush): Likewise.
1445 * debug.h (debug_set_output): New declaration.
1446 * server.c (handle_monitor_command): Add debug-file option.
1447 (captured_main): Likewise.
1448
c1bc0935
AH
14492019-04-17 Alan Hayward <alan.hayward@arm.com>
1450
1451 * debug.c (remote_debug): Add definition.
1452 * debug.h (remote_debug): Add declaration.
1453 * hostio.c (remote_debug): Remove declaration.
1454 * remote-utils.c (struct ui_file): Likewise.
1455 (remote_debug): Likewise.
1456 * remote-utils.h (remote_debug): Likewise,
1457 * server.c (remote_debug): Remove definition.
1458
3f52fdbc
KB
14592019-04-10 Kevin Buettner <kevinb@redhat.com>
1460
1461 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1462 when using a 64-bit gdbserver.
1463
b0319eaa
TT
14642019-04-09 Tom Tromey <tromey@adacore.com>
1465
1466 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1467
eedc3f4f
TT
14682019-04-08 Tom Tromey <tom@tromey.com>
1469
1470 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1471 throw.
1472 (linux_resume_one_lwp): Likewise.
1473
230d2906
TT
14742019-04-08 Tom Tromey <tom@tromey.com>
1475
1476 * gdbreplay.c: Update.
1477 * linux-low.c: Update.
1478 * server.c: Update.
1479
a70b8144
TT
14802019-04-08 Tom Tromey <tom@tromey.com>
1481
1482 * server.c: Use C++ exception handling.
1483 * linux-low.c: Use C++ exception handling.
1484 * gdbreplay.c: Use C++ exception handling.
1485
3d6e9d23
TT
14862019-04-08 Tom Tromey <tom@tromey.com>
1487
1488 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1489 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1490 (captured_main, main): Update.
1491 * gdbreplay.c (main): Update.
1492
0570503d
PFC
14932019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1494
1495 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1496 value in argument pointer, return 1 if the entry is found and 0
1497 otherwise. Move comment.
1498 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1499 * linux-low.h (linux_get_auxv): Declare.
1500 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1501
227a9e65
TT
15022019-04-05 Tom Tromey <tromey@adacore.com>
1503
1504 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1505 variables.
1506
69f4c9cc
AH
15072019-03-28 Alan Hayward <alan.hayward@arm.com>
1508
1509 * linux-low.c (AT_HWCAP2): Add define if not already included.
1510
974c89e0
AH
15112019-03-26 Alan Hayward <alan.hayward@arm.com>
1512
1513 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1514 (aarch64_arch_setup): Call linux_get_hwcap.
1515 * linux-arm-low.c (arm_get_hwcap): Remove function.
1516 (arm_read_description): Call linux_get_hwcap.
1517 * linux-low.c (linux_get_auxv): New function.
1518 (linux_get_hwcap): Likewise.
1519 (linux_get_hwcap2): Likewise.
1520 * linux-low.h (linux_get_hwcap): New declaration.
1521 (linux_get_hwcap2): Likewise.
1522 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1523 (ppc_arch_setup): Call linux_get_hwcap.
1524 * linux-s390-low.c (s390_get_hwcap): Remove function.
1525 (s390_arch_setup): Call linux_get_hwcap.
1526
1ef53e6b
AH
15272019-03-22 Alan Hayward <alan.hayward@arm.com>
1528 Jiong Wang <jiong.wang@arm.com>
1529
1530 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1531 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1532 to fail.
1533 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1534
ee4fbcfa
AH
15352019-03-22 Alan Hayward <alan.hayward@arm.com>
1536 Jiong Wang <jiong.wang@arm.com>
1537
1538 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1539 (aarch64_get_hwcap): New function.
1540 (aarch64_arch_setup): Read APIA hwcap.
1541
6dc0ebde
AH
15422019-03-22 Alan Hayward <alan.hayward@arm.com>
1543 Jiong Wang <jiong.wang@arm.com>
1544
1545 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1546 (initialize_low_tracepoint): Likewise.
1547 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1548 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1549 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1550 (aarch64_linux_read_description): Likewise.
1551 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1552
1163a4b7
JB
15532019-03-12 John Baldwin <jhb@FreeBSD.org>
1554
1555 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1556 i386_create_target_description for 'segments' parameter.
1557 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1558 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1559 * win32-i386-low.c (i386_arch_setup): Likewise.
1560
d3a70e03
TT
15612019-03-12 Tom Tromey <tromey@adacore.com>
1562
1563 * linux-low.c (iterate_over_lwps): Update.
1564
37991b4f
TT
15652019-03-06 Tom Tromey <tom@tromey.com>
1566
1567 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1568 (captured_main): Use SCOPE_EXIT.
1569
45950eb6
SDJ
15702019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1571
1572 * configure.srv: Use '$enable_unittest' instead of '$development'
1573 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1574 case.
1575
43ac54fc
TT
15762019-02-27 Tom Tromey <tromey@adacore.com>
1577
1578 * gdbreplay.c (logchar): Handle \r\n.
1579
df0da8a2
AH
15802019-02-07 Alan Hayward <alan.hayward@arm.com>
1581
1582 * linux-low.c (linux_attach): Add process before lwp.
1583 * server.c (attach_inferior): Check if already attached.
1584
1a5c2598
TT
15852019-02-07 Tom Tromey <tom@tromey.com>
1586
1587 * x86-tdesc.h: Rename include guard.
1588 * x86-low.h: Add include guard.
1589 * wincecompat.h: Rename include guard.
1590 * win32-low.h: Add include guard.
1591 * utils.h: Rename include guard.
1592 * tracepoint.h: Rename include guard.
1593 * tdesc.h: Rename include guard.
1594 * target.h: Rename include guard.
1595 * server.h: Rename include guard.
1596 * remote-utils.h: Rename include guard.
1597 * regcache.h: Rename include guard.
1598 * nto-low.h: Rename include guard.
1599 * notif.h: Add include guard.
1600 * mem-break.h: Rename include guard.
1601 * lynx-low.h: Add include guard.
1602 * linux-x86-tdesc.h: Add include guard.
1603 * linux-s390-tdesc.h: Add include guard.
1604 * linux-ppc-tdesc-init.h: Add include guard.
1605 * linux-low.h: Add include guard.
1606 * linux-aarch64-tdesc.h: Add include guard.
1607 * linux-aarch32-low.h: Add include guard.
1608 * inferiors.h: Rename include guard.
1609 * i387-fp.h: Rename include guard.
1610 * hostio.h: Rename include guard.
1611 * gdbthread.h: Rename include guard.
1612 * gdb_proc_service.h: Rename include guard.
1613 * event-loop.h: Rename include guard.
1614 * dll.h: Rename include guard.
1615 * debug.h: Rename include guard.
1616 * ax.h: Rename include guard.
1617
956cc47c
SN
16182018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1619
1620 PR gdb/23985
1621 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1622 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1623
a0707f3c
TT
16242019-01-25 Tom Tromey <tom@tromey.com>
1625
1626 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1627
0747795c
TT
16282019-01-25 Tom Tromey <tom@tromey.com>
1629
1630 * win32-low.c: Fix common/ includes.
1631 * win32-i386-low.c: Fix common/ includes.
1632 * tracepoint.c: Fix common/ includes.
1633 * thread-db.c: Fix common/ includes.
1634 * target.h: Fix common/ includes.
1635 * symbol.c: Fix common/ includes.
1636 * spu-low.c: Fix common/ includes.
1637 * server.h: Fix common/ includes.
1638 * server.c: Fix common/ includes.
1639 * remote-utils.c: Fix common/ includes.
1640 * regcache.h: Fix common/ includes.
1641 * regcache.c: Fix common/ includes.
1642 * nto-x86-low.c: Fix common/ includes.
1643 * notif.h: Fix common/ includes.
1644 * mem-break.h: Fix common/ includes.
1645 * lynx-low.c: Fix common/ includes.
1646 * lynx-i386-low.c: Fix common/ includes.
1647 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1648 * linux-x86-low.c: Fix common/ includes.
1649 * linux-low.c: Fix common/ includes.
1650 * inferiors.h: Fix common/ includes.
1651 * i387-fp.c: Fix common/ includes.
1652 * hostio.c: Fix common/ includes.
1653 * hostio-errno.c: Fix common/ includes.
1654 * gdbthread.h: Fix common/ includes.
1655 * gdbreplay.c: Fix common/ includes.
1656 * fork-child.c: Fix common/ includes.
1657 * event-loop.c: Fix common/ includes.
1658 * ax.c:
1659 (enum gdb_agent_op): Fix common/ includes.
1660
be6d4f74
TT
16612019-01-21 Tom Tromey <tom@tromey.com>
1662
1663 * tracepoint.c: Fix includes.
1664 * remote-utils.c: Fix includes.
1665 * linux-x86-low.c: Fix includes.
1666
66d91b39
JB
16672019-01-01 Joel Brobecker <brobecker@adacore.com>
1668
1669 * gdbreplay.c (gdbreplay_version): Update copyright year in
1670 version message.
1671 * server.c (gdbserver_version): Likewise.
1672
754e3168
AH
16732018-12-05 Alan Hayward <alan.hayward@arm.com>
1674
1675 * linux-low.c (add_lwp): Switch ordering.
1676
d105de22
TT
16772018-11-29 Tom Tromey <tom@tromey.com>
1678
1679 * win32-low.c (win32_join): Take pid, not process.
1680 * target.h (struct target_ops) <join>: Change argument type.
1681 (join_inferior): Change argument name.
1682 * spu-low.c (spu_join): Take pid, not process.
1683 * server.c (handle_detach): Preserve pid before destroying
1684 process.
1685 * lynx-low.c (lynx_join): Take pid, not process.
1686 * linux-low.c (linux_join): Take pid, not process.
1687
50138245
AH
16882018-11-23 Alan Hayward <alan.hayward@arm.com>
1689
1690 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1691 (aarch64_cannot_fetch_register): Likewise.
1692 (struct linux_target_ops): Update references.
1693
64f57f3d
PFC
16942018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1695
1696 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1697
8d619c01
EBM
16982018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1699
1700 * configure.srv (ipa_ppc_linux_regobj): Add
1701 powerpc-isa207-htm-vsx32l-ipa.o and
1702 powerpc-isa207-htm-vsx64l-ipa.o.
1703 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1704 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1705 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1706 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1707 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1708 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1709 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1710 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1711 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1712 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1713 (init_registers_powerpc_isa207_htm_vsx32l)
1714 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1715 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1716 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1717 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1718 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1719 (ppc_store_tm_ctarregset): New functions.
1720 (ppc_regsets): Add entries for HTM regsets.
1721 (ppc_arch_setup): Set htm in features struct when needed. Set
1722 sizes for the HTM regsets.
1723 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1724 (initialize_low_arch): Call
1725 init_registers_powerpc_isa207_htm_vsx32l and
1726 init_registers_powerpc_isa207_htm_vsx64l.
1727 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1728 PPC_TDESC_ISA207_HTM_VSX.
1729 (initialize_low_tracepoint): Call
1730 init_registers_powerpc_isa207_htm_vsx32l and
1731 init_registers_powerpc_isa207_htm_vsx64l.
1732
232bfb86
EBM
17332018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1734
1735 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1736 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1737 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1738 (ppc_store_pmuregset): New functions.
1739 (ppc_regsets): Add entries for ebb and pmu regsets.
1740 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1741 pmu regsets are available. Set sizes for these regsets.
1742
f2cf6173
EBM
17432018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1744
1745 * configure.srv (ipa_ppc_linux_regobj): Add
1746 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1747 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1748 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1749 rs6000/powerpc-isa207-vsx32l.xml, and
1750 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1751 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1752 <PPC_TDESC_ISA207_VSX>: New enum value.
1753 (init_registers_powerpc_isa207_vsx32l): Declare.
1754 (init_registers_powerpc_isa207_vsx64l): Declare.
1755 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1756 (ppc_store_tarregset): New function.
1757 (ppc_regsets): Add entry for the TAR regset.
1758 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1759 size for the TAR regsets.
1760 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1761 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1762 and init_registers_powerpc_isa207_vsx64l.
1763 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1764 (initialize_low_tracepoint): Call
1765 init_registers_powerpc_isa207_vsx32l and
1766 init_registers_powerpc_isa207_vsx64l.
1767
7ca18ed6
EBM
17682018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1769 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1770
1771 * configure.srv (ipa_ppc_linux_regobj): Add
1772 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1773 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1774 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1775 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1776 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1777 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1778 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1779 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1780 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1781 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1782 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1783 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1784 (ppc_hwcap): Add comment.
1785 (ppc_hwcap2): New global.
1786 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1787 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1788 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1789 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1790 when needed. Set sizes for the the DSCR and PPR regsets.
1791 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1792 (initialize_low_arch): Call
1793 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1794 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1795 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1796 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1797 (initialize_low_tracepoint): Call
1798 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1799 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1800
5c849b22
PFC
18012018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1802
1803 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1804
8ecfd7bd
SDJ
18052018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1806 Simon Marchi <simark@simark.ca>
1807
1808 * acinclude.m4: Include "../selftest.m4".
1809 * configure: Regenerate.
1810 * configure.ac: Use "GDB_AC_SELFTEST".
1811 * configure.srv: Use "$enable_unittests" instead of
1812 "$development" when checking whether unit tests have been
1813 enabled.
1814 * server.c (captured_main): Update message informing that
1815 selftests have been disabled.
1816
96643e35
TT
18172018-10-04 Tom Tromey <tom@tromey.com>
1818
1819 * configure: Rebuild.
1820
da4ae14a
TT
18212018-10-04 Tom Tromey <tom@tromey.com>
1822
1823 * server.c (handle_status): Rename inner "thread".
1824 (process_serial_event): Declare "res" in 'm' case.
1825 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1826 (iterate_over_lwps): Rename inner "thread".
1827 (linux_qxfer_libraries_svr4): Rename inner "len".
1828 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1829
7c619dbd
GB
18302018-10-01 Gary Benson <gbenson@redhat.com>
1831
1832 * gdb_proc_service.h: Moved common code to
1833 common/gdb_proc_service.h.
1834
3795e814
GB
18352018-10-01 Gary Benson <gbenson@redhat.com>
1836
1837 * gdb_proc_service.h: Synchronize comments and whitespace with
1838 GDB's version of this file.
1839
49b036f1
TT
18402018-09-25 Tom Tromey <tom@tromey.com>
1841
1842 * configure: Rebuild.
1843 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1844
8ff03f0b
SM
18452018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1846
1847 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1848 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1849 ($(IPA_LIB)): Sort IPA_OBJS.
1850
a1cd91dc
SM
18512018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1852
1853 * Makefile.in: Remove references to $(ADD_DEPS).
1854
752312ba
TT
18552018-09-16 Tom Tromey <tom@tromey.com>
1856
1857 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1858 variables.
1859 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1860 variables.
1861
f1628857
TT
18622018-09-05 Tom Tromey <tom@tromey.com>
1863
1864 * configure: Rebuild.
1865
ad202fcc
SM
18662018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1867
1868 PR build/23399
1869 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1870
d3d8724a
TT
18712018-08-27 Tom Tromey <tom@tromey.com>
1872
1873 PR build/23087:
1874 * configure: Rebuild.
1875
b4f183d2
TT
18762018-08-27 Tom Tromey <tom@tromey.com>
1877
1878 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1879 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1880 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1881 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1882 (s390x_emit_stack_adjust): Add casts to unsigned char.
1883
4e2aa472
SM
18842018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1885
1886 PR gdb/23374
1887 PR gdb/23375
1888 * server.h (struct client_state) <disable_randomization>:
1889 Initialize to 1.
1890
cf4088a9
SM
18912018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1892
1893 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1894 variable.
1895 (mips_supply_ptrace_register): Likewise.
1896
a0de763e
TT
18972018-07-22 Tom Tromey <tom@tromey.com>
1898
1899 * configure: Rebuild.
1900
b0a7723d
TT
19012018-07-22 Tom Tromey <tom@tromey.com>
1902
1903 * win32-low.c (win32_create_inferior): Remove unused variables.
1904 * gdbreplay.c (remote_open): Remove unused variable.
1905 * remote-utils.c (remote_prepare): Remove unused variable.
1906 * x86-tdesc.h (X86_TDESC_H): Define.
1907 (amd64_expedite_regs): Define conditionally.
1908 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1909 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1910 * remote-utils.c (readchar): Remove unused variable.
1911
a780ef4f
PA
19122018-07-13 Pedro Alves <palves@redhat.com>
1913
1914 * linux-low.c (linux_kill): Change parameter to process_info
1915 pointer instead of pid. Adjust.
1916 * lynx-low.c (lynx_kill): Likewise.
1917 * nto-low.c (nto_kill): Likewise.
1918 * spu-low.c (spu_kill): Likewise.
1919 * win32-low.c (win32_kill): Likewise.
1920 * server.c (handle_v_kill, kill_inferior_callback)
1921 (detach_or_kill_for_exit): Adjust.
1922 * target.c (kill_inferior): Change parameter to process_info
1923 pointer instead of pid. Adjust.
1924 * target.h (struct target_ops) <kill>: Change parameter to
1925 process_info pointer instead of pid. Adjust all implementations
1926 and callers.
1927 (kill_inferior): Likewise.
1928
ef2ddb33
PA
19292018-07-13 Pedro Alves <palves@redhat.com>
1930
1931 * linux-low.c (linux_detach, linux_join): Change parameter to
1932 process_info pointer instead of pid. Adjust.
1933 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1934 * nto-low.c (nto_detach): Likewise.
1935 * spu-low.c (spu_detach, spu_join): Likewise.
1936 * win32-low.c (win32_detach, win32_join): Likewise.
1937 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1938 * target.h (struct target_ops) <detach, join>: Change parameter to
1939 process_info pointer instead of pid. Adjust all implementations
1940 and callers.
1941 (detach_inferior, join_inferior): Rename 'pid' parameter to
1942 'proc'.
1943
c7ab0aef
SDJ
19442018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1945 Jan Kratochvil <jan.kratochvil@redhat.com>
1946 Paul Fertser <fercerpav@gmail.com>
1947 Tsutomu Seki <sekiriki@gmail.com>
1948
1949 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1950 (OBS): Add 'common/netstuff.o'.
1951 (GDBREPLAY_OBS): Likewise.
1952 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1953 (remote_open): Implement support for IPv6
1954 connections.
1955 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1956 and 'wspiapi.h'.
1957 (handle_accept_event): Accept connections from IPv6 sources.
1958 (remote_prepare): Handle IPv6-style hostnames; implement
1959 support for IPv6 connections.
1960 (remote_open): Implement support for printing connections from
1961 IPv6 sources.
1962
31445d10
PA
19632018-07-11 Pedro Alves <palves@redhat.com>
1964
1965 PR gdb/23377
1966 * mem-break.c (any_persistent_commands): Add process_info
1967 parameter and use it instead of relying on the current process.
1968 Change return type to bool.
1969 * mem-break.h (any_persistent_commands): Add process_info
1970 parameter and change return type to bool.
1971 * server.c (handle_detach): Remove require_running_or_return call.
1972 Look up the process_info for the process we're about to detach.
1973 If not found, return back error to GDB. Adjust
1974 any_persistent_commands call to pass down a process pointer.
1975
cb197132
PA
19762018-07-11 Pedro Alves <palves@redhat.com>
1977
1978 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1979 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1980 instead of collect_register_by_name.
1981 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1982 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1983
1b919490
VB
19842018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1985 Pedro Alves <palves@redhat.com>
1986
1987 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1988
d7e15655
TT
19892018-07-03 Tom Tromey <tom@tromey.com>
1990
1991 * linux-low.c: Update.
1992 * lynx-low.c: Update.
1993 * mem-break.c: Update.
1994 * nto-low.c: Update.
1995 * remote-utils.c: Update.
1996 * server.c: Update.
1997 * spu-low.c: Update.
1998 * target.c: Update.
1999 * win32-low.c: Update.
2000
26a57c92
TT
20012018-07-03 Tom Tromey <tom@tromey.com>
2002
2003 * server.c: Update.
2004
0e998d96
TT
20052018-07-03 Tom Tromey <tom@tromey.com>
2006
2007 * linux-low.c: Update.
2008
cc6bcb54
TT
20092018-07-03 Tom Tromey <tom@tromey.com>
2010
2011 * target.c: Update.
2012
e38504b3
TT
20132018-07-03 Tom Tromey <tom@tromey.com>
2014
2015 * linux-low.c: Update.
2016 * linux-mips-low.c: Update.
2017 * lynx-low.c: Update.
2018 * nto-low.c: Update.
2019 * remote-utils.c: Update.
2020 * server.c: Update.
2021 * spu-low.c: Update.
2022 * target.c: Update.
2023 * thread-db.c: Update.
2024
e99b03dc
TT
20252018-07-03 Tom Tromey <tom@tromey.com>
2026
2027 * linux-low.c: Update.
2028 * linux-mips-low.c: Update.
2029 * lynx-low.c: Update.
2030 * mem-break.c: Update.
2031 * nto-low.c: Update.
2032 * remote-utils.c: Update.
2033 * server.c: Update.
2034 * spu-low.c: Update.
2035 * target.c: Update.
2036 * tracepoint.c: Update.
2037
f2907e49
TT
20382018-07-03 Tom Tromey <tom@tromey.com>
2039
2040 * linux-low.c: Update.
2041 * linux-ppc-low.c: Update.
2042 * linux-x86-low.c: Update.
2043 * proc-service.c: Update.
2044 * server.c: Update.
2045 * spu-low.c: Update.
2046 * thread-db.c: Update.
2047 * win32-low.c: Update.
2048
fd79271b
TT
20492018-07-03 Tom Tromey <tom@tromey.com>
2050
2051 * linux-low.c: Update.
2052 * lynx-low.c: Update.
2053 * nto-low.c: Update.
2054 * remote-utils.c: Update.
2055 * spu-low.c: Update.
2056 * thread-db.c: Update.
2057 * win32-low.c: Update.
2058
c0867626
SDJ
20592018-06-29 Joel Brobecker <brobecker@adacore.com>
2060
2061 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2062 parameter in call to 'amd64_create_target_description'.
2063
2512d7ef
JK
20642018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2065
2066 * x86-tdesc.h: Remove executable permission flag.
2067
d0ac1c44
SM
20682018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2069
2070 * configure.ac: Remove AC_PREREQ, add missing quoting.
2071 * configure: Re-generate.
2072 * config.in: Re-generate.
2073 * aclocal.m4: Re-generate.
2074
c4eb05ff
SM
20752018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2076
2077 * tracepoint.h (current_traceframe): Remove declaration.
2078
02895270
AH
20792018-06-18 Alan Hayward <alan.hayward@arm.com>
2080
2081 * linux-aarch64-low.c (is_sve_tdesc): New function.
2082 (aarch64_sve_regs_copy_to_regcache): Likewise.
2083 (aarch64_sve_regs_copy_from_regcache): Likewise.
2084 (aarch64_regs_info): Add SVE checks.
2085 (initialize_low_arch): Initialize SVE.
2086
e9902bfc
AH
20872018-06-18 Alan Hayward <alan.hayward@arm.com>
2088
2089 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2090
fefa175e
AH
20912018-06-11 Alan Hayward <alan.hayward@arm.com>
2092
2093 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2094 (initialize_low_tracepoint): Likewise
2095 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2096 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2097 param.
2098 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2099 checks.
2100 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2101
b91ad3ff
AH
21022018-06-11 Alan Hayward <alan.hayward@arm.com>
2103
2104 * server.h (PBUFSIZ): Increase size
2105
f868386e
AH
21062018-06-11 Alan Hayward <alan.hayward@arm.com>
2107
2108 * regcache.c (regcache::raw_compare): New function.
2109 * regcache.h (regcache::raw_compare): New declaration.
2110
9c861883
AH
21112018-06-11 Alan Hayward <alan.hayward@arm.com>
2112
2113 * regcache.c (new_register_cache): Use new.
2114 (free_register_cache): Use delete.
2115 (register_data): Use const.
2116 (supply_register): Move body inside regcache.
2117 (regcache::raw_supply): New override function.
2118 (collect_register): Move body inside regcache.
2119 (regcache::raw_collect): New override function.
2120 (regcache::get_register_status): New override function.
2121 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2122
40591844
TT
21232018-06-09 Tom Tromey <tom@tromey.com>
2124
2125 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2126 declare queue.
2127 (event_queue): Use std::queue.
2128 (gdb_event_xfree): Remove.
2129 (initialize_event_loop, process_event, wait_for_event): Update.
2130
6341380d
SC
21312018-06-08 Stan Cox <scox@redhat.com>
2132
2133 * win32-low.c (win32_create_inferior): last_ptid and last_status
2134 moved to client_state.
2135
03349c93
PA
21362018-06-08 Pedro Alves <palves@redhat.com>
2137
2138 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2139 common/common-exceptions.o, common/common-utils.o,
2140 common/errors.o, common/print-utils.o and utils.o.
2141 * gdbreplay.c: Include "common-defs.h" instead of the two
2142 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2143 string.h or alloca.h.
2144 (perror_with_name): Delete.
2145 (remote_open): Use xstrdup instead of strdup.
2146 (main): Rename to ...
2147 (captured_main): ... this.
2148 (main): New.
2149
8dcc53b3
TT
21502018-06-08 Tom Tromey <tom@tromey.com>
2151
2152 * linux-low.c (linux_low_read_btrace): Update.
2153
c12a5089
SC
21542018-06-04 Stan Cox <scox@redhat.com>
2155
2156 * server.h (struct client_state): New.
2157 * server.c (cont_thread, general_thread, multi_process)
2158 (report_fork_events, report_vfork_events, report_exec_events)
2159 (report_thread_events, swbreak_feature, hwbreak_feature)
2160 (vCont_supported, disable_randomization, pass_signals)
2161 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2162 Moved to client_state.
2163 * remote-utils.c (remote_debug, noack_mode)
2164 (transport_is_reliable): Moved to client_state.
2165 * tracepoint.c (current_traceframe): Moved to client_state.
2166
2167 Update all callers.
2168 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2169 linux-low.c, remote-utils.h, target.c: Use client_state.
2170
122394f1
AH
21712018-05-31 Alan Hayward <alan.hayward@arm.com>
2172
2173 * configure.srv: Add new c/h file.
2174
95228a0d
AH
21752018-05-31 Alan Hayward <alan.hayward@arm.com>
2176
2177 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2178 null VQ.
2179
d8dab6c3
MR
21802018-05-25 Maciej W. Rozycki <macro@mips.com>
2181
2182 * gdb.arch/mips-fpregset-core.exp: New test.
2183 * gdb.arch/mips-fpregset-core.c: New test source.
2184
81e25b7c
EK
21852018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2186
2187 PR server/23198
2188 * hostio.c (require_int): Do not report overflow for integers
2189 between 0xfffffff and 0x7fffffff.
2190
7e947ad3
MR
21912018-05-22 Maciej W. Rozycki <macro@mips.com>
2192
2193 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2194 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2195 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2196 functions.
2197 (the_low_target): Wire them.
2198
1d75a658
PFC
21992018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2200
2201 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2202 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2203 mode. Call collect_register_by_name with vscr using
2204 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2205 (ppc_store_vrregset): Add and set vscr_offset variable as in
2206 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2207 vscr_offset.
2208
d078308a
PFC
22092018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2210
2211 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2212 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2213 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2214
7273b5fc
PFC
22152018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2216
2217 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2218 (ppc_store_vsxregset): Likewise.
2219 (ppc_fill_vrregset): Likewise.
2220 (ppc_store_vrregset): Likewise.
2221 (ppc_fill_evrregset): Likewise.
2222 (ppc_store_evrregset): Likewise.
2223 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2224 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2225 needed.
2226
2e077f5e
PFC
22272018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2228
2229 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2230 wordsize of the inferior. Call ppc_linux_target_wordsize.
2231
bd64614e
PFC
22322018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2233
2234 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2235 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2236 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2237 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2238 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2239 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2240 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2241 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2242 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2243 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2244 (tdesc_powerpc_e500l): Remove.
2245 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2246 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2247 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2248 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2249 linux-ppc-tdesc.h.
2250 (ppc_arch_setup): Remove target description matching code. Fill a
2251 ppc_linux_features struct and call ppc_linux_match_description
2252 with it.
2253
75d74cca
MR
22542018-05-22 Maciej W. Rozycki <macro@mips.com>
2255
2256 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2257 width of the requested register exceeds the width of the
2258 `ptrace' data type.
2259 (mips_cannot_store_register): Likewise.
2260
e4439e43
MR
22612018-05-21 Maciej W. Rozycki <macro@mips.com>
2262
2263 * linux-mips-low.c (mips_fetch_register): New function. Update
2264 preceding comment.
2265 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2266 (the_low_target): Wire `mips_fetch_register'.
2267
55271bf9
JB
22682018-05-10 Joel Brobecker <brobecker@adacore.com>
2269
2270 * lynx-i386-low.c (LYNXOS_178): New macro.
2271 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2272 the layout on LynxOS-178.
2273 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2274 handle floating point registers that are not supported by
2275 LynxOS-178.
2276
1a34f210
TT
22772018-05-10 Tom Tromey <tom@tromey.com>
2278
2279 * configure: Rebuild.
2280
190852c8
JB
22812018-05-10 Joel Brobecker <brobecker@adacore.com>
2282
2283 PR server/23158:
2284 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2285 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2286 Use it to set the expedite_regs field in the given tdesc.
2287 * x86-tdesc.h: New file.
2288 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2289 Adjust following the addition of the new expedite_regs parameter
2290 to init_target_desc.
2291 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2292 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2293 (i386_linux_read_description, amd64_linux_read_description):
2294 Adjust following the addition of the new expedite_regs parameter
2295 to init_target_desc.
2296 * lynx-i386-low.c: #include "x86-tdesc.h".
2297 (lynx_i386_arch_setup): Adjust following the addition of the new
2298 expedite_regs parameter to init_target_desc.
2299 * nto-x86-low.c: #include "x86-tdesc.h".
2300 (nto_x86_arch_setup): Adjust following the addition of the new
2301 expedite_regs parameter to init_target_desc.
2302 * win32-i386-low.c: #include "x86-tdesc.h".
2303 (i386_arch_setup): Adjust following the addition of the new
2304 expedite_regs parameter to init_target_desc.
2305
7dbac825
JB
23062018-05-10 Joel Brobecker <brobecker@adacore.com>
2307
2308 PR server/23158:
2309 * win32-low.c (win32_create_inferior): Add call to my_wait
2310 setting last_status global.
2311
906994d9
JB
23122018-05-10 Joel Brobecker <brobecker@adacore.com>
2313
2314 PR server/23158:
2315 * win32-low.c (create_process): Only call gdb_tilde_expand if
2316 inferior_cwd is not NULL.
2317
8ee22052
AB
23182018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2319
2320 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2321 registers to the cache if their values have changed.
2322 (i387_xsave_to_cache): Provide default values for x87 control
2323 registers when these features are available, but disabled.
2324 * regcache.c (supply_register_by_name_zeroed): New function.
2325 * regcache.h (supply_register_by_name_zeroed): Declare new
2326 function.
2327
aff689d3
TT
23282018-05-07 Tom Tromey <tom@tromey.com>
2329
2330 * configure: Rebuild.
2331
85e26832
TT
23322018-05-04 Tom Tromey <tom@tromey.com>
2333
2334 * configure: Rebuild.
2335
a3b60e45
JK
23362018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2337 Pedro Alves <palves@redhat.com>
2338
2339 * linux-aarch64-low.c (aarch64_stopped_data_address):
2340 Likewise.
2341
632e107b
TT
23422018-04-27 Tom Tromey <tom@tromey.com>
2343
2344 * configure: Rebuild.
2345
458412c3
TT
23462018-04-23 Tom Tromey <tom@tromey.com>
2347
2348 * configure: Rebuild.
2349
f31c089e
SM
23502018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * Makefile.in (depcomp): Add "..".
2353 (all_deps_files): New and use it.
2354
b319b098
AH
23552018-04-18 Alan Hayward <alan.hayward@arm.com>
2356
2357 * configure.srv (aarch64*-*-linux*): Don't include xml.
2358 (i[34567]86-*-cygwin*): Likewise.
2359 (i[34567]86-*-linux*): Likewise.
2360 (i[34567]86-*-lynxos*): Likewise.
2361 (i[34567]86-*-mingw32ce*): Likewise.
2362 (i[34567]86-*-mingw*): Likewise.
2363 (i[34567]86-*-nto*): Likewise.
2364 (tic6x-*-uclinux): Likewise.
2365 (x86_64-*-linux*): Likewise.
2366 (x86_64-*-mingw*): Likewise.
2367 (x86_64-*-cygwin*): Likewise.
2368
3b74854b
AH
23692018-04-18 Alan Hayward <alan.hayward@arm.com>
2370
2371 * tdesc.c: Remove xml parameter.
2372
e98577a9
AH
23732018-04-18 Alan Hayward <alan.hayward@arm.com>
2374
2375 * server.c (get_features_xml): Remove cast.
2376 * tdesc.c (void target_desc::accept): Fill in function.
2377 (tdesc_get_features_xml): Remove old xml creation.
2378 (print_xml_feature::visit_pre): Add xml vistor.
2379 * tdesc.h (struct target_desc): Make xmltarget mutable.
2380 (tdesc_get_features_xml): Remove declaration.
2381
d278f585
AH
23822018-04-18 Alan Hayward <alan.hayward@arm.com>
2383
2384 * tdesc.c (tdesc_architecture_name): Add new function.
2385 (tdesc_osabi_name): Likewise.
2386 (tdesc_get_features_xml): Use new functions.
2387
eee8a18d
AH
23882018-04-18 Alan Hayward <alan.hayward@arm.com>
2389
2390 * tdesc.c (tdesc_create_flags): Remove.
2391 (tdesc_add_flag): Likewise.
2392 (tdesc_named_type): Likewise.
2393 (tdesc_create_union): Likewise.
2394 (tdesc_create_struct): Likewise.
2395 (tdesc_create_vector): Likewise.
2396 (tdesc_add_bitfield): Likewise.
2397 (tdesc_add_field): Likewise.
2398 (tdesc_set_struct_size): Likewise.
2399
82ec9bc7
AH
24002018-04-18 Alan Hayward <alan.hayward@arm.com>
2401
2402 * tdesc.c (~target_desc): Remove implictly deleted items.
2403 (init_target_desc): Iterate all features.
2404 (tdesc_get_features_xml): Use vector.
2405 (tdesc_create_feature): Create feature.
2406 * tdesc.h (tdesc_feature) Remove
2407 (target_desc): Add features.
2408
ea3e7d71
AH
24092018-04-18 Alan Hayward <alan.hayward@arm.com>
2410
2411 * Makefile.in: Add common/tdesc.c
2412 * tdesc.c (init_target_desc): init all reg_defs from register
2413 vector.
2414 (tdesc_create_reg): Create tdesc_reg.
2415 * tdesc.h (tdesc_feature): Add register vector.
2416
17d08cd4
SM
24172018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2418
2419 * tdesc.h (struct target_desc) <features>: Change type to
2420 std::vector<std::string>.
2421 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2422 changes.
2423 (tdesc_get_features_xml): Likewise.
2424 (tdesc_create_feature): Likewise.
2425
5cd3e386
AH
24262018-03-26 Alan Hayward <alan.hayward@arm.com>
2427
2428 * regcache.c (find_register_by_number): Return a ref.
2429 (find_regno): Use references.
2430 (register_size): Likewise.
2431 (register_data): Likewise.
2432 * tdesc.c (target_desc::~target_desc): Remove free calls.
2433 (target_desc::operator==): Use std::vector compare.
2434 (init_target_desc): Use reference.
2435 (tdesc_create_reg): Use reg constructors.
2436 * tdesc.h (struct target_desc): Replace pointer with object.
2437
dff7492c
AH
24382018-03-23 Alan Hayward <alan.hayward@arm.com>
2439
2440 * regcache.c (find_register_by_number): Make static.
2441 (find_regno): Use find_register_by_number
2442 * regcache.h (struct reg): Remove declaration.
2443
d80e5242
AH
24442018-03-23 Alan Hayward <alan.hayward@arm.com>
2445
2446 * tdesc.c (target_desc::~target_desc): Move to here.
2447 (target_desc::operator==): Likewise.
2448 * tdesc.h (target_desc::~target_desc): Move from here.
2449 (target_desc::operator==): Likewise.
2450
f69c5afb
AA
24512018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2452
2453 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2454
ce29f843
AA
24552018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2456
2457 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2458 S390_TDESC_GS.
2459 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2460 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2461 and init_registers_s390_gs_linux64.
2462
c49bd90b
AA
24632018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2464
2465 * linux-s390-low.c (s390_fill_gs): Remove function.
2466 (s390_fill_gsbc): Remove function.
2467 (s390_regsets): Set fill functions for the guarded storage regsets
2468 to NULL.
2469
7edb9bd3
AA
24702018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2471
2472 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2473 the word size. Add comment.
2474 (s390_get_wordsize): New function.
2475 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2476 pswm with it. Instead, use s390_get_wordsize to determine the
2477 word size first and derive the correct tdesc from that directly.
2478
39be3c7e
SM
24792018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2480
2481 * Makefile.in: Include silent-rules.mk.
2482 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2483 (COMPILE): Add ECHO_CXX.
2484 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2485 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2486 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2487 (version-generated.c): Add ECHO_GEN.
2488 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2489 (IPAGENT_COMPILE): Add ECHO_CXX.
2490 (%-generated.c): Add ECHO_REGDAT.
2491
3ae9ce5d
TT
24922018-03-14 Tom Tromey <tom@tromey.com>
2493
2494 PR cli/14977:
2495 * ax.c (ax_printf): Special case for NULL.
2496
e6a58aa8
SM
24972018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2498
2499 * linux-low.c (linux_qxfer_libraries_svr4): Use
2500 xml_escape_text_append.
2501
f6e8a41e
SM
25022018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2503
2504 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2505
b9671caf
SM
25062018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2507
2508 * server.c (handle_general_set): Remove unnecessary xstrdup.
2509
e80aaf61
SM
25102018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2511
2512 * server.c (parse_debug_format_options): Adjust to
2513 delim_string_to_char_ptr_vec changes.
2514 * thread-db.c (thread_db_load_search): Adjust to
2515 dirnames_to_char_ptr_vec changes.
2516
b1223e78
MM
25172018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2518
2519 * target.h (target_enable_btrace, target_disable_btrace)
2520 (target_read_btrace, target_read_btrace_conf): Turn macro into
2521 inline function. Throw error if target method is not defined.
2522 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2523 check for btrace target method. Be prepared to handle exceptions
2524 from btrace target methods.
2525
81561546
SDJ
25262018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2527
2528 * server.c (captured_main): Change order of error message printed
2529 when the current working directory cannot be found.
2530
25e3c82c
SDJ
25312018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2532
2533 * server.c: Include "filenames.h" and "pathstuff.h".
2534 (program_name): Delete variable.
2535 (program_path): New anonymous class.
2536 (get_exec_wrapper): Use "program_path" instead of
2537 "program_name".
2538 (handle_v_run): Likewise.
2539 (captured_main): Likewise.
2540 (process_serial_event): Likewise.
2541
b4987c95
SDJ
25422018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2543
2544 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2545 (OBJS): Add "pathstuff.o".
2546 * server.c (current_directory): New global variable.
2547 (captured_main): Initialize "current_directory".
2548
f46cd62a
AH
25492018-02-26 Alan Hayward <alan.hayward@arm.com>
2550
2551 * tdesc.c: Use common/tdesc.h.
2552 * tdesc.h: Likewise.
2553
a543c5ca
AH
25542018-02-20 Alan Hayward <alan.hayward@arm.com>
2555 Simon Marchi <simon.marchi@ericsson.com>
2556
2557 * Makefile.in: Switch order of make rules.
2558
b5884fa7
AH
25592018-02-19 Alan Hayward <alan.hayward@arm.com>
2560
2561 * Makefile.in: Add common directory in build.
2562 * configure.ac: Add common reference.
2563 * configure: Regenerate.
2564
de6242d3
MM
25652018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2566
2567 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2568 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2569 * spu-low.c (spu_target_ops): Likewise.
2570 * win32-low.c (win32_target_ops): Likewise.
2571 * server.c (supported_btrace_packets): Report packets unconditionally.
2572 * target.h (target_ops) <supports_btrace>: Remove.
2573 (target_supports_btrace): Remove.
2574
9ee23a85
MM
25752018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2576
2577 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2578 (handle_btrace_disable): Change return type to void. Use exceptions
2579 to report errors.
2580 (handle_btrace_general_set): Catch exception and copy message to
2581 return message.
2582
8ce47547
TT
25832018-02-08 Tom Tromey <tom@tromey.com>
2584
2585 * linux-low.c (install_software_single_step_breakpoints): Use
2586 make_scoped_restore.
2587 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2588 (do_restore_current_thread_cleanup): Remove.
2589 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2590 declare.
2591
45dd3607
TT
25922018-02-08 Tom Tromey <tom@tromey.com>
2593
2594 * mem-break.c (set_raw_breakpoint_at): Use
2595 gdb::unique_xmalloc_ptr.
2596
e671cd59
PA
25972018-01-30 Pedro Alves <palves@redhat.com>
2598
2599 PR gdb/13211
2600 * target.c (target_terminal::terminal_state): Rename to ...
2601 (target_terminal::m_terminal_state): ... this.
2602
a0aad537
JC
26032018-01-19 James Clarke <jrtc27@jrtc27.com>
2604
2605 * linux-low.c (handle_extended_wait): Surround call to
2606 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2607
4d9b86e1
SM
26082018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2609
2610 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2611 linux_ptrace_attach_fail_reason_string now returning an
2612 std::string.
2613 (linux_attach): Likewise.
2614 * thread-db.c (attach_thread): Likewise.
2615
f517c180
EA
26162018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2617
2618 PR gdb/21559
2619 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2620 checking for fs_base/gs_base fields in struct user_regs_struct.
2621 * configure: Regenerate.
2622
9a70f35c
YQ
26232018-01-16 Yao Qi <yao.qi@linaro.org>
2624
2625 PR gdb/18749
2626 * linux-low.c (fetch_register): Call supply_register instead of
2627 error.
2628
605fd3c6
YQ
26292018-01-08 Yao Qi <yao.qi@linaro.org>
2630 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * Makefile.in (OBS): Remove selftest.o.
2633 * configure.ac: Set srv_selftest_objs if $development is true.
2634 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2635 * configure: Re-generated.
2636 * server.c (captured_main): Wrap variable selftest_filter with
2637 GDB_SELF_TEST.
2638
2cc05030
SM
26392018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2640
2641 * server.c (parse_debug_format_options): Return std::string.
2642 (handle_monitor_command, captured_main): Adjust.
2643
e379cee6
PA
26442018-01-05 Pedro Alves <palves@redhat.com>
2645
2646 PR gdb/18653
2647 * server.c (captured_main): Pass quiet=false to
2648 save_original_signals_state.
2649
82e1e79a
JB
26502018-01-01 Joel Brobecker <brobecker@adacore.com>
2651
2652 * gdbreplay.c (gdbreplay_version): Update copyright year in
2653 version message.
2654 * server.c (gdbserver_version): Likewise.
2655
8e481c3b
TT
26562017-12-08 Tom Tromey <tom@tromey.com>
2657
2658 * ax.c (ax_printf): Update.
2659
a8806230
YQ
26602017-12-07 Yao Qi <yao.qi@linaro.org>
2661
2662 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2663 aarch64_linux_read_description.
2664 * linux-amd64-ipa.c (idx2mask): New array.
2665 (get_ipa_tdesc): Move idx2mask out.
2666 (initialize_low_tracepoint): Initialize target descriptions.
2667 * linux-i386-ipa.c (idx2mask): New array.
2668 (get_ipa_tdesc): Move idx2mask out.
2669 (initialize_low_tracepoint): Initialize target descriptions.
2670
d4a0e8b5
SM
26712017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2672
2673 * tdesc.c (struct tdesc_type): Change return type.
2674 (tdesc_add_flag): Change parameter type.
2675 (tdesc_add_bitfield): Likewise.
2676 (tdesc_add_field): Likewise.
2677 (tdesc_set_struct_size): Likewise.
2678
798a7429
SM
26792017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2680
2681 * regcache.c (registers_to_string): Remove unused variable.
2682
c0e15c9b
SM
26832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2684
2685 * inferiors.c (for_each_inferior_with_data): Remove.
2686 * inferiors.h (for_each_inferior_with_data): Remove.
2687 * server.c (handle_qxfer_threads_worker): Change parameter type.
2688 (handle_qxfer_threads_proper): Use for_each_thread.
2689
f0045347
SM
26902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2691
2692 * inferiors.c (for_each_inferior): Remove.
2693 (clear_inferiors): Use for_each_thread.
2694 * inferiors.h (for_each_inferior): Remove.
2695 * linux-low.c (linux_wait_for_event_filtered): Use
2696 for_each_thread.
2697 (linux_stabilize_threads): Likewise.
2698 * regcache.c (regcache_release): Likewise.
2699 * server.c (gdb_wants_all_threads_stopped): Likewise.
2700 (clear_pending_status_callback): Remove.
2701 (handle_status): Use for_each_thread.
2702 (captured_main): Likewise.
2703 * win32-low.c (child_init_thread_list): Likewise.
2704 (win32_clear_inferiors): Likewise.
2705 (fake_breakpoint_event): Likewise.
2706
9521758b
SM
27072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2708
2709 * inferiors.h (find_inferior): Remove.
2710 * inferiors.c (find_inferior): Remove.
2711
8f86d7aa
SM
27122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2713
2714 * linux-low.c (resume_status_pending_p): Update comment.
2715 (need_step_over_p): Update comment.
2716
e2b44075
SM
27172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2718
2719 * linux-low.c (proceed_one_lwp): Return void, change parameter
2720 type.
2721 (unsuspend_and_proceed_one_lwp): Likewise.
2722 (proceed_all_lwps): Use for_each_thread.
2723 (unstop_all_lwps): Likewise.
2724
c80825ff
SM
27252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2726
2727 * linux-low.c (linux_resume_one_thread): Return void, take
2728 parameter directly.
2729 (linux_resume): Use for_each_thread.
2730
df3e4dbe
SM
27312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2732
2733 * linux-low.c (send_sigstop_callback): Return void, change
2734 parameter type. Rename to...
2735 (send_sigstop): ... this.
2736 (suspend_and_send_sigstop_callback): Return void, change parameter
2737 type. Rename to...
2738 (suspend_and_send_sigstop): ... this.
2739 (stop_all_lwps): Use for_each_thread.
2740
5a6b0a41
SM
27412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2742
2743 * linux-low.c (lwp_running): Return bool, remove unused
2744 argument.
2745 (linux_stabilize_threads): Use find_thread.
2746
39a64da5
SM
27472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2748
2749 * linux-low.c (select_singlestep_lwp_callback): Remove.
2750 (count_events_callback): Remove.
2751 (select_event_lwp_callback): Remove.
2752 (select_event_lwp): Use find_thread/for_each_thread.
2753
a1385b7b
SM
27542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2755
2756 * linux-low.c (not_stopped_callback): Return bool, take filter
2757 argument directly.
2758 (linux_wait_for_event_filtered): Use find_thread.
2759 (linux_wait_1): Likewise.
2760
454296a2
SM
27612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2762
2763 * linux-low.c (same_lwp): Remove.
2764 (find_lwp_pid): Use find_thread.
2765
6b2a85da
SM
27662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2767
2768 * linux-low.c (delete_lwp_callback): Remove.
2769 (linux_mourn): Use for_each_thread.
2770
798a38e8
SM
27712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2772
2773 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2774 args parameter, don't check for pid.
2775 (linux_detach): Use for_each_thread.
2776
e4eb0dec
SM
27772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2778
2779 * linux-low.c (struct counter): Remove.
2780 (second_thread_of_pid_p): Remove.
2781 (last_thread_of_process_p): Use find_thread.
2782
83e1b6c1
SM
27832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2784
2785 * inferiors.c (find_inferior_in_random): Remove.
2786 * inferiors.h (find_inferior_in_random): Remove.
2787 * linux-low.c (status_pending_p_callback): Return bool, accept
2788 parameter ptid directly.
2789 (linux_wait_for_event_filtered): Use find_thread_in_random.
2790 (linux_wait_1): Likewise.
2791
8dc7b443
SM
27922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2793
2794 * inferiors.c (find_inferior_id): Remove.
2795 (find_thread_ptid): Move implemention from find_inferior_id to
2796 here.
2797 * inferiors.h (find_inferior_id): Remove.
2798 * server.c (handle_status): Use find_thread_ptid.
2799 (process_serial_event): Likewise.
2800 * thread-db.c (find_one_thread): Likewise.
2801 (thread_db_thread_handle): Likewise.
2802 * win32-low.c (thread_rec): Likewise.
2803 (child_delete_thread): Likewise.
2804 (win32_thread_alive): Likewise.
2805 (get_child_debug_event): Likewise.
2806
da25033c
SM
28072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2808
2809 * linux-mips-low.c (update_watch_registers_callback): Return
2810 void, remove pid_p parameter, don't check for pid.
2811 (mips_insert_point, mips_remove_point): Use for_each_thread.
2812
c91bb56b
SM
28132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * lynx.low (lynx_delete_thread_callback): Remove.
2816 (lynx_mourn): Use for_each_thread.
2817
634a3254
SM
28182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2819
2820 * regcache.c (regcache_invalidate_one): Remove.
2821 (regcache_invalidate_pid): use for_each_thread.
2822
41272101
TT
28232017-11-26 Tom Tromey <tom@tromey.com>
2824
2825 * linux-low.c (linux_create_inferior): Update.
2826
f5291a6f
UW
28272017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2828
2829 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2830
6654d750
AH
28312017-11-24 Alan Hayward <alan.hayward@arm.com>
2832
2833 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2834 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2835 * linux-aarch64-tdesc-selftest.c: New file.
2836 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2837
28382017-11-24 Alan Hayward <alan.hayward@arm.com>
2839
2840 * configure.srv: Add new file.
2841 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2842 * linux-aarch64-tdesc-selftest.c: New file.
2843 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2844
49bdb7ee
AH
28452017-11-24 Alan Hayward <alan.hayward@arm.com>
2846
2847 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2848 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2849 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2850
d6d7ce56
AH
28512017-11-24 Alan Hayward <alan.hayward@arm.com>
2852
2853 * configure.srv: Add new files.
2854 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2855 aarch64_linux_read_description.
2856 * linux-aarch64-low.c (aarch64_linux_read_description):
2857 Merge with aarch64_arch_setup.
2858 (aarch64_arch_setup): Call aarch64_linux_read_description.
2859 * linux-aarch64-tdesc.c: New file.
2860 * linux-aarch64-tdesc.h: New file.
2861
506fe5f4
YQ
28622017-11-24 Yao Qi <yao.qi@linaro.org>
2863
2864 * configure.srv: Set $srv_regobj for tic6x-linux.
2865 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2866 (tic6x_read_description): Move some code to tic6x_arch_setup.
2867 (tic6x_tdesc_test): New function.
2868 (initialize_low_arch): Call selftests::register_test.
2869
29f9a567
YQ
28702017-11-22 Yao Qi <yao.qi@linaro.org>
2871
2872 * remote-utils.c (prepare_resume_reply): Use memcpy.
2873
578290ec
SM
28742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2875
2876 * linux-low.c (kill_one_lwp_callback): Return void, take
2877 argument directly, don't filter on pid.
2878 (linux_kill): Use for_each_thread.
2879
eca55aec
SM
28802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2881
2882 * linux-low.c (need_step_over_p): Return bool, remove dummy
2883 argument.
2884 (linux_resume, proceed_all_lwps): Use find_thread.
2885
25c28b4d
SM
28862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2887
2888 * linux-low.c (resume_status_pending_p): Return bool, remove
2889 flag_p argument.
2890 (linux_resume): Use find_thread.
2891
5fdda392
SM
28922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2893
2894 * linux-low.c (struct thread_resume_array): Remove.
2895 (linux_set_resume_request): Return void, take arguments
2896 directly.
2897 (linux_resume): Use for_each_thread.
2898
fcb056a5
SM
28992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2900
2901 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2902 return bool, remove data argument.
2903 (linux_stabilize_threads): Use find_thread.
2904
139720c5
SM
29052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2906
2907 * linux-low.c (unsuspend_one_lwp): Remove.
2908 (unsuspend_all_lwps): Use for_each_thread, inline code from
2909 unsuspend_one_lwp.
2910
6d1e5673
SM
29112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2912
2913 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2914 * linux-low.c (struct iterate_over_lwps_args): Remove.
2915 (iterate_over_lwps_filter): Remove.
2916 (iterate_over_lwps): Use find_thread.
2917
bbf550d5
SM
29182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2919
2920 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2921 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2922 code from reset_lwp_ptrace_options_callback.
2923
00192f77
SM
29242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2925
2926 * linux-arm-low.c (struct update_registers_data): Remove.
2927 (update_registers_callback): Return void, take arguments
2928 directly, don't check thread's pid.
2929 (arm_insert_point, arm_remove_point): Use for_each_thread.
2930
2bee2b6c
SM
29312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2932
2933 * win32-low.c (continue_one_thread): Return void, take argument
2934 directly.
2935 (child_continue): Use for_each_thread.
2936
0b360f19
SM
29372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * win32-i386-low.c (update_debug_registers_callback): Rename
2940 to ...
2941 (update_debug_registers): ... this, return void, remove pid_p arg.
2942 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2943
f27866ba
SM
29442017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2945
2946 * inferiors.h (struct process_info): Add constructor, initialize
2947 fields..
2948 <syscalls_to_catch>: Change type to std::vector<int>.
2949 * inferiors.c (add_process): Allocate process_info with new.
2950 (remove_process): Free process_info with delete.
2951 * linux-low.c (handle_extended_wait): Adjust.
2952 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2953 * server.c (handle_general_set): Adjust.
2954
e849ea89
PA
29552017-11-16 Pedro Alves <palves@redhat.com>
2956
2957 * remote-utils.c (remote_close): Block SIGIO signals instead of
2958 uninstalling the SIGIO handler.
2959
1d0aa65c
AH
29602017-11-16 Alan Hayward <alan.hayward@arm.com>
2961
2962 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2963
3491a34c
YQ
29642017-11-16 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2967 (tic6x_store_gregset): Likewise.
2968 (tic6x_usrregs_info): Move it up.
2969
a602f924
AH
29702017-11-15 Alan Hayward <alan.hayward@arm.com>
2971
2972 * Makefile.in: Update arch rules.
2973 * configure.srv: Explicitly mark arch/ files.
2974
5616b6c3
AS
29752017-11-13 Andreas Schwab <schwab@suse.de>
2976
2977 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2978 function.
2979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2980
d1928160
PA
29812017-11-06 Pedro Alves <palves@redhat.com>
2982
2983 * config.in, configure: Regenerate.
2984
bac608e7
SM
29852017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2986
2987 * target.c (struct thread_search): Remove.
2988 (thread_search_callback): Remove.
2989 (prepare_to_access_memory): Use for_each_thread instead of
2990 find_inferior. Inline code from thread_search_callback.
2991
eaddb425
SM
29922017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2993
2994 * server.c (struct visit_actioned_threads_data): Remove.
2995 (visit_actioned_threads): Change prototype to take arguments
2996 directly.
2997 (resume): Use find_thread instead of find_inferior.
2998
99078d34
SM
29992017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3000
3001 * server.c (queue_stop_reply_callback): Change prototype, return
3002 void.
3003 (find_status_pending_thread_callback): Remove.
3004 (handle_status): Replace find_inferior with find_thread and
3005 for_each_thread.
3006
cc628f3d
AH
30072017-10-25 Alan Hayward <alan.hayward@arm.com>
3008
3009 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3010 with REGNO.
3011 (aarch64_store_gregset): Likewise.
3012 (aarch64_fill_fpregset): Likewise.
3013 (aarch64_store_fpregset): Likewise.
3014
4d3bb80e
SM
30152017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3016
3017 * gdbthread.h (find_thread, for_each_thread): New functions.
3018 * inferiors.c (thread_of_pid): Remove.
3019 (find_any_thread_of_pid): Use find_thread.
3020 * linux-low.c (num_lwps): Use for_each_thread.
3021
7a7cdfa0
YQ
30222017-10-17 Yao Qi <yao.qi@linaro.org>
3023
3024 * Makefile.in: Remove one rule.
3025 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3026
e675d170
YQ
30272017-10-17 Yao Qi <yao.qi@linaro.org>
3028
3029 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3030 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3031
7eb4e0f9
YQ
30322017-10-17 Yao Qi <yao.qi@linaro.org>
3033
3034 * configure.srv: Rename arm.o with arch/arm.o.
3035
60d6cfc9
YQ
30362017-10-17 Yao Qi <yao.qi@linaro.org>
3037
3038 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3039 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3040 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3041 (arch-i386.o, arch-amd64.o): Remove rules.
3042 (arch/%.o): New rule.
3043 Update POSTCOMPILE and COMPILE.pre.
3044 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3045 * configure: Re-generated.
3046 * configure.srv: Replace arch-i386.o with arch/i386.o.
3047 Replace arch-amd64.o with arch/amd64.o.
3048
5bfda255
YQ
30492017-10-16 Yao Qi <yao.qi@linaro.org>
3050
3051 * configure: Regenerated.
3052
9c80ecd6
SM
30532017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * inferiors.h: (struct inferior_list): Remove.
3056 (struct inferior_list_entry); Remove.
3057 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3058 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3059 get_first_inferior): Remove.
3060 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3061 find_inferior_id, find_inferior_in_random): Change signature.
3062 * inferiors.c (all_threads): Change type to
3063 std::list<thread_info *>.
3064 (get_thread): Remove macro.
3065 (find_inferior, find_inferior_id): Change signature, implement
3066 using find_thread.
3067 (find_inferior_in_random): Change signature, implement using
3068 find_thread_in_random.
3069 (for_each_inferior, for_each_inferior_with_data): Change
3070 signature, implement using for_each_thread.
3071 (add_inferior_to_list, remove_inferior): Remove.
3072 (add_thread, get_first_thread, thread_of_pid,
3073 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3074 (get_first_inferior, one_inferior_p, clear_inferior_list):
3075 Remove.
3076 (clear_inferiors, get_thread_process): Update.
3077 * gdbthread.h: Include <list>.
3078 (struct thread_info) <entry>: Remove field.
3079 <id>: New field.
3080 (all_threads): Change type to std::list<thread_info *>.
3081 (get_first_inferior): Add doc.
3082 (find_thread, for_each_thread, find_thread_in_random): New
3083 functions.
3084 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3085 * linux-arm-low.c (update_registers_callback): Update.
3086 * linux-low.c (second_thread_of_pid_p): Update.
3087 (kill_one_lwp_callback, linux_detach_lwp_callback,
3088 delete_lwp_callback, status_pending_p_callback, same_lwp,
3089 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3090 iterate_over_lwps, not_stopped_callback,
3091 resume_stopped_resumed_lwps, count_events_callback,
3092 select_singlestep_lwp_callback, select_event_lwp_callback,
3093 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3094 suspend_and_send_sigstop_callback, wait_for_sigstop,
3095 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3096 lwp_running, linux_set_resume_request, resume_status_pending_p,
3097 need_step_over_p, start_step_over, linux_resume_one_thread,
3098 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3099 reset_lwp_ptrace_options_callback): Update.
3100 * linux-mips-low.c (update_watch_registers_callback): Update.
3101 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3102 Update.
3103 (free_register_cache_thread_one): Remove.
3104 (regcache_release): Update.
3105 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3106 handle_qxfer_threads_worker): Update.
3107 (handle_query): Update, use list iterator.
3108 (visit_actioned_threads, handle_pending_status,
3109 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3110 clear_pending_status_callback, set_pending_status_callback,
3111 find_status_pending_thread_callback, handle_status,
3112 process_serial_event): Update.
3113 * target.c (thread_search_callback): Update.
3114 * thread-db.c (thread_db_get_tls_address): Update.
3115 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3116 Update.
3117 * win32-i386-low.c (update_debug_registers_callback): Update.
3118 * win32-low.c (delete_thread_info, child_delete_thread,
3119 continue_one_thread, suspend_one_thread,
3120 get_child_debug_event): Adjust.
3121
9179355e
SM
31222017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3123
3124 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3125 * inferiors.h: Include <list>.
3126 (struct process_info) <entry>: Remove field.
3127 <pid>: New field.
3128 (pid_of): Change macro to function.
3129 (ptid_of, lwpid_of): Remove macro.
3130 (all_processes): Change type to std::list<process_info *>.
3131 (ALL_PROCESSES): Remove macro.
3132 (for_each_process, find_process): New function.
3133 * inferiors.c (all_processes): Change type to
3134 std::list<process_info *>.
3135 (find_thread_process): Adjust.
3136 (add_process): Likewise.
3137 (remove_process): Likewise.
3138 (find_process_pid): Likewise.
3139 (get_first_process): Likewise.
3140 (started_inferior_callback): Remove.
3141 (have_started_inferiors_p): Adjust.
3142 (attached_inferior_callback): Remove.
3143 (have_attached_inferiors_p): Adjust.
3144 * linux-low.c (check_zombie_leaders): Likewise.
3145 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3146 (x86_linux_update_xmltarget): Adjust.
3147 * server.c (handle_query): Likewise.
3148 (gdb_reattached_process): Remove.
3149 (handle_status): Adjust.
3150 (kill_inferior_callback): Likewise.
3151 (detach_or_kill_inferior): Remove.
3152 (print_started_pid): Likewise.
3153 (print_attached_pid): Likewise.
3154 (detach_or_kill_for_exit): Update.
3155 (process_serial_event): Likewise.
3156 * linux-arm-low.c (arm_new_fork): Likewise.
3157
c9cb8905
SM
31582017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3159
3160 * dll.h: Include <list>.
3161 (struct dll_info): Add constructor.
3162 <entry>: Remove field.
3163 (all_dlls): Change type to std::list<dll_info>.
3164 * dll.c: Include <algorithm>.
3165 (get_dll): Remove macro.
3166 (all_dlls): Change type to std::list<dll_info *>.
3167 (free_one_dll): Remove.
3168 (match_dll): Likewise.
3169 (loaded_dll): Adjust.
3170 (unloaded_dll): Adjust to all_dlls type change, use
3171 std::find_if. Inline code from match_dll.
3172 (clear_dlls): Adjust to all_dlls type change.
3173 * server.c (emit_dll_description): Remove.
3174 (handle_qxfer_libraries): Adjust to all_dlls type change,
3175 integrate emit_dll_description's functionality.
3176
04ec7890
SM
31772017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3178
3179 * linux-low.h (struct linux_target_ops) <delete_process>: New
3180 field.
3181 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3182 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3183 (struct linux_target_ops): Add delete_process callback.
3184 * linux-arm-low.c (arm_delete_process): New.
3185 (struct linux_target_ops): Add delete_process callback.
3186 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3187 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3188 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3189 * linux-mips-low.c (mips_linux_delete_process): New.
3190 (struct linux_target_ops): Add delete_process callback.
3191 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3192 * linux-s390-low.c (struct linux_target_ops): Likewise.
3193 * linux-sh-low.c (struct linux_target_ops): Likewise.
3194 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3195 * linux-tile-low.c (struct linux_target_ops): Likewise.
3196 * linux-x86-low.c (x86_linux_delete_process): New.
3197 (struct linux_target_ops): Add delete_process callback.
3198 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3199
466eecee
SM
32002017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3201
3202 * linux-aarch64-low.c (the_low_target): Add thread delete
3203 callback.
3204 * linux-arm-low.c (arm_delete_thread): New function.
3205 (the_low_target): Add thread delete callback.
3206 * linux-bfin-low.c (the_low_target): Likewise.
3207 * linux-crisv32-low.c (the_low_target): Likewise.
3208 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3209 set.
3210 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3211 field.
3212 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3213 * linux-mips-low.c (mips_linux_delete_thread): New function.
3214 (the_low_target): Add thread delete callback.
3215 * linux-ppc-low.c (the_low_target): Likewise.
3216 * linux-s390-low.c (the_low_target): Likewise.
3217 * linux-sh-low.c (the_low_target): Likewise.
3218 * linux-tic6x-low.c (the_low_target): Likewise.
3219 * linux-tile-low.c (the_low_target): Likewise.
3220 * linux-x86-low.c (the_low_target): Likewise.
3221 * linux-xtensa-low.c (the_low_target): Likewise.
3222
b79f7801
YZ
32232017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3224
3225 * win32-low.c: Include "common-inferior.h".
3226
bc3b087d
SDJ
32272017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3228
3229 * inferiors.c (set_inferior_cwd): New function.
3230 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3231 (handle_query): Inform that QSetWorkingDir is supported.
3232 * win32-low.c (create_process): Pass the inferior's cwd to
3233 CreateProcess.
3234
d092c5a2
SDJ
32352017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3236
3237 * inferiors.c (current_inferior_cwd): New global variable.
3238 (get_inferior_cwd): New function.
3239 * inferiors.h (struct process_info) <cwd>: New field.
3240
7da0a886
SDJ
32412017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3242
3243 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3244 (OBS): Add gdb_tilde_expand.o.
3245
289a6840
SM
32462017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3247
3248 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3249 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3250
256642e8
PA
32512017-09-29 Pedro Alves <palves@redhat.com>
3252
3253 * ax.c (gdb_parse_agent_expr): Constify.
3254 * ax.h (gdb_parse_agent_expr): Constify.
3255 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3256 Constify.
3257 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3258 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3259 * remote-utils.h (read_ptid): Constify.
3260 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3261 (process_point_options, process_serial_event): Constify.
3262 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3263 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3264 (cmd_qtbuffer): Constify.
3265
5b9ca4d4
PA
32662017-09-29 Pedro Alves <palves@redhat.com>
3267
3268 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3269 fails.
3270
94c207e0
PA
32712017-09-29 Pedro Alves <palves@redhat.com>
3272
3273 * linux-low.c (handle_extended_wait): Pass parent thread instead
3274 of process to thread_db_notice_clone.
3275 * linux-low.h (thread_db_notice_clone): Replace parent process
3276 parameter with parent thread parameter.
3277 * thread-db.c (find_one_thread): Add comment.
3278 (thread_db_notice_clone): Replace parent process parameter with
3279 parent thread parameter. Temporarily switch to the parent thread.
3280
75352e28
SDJ
32812017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3282
3283 * gdbthread.h: Include "common-gdbthread.h".
3284 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3285 "if" when validating the ptid.
3286 * remote-utils.c: Include "gdbthread.h".
3287 (prepare_resume_reply): Use "switch_to_thread".
3288 * target.c (done_accessing_memory): Likewise.
3289
ad339634
AA
32902017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3291
3292 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3293 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3294 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3295 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3296 s390x-gs-linux64-ipa.o to ipa_obj.
3297 * linux-s390-low.c (HWCAP_S390_GS): New define.
3298 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3299 New functions.
3300 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3301 (s390_arch_setup): Check for guarded-storage support and choose
3302 appropriate tdesc.
3303 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3304 init_registers_s390x_gs_linux64.
3305 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3306 enum value.
3307 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3308 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3309
cc4d742f
SM
33102017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3311
3312 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3313
f6327dcb
KB
33142017-09-21 Kevin Buettner <kevinb@redhat.com>
3315
3316 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3317 (thread_db_thread_handle): Declare.
3318 * linux-low.c (linux_target_ops): Initialize thread_handle.
3319 * server.c (handle_qxfer_threads_worker): Add support for
3320 "handle" attribute.
3321 * target.h (struct target_ops): Add new function pointer,
3322 thread_handle.
3323 (target_thread_handle): Define.
3324 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3325 field in lwp.
3326 (thread_db_thread_handle): New function.
3327
86299109
KB
33282017-09-21 Kevin Buettner <kevinb@redhat.com>
3329
3330 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3331 * linux-low.h (thread_db_notice_clone): Declare.
3332 * thread-db.c (thread_db_notice_clone): New function.
3333
f557a88a
PA
33342017-09-21 Pedro Alves <palves@redhat.com>
3335
3336 * server.c (gdb_read_memory, handle_status, process_serial_event)
3337 (handle_serial_event, handle_target_event): Adjust to
3338 set_desired_thread prototype change.
3339 * target.c (set_desired_thread): Remove 'use_general' parameter
3340 and adjust.
3341 * target.h (set_desired_thread): Remove 'use_general' parameter.
3342
223ffa71
TT
33432017-09-20 Tom Tromey <tom@tromey.com>
3344
3345 * target.c (target_terminal::terminal_state): Define.
3346 (target_terminal::init): Rename from target_terminal_init.
3347 (target_terminal::inferior): Rename from
3348 target_terminal_inferior.
3349 (target_terminal::ours): Rename from target_terminal_ours.
3350 (target_terminal::ours_for_output, target_terminal::info): New.
3351
04fd3ba9
SM
33522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3353
3354 * server.c (accumulate_file_name_length): Remove.
3355 (emit_dll_description): Adjust to std::string change.
3356 (handle_qxfer_libraries): Use std::string to hold document.
3357
5e187554
SM
33582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3359
3360 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3361 return type of xml_escape_text.
3362 * server.c (emit_dll_description): Likewise.
3363
1526853e
SM
33642017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3365
3366 * server.c (captured_main): Accept argument for --selftest.
3367 Update run_tests call.
3368 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3369 when registering selftests.
3370
c4dfafab
SDJ
33712017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3372
3373 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3374 instead of "VEC" for "target_desc.reg_defs".
3375 (regcache_cpy): Likewise.
3376 (registers_to_string): Likewise.
3377 (registers_from_string): Likewise.
3378 (find_regno): Likewise.
3379 (supply_regblock): Likewise.
3380 (regcache_raw_read_unsigned): Likewise.
3381 * tdesc.c (init_target_desc): Likewise.
3382 (tdesc_create_reg): Likewise.
3383 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3384 (struct target_desc) <reg_defs>: Convert to "std::vector".
3385 (target_desc): Do not initialize "reg_defs".
3386 (~target_desc): Update code to use "std::vector" instead of "VEC"
3387 for "target_desc.reg_defs".
3388 (operator==): Likewise.
3389
124aceb4
SM
33902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3391
3392 * inferiors.h (thread_to_gdb_id): Remove.
3393 * inferiors.c (thread_to_gdb_id): Remove.
3394 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3395 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3396 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3397 Likewise.
3398 * nto-low.c (nto_fetch_registers, nto_store_registers,
3399 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3400
96cde54f
SM
34012017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3402
3403 * inferiors.h (gdb_id_to_thread_id): Remove.
3404 * inferiors.c (gdb_id_to_thread_id): Remove.
3405 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3406 removal. Move pid declaration closer to where it's used.
3407
e8ca139e
SM
34082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3409
3410 * server.c (handle_detach): New function.
3411 (process_serial_event): Move code out, call handle_detach.
3412
f8a4e119
SM
34132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3414
3415 * server.c (require_running): Rename to ...
3416 (require_running_or_return): ... this ...
3417 (require_running_or_break): ... and this.
3418 (handle_query, process_serial_event): Adjust.
3419
0eb0a407
SM
34202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3421
3422 * linux-low.c (linux_set_resume_request): Remove unused
3423 variables.
3424
785922a5
SM
34252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3426
3427 * server.c (first_thread_of): Remove.
3428 (process_serial_event): Replace usage of first_thread_of with
3429 find_any_thread_of_pid.
3430 * tracepoint.c (same_process_p): Remove.
3431 (gdb_agent_about_to_close): Replace usage of same_process_p with
3432 find_any_thread_of_pid.
3433 * linux-x86-low.c (same_process_callback): Remove.
3434 (x86_arch_setup_process_callback): Replace usage of
3435 same_process_callback with find_any_thread_of_pid.
3436 * thread-db.c (any_thread_of): Remove.
3437 (switch_to_process): Replace usage of any_thread_of with
3438 find_any_thread_of_pid.
3439 * inferiors.c (thread_pid_matches_callback): Remove.
3440 (find_thread_process): Adjust to use find_any_thread_of_pid.
3441
a059f00c
SDJ
34422017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3443
3444 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3445 with "!VEC_empty".
a059f00c 3446
cc397f3a
SDJ
34472017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3448
3449 * linux-low.c (handle_extended_wait): Use
3450 "allocate_target_description" instead of "XNEW".
3451 * linux-x86-low.c (initialize_low_arch): Likewise.
3452
22916b07
YQ
34532017-09-05 Yao Qi <yao.qi@linaro.org>
3454
3455 * configure.srv (srv_i386_regobj): Remove.
3456 (srv_amd64_regobj): Remove.
3457 (srv_regobj): Set it to "" for x86 non-linux targets.
3458 * linux-x86-tdesc.c (i386_linux_read_description):
3459 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3460 (init_registers_i386): Remove the declaration.
3461 (tdesc_i386): Remove the declaration.
3462 (lynx_i386_arch_setup): Call i386_create_target_description.
3463 * nto-x86-low.c: Likewise.
3464 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3465 [!__x86_64__]: include arch/i386.h.
3466 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3467
38602d55
YQ
34682017-09-05 Yao Qi <yao.qi@linaro.org>
3469
3470 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3471 i386/amd64-XXX-linux from it.
3472
44b886ff
YQ
34732017-09-05 Yao Qi <yao.qi@linaro.org>
3474
3475 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3476 false.
3477 (ipa_amd64_linux_regobj): Remove.
3478 (ipa_x32_linux_regobj): Remove.
3479
b4570e4b
YQ
34802017-09-05 Yao Qi <yao.qi@linaro.org>
3481
3482 * Makefile.in (arch-amd64.o): New rule.
3483 * configure.srv: Append arch-amd64.o.
3484 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3485 (get_ipa_tdesc): Call amd64_linux_read_description.
3486 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3487 and init_registers_amd64_XXX.
3488 * linux-x86-low.c (x86_linux_read_description): Call
3489 amd64_linux_read_description.
3490 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3491 (initialize_low_arch): Don't call init_registers_x32_XXX and
3492 init_registers_amd64_XXX.
3493 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3494 and tdesc_amd64_XXX.
3495 [__x86_64__] (amd64_tdesc_test): New function.
3496 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3497 and init_registers_amd64_XXX.
3498 * linux-x86-tdesc.c: Include arch/amd64.h.
3499 (xcr0_to_tdesc_idx): New function.
3500 (i386_linux_read_description): New function.
3501 (amd64_get_ipa_tdesc_idx): New function.
3502 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3503 (amd64_get_ipa_tdesc): Declare.
3504
d1f28ea2
YQ
35052017-09-05 Yao Qi <yao.qi@linaro.org>
3506
3507 * configure.srv (srv_i386_linux_xmlfiles): Remove
3508 i386/i386-XXX-linux.xml from it.
3509
25a93583
YQ
35102017-09-05 Yao Qi <yao.qi@linaro.org>
3511
3512 * configure.srv: Set srv_i386_linux_regobj empty if $development
3513 is false.
3514 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3515 initialize_low_tdesc.
3516 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3517 with #if initialize_low_tdesc.
3518 * linux-x86-tdesc-selftest.c: New file.
3519 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3520
5f035c07
YQ
35212017-09-05 Yao Qi <yao.qi@linaro.org>
3522
3523 * Makefile.in (arch-i386.o): New rule.
3524 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3525 (x86_64-*-linux*): Likewise.
3526 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3527 include arch/i386.h.
3528 (i386_linux_read_description): Remove code and call
3529 i386_create_target_description.
3530 * tdesc.c (allocate_target_description): New function.
3531 * tdesc.h (set_tdesc_architecture): Remove declaration.
3532 (set_tdesc_osabi): Likewise.
3533
0abe8a89
YQ
35342017-09-05 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3537 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3538 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3539 .xmltarget.
3540 * server.c (get_features_xml): Call tdesc_get_features_xml.
3541 * tdesc.c (set_tdesc_architecture): New function.
3542 (set_tdesc_osabi): New function.
3543 (tdesc_get_features_xml): New function.
3544 (tdesc_create_feature): Add an argument.
3545 * tdesc.h (struct target_desc) <features>: New field.
3546 <arch, osabi>: New field.
3547 (~target_desc): xfree features, arch, and osabi.
3548 (target_desc::oerator==): Don't compare .xmltarget.
3549 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3550 (set_tdesc_osabi): Likewise.
3551 (tdesc_get_features_xml): Likewise.
3552
0a188386
YQ
35532017-09-05 Yao Qi <yao.qi@linaro.org>
3554
3555 * linux-x86-tdesc.c: Include selftest.h.
3556 (i386_tdesc_test): New function.
3557 (initialize_low_tdesc): Call selftests::register_test.
3558 * tdesc.h: Include regdef.h.
3559 (target_desc): Override operator == and !=.
3560
f49ff000
YQ
35612017-09-05 Yao Qi <yao.qi@linaro.org>
3562
3563 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3564 (ipa_obj): Likewise.
3565 * linux-i386-ipa.c: Include common/x86-xstate.h
3566 (get_ipa_tdesc): Call i386_linux_read_description.
3567 (initialize_low_tracepoint): Don't call init_registers_XXX
3568 functions, call initialize_low_tdesc instead.
3569 * linux-x86-low.c (x86_linux_read_description): Call
3570 i386_linux_read_description.
3571 (initialize_low_arch): Don't call init_registers_i386_XXX
3572 functions, call initialize_low_tdesc.
3573 * linux-x86-tdesc.c: New file.
3574 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3575 (i386_get_ipa_tdesc_idx): Declare.
3576 (i386_get_ipa_tdesc): Declare.
3577 (initialize_low_tdesc): Declare.
3578
2b68ef2f
YQ
35792017-09-05 Yao Qi <yao.qi@linaro.org>
3580
3581 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3582 instead of 0.
3583
f7000548
YQ
35842017-09-05 Yao Qi <yao.qi@linaro.org>
3585
3586 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3587 * regcache.c (get_thread_regcache): Use VEC_length.
3588 (init_register_cache): Likewise.
3589 (regcache_cpy): Likewise.
3590 (registers_to_string): Iterate reg_defs via VEC_iterate.
3591 (find_regno): Likewise.
3592 (find_register_by_number): Use VEC_index.
3593 (register_size): Call find_register_by_number.
3594 (register_data): Call find_register_by_number.
3595 (supply_regblock): Use VEC_length.
3596 (regcache_raw_read_unsigned): Likewise.
3597 * tdesc.c (init_target_desc): Iterate reg_defs via
3598 VEC_iterate.
3599 (default_description): Update initializer.
3600 (copy_target_description): Don't update field num_registers.
3601 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3602 <num_registers>: Remove.
3603
50a421ac
SM
36042017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3605
3606 * Makefile.in (.SECONDARY): Define target.
3607
23fdd69e
SM
36082017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3609
3610 * linux-low.c (linux_wait_1): Adjust.
3611 * server.c (queue_stop_reply_callback): Adjust.
3612
0a2dde4a
SDJ
36132017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3614
3615 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3616 QEnvironmentUnset and QEnvironmentReset packets.
3617 (handle_query): Inform remote that QEnvironmentHexEncoded,
3618 QEnvironmentUnset and QEnvironmentReset are supported.
3619
6afd337d
SM
36202017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3621
3622 * inferiors.h (inferior_target_data): Rename to ...
3623 (thread_target_data): ... this.
3624 (inferior_regcache_data): Rename to ...
3625 (thread_regcache_data): ... this.
3626 (set_inferior_regcache_data): Rename to ...
3627 (set_thread_regcache_data): ... this.
3628 * inferiors.c (inferior_target_data): Rename to ...
3629 (thread_target_data): ... this.
3630 (inferior_regcache_data): Rename to ...
3631 (thread_regcache_data): ... this.
3632 (set_inferior_regcache_data): Rename to ...
3633 (set_thread_regcache_data): ... this.
3634 (free_one_thread): Update.
3635 * linux-low.h (get_thread_lwp): Update.
3636 * regcache.c (get_thread_regcache): Update.
3637 (regcache_invalidate_thread): Update.
3638 (free_register_cache_thread): Update.
3639 * win32-i386-low.c (update_debug_registers_callback): Update.
3640 (win32_get_current_dr): Update.
3641 * win32-low.c (thread_rec): Update.
3642 (delete_thread_info): Update.
3643 (continue_one_thread): Update.
3644 (suspend_one_thread): Update.
3645
a160cc46
SM
36462017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3647
3648 * inferiors.c (set_inferior_target_data): Remove.
3649 * inferiors.h (set_inferior_target_data): Remove.
3650
6d580b63
YQ
36512017-08-18 Yao Qi <yao.qi@linaro.org>
3652
3653 * Makefile.in (OBS): Add selftest.o.
3654 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3655 * configure, config.in: Re-generated.
3656 * server.c: Include common/sefltest.h.
3657 (captured_main): Handle option --selftest.
3658
f5a29eb0
YQ
36592017-08-09 Yao Qi <yao.qi@linaro.org>
3660
3661 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3662 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3663 i386-avx-mpx.o and i386-mmx.o.
3664 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3665 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3666 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3667 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3668 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3669 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3670 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3671 i386/amd64-avx-mpx.xml.
3672
57757c2f
YQ
36732017-08-09 Yao Qi <yao.qi@linaro.org>
3674
3675 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3676 and x32-avx-avx512.o.
3677 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3678 i386/x32-avx-avx512.xml.
3679
229d26fc
SM
36802017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3681
3682 * tracepoint.h (enum class fast_tpoint_collect_result): New
3683 enumeration.
3684 (fast_tracepoint_collecting): Change return type to
3685 fast_tpoint_collect_result.
3686 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3687 * linux-low.h: Include tracepoint.h.
3688 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3689 fast_tpoint_collect_result.
3690 * linux-low.c (handle_tracepoints): Adjust.
3691 (linux_fast_tracepoint_collecting): Change return type to
3692 fast_tpoint_collect_result.
3693 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3694 linux_wait_1, stuck_in_jump_pad_callback,
3695 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3696 proceed_one_lwp): Adjust to type change.
3697
2e1e43e1
YQ
36982017-07-10 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3701
adc764e7
YQ
37022017-06-29 Yao Qi <yao.qi@linaro.org>
3703
3704 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3705 Remove.
3706 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3707
a206891a
SM
37082017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3709
3710 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3711
9a6c7d9c
SDJ
37122017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3713
3714 * linux-low.c (linux_create_inferior): Adjust code to access the
3715 environment information via 'gdb_environ' class.
3716 * lynx-low.c (lynx_create_inferior): Likewise.
3717 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3718 (get_environ): Return a pointer to 'our_environ'.
3719 (captured_main): Initialize 'our_environ'.
3720 * server.h (get_environ): Adjust prototype.
3721 * spu-low.c (spu_create_inferior): Adjust code to access the
3722 environment information via 'gdb_environ' class.
3723
ae3e2ccf
SM
37242017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3725
3726 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3727 usage of "register" keyword.
3728
3e019bdc
SM
37292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3730
3731 * configure: Re-generate.
3732
8465943a
SM
37332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3734
3735 * configure: Re-generate.
3736
cf0dd6f0
SM
37372017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3738
3739 * Makefile.in (COMPILE.pre): Add "-x c++".
3740
9845682b
SDJ
37412017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3742
3743 * fork-child.c: Conditionally include <signal.h>.
3744
aefd8b33
SDJ
37452017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3746
3747 * server.c (handle_general_set): Handle new packet
3748 "QStartupWithShell".
3749 (handle_query): Add "QStartupWithShell" to the list of supported
3750 packets.
3751 (gdbserver_usage): Add help text explaining the
3752 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3753 options.
3754 (captured_main): Recognize and act upon the presence of the new
3755 CLI options.
3756
2090129c
SDJ
37572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3758 Pedro Alves <palves@redhat.com>
3759
3760 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3761 * configure: Regenerate.
3762 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3763 "fork-inferior.o".
3764 (i[34567]86-*-lynxos*): Likewise.
3765 (spu*-*-*): Likewise.
3766 * fork-child.c: New file.
3767 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3768 and "environ.h".
3769 (linux_ptrace_fun): New function.
3770 (linux_create_inferior): Adjust function prototype to reflect
3771 change on "target.h". Adjust function code to use
3772 "fork_inferior".
3773 (linux_request_interrupt): Delete "signal_pid".
3774 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3775 (lynx_ptrace_fun): New function.
3776 (lynx_create_inferior): Adjust function prototype to reflect
3777 change on "target.h". Adjust function code to use
3778 "fork_inferior".
3779 * nto-low.c (nto_create_inferior): Adjust function prototype and
3780 code to reflect change on "target.h". Update comments.
3781 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3782 "common-terminal.h" and "environ.h".
3783 (terminal_fd): Moved to fork-child.c.
3784 (old_foreground_pgrp): Likewise.
3785 (restore_old_foreground_pgrp): Likewise.
3786 (last_status): Make it global.
3787 (last_ptid): Likewise.
3788 (our_environ): New variable.
3789 (startup_with_shell): Likewise.
3790 (program_name): Likewise.
3791 (program_argv): Rename to...
3792 (program_args): ...this.
3793 (wrapper_argv): New variable.
3794 (start_inferior): Delete function.
3795 (get_exec_wrapper): New function.
3796 (get_exec_file): Likewise.
3797 (get_environ): Likewise.
3798 (prefork_hook): Likewise.
3799 (post_fork_inferior): Likewise.
3800 (postfork_hook): Likewise.
3801 (postfork_child_hook): Likewise.
3802 (handle_v_run): Update code to deal with arguments coming from the
3803 remote host. Update calls from "start_inferior" to
3804 "create_inferior".
3805 (captured_main): Likewise. Initialize environment variable. Call
3806 "have_job_control".
3807 * server.h (post_fork_inferior): New prototype.
3808 (get_environ): Likewise.
3809 (last_status): Declare.
3810 (last_ptid): Likewise.
3811 (signal_pid): Likewise.
3812 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3813 (spu_ptrace_fun): New function.
3814 (spu_create_inferior): Adjust function prototype to reflect change
3815 on "target.h". Adjust function code to use "fork_inferior".
3816 * target.c (target_terminal_init): New function.
3817 (target_terminal_inferior): Likewise.
3818 (target_terminal_ours): Likewise.
3819 * target.h: Include <vector>.
3820 (struct target_ops) <create_inferior>: Update prototype.
3821 (create_inferior): Update macro.
3822 * utils.c (gdb_flush_out_err): New function.
3823 * win32-low.c (win32_create_inferior): Adjust function prototype
3824 and code to reflect change on "target.h".
3825
043a4934
SDJ
38262017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3827
3828 * inferiors.c (switch_to_thread): New function.
3829
15652511
SDJ
38302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3831
3832 * Makefile.in (SFILE): Add "common/job-control.c".
3833 (OBS): Add "job-control.o".
3834
21ea5acd
SDJ
38352017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3836
3837 * Makefile: Remove "@host_makefile_frag@".
3838
e13cb306
PA
38392017-05-05 Pedro Alves <palves@redhat.com>
3840
3841 * configure: Regenerate.
3842
c94fee56
SDJ
38432017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3844
3845 * configure: Regenerate.
3846
a0ff9e1a
SM
38472017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3848
3849 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3850 software_single_step change of return type to
3851 std::vector<CORE_ADDR>.
3852 * linux-low.c (install_software_single_step_breakpoints):
3853 Likewise.
3854 * linux-low.h (install_software_single_step_breakpoints):
3855 Likewise.
3856
be628ab8
SDJ
38572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3858
3859 * remote-utils.c: Include "gdb_termios.h" instead of
3860 "terminal.h".
3861 * terminal.h: Delete file.
3862
7c5ded6a
SDJ
38632017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3864
3865 * server.c: Include <vector>.
3866 <program_argv, wrapper_argv>: Convert to std::vector.
3867 (start_inferior): Rewrite function to use C++.
3868 (handle_v_run): Likewise. Update code that calculates the argv
3869 based on the vRun packet; use C++.
3870 (captured_main): Likewise.
3871
436252de
SM
38722017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3873
3874 * server.c (handle_v_cont): Initialize thread_resume::thread
3875 with null_ptid.
3876
9bf2a700
PA
38772017-04-05 Pedro Alves <palves@redhat.com>
3878
3879 * configure: Regenerate.
3880
a121b7c1
PA
38812017-04-05 Pedro Alves <palves@redhat.com>
3882
3883 * gdbreplay.c (sync_error): Constify.
3884 * linux-x86-low.c (push_opcode): Constify.
3885
21c8a587
PA
38862017-04-05 Pedro Alves <palves@redhat.com>
3887
3888 * win32-low.c (get_child_debug_event)
3889 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3890 Report TARGET_WAITKIND_SPURIOUS instead.
3891
fb32b4f7
PA
38922017-04-05 Pedro Alves <palves@redhat.com>
3893
e79be6e5
SM
3894 * remote-utils.c (remote_prepare, remote_open): Constify.
3895 * remote-utils.h (remote_prepare, remote_open): Constify.
3896 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3897
65dd1e59
SM
38982017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3899
3900 * Makefile.in (clean): Clear .deps.
3901
8fa5b777
SM
39022017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3903
3904 * .gitignore: Remove generated files, replace with wildcard.
3905 * (clean): Replace removal of generated files with wildcard.
3906 (version.c): Replace with...
3907 (version-generated.c): ...this.
3908 (xml-builtin.c): Replace with...
3909 (xml-builtin-generated.c): ...this.
3910 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3911 (%.c: *regformats*): Replace with...
3912 (%-generated.c: *regformats*): ...this.
3913
a12e714b
MF
39142017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3915
3916 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3917 (xtensa_fill_gregset): Call collect_register_by_name for
3918 threadptr register.
3919 (xtensa_store_gregset): Call supply_register_by_name for
3920 threadptr register.
3921
1a09b50a
MF
39222017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3923
3924 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3925 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3926 (xtensa_store_gregset): Call supply_register for all registers in
3927 a0_regnum..a0_regnum + C0_NREGS range.
3928
1a01e7c6
SM
39292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3930
3931 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3932 (ax-ipa.o: ax.c): Remove.
3933 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3934 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3935 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3936 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3937 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3938
36bc18a8
SM
39392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3940
3941 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3942 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3943 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3944 (errors-ipa.o: ../common/errors.c): Remove.
3945 (format-ipa.o: ../common/format.c): Remove.
3946 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3947
a8ebe3d5
SM
39482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3949
3950 * Makefile.in (%-ipa.o: %.c): New rule.
3951 (tracepoint-ipa.o: tracepoint.c): Remove.
3952 (utils-ipa.o: utils.c): Remove.
3953 (remote-utils-ipa.o: remote-utils.c): Remove.
3954 (regcache-ipa.o: regcache.c): Remove.
3955 (i386-linux-ipa.o: i386-linux.c): Remove.
3956 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3957 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3958 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3959 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3960 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3961 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3962 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3963 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3964 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3965 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3966 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3967 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3968 (aarch64-ipa.o: aarch64.c): Remove.
3969 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3970 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3971 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3972 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3973 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3974 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3975 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3976 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3977 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3978 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3979 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3980 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3981 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3982 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3983 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3984 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3985 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3986 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3987 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3988 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3989 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3990 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3991 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3992 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3993 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3994 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3995 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3996 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3997 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3998 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3999 (tdesc-ipa.o: tdesc.c): Remove.
4000 (x32-linux-ipa.o: x32-linux.c): Remove.
4001 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4002 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4003
50cfacb7
SM
40042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4005
4006 * Makefile.in (%.o: ../arch/%.c): New rule.
4007 (arm.o: ../arch/arm.c): Remove.
4008 (arm-linux.o: ../arch/arm-linux.c): Remove.
4009 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4010 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4011
c5a22423
SM
40122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4013
4014 * Makefile.in (%.o: ../nat/%.c): New rule.
4015 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4016 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4017 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4018 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4019 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4020 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4021 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4022 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4023 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4024 (linux-personality.o: ../nat/linux-personality.c): Remove.
4025 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4026 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4027 (x86-linux.o: ../nat/x86-linux.c): Remove.
4028 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4029 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4030
6bda016b
SM
40312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4032
4033 * Makefile.in (%.o: ../common/%.c): New rule.
4034 (signals.o: ../common/signals.c): Remove.
4035 (print-utils.o: ../common/print-utils.c): Remove.
4036 (rsp-low.o: ../common/rsp-low.c): Remove.
4037 (common-utils.o: ../common/common-utils.c): Remove.
4038 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4039 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4040 (vec.o: ../common/vec.c): Remove.
4041 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4042 (xml-utils.o: ../common/xml-utils.c): Remove.
4043 (ptid.o: ../common/ptid.c): Remove.
4044 (buffer.o: ../common/buffer.c): Remove.
4045 (format.o: ../common/format.c): Remove.
4046 (filestuff.o: ../common/filestuff.c): Remove.
4047 (agent.o: ../common/agent.c): Remove.
4048 (errors.o: ../common/errors.c): Remove.
4049 (environ.o: ../common/environ.c): Remove.
4050 (common-debug.o: ../common/common-debug.c): Remove.
4051 (cleanups.o: ../common/cleanups.c): Remove.
4052 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4053 (fileio.o: ../common/fileio.c): Remove.
4054 (common-regcache.o: ../common/common-regcache.c): Remove.
4055 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4056 (new-op.o: ../common/new-op.c): Remove.
4057 (btrace-common.o: ../common/btrace-common.c): Remove.
4058
21122961
SM
40592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4060
4061 * Makefile.in (%.o: ../target/%.c): New rule.
4062 (waitstatus.o: ../target/waitstatus.c): Remove.
4063
c362e621
SM
40642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4065
4066 * Makefile.in
4067 (%.c: ../regformats/%.dat,
4068 (%.c: ../regformats/arm/%.dat,
4069 (%.c: ../regformats/i386/%.dat,
4070 (%.c: ../regformats/rs6000/%.dat): New rules.
4071 (aarch64.c): Remove.
4072 (reg-arm.c): Remove.
4073 (arm-with-iwmmxt.c): Remove.
4074 (arm-with-vfpv2.c): Remove.
4075 (arm-with-vfpv3.c): Remove.
4076 (arm-with-neon.c): Remove.
4077 (reg-bfin.c): Remove.
4078 (reg-cris.c): Remove.
4079 (reg-crisv32.c): Remove.
4080 (i386.c): Remove.
4081 (i386-linux.c): Remove.
4082 (i386-avx.c): Remove.
4083 (i386-avx-linux.c): Remove.
4084 (i386-avx-avx512.c): Remove.
4085 (i386-avx-avx512-linux.c): Remove.
4086 (i386-mpx.c): Remove.
4087 (i386-mpx-linux.c): Remove.
4088 (i386-avx-mpx-avx512-pku.c): Remove.
4089 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4090 (i386-avx-mpx.c): Remove.
4091 (i386-avx-mpx-linux.c): Remove.
4092 (i386-mmx.c): Remove.
4093 (i386-mmx-linux.c): Remove.
4094 (reg-ia64.c): Remove.
4095 (reg-m32r.c): Remove.
4096 (reg-m68k.c): Remove.
4097 (reg-cf.c): Remove.
4098 (mips-linux.c): Remove.
4099 (mips-dsp-linux.c): Remove.
4100 (mips64-linux.c): Remove.
4101 (mips64-dsp-linux.c): Remove.
4102 (nios2-linux.c): Remove.
4103 (powerpc-32.c): Remove.
4104 (powerpc-32l.c): Remove.
4105 (powerpc-altivec32l.c): Remove.
4106 (powerpc-cell32l.c): Remove.
4107 (powerpc-vsx32l.c): Remove.
4108 (powerpc-isa205-32l.c): Remove.
4109 (powerpc-isa205-altivec32l.c): Remove.
4110 (powerpc-isa205-vsx32l.c): Remove.
4111 (powerpc-e500l.c): Remove.
4112 (powerpc-64l.c): Remove.
4113 (powerpc-altivec64l.c): Remove.
4114 (powerpc-cell64l.c): Remove.
4115 (powerpc-vsx64l.c): Remove.
4116 (powerpc-isa205-64l.c): Remove.
4117 (powerpc-isa205-altivec64l.c): Remove.
4118 (powerpc-isa205-vsx64l.c): Remove.
4119 (s390-linux32.c): Remove.
4120 (s390-linux32v1.c): Remove.
4121 (s390-linux32v2.c): Remove.
4122 (s390-linux64.c): Remove.
4123 (s390-linux64v1.c): Remove.
4124 (s390-linux64v2.c): Remove.
4125 (s390-te-linux64.c): Remove.
4126 (s390-vx-linux64.c): Remove.
4127 (s390-tevx-linux64.c): Remove.
4128 (s390x-linux64.c): Remove.
4129 (s390x-linux64v1.c): Remove.
4130 (s390x-linux64v2.c): Remove.
4131 (s390x-te-linux64.c): Remove.
4132 (s390x-vx-linux64.c): Remove.
4133 (s390x-tevx-linux64.c): Remove.
4134 (tic6x-c64xp-linux.c): Remove.
4135 (tic6x-c64x-linux.c): Remove.
4136 (tic6x-c62x-linux.c): Remove.
4137 (reg-sh.c): Remove.
4138 (reg-sparc64.c): Remove.
4139 (reg-spu.c): Remove.
4140 (amd64.c): Remove.
4141 (amd64-linux.c): Remove.
4142 (amd64-avx.c): Remove.
4143 (amd64-avx-linux.c): Remove.
4144 (amd64-avx-avx512.c): Remove.
4145 (amd64-avx-avx512-linux.c): Remove.
4146 (amd64-mpx.c): Remove.
4147 (amd64-mpx-linux.c): Remove.
4148 (amd64-avx-mpx-avx512-pku.c): Remove.
4149 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4150 (amd64-avx-mpx.c): Remove.
4151 (amd64-avx-mpx-linux.c): Remove.
4152 (x32.c): Remove.
4153 (x32-linux.c): Remove.
4154 (x32-avx.c): Remove.
4155 (x32-avx-linux.c): Remove.
4156 (x32-avx-avx512.c): Remove.
4157 (x32-avx-avx512-linux.c): Remove.
4158 (reg-xtensa.c): Remove.
4159 (reg-tilegx.c): Remove.
4160 (reg-tilegx32.c): Remove.
4161
1672e0d9
SDJ
41622017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4163
4164 * Makefile.in (SFILES): Add "common/environ.c".
4165 (OBJS): Add "common/environ.h".
4166
239b6d10
WT
41672017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4168
4169 * configure.ac: Check if the fs_base and gs_base members of
4170 `struct user_regs_struct' exist.
4171 * config.in: Regenerated.
4172 * configure: Likewise.
4173
694b382c
AT
41742017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4175
4176 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4177 target_read_memory.
4178 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4179 (get_next_pcs_syscall_next_pc): Likewise.
4180
7dc53023
LM
41812016-12-23 Luis Machado <lgustavo@codesourcery.com>
4182
4183 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4184 * nto-x86-low.c: Likewise.
4185
ad02e4fe
SM
41862016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4187
4188 * Makefile.in: Include disable-implicit-rules.mk.
4189
dcb07cfa
PA
41902016-11-23 Pedro Alves <palves@redhat.com>
4191
4192 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4193 (debug_vprintf): Use std::chrono::steady_clock instead of
4194 gettimeofday. Use '.' instead of ':'.
4195 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4196 (get_timestamp): Use std::chrono::steady_clock instead of
4197 gettimeofday.
4198
8629c02c
SM
41992016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4200
4201 * Makefile.in: Fix whitespace formatting.
4202
b593ecca
SM
42032016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4204
4205 * Makefile.in (SFILES, OBS): Flatten list and order
4206 alphabetically.
4207
9986ba08
PA
42082016-11-23 Pedro Alves <palves@redhat.com>
4209
4210 * event-loop.c (handle_file_event): Use warning.
4211 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4212 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4213 Use warning.
4214
4eefa7bc
PA
42152016-11-23 Pedro Alves <palves@redhat.com>
4216
4217 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4218 output.
4219 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4220 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4221 debug_printf and debug_flush for debug output.
4222 * server.c (handle_general_set): Likewise.
4223 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4224 output.
4225
5443506e
SM
42262016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4227
4228 * Makefile.in (.c.o): Replace rule with ...
4229 (%.o: %.c): ... this one.
4230
3b165252
SM
42312016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4232
4233 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4234 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4235 make.
4236 * configure.ac: Remove checks for the make program.
4237 * configure: Re-generate.
4238
0bcda685
PA
42392016-10-28 Pedro Alves <palves@redhat.com>
4240
4241 * Makefile.in (CXX_DIALECT): Get from configure.
4242 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4243 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4244 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4245 * config.in: Regenerate.
4246 * configure: Regenerate.
4247
c3805894
YQ
42482016-10-27 Yao Qi <yao.qi@linaro.org>
4249
4250 * linux-low.c (linux_supports_range_stepping): Return true if
4251 can_software_single_step return true.
4252
89342618
YQ
42532016-10-27 Yao Qi <yao.qi@linaro.org>
4254
4255 * inferiors.c (find_inferior_in_random): New function.
4256 * inferiors.h (find_inferior_in_random): Declare.
4257 * linux-low.c (linux_wait_for_event_filtered): Call
4258 find_inferior_in_random instead of find_inferior.
4259
e3652c84
YQ
42602016-10-27 Yao Qi <yao.qi@linaro.org>
4261
4262 * linux-low.c (linux_wait_1): If single-step breakpoints are
4263 inserted, remove them.
4264
5a04c4cf
PA
42652016-10-26 Pedro Alves <palves@redhat.com>
4266
4267 * linux-low.c (handle_extended_wait): Link parent/child fork
4268 threads.
4269 (linux_wait_1): Unlink them.
4270 (linux_set_resume_request): Ignore resume requests for
4271 already-resumed and unhandled fork child threads.
4272 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4273 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4274 New functions.
4275 (handle_v_requests) <vCont>: Don't call require_running.
4276 * server.h (in_queued_stop_replies): New declaration.
4277
cb93dc7f
YQ
42782016-10-24 Yao Qi <yao.qi@linaro.org>
4279
4280 PR server/20733
4281 * linux-aarch64-low.c (append_insns): Cast the return value to
4282 'uint32_t *'.
4283
a1078bea
YQ
42842016-10-10 Yao Qi <yao.qi@linaro.org>
4285
4286 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4287
1fb77080
SDJ
42882016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4289
4290 * target.c (target_supports_multi_process): New function, moved
4291 from...
4292 * target.h (target_supports_multi_process): ... here. Remove
4293 macro.
4294
39b5a3b9
TT
42952016-10-05 Tom Tromey <tom@tromey.com>
4296
4297 PR remote/20655:
4298 * tracepoint.c (handle_tracepoint_bkpts): Check
4299 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4300
c1d0b70a
YQ
43012016-10-05 Yao Qi <yao.qi@linaro.org>
4302
4303 * configure.srv: Update the path of arm-*.xml files.
4304
0a69eedb
YQ
43052016-10-05 Terry Guo <terry.guo@arm.com>
4306 Yao Qi <yao.qi@linaro.org>
4307
4308 * Makefile.in: Adjust the path of rules.
4309 * configure.srv: Update the path of xml files.
4310 * regformats/arm-with-iwmmxt.dat: Regenerated.
4311 * regformats/arm-with-neon.dat: Likewise.
4312 * regformats/arm-with-vfpv2.dat: Likewise.
4313 * regformats/arm-with-vfpv3.dat Likewise.
4314
17e16485
YQ
43152016-09-30 Yao Qi <yao.qi@linaro.org>
4316
4317 PR gdbserver/20627
4318 * target.c (target_stop_and_wait): Don't call
4319 target_continue_no_signal, use resume_stop instead.
4320
edeeb602
YQ
43212016-09-26 Yao Qi <yao.qi@linaro.org>
4322
4323 * linux-low.c (linux_wait_1): Call debug_exit.
4324
503b1c39
PA
43252016-09-23 Pedro Alves <palves@redhat.com>
4326
4327 * Makefile.in (SFILES): Add common/new-op.c.
4328 (OBS): Add common/new-op.o.
4329 (new-op.o): New rule.
4330
74172ecf
SM
43312016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4332
4333 * .gitinore: Ignore more files.
4334
fc6cda2e
YQ
43352016-09-21 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4338 23.
4339
bc1e6c81
SDJ
43402016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4341
4342 * server.c (start_inferior): Call target_mourn_inferior instead of
4343 mourn_inferior; pass ptid_t argument to it.
4344 (resume): Likewise.
4345 (handle_target_event): Likewise.
4346 * target.c (target_mourn_inferior): New function.
4347 * target.h (mourn_inferior): Delete macro.
4348
0e00e962
AA
43492016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4350
4351 * linux-low.c (lwp_is_stepping): New function.
4352
1d8cb77d
CL
43532016-09-06 Carl Love <cel@us.ibm.com>
4354
4355 * server.c (start_inferior): Fixed comment, requested comment change
4356 didn't get updated correctly. Removed reference to ptrace () call as
4357 it is only true on Linux systems.
4358
7313bced
CL
43592016-09-06 Carl Love <cel@us.ibm.com>
4360
4361 * server.c (start_inferior): Do not call
4362 function target_post_create_inferior () if the
4363 inferior process has already exited.
4364
cf6de44d
PA
43652016-09-05 Pedro Alves <palves@redhat.com>
4366
4367 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4368 (COMPILE.pre, CC_LD): Use CXX directly.
4369 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4370 * acinclude.m4: Don't include build-with-cxx.m4.
4371 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4372 * configure: Regenerate.
4373
c1da6748
AT
43742016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4375
4376 PR gdb/19495
4377 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4378 call writing data to own_buf.
4379
f2b9e3df
SDJ
43802016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4381
4382 * target.c (mywait): Call target_wait instead of
4383 the_target->wait.
4384 (target_wait): New function.
4385
049a8570
SDJ
43862016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4387
4388 * server.c (start_inferior): New variable 'ptid'. Replace calls
4389 to the_target->resume by target_continue{,_no_signal}, depending
4390 on the case.
4391 * target.c (target_stop_and_wait): Call target_continue_no_signal
4392 instead of the_target->resume.
4393 (target_continue): New function.
4394
3aa5cfa0
AT
43952016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4396
4397 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4398
754653a7
AZ
43992016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4400
4401 PR server/20491
4402 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4403 ps_prochandle.
4404 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4405 * linux-arm-low.c (ps_get_thread_area): Likewise.
4406 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4407 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4408 * linux-mips-low.c (ps_get_thread_area): Likewise.
4409 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4410 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4411 * linux-x86-low.c (ps_get_thread_area): Likewise.
4412 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4413
ed036b40
PA
44142016-08-19 Pedro Alves <palves@redhat.com>
4415
4416 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4417
c8ef42ee
PA
44182016-08-19 Pedro Alves <palves@redhat.com>
4419
4420 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4421 comment. Use memcpy instead of casting through unsigned long.
4422
9c235a72
PA
44232016-08-19 Pedro Alves <palves@redhat.com>
4424
4425 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4426 allocating around 0x80000000.
4427
201506da
PA
44282016-08-19 Pedro Alves <palves@redhat.com>
4429
4430 PR gdb/20415
4431 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4432 (x32-avx512-linux-ipa.o): New rules.
4433 * configure.ac (x86_64-*-linux*): New x32 check.
4434 * configure.srv (ipa_x32_linux_regobj): New.
4435 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4436 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4437 descriptions.
4438 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4439 descriptions.
4440 * configure: Regenerate.
4441
f348d89a
PA
44422016-08-09 Pedro Alves <palves@redhat.com>
4443
4444 PR gdb/18653
4445 * Makefile.in (OBS): Add signals-state-save-restore.o.
4446 (signals-state-save-restore.o): New rule.
4447 * config.in: Regenerate.
4448 * configure: Regenerate.
4449 * linux-low.c: Include "signals-state-save-restore.h".
4450 (linux_create_inferior): Call
4451 restore_original_signals_state.
4452 * server.c: Include "dispositions-save-restore.h".
4453 (captured_main): Call save_original_signals_state.
4454
1baf5149
PA
44552016-08-05 Pedro Alves <palves@redhat.com>
4456
4457 * configure: Regenerate.
4458
fcd4a73d
YQ
44592016-08-04 Yao Qi <yao.qi@linaro.org>
4460
4461 * linux-low.c (regsets_fetch_inferior_registers): Check
4462 errno is ESRCH or not.
4463
979659d0
YQ
44642016-08-02 Yao Qi <yao.qi@linaro.org>
4465
4466 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4467 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4468 (thread_db_load_search): Update.
4469 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4470 td_ta_set_event and td_ta_event_getmsg.
4471
6598661d
PA
44722016-07-26 Pedro Alves <palves@redhat.com>
4473
4474 PR server/20414
4475 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4476 of unsigned long for 64-bit registers and use uint32_t instead of
4477 unsigned int for 32-bit registers.
4478
9cf12d57
PA
44792016-07-26 Pedro Alves <palves@redhat.com>
4480
4481 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4482 to 'ptrace'.
4483
305450ed
TT
44842016-07-21 Tom Tromey <tom@tromey.com>
4485
4486 * configure: Rebuild.
4487
2583da7c
YQ
44882016-07-21 Yao Qi <yao.qi@linaro.org>
4489
4490 * mem-break.c (find_gdb_breakpoint): Cast bp to
4491 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4492
21536b36
YQ
44932016-07-21 Yao Qi <yao.qi@linaro.org>
4494
4495 * server.c (handle_v_requests): Support s and S actions
4496 if target_supports_software_single_step return true.
4497
8901d193
YQ
44982016-07-21 Yao Qi <yao.qi@linaro.org>
4499
4500 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4501 is resume_step, call maybe_hw_step.
4502 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4503 and unstop them.
4504 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4505 breakpoints or not.
4506 (proceed_one_lwp): If resume request is resume_step, install
4507 reinsert breakpoints and call maybe_hw_step.
4508
0e9a339e
YQ
45092016-07-21 Yao Qi <yao.qi@linaro.org>
4510
4511 * linux-low.c (proceed_one_lwp): Declare.
4512 (linux_resume_one_thread): Remove local variable 'step'.
4513 Lift code enqueue signal. Call proceed_one_lwp instead of
4514 linux_resume_one_lwp.
4515
4281b351
YQ
45162016-07-21 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-low.c (linux_resume_one_thread): Call
4519 enqueue_pending_signal.
4520
984a2c04
YQ
45212016-07-21 Yao Qi <yao.qi@linaro.org>
4522
4523 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4524 * inferiors.c (do_restore_current_thread_cleanup): New function.
4525 (make_cleanup_restore_current_thread): Likewise.
4526 * linux-low.c (install_software_single_step_breakpoints): Call
4527 make_cleanup_restore_current_thread. Switch current_thread to
4528 thread.
4529
bec903c9
YQ
45302016-07-21 Yao Qi <yao.qi@linaro.org>
4531
4532 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4533 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4534 (clone_one_breakpoint): Likewise.
4535 (delete_reinsert_breakpoints): Change parameter to thread.
4536 Callers updated.
4537 (has_reinsert_breakpoints): Likewise.
4538 (uninsert_reinsert_breakpoints): Likewise.
4539 (reinsert_reinsert_breakpoints): Likewise.
4540 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4541 (delete_reinsert_breakpoints): Likewise.
4542 (reinsert_reinsert_breakpoints): Likewise.
4543 (uninsert_reinsert_breakpoints): Likewise.
4544 (has_reinsert_breakpoints): Likewise.
4545
63c40ec7
YQ
45462016-07-21 Yao Qi <yao.qi@linaro.org>
4547
4548 * inferiors.c (get_thread_process): Make parameter const.
4549 * inferiors.h (get_thread_process): Update declaration.
4550 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4551 Add new parameters child_thread and parent_thread. Callers
4552 updated.
4553 * mem-break.h (clone_all_breakpoints): Update declaration.
4554
9aa76cd0
YQ
45552016-07-21 Yao Qi <yao.qi@linaro.org>
4556
4557 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4558 <command_list, handler>: Remove.
4559 (struct gdb_breakpoint): New.
4560 (struct other_breakpoint): New.
4561 (struct reinsert_breakpoint): New.
4562 (is_gdb_breakpoint): New function.
4563 (any_persistent_commands): Update command_list if
4564 is_gdb_breakpoint returns true.
4565 (set_breakpoint): Create breakpoints according to their types.
4566 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4567 (set_gdb_breakpoint_1): Likewise.
4568 (set_gdb_breakpoint): Likewise.
4569 (clear_breakpoint_conditions): Change parameter type to
4570 'struct gdb_breakpoint *'.
4571 (clear_breakpoint_commands): Likewise.
4572 (clear_breakpoint_conditions_and_commands): Likewise.
4573 (add_condition_to_breakpoint): Likewise.
4574 (add_breakpoint_condition): Likewise.
4575 (add_commands_to_breakpoint): Likewise.
4576 (check_breakpoints): Check other_breakpoint.
4577 (clone_one_breakpoint): Clone breakpopint according to its type.
4578 * mem-break.h (struct gdb_breakpoint): Declare.
4579 (set_gdb_breakpoint): Update declaration.
4580 (clear_breakpoint_conditions_and_commands): Likewise.
4581 (add_breakpoint_condition): Likewise.
4582 (add_breakpoint_commands): Likewise.
4583 * server.c (process_point_options): Change parameter type to
4584 'struct gdb_breakpoint *'.
4585
811f8301
YQ
45862016-07-21 Yao Qi <yao.qi@linaro.org>
4587
4588 * mem-break.c (set_breakpoint_at): Rename it to ...
4589 (set_breakpoint_type_at): ... it.
4590 (set_breakpoint_at): Call set_breakpoint_type_at.
4591 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4592 * mem-break.h (set_breakpoint_at): Update comments.
4593
b1c51e36
CLT
45942016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4595
4596 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4597 to buf parameter.
4598 (nios2_store_gregset): Likewise.
4599
ced2dffb
PA
46002016-07-01 Pedro Alves <palves@redhat.com>
4601 Antoine Tremblay <antoine.tremblay@ericsson.com>
4602
4603 * linux-low.c: Change interface to take the target lwp_info
4604 pointer directly and return void. Handle detaching from a zombie
4605 thread.
4606 (linux_detach_lwp_callback): New function.
4607 (linux_detach): Detach from the leader thread after detaching from
4608 the clone threads.
4609
2ac09a5b
YQ
46102016-06-28 Yao Qi <yao.qi@linaro.org>
4611
4612 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4613 for variable new_offset.
4614 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4615 (aarch64_ftrace_insn_reloc_cb): Likewise.
4616 (aarch64_ftrace_insn_reloc_tb): Likewise.
4617 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4618 PRIx64 instead of PRIx32.
4619
79e7fd4f
YQ
46202016-06-28 Yao Qi <yao.qi@linaro.org>
4621
4622 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4623 (the_low_target): Install arm_get_syscall_trapinfo.
4624
061fc021
YQ
46252016-06-28 Yao Qi <yao.qi@linaro.org>
4626
4627 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4628 function.
4629 (the_low_target): Install aarch64_get_syscall_trapinfo.
4630
4cc32bec
YQ
46312016-06-28 Yao Qi <yao.qi@linaro.org>
4632
4633 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4634 Callers updated.
4635 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4636 Remove parameter sysno.
4637 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4638 sysret.
4639
782c1122
AA
46402016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4641
4642 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4643 (s390_emit_ne_goto): Likewise.
4644 (s390_emit_lt_goto): Likewise.
4645 (s390_emit_le_goto): Likewise.
4646 (s390_emit_gt_goto): Likewise.
4647 (s390_emit_ge_goto): Likewise.
4648 (s390x_emit_eq_goto): Likewise.
4649 (s390x_emit_ne_goto): Likewise.
4650 (s390x_emit_lt_goto): Likewise.
4651 (s390x_emit_le_goto): Likewise.
4652 (s390x_emit_gt_goto): Likewise.
4653 (s390x_emit_ge_goto): Likewise.
4654 (s390_emit_ops_impl): Mark variable static.
4655 (s390x_emit_ops): Likewise.
4656
2e7b624b
YQ
46572016-06-17 Yao Qi <yao.qi@linaro.org>
4658
4659 * linux-low.c (handle_extended_wait): Call
4660 uninsert_reinsert_breakpoints for the parent process. Remove
4661 reinsert breakpoints from the child process. Reinsert them to
4662 the parent process when vfork is done.
4663 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4664 (reinsert_reinsert_breakpoints): New function.
4665 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4666 (reinsert_reinsert_breakpoints): Declare.
4667
8a81c5d7
YQ
46682016-06-17 Yao Qi <yao.qi@linaro.org>
4669
4670 * linux-low.c (handle_extended_wait): If the parent is doing
4671 step-over, remove the reinsert breakpoints from the forked child.
4672
f50bf8e5
YQ
46732016-06-17 Yao Qi <yao.qi@linaro.org>
4674
4675 * linux-low.c (unsuspend_all_lwps): Declare.
4676 (linux_low_filter_event): If thread exited, call finish_step_over.
4677 If step-over is finished, unsuspend other threads.
4678
8376a3cb
YQ
46792016-06-17 Yao Qi <yao.qi@linaro.org>
4680
4681 * linux-low.c (linux_resume_one_lwp_throw): Assert
4682 has_reinsert_breakpoints returns false.
4683 * mem-break.c (delete_disabled_breakpoints): Assert
4684 bp type isn't reinsert_breakpoint.
4685
f79b145d
YQ
46862016-06-17 Yao Qi <yao.qi@linaro.org>
4687
4688 * linux-low.c (maybe_hw_step): New function.
4689 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4690 (finish_step_over): Switch current_thread to lwp temporarily,
4691 and assert has_reinsert_breakpoints returns true.
4692 (proceed_one_lwp): Call maybe_hw_step.
4693 * mem-break.c (has_reinsert_breakpoints): New function.
4694 * mem-break.h (has_reinsert_breakpoints): Declare.
4695
0ae534d2
JT
46962016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4697
4698 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4699
fcdad592
YQ
47002016-05-17 Yao Qi <yao.qi@linaro.org>
4701
4702 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4703 instead of find_inferior.
4704
9e784964
YQ
47052016-05-05 Yao Qi <yao.qi@linaro.org>
4706
4707 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4708 Initialize res to zero.
4709
cf2ebb6e
YQ
47102016-05-05 Yao Qi <yao.qi@linaro.org>
4711
4712 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4713 to uint32_t.
4714
c1aebf87
UW
47152016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4716
4717 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4718 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4719 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4720
35fd2deb 47212016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4722 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4723
4724 * tracepoint.c (write_inferior_int8): New function.
4725 (cmd_qtenable_disable): Write enable flag using
4726 write_inferior_int8.
4727
484b3c32
YQ
47282016-04-25 Yao Qi <yao.qi@linaro.org>
4729
4730 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4731 (need_step_over_p): Return zero if the LWP has pending signals
4732 can be delivered on software single step target.
4733
85ba7d86
YQ
47342016-04-25 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4737 return instead of error.
4738
3539aa13
YQ
47392016-04-22 Yao Qi <yao.qi@linaro.org>
4740
4741 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4742 to 23.
4743
5b061e98
YQ
47442016-04-22 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4747 signal when stepping over breakpoint with software single
4748 step.
4749
3451269c
PA
47502016-04-21 Pedro Alves <palves@redhat.com>
4751
4752 * linux-s390-low.c (s390_collect_ptrace_register)
4753 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4754 add casts.
4755 (s390_check_regset): Use void * instead of gdb_byte *.
4756
a2358508
PA
47572016-04-20 Pedro Alves <palves@redhat.com>
4758
4759 * configure: Renegerate.
4760
6885166d
YQ
47612016-04-20 Yao Qi <yao.qi@linaro.org>
4762
4763 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4764 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4765 number 16.
4766 (arm_store_gregset): Likewise.
4767
2b863f51
WT
47682016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4769
4770 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4771 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4772 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4773 (amd64-avx-mpx-linux.c): New rules.
4774 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4775 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4776 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4777 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4778 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4779 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4780 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4781 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4782 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4783 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4784 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4785 * linux-x86-low.c (x86_linux_read_description): Add case for
4786 X86_XSTATE_AVX_MPX_MASK.
4787 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4788 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4789 init_registers_i386_avx_mpx_linux.
4790 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4791 (initialize_low_tracepoint): Call
4792 init_registers_i386_avx_mpx_linux.
4793 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4794 (initialize_low_tracepoint): Call
4795 init_registers_amd64_avx_mpx_linux.
4796 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4797 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4798 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4799 declarations.
4800
9b30624b
PA
48012016-04-18 Pedro Alves <palves@redhat.com>
4802
4803 * configure: Regenerate.
4804
45e3745e
AT
48052016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4806
4807 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4808 (aarch64_emit_sub): Likewise.
4809
2afc13ff
PA
48102016-04-12 Pedro Alves <palves@redhat.com>
4811
4812 * utils.c (prepare_to_throw_exception): Delete.
4813
6e774b13
SM
48142016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4815
4816 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4817
4dca19f8
MK
48182016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4819
4820 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4821
d0a9981f
MK
48222016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4823
4824 * linux-aarch64-ipa.c: Add <elf.h> include.
4825 * linux-ppc-ipa.c: Add <elf.h> include.
4826 * linux-s390-ipa.c: Add <elf.h> include.
4827
252db07e
MK
48282016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4829
4830 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4831 (get_raw_reg_ptr): Likewise.
4832 (get_trace_state_variable_value_ptr): Likewise.
4833 (set_trace_state_variable_value_ptr): Likewise.
4834 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4835 char *.
4836
14e2b6d9
MK
48372016-03-31 Wei-cheng Wang <cole945@gmail.com>
4838 Marcin Kościelnicki <koriakin@0x04.net>
4839
4840 PR/17221
4841 * linux-ppc-low.c (emit_insns): New function.
4842 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4843 (ppc_emit_prologue): New function.
4844 (ppc_emit_epilogue): New function.
4845 (ppc_emit_add): New function.
4846 (ppc_emit_sub): New function.
4847 (ppc_emit_mul): New function.
4848 (ppc_emit_lsh): New function.
4849 (ppc_emit_rsh_signed): New function.
4850 (ppc_emit_rsh_unsigned): New function.
4851 (ppc_emit_ext): New function.
4852 (ppc_emit_zero_ext): New function.
4853 (ppc_emit_log_not): New function.
4854 (ppc_emit_bit_and): New function.
4855 (ppc_emit_bit_or): New function.
4856 (ppc_emit_bit_xor): New function.
4857 (ppc_emit_bit_not): New function.
4858 (ppc_emit_equal): New function.
4859 (ppc_emit_less_signed): New function.
4860 (ppc_emit_less_unsigned): New function.
4861 (ppc_emit_ref): New function.
4862 (ppc_emit_const): New function.
4863 (ppc_emit_reg): New function.
4864 (ppc_emit_pop): New function.
4865 (ppc_emit_stack_flush): New function.
4866 (ppc_emit_swap): New function.
4867 (ppc_emit_stack_adjust): New function.
4868 (ppc_emit_call): New function.
4869 (ppc_emit_int_call_1): New function.
4870 (ppc_emit_void_call_2): New function.
4871 (ppc_emit_if_goto): New function.
4872 (ppc_emit_goto): New function.
4873 (ppc_emit_eq_goto): New function.
4874 (ppc_emit_ne_goto): New function.
4875 (ppc_emit_lt_goto): New function.
4876 (ppc_emit_le_goto): New function.
4877 (ppc_emit_gt_goto): New function.
4878 (ppc_emit_ge_goto): New function.
4879 (ppc_write_goto_address): New function.
4880 (ppc_emit_ops_impl): New static variable.
4881 (ppc64v1_emit_prologue): New function.
4882 (ppc64v2_emit_prologue): New function.
4883 (ppc64_emit_epilogue): New function.
4884 (ppc64_emit_add): New function.
4885 (ppc64_emit_sub): New function.
4886 (ppc64_emit_mul): New function.
4887 (ppc64_emit_lsh): New function.
4888 (ppc64_emit_rsh_signed): New function.
4889 (ppc64_emit_rsh_unsigned): New function.
4890 (ppc64_emit_ext): New function.
4891 (ppc64_emit_zero_ext): New function.
4892 (ppc64_emit_log_not): New function.
4893 (ppc64_emit_bit_and): New function.
4894 (ppc64_emit_bit_or): New function.
4895 (ppc64_emit_bit_xor): New function.
4896 (ppc64_emit_bit_not): New function.
4897 (ppc64_emit_equal): New function.
4898 (ppc64_emit_less_signed): New function.
4899 (ppc64_emit_less_unsigned): New function.
4900 (ppc64_emit_ref): New function.
4901 (ppc64_emit_const): New function.
4902 (ppc64v1_emit_reg): New function.
4903 (ppc64v2_emit_reg): New function.
4904 (ppc64_emit_pop): New function.
4905 (ppc64_emit_stack_flush): New function.
4906 (ppc64_emit_swap): New function.
4907 (ppc64v1_emit_call): New function.
4908 (ppc64v2_emit_call): New function.
4909 (ppc64v1_emit_int_call_1): New function.
4910 (ppc64v2_emit_int_call_1): New function.
4911 (ppc64v1_emit_void_call_2): New function.
4912 (ppc64v2_emit_void_call_2): New function.
4913 (ppc64_emit_if_goto): New function.
4914 (ppc64_emit_eq_goto): New function.
4915 (ppc64_emit_ne_goto): New function.
4916 (ppc64_emit_lt_goto): New function.
4917 (ppc64_emit_le_goto): New function.
4918 (ppc64_emit_gt_goto): New function.
4919 (ppc64_emit_ge_goto): New function.
4920 (ppc64v1_emit_ops_impl): New static variable.
4921 (ppc64v2_emit_ops_impl): New static variable.
4922 (ppc_emit_ops): New function.
4923 (linux_low_target): Wire in ppc_emit_ops.
4924
a2174ba4
MK
49252016-03-31 Wei-cheng Wang <cole945@gmail.com>
4926 Marcin Kościelnicki <koriakin@0x04.net>
4927
4928 PR/17221
4929 * Makefile.in: Add powerpc-*-ipa.o
4930 * configure.srv: Add ipa_obj for powerpc*-linux.
4931 * linux-ppc-ipa.c: New file.
4932 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4933 includes.
4934 (PPC_FIELD): New macro.
4935 (PPC_SEXT): New macro.
4936 (PPC_OP6): New macro.
4937 (PPC_BO): New macro.
4938 (PPC_LI): New macro.
4939 (PPC_BD): New macro.
4940 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4941 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4942 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4943 (ppc_get_thread_area): New function.
4944 (is_elfv2_inferior): New function.
4945 (gen_ds_form): New function.
4946 (GEN_STD): New macro.
4947 (GEN_STDU): New macro.
4948 (GEN_LD): New macro.
4949 (GEN_LDU): New macro.
4950 (gen_d_form): New function.
4951 (GEN_ADDI): New macro.
4952 (GEN_ADDIS): New macro.
4953 (GEN_LI): New macro.
4954 (GEN_LIS): New macro.
4955 (GEN_ORI): New macro.
4956 (GEN_ORIS): New macro.
4957 (GEN_LWZ): New macro.
4958 (GEN_STW): New macro.
4959 (GEN_STWU): New macro.
4960 (gen_xfx_form): New function.
4961 (GEN_MFSPR): New macro.
4962 (GEN_MTSPR): New macro.
4963 (GEN_MFCR): New macro.
4964 (GEN_MTCR): New macro.
4965 (GEN_SYNC): New macro.
4966 (GEN_LWSYNC): New macro.
4967 (gen_x_form): New function.
4968 (GEN_OR): New macro.
4969 (GEN_MR): New macro.
4970 (GEN_LWARX): New macro.
4971 (GEN_STWCX): New macro.
4972 (GEN_CMPW): New macro.
4973 (gen_md_form): New function.
4974 (GEN_RLDICL): New macro.
4975 (GEN_RLDICR): New macro.
4976 (gen_i_form): New function.
4977 (GEN_B): New macro.
4978 (GEN_BL): New macro.
4979 (gen_b_form): New function.
4980 (GEN_BNE): New macro.
4981 (GEN_LOAD): New macro.
4982 (GEN_STORE): New macro.
4983 (gen_limm): New function.
4984 (gen_atomic_xchg): New function.
4985 (gen_call): New function.
4986 (ppc_relocate_instruction): New function.
4987 (ppc_install_fast_tracepoint_jump_pad): New function.
4988 (ppc_get_min_fast_tracepoint_insn_len): New function.
4989 (ppc_get_ipa_tdesc_idx): New function.
4990 (the_low_target): Wire in the new functions.
4991 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4992 tdescs.
4993 * linux-ppc-tdesc.h: New file.
4994
a13c4696
MK
49952016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4996
4997 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4998 (alloc_jump_pad_buffer): New function.
4999 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5000 (alloc_jump_pad_buffer): New function.
5001 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5002 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5003 (alloc_jump_pad_buffer): New function.
5004 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5005 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5006 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5007 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5008
1cda1512
MK
50092016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5010
5011 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5012 * linux-amd64-ipa.c: Likewise.
5013 * linux-i386-ipa.c: Likewise.
5014 * linux-s390-ipa.c: Likewise.
5015 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5016 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5017 set_trace_state_variable_value_ptr.
5018 (struct ipa_sym_addresses): Likewise.
5019 (symbol_list): Likewise.
5020 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5021 accessing gdb_collect directly.
5022 (gdb_collect_ptr_type): New typedef.
5023 (get_raw_reg_ptr_type): New typedef.
5024 (get_trace_state_variable_value_ptr_type): New typedef.
5025 (set_trace_state_variable_value_ptr_type): New typedef.
5026 (gdb_collect_ptr): New global.
5027 (get_raw_reg_ptr): New global.
5028 (get_trace_state_variable_value_ptr): New global.
5029 (set_trace_state_variable_value_ptr): New global.
5030 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5031 accessing get_raw_reg directly.
5032 (get_get_tsv_func_addr): Likewise for
5033 get_trace_state_variable_value_ptr.
5034 (get_set_tsv_func_addr): Likewise for
5035 set_trace_state_variable_value_ptr.
5036 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5037
72fb5488
SM
50382016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5039
5040 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5041
28170b88
MK
50422016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5043
5044 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5045 packets.
5046 (relocate_instruction): Remove own_buf.
5047 * server.c (own_buf): Make global.
5048 (handle_v_requests): Make global.
5049 * server.h (own_buf): New declaration.
5050 (handle_v_requests): New prototype.
5051
f39e8743
MK
50522016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5053
5054 PR 18377
5055 * linux-s390-low.c (add_insns): New function.
5056 (s390_emit_prologue): New function.
5057 (s390_emit_epilogue): New function.
5058 (s390_emit_add): New function.
5059 (s390_emit_sub): New function.
5060 (s390_emit_mul): New function.
5061 (s390_emit_lsh): New function.
5062 (s390_emit_rsh_signed): New function.
5063 (s390_emit_rsh_unsigned): New function.
5064 (s390_emit_ext): New function.
5065 (s390_emit_log_not): New function.
5066 (s390_emit_bit_and): New function.
5067 (s390_emit_bit_or): New function.
5068 (s390_emit_bit_xor): New function.
5069 (s390_emit_bit_not): New function.
5070 (s390_emit_equal): New function.
5071 (s390_emit_less_signed): New function.
5072 (s390_emit_less_unsigned): New function.
5073 (s390_emit_ref): New function.
5074 (s390_emit_if_goto): New function.
5075 (s390_emit_goto): New function.
5076 (s390_write_goto_address): New function.
5077 (s390_emit_litpool): New function.
5078 (s390_emit_const): New function.
5079 (s390_emit_call): New function.
5080 (s390_emit_reg): New function.
5081 (s390_emit_pop): New function.
5082 (s390_emit_stack_flush): New function.
5083 (s390_emit_zero_ext): New function.
5084 (s390_emit_swap): New function.
5085 (s390_emit_stack_adjust): New function.
5086 (s390_emit_set_r2): New function.
5087 (s390_emit_int_call_1): New function.
5088 (s390_emit_void_call_2): New function.
5089 (s390_emit_eq_goto): New function.
5090 (s390_emit_ne_goto): New function.
5091 (s390_emit_lt_goto): New function.
5092 (s390_emit_le_goto): New function.
5093 (s390_emit_gt_goto): New function.
5094 (s390_emit_ge_goto): New function.
5095 (s390x_emit_prologue): New function.
5096 (s390x_emit_epilogue): New function.
5097 (s390x_emit_add): New function.
5098 (s390x_emit_sub): New function.
5099 (s390x_emit_mul): New function.
5100 (s390x_emit_lsh): New function.
5101 (s390x_emit_rsh_signed): New function.
5102 (s390x_emit_rsh_unsigned): New function.
5103 (s390x_emit_ext): New function.
5104 (s390x_emit_log_not): New function.
5105 (s390x_emit_bit_and): New function.
5106 (s390x_emit_bit_or): New function.
5107 (s390x_emit_bit_xor): New function.
5108 (s390x_emit_bit_not): New function.
5109 (s390x_emit_equal): New function.
5110 (s390x_emit_less_signed): New function.
5111 (s390x_emit_less_unsigned): New function.
5112 (s390x_emit_ref): New function.
5113 (s390x_emit_if_goto): New function.
5114 (s390x_emit_const): New function.
5115 (s390x_emit_call): New function.
5116 (s390x_emit_reg): New function.
5117 (s390x_emit_pop): New function.
5118 (s390x_emit_stack_flush): New function.
5119 (s390x_emit_zero_ext): New function.
5120 (s390x_emit_swap): New function.
5121 (s390x_emit_stack_adjust): New function.
5122 (s390x_emit_int_call_1): New function.
5123 (s390x_emit_void_call_2): New function.
5124 (s390x_emit_eq_goto): New function.
5125 (s390x_emit_ne_goto): New function.
5126 (s390x_emit_lt_goto): New function.
5127 (s390x_emit_le_goto): New function.
5128 (s390x_emit_gt_goto): New function.
5129 (s390x_emit_ge_goto): New function.
5130 (s390_emit_ops): New function.
5131 (struct linux_target_ops): Fill in emit_ops hook.
5132
abd9baf9
MK
51332016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5134
5135 PR 18377
5136 * Makefile.in: Add s390 IPA files.
5137 * configure.srv: Build IPA for s390.
5138 * linux-s390-ipa.c: New file.
5139 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5140 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5141 (tdesc_s390_linux32): Likewise.
5142 (init_registers_s390_linux32v1): Likewise.
5143 (tdesc_s390_linux32v1): Likewise.
5144 (init_registers_s390_linux32v2): Likewise.
5145 (tdesc_s390_linux32v2): Likewise.
5146 (init_registers_s390_linux64): Likewise.
5147 (tdesc_s390_linux64): Likewise.
5148 (init_registers_s390_linux64v1): Likewise.
5149 (tdesc_s390_linux64v1): Likewise.
5150 (init_registers_s390_linux64v2): Likewise.
5151 (tdesc_s390_linux64v2): Likewise.
5152 (init_registers_s390_te_linux64): Likewise.
5153 (tdesc_s390_te_linux64): Likewise.
5154 (init_registers_s390_vx_linux64): Likewise.
5155 (tdesc_s390_vx_linux64): Likewise.
5156 (init_registers_s390_tevx_linux64): Likewise.
5157 (tdesc_s390_tevx_linux64): Likewise.
5158 (init_registers_s390x_linux64): Likewise.
5159 (tdesc_s390x_linux64): Likewise.
5160 (init_registers_s390x_linux64v1): Likewise.
5161 (tdesc_s390x_linux64v1): Likewise.
5162 (init_registers_s390x_linux64v2): Likewise.
5163 (tdesc_s390x_linux64v2): Likewise.
5164 (init_registers_s390x_te_linux64): Likewise.
5165 (tdesc_s390x_te_linux64): Likewise.
5166 (init_registers_s390x_vx_linux64): Likewise.
5167 (tdesc_s390x_vx_linux64): Likewise.
5168 (init_registers_s390x_tevx_linux64): Likewise.
5169 (tdesc_s390x_tevx_linux64): Likewise.
5170 (have_hwcap_s390_vx): New static variable.
5171 (s390_arch_setup): Fill have_hwcap_s390_vx.
5172 (s390_get_thread_area): New function.
5173 (s390_ft_entry_gpr_esa): New const.
5174 (s390_ft_entry_gpr_zarch): New const.
5175 (s390_ft_entry_misc): New const.
5176 (s390_ft_entry_fr): New const.
5177 (s390_ft_entry_vr): New const.
5178 (s390_ft_main_31): New const.
5179 (s390_ft_main_64): New const.
5180 (s390_ft_exit_fr): New const.
5181 (s390_ft_exit_vr): New const.
5182 (s390_ft_exit_misc): New const.
5183 (s390_ft_exit_gpr_esa): New const.
5184 (s390_ft_exit_gpr_zarch): New const.
5185 (append_insns): New function.
5186 (s390_relocate_instruction): New function.
5187 (s390_install_fast_tracepoint_jump_pad): New function.
5188 (s390_get_min_fast_tracepoint_insn_len): New function.
5189 (s390_get_ipa_tdesc_idx): New function.
5190 (struct linux_target_ops): Wire in the above functions.
5191 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5192 * linux-s390-tdesc.h: New file.
5193
a4105d04
MK
51942016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5195
5196 * linux-s390-low.c (s390_supports_tracepoints): New function.
5197 (struct linux_target_ops): Fill supports_tracepoints hook.
5198
35ac8b3e
YQ
51992016-03-18 Yao Qi <yao.qi@linaro.org>
5200
5201 * linux-low.c (lwp_signal_can_be_delivered): New function.
5202 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5203
94610ec4
YQ
52042016-03-18 Yao Qi <yao.qi@linaro.org>
5205
5206 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5207 0 if signal is enqueued. Remove 'signal' from one debugging
5208 message. Move one debugging message to some lines below.
5209 Remove code setting 'signal' to 0.
5210
80aea927
YQ
52112016-03-18 Yao Qi <yao.qi@linaro.org>
5212
5213 * linux-low.c (linux_low_filter_event): Remove redundant
5214 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5215
b04fd3be
MK
52162016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5217
5218 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5219 (struct linux_target_ops): Wire in the above.
5220
c40c8d4b
YQ
52212016-03-03 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-low.c: Update comments to start_step_over.
5224
0f8288ae
YQ
52252016-03-03 Yao Qi <yao.qi@linaro.org>
5226
5227 PR server/19736
5228 * linux-low.c (handle_extended_wait): Set child suspended
5229 if event_lwp->bp_reinsert isn't zero.
5230
fdbd04a8
YQ
52312016-03-02 Yao Qi <yao.qi@linaro.org>
5232
5233 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5234 enqueue_pending_signal.
5235
6896a8fa
MK
52362016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5237
5238 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5239 is actually loaded.
5240
ab503087
MK
52412016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5242
5243 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5244 (s390_regmap_3264) [!__s390x__]: New global.
5245 (s390_collect_ptrace_register): Skip map entries containing -1.
5246 (s390_supply_ptrace_register): Ditto.
5247 (s390_fill_gprs_high): New function.
5248 (s390_store_gprs_high): New function.
5249 (s390_regsets): Add NT_S390_HIGH_GPRS.
5250 (s390_get_hwcap): Enable on 31-bit.
5251 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5252 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5253 Detect NT_S390_HIGH_GPRS.
5254 (s390_usrregs_info_3264): Enable on 31-bit.
5255 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5256 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5257
ae91f625
MK
52582016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5259
5260 PR gdb/13808
5261 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5262 * configure.srv: Ditto.
5263 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5264 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5265 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5266 (init_registers_amd64_linux): Remove prototype.
5267 (tdesc_amd64_linux): Remove declaration.
5268 (get_ipa_tdesc): New function.
5269 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5270 initialize remaining tdescs.
5271 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5272 (init_registers_i386_linux): Remove prototype.
5273 (tdesc_i386_linux): Remove declaration.
5274 (get_ipa_tdesc): New function.
5275 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5276 initialize remaining tdescs.
5277 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5278 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5279 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5280 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5281 (x86_get_ipa_tdesc_idx): New function.
5282 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5283 * linux-x86-tdesc.h: New file.
5284 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5285 (target_get_ipa_tdesc_idx): New macro.
5286 * tracepoint.c (ipa_tdesc_idx): New macro.
5287 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5288 (symbol_list): Add ipa_tdesc_idx.
5289 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5290 (ipa_tdesc): Remove.
5291 (ipa_tdesc_idx): New variable.
5292 (get_context_regcache): Use get_ipa_tdesc.
5293 (gdb_collect): Ditto.
5294 (gdb_probe): Ditto.
5295 * tracepoint.h (get_ipa_tdesc): New prototype.
5296 (ipa_tdesc): Remove.
5297
e7ad2f14
PA
52982016-02-24 Pedro Alves <palves@redhat.com>
5299
5300 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5301 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5302 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5303 Factor out common code between the USE_SIGTRAP_SIGINFO and
5304 !USE_SIGTRAP_SIGINFO blocks.
5305 (linux_low_filter_event): Call save_stop_reason instead of
5306 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5307 Update comments.
5308 (linux_wait_1): Update comments.
5309
657f9cde
WW
53102016-02-24 Wei-cheng Wang <cole945@gmail.com>
5311
5312 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5313 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5314 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5315 ppc_insert_point, ppc_remove_point.
5316
b00b61e1
MK
53172016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5318
5319 * linux-s390-low.c (s390_supports_z_point_type): New function.
5320 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5321
553cb527
YQ
53222016-02-16 Yao Qi <yao.qi@linaro.org>
5323
5324 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5325 PC. Get pc from regcache_read_pc.
5326
a5652c21
YQ
53272016-02-12 Yao Qi <yao.qi@linaro.org>
5328
5329 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5330 or linux_get_pc_32bit.
5331 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5332
ed443b61
YQ
53332016-02-12 Yao Qi <yao.qi@linaro.org>
5334
5335 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5336 arm_linux_get_next_pcs_fixup.
5337
020ecd38
MK
53382016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5339
5340 * tracepoint.c (x_tracepoint_action_download): Change
5341 write_inferior_data_ptr to write_inferior_data_pointer.
5342 (cmd_qtstart): Likewise.
5343 (write_inferior_data_ptr): Remove.
5344 (download_agent_expr): Change write_inferior_data_ptr to
5345 write_inferior_data_pointer.
5346 (download_tracepoint_1): Likewise.
5347 (download_tracepoint): Likewise.
5348 (download_trace_state_variables): Likewise.
5349
7cae9051
WW
53502016-02-11 Wei-cheng Wang <cole945@gmail.com>
5351 Marcin Kościelnicki <koriakin@0x04.net>
5352
5353 * tracepoint.c (struct tracepoint_action_ops): Remove.
5354 (struct tracepoint_action): Remove ops.
5355 (m_tracepoint_action_download, r_tracepoint_action_download)
5356 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5357 size and offset accordingly.
5358 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5359 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5360 (tracepoint_action_send, tracepoint_action_download): New functions.
5361 Helpers for trace action handlers.
5362 (add_tracepoint_action): Remove setup actions ops.
5363 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5364
9f6a71b4
YQ
53652016-02-10 Yao Qi <yao.qi@linaro.org>
5366
5367 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5368
1e94266c
SM
53692016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5370
5371 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5372 to AC_OUTPUT.
5373 * configure: Regenerate.
5374
8adce034
SM
53752016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5376
5377 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5378 void * to gdb_byte *.
5379 * linux-low.c (siginfo_fixup): Likewise.
5380 (linux_xfer_siginfo): Likewise.
5381 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5382 Likewise.
5383 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5384
93813b37
WT
53852016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5386
5387 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5388 to srv_tgtobj.
5389 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5390 to srv_tgtobj.
5391 * linux-x86-low.c [__x86_64__]: Include
5392 "nat/amd64-linux-siginfo.h".
5393 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5394 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5395 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5396 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5397 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5398 (cpt_si_fd, si_timerid, si_overrun): Move from
5399 nat/amd64-linux-siginfo.c.
5400 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5401
8424cc97
SM
54022016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5403
5404 * server.c (skip_to_semicolon): Remove.
5405 (process_point_options): Use strchrnul instead of
5406 skip_to_semicolon.
5407
4d18591b
YQ
54082016-01-26 Yao Qi <yao.qi@linaro.org>
5409
5410 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5411 * linux-low.c (install_software_single_step_breakpoints): Don't
5412 call regcache_read_pc.
5413 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5414 argument pc.
5415
d8020970
YQ
54162016-01-26 Yao Qi <yao.qi@linaro.org>
5417
5418 * linux-low.c (install_software_single_step_breakpoints): Call
5419 regcache_read_pc instead of get_pc.
5420
8b207339
YQ
54212016-01-26 Yao Qi <yao.qi@linaro.org>
5422
5423 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5424 (unblock_async_io): Rename to ...
5425 (block_unblock_async_io): ... it. New function.
5426 (enable_async_io): Don't install SIGIO handler. Unblock it
5427 instead.
5428 (disable_async_io): Don't ignore SIGIO. Block it instead.
5429 (initialize_async_io): Install SIGIO handler. Don't call
5430 unblock_async_io.
5431
18879fef
YQ
54322016-01-26 Yao Qi <yao.qi@linaro.org>
5433
5434 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5435 first character is '\003', call *the_target->request_interrupt.
5436
a0f8e08a
YQ
54372016-01-25 Yao Qi <yao.qi@linaro.org>
5438
5439 * remote-utils.c (new_thread_notify): Remove.
5440 (dead_thread_notify): Likewise.
5441 * remote-utils.h (new_thread_notify): Remove declaration.
5442 (dead_thread_notify): Likewise.
5443
cc5fd9ab
MK
54442016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5445
5446 * gdb.trace/pending.exp: Fix expected message on continue.
5447
99e8eb11
MK
54482016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5449
5450 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5451 it works properly on big-endian machines where sizeof (CORE_ADDR)
5452 != sizeof (void *).
5453
a994041d
PA
54542016-01-21 Pedro Alves <palves@redhat.com>
5455
5456 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5457 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5458 * configure: Regenerate.
5459
f7a6a40d
YQ
54602016-01-21 Yao Qi <yao.qi@linaro.org>
5461
5462 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5463 is_thumb and set it according to CPSR saved on the stack.
5464 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5465 arm_sigreturn_next_pc.
5466
6f69e520
YQ
54672016-01-18 Yao Qi <yao.qi@linaro.org>
5468
5469 * linux-low.c (linux_set_pc_64bit): New function.
5470 (linux_get_pc_64bit): New function.
5471 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5472 Declare.
5473 * linux-sparc-low.c (debug_threads): Remove declaration.
5474 (sparc_get_pc): Remove.
5475 (the_low_target): Use linux_get_pc_64bit instead of
5476 sparc_get_pc.
5477 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5478 (the_low_target): Use linux_get_pc_64bit and
5479 linux_set_pc_64bit.
5480
276d4552
YQ
54812016-01-18 Yao Qi <yao.qi@linaro.org>
5482
5483 * linux-arm-low.c (debug_threads): Remove declaration.
5484 (arm_get_pc, arm_set_pc): Remove.
5485 (the_low_target): Use linux_get_pc_32bit and
5486 linux_set_pc_32bit.
5487 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5488 (the_low_target): Use linux_get_pc_32bit and
5489 linux_set_pc_32bit.
5490 * linux-cris-low.c (debug_threads): Remove declaration.
5491 (cris_get_pc, cris_set_pc,): Remove.
5492 (the_low_target): Use linux_get_pc_32bit and
5493 linux_set_pc_32bit.
5494 * linux-crisv32-low.c (debug_threads): Remove declaration.
5495 (cris_get_pc, cris_set_pc): Remove.
5496 (the_low_target): Use linux_get_pc_32bit and
5497 linux_set_pc_32bit.
5498 * linux-low.c: Include inttypes.h.
5499 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5500 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5501 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5502 (the_low_target): Use linux_get_pc_32bit and
5503 linux_set_pc_32bit.
5504 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5505 (the_low_target): Use linux_get_pc_32bit and
5506 linux_set_pc_32bit.
5507 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5508 (the_low_target): Use linux_get_pc_32bit and
5509 linux_set_pc_32bit.
5510 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5511 (the_low_target): Use linux_get_pc_32bit and
5512 linux_set_pc_32bit.
5513 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5514 (the_low_target): Use linux_get_pc_32bit and
5515 linux_set_pc_32bit.
5516
eb0edac8
GB
55172016-01-18 Gary Benson <gbenson@redhat.com>
5518
5519 * configure.ac (AC_FUNC_FORK): New check.
5520 * config.in: Regenerate.
5521 * configure: Likewise.
5522
1b451dda
YQ
55232016-01-14 Yao Qi <yao.qi@linaro.org>
5524
5525 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5526 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5527 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5528 arm_get_next_pcs_ctor.
5529
82075af2
JS
55302016-01-12 Josh Stone <jistone@redhat.com>
5531 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5532
5533 * inferiors.h: Include "gdb_vecs.h".
5534 (struct process_info): Add syscalls_to_catch.
5535 * inferiors.c (remove_process): Free syscalls_to_catch.
5536 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5537 syscall_return stops.
5538 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5539 * server.c (handle_general_set): Handle QCatchSyscalls.
5540 (handle_query): Report support for QCatchSyscalls.
5541 * target.h (struct target_ops): Add supports_catch_syscall.
5542 (target_supports_catch_syscall): New macro.
5543 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5544 (struct lwp_info): Add syscall_state.
5545 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5546 Maintain syscall_state and syscalls_to_catch across exec.
5547 (get_syscall_trapinfo): New function, proxy to the_low_target.
5548 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5549 (linux_low_filter_event): Toggle syscall_state entry/return for
5550 syscall traps, and set it ignored for all others.
5551 (gdb_catching_syscalls_p): New function.
5552 (gdb_catch_this_syscall_p): New function.
5553 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5554 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5555 (linux_supports_catch_syscall): New function.
5556 (linux_target_ops): Install it.
5557 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5558 (the_low_target): Install it.
5559
8f13a3ce
MF
55602016-01-12 Mike Frysinger <vapier@gentoo.org>
5561
5562 * acinclude.m4: Include new ../warning.m4 file.
5563 * configure: Regenerated.
5564 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5565
5b3da067
MF
55662016-01-12 Mike Frysinger <vapier@gentoo.org>
5567
5568 * ax.c (is_goto_target): Mark static.
5569 * linux-low.c (register_addr): Likewise.
5570 (linux_fetch_registers, linux_store_registers): Likewise.
5571 * mem-break.c (any_persistent_commands): Fix old prototype.
5572 (add_commands_to_breakpoint): Mark static.
5573 * regcache.c (find_register_by_name): Delete unused func.
5574 * remote-utils.c (hex_or_minus_one): Mark static.
5575 * server.c (monitor_show_help): Mark static.
5576 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5577 handle_v_requests): Likewise.
5578
bc504a31
PA
55792016-01-12 Pedro Alves <palves@redhat.com>
5580
5581 Remove use of the registered trademark symbol throughout.
5582
5a0dd67a
YQ
55832016-01-08 Yao Qi <yao.qi@linaro.org>
5584
5585 * remote-utils.c (getpkt): If c is '\003', call target hook
5586 request_interrupt.
5587
b2ca446f
YQ
55882016-01-06 Yao Qi <yao.qi@linaro.org>
5589
5590 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5591 linux-aarch32-low.c.
5592 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5593 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5594 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5595 (thumb2_breakpoint): Declare.
5596 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5597 linux-aarch32-low.h.
5598 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5599 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5600 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5601
edd88788
JB
56022016-01-01 Joel Brobecker <brobecker@adacore.com>
5603
5604 * gdbreplay.c (gdbreplay_version): Change copyright year in
5605 version message.
5606 * server.c (gdbserver_version): Likewise.
5607
65da7f14
PP
56082015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5609
5610 * server.c (crc32_table): Delete.
5611 (crc32): Use libiberty's xcrc32 function.
5612
4abd5ed2
JB
56132015-12-22 Joel Brobecker <brobecker@adacore.com>
5614
5615 * lynx-low.c (lynx_delete_thread_callback): New function.
5616 (lynx_mourn): Properly delete our process and all of its
5617 threads. Remove call to clear_inferiors.
5618
0e50fe5c
JB
56192015-12-22 Joel Brobecker <brobecker@adacore.com>
5620
5621 * target.c (thread_search_callback): Add check that
5622 the thread_stopped target callback is not NULL before
5623 calling it.
5624
35adc03f
YQ
56252015-12-21 Yao Qi <yao.qi@linaro.org>
5626
5627 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5628 arm breakpoint.
5629
bd2b2909
AT
56302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5631
5632 * server.c (handle_query): Call target_supports_software_single_step.
5633
7fe5e27e
AT
56342015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5635
5636 * linux-low.c (single_step): New function.
5637 (linux_resume_one_lwp_throw): Call single_step.
5638 (start_step_over): Likewise.
5639
d9311bfa
AT
56402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5641
5642 * Makefile.in (SFILES): Append arch/arm-linux.c,
5643 arch/arm-get-next-pcs.c.
5644 (arm-linux.o): New rule.
5645 (arm-get-next-pcs.o): New rule.
5646 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5647 arm-linux.o.
5648 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5649 to linux-aarch32-low.c.
5650 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5651 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5652 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5653 (thumb2_breakpoint_len): Likewise.
5654 (arm_is_thumb_mode): Make non-static.
5655 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5656 from linux-aarch32-low.c.
5657 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5658 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5659 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5660 (thumb2_breakpoint_len): Likewise.
5661 (arm_is_thumb_mode): New declaration.
5662 * linux-arm-low.c: Include arch/arm-linux.h
5663 aarch/arm-get-next-pcs.h, sys/syscall.h.
5664 (get_next_pcs_ops): New struct.
5665 (get_next_pcs_addr_bits_remove): New function.
5666 (get_next_pcs_is_thumb): New function.
5667 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5668 (arm_sigreturn_next_pc): Likewise.
5669 (get_next_pcs_syscall_next_pc): Likewise.
5670 (arm_gdbserver_get_next_pcs): Likewise.
5671 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5672 Initialize.
5673 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5674 * server.h: Include gdb_vecs.h.
5675
68ce2059
AT
56762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5677
5678 * Makefile.in (SFILES): Append common/common-regcache.c.
5679 (OBS): Append common-regcache.o.
5680 (common-regcache.o): New rule.
5681 * regcache.c (init_register_cache): Initialize cache to
5682 REG_UNAVAILABLE.
5683 (regcache_raw_read_unsigned): New function.
5684 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5685 register_status enum.
5686
fa5308bd
AT
56872015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5688
5689 * linux-aarch64-low.c (the_low_targets): Rename
5690 breakpoint_reinsert_addr to get_next_pcs.
5691 * linux-arm-low.c (the_low_targets): Likewise.
5692 * linux-bfin-low.c (the_low_targets): Likewise.
5693 * linux-cris-low.c (the_low_targets): Likewise.
5694 * linux-crisv32-low.c (the_low_targets): Likewise.
5695 * linux-low.c (can_software_single_step): Likewise.
5696 (install_software_single_step_breakpoints): New function.
5697 (start_step_over): Use install_software_single_step_breakpoints.
5698 * linux-low.h: New CORE_ADDR vector.
5699 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5700 get_next_pcs.
5701 * linux-mips-low.c (the_low_targets): Likewise.
5702 * linux-nios2-low.c (the_low_targets): Likewise.
5703 * linux-sparc-low.c (the_low_targets): Likewise.
5704
4a6ed09b
PA
57052015-12-17 Pedro Alves <palves@redhat.com>
5706
5707 * linux-low.c (linux_kill_one_lwp): Remove references to
5708 LinuxThreads.
5709 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5710 to 'kill'.
5711 (linux_init_signals): Delete.
5712 (initialize_low): Adjust.
5713 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5714
7544db95
PA
57152015-12-16 Pedro Alves <palves@redhat.com>
5716
5717 * configure.ac (compiler warning flags): When testing a
5718 -Wno-foo option, check whether -Wfoo works instead.
5719 * configure: Regenerate.
5720
8020350c
DB
57212015-12-11 Don Breazeal <donb@codesourcery.com>
5722
5723 * server.c (process_serial_event): Don't exit from gdbserver
5724 in remote mode if there are still active inferiors.
5725
db91f502
YQ
57262015-12-11 Yao Qi <yao.qi@linaro.org>
5727
5728 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5729 arm_breakpoint_at if the process is 32-bit.
5730
b37a6290
YQ
57312015-12-11 Yao Qi <yao.qi@linaro.org>
5732
5733 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5734 arm breakpoint.
5735
17b1509a
YQ
57362015-12-07 Yao Qi <yao.qi@linaro.org>
5737
5738 * configure.srv: Append arm.o to srv_tgtobj for
5739 aarch64*-*-linux* target.
5740 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5741 from linux-arm-low.c.
5742 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5743 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5744 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5745 (thumb2_breakpoint_len): Likewise.
5746 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5747 (arm_breakpoint_kinds): Likewise.
5748 (arm_breakpoint_kind_from_pc): Likewise.
5749 (arm_sw_breakpoint_from_kind): Likewise.
5750 (arm_breakpoint_kind_from_current_state): Likewise.
5751 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5752 (arm_sw_breakpoint_from_kind): Declare.
5753 (arm_breakpoint_kind_from_current_state): Declare.
5754 (arm_breakpoint_at): Declare.
5755 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5756 arm_sw_breakpoint_from_kind if process is 32-bit.
5757 (aarch64_breakpoint_kind_from_pc): New function.
5758 (aarch64_breakpoint_kind_from_current_state): New function.
5759 (the_low_target): Initialize fields breakpoint_kind_from_pc
5760 and breakpoint_kind_from_current_state.
5761 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5762 linux-aarch32-low.c.
5763 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5764 (arm_breakpoint, arm_breakpoint_len): Likewise.
5765 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5766 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5767 (arm_is_thumb_mode): Likewise.
5768 (arm_breakpoint_at): Likewise.
5769 (arm_breakpoint_kind_from_pc): Likewise.
5770 (arm_sw_breakpoint_from_kind): Likewise.
5771 (arm_breakpoint_kind_from_current_state): Likewise.
5772
5773 Revert:
5774 2015-08-04 Yao Qi <yao.qi@linaro.org>
5775
5776 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5777 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5778 * server.c (extended_protocol): Remove "static".
5779 * server.h (extended_protocol): Declare it.
5780
ece66d65
JS
57812015-12-04 Josh Stone <jistone@redhat.com>
5782
5783 * target.h (struct target_ops) <arch_setup>: Rename to ...
5784 (struct target_ops) <post_create_inferior>: ... this.
5785 (target_arch_setup): Rename to ...
5786 (target_post_create_inferior): ... this, calling post_create_inferior.
5787 * server.c (start_inferior): Update target_arch_setup calls to
5788 target_post_create_inferior.
5789 * linux-low.c (linux_low_ptrace_options): Forward declare.
5790 (linux_arch_setup): Update its comment for general use.
5791 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5792 (struct linux_target_ops): Use linux_post_create_inferior.
5793 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5794 to post_create_inferior.
5795 * nto-low.c (struct nto_target_ops): Likewise.
5796 * spu-low.c (struct spu_target_ops): Likewise.
5797 * win32-low.c (struct win32_target_ops): Likewise.
5798
e58c48b4
AT
57992015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5800
5801 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5802
fbec8956
AT
58032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5804
5805 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5806 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5807 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5808 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5809 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5810 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5811 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5812 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5813 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5814 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5815 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5816 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5817
9b4c5f87
AT
58182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5819
5820 * linux-low.c (linux_look_up_symbols): Don't call
5821 linux_supports_traceclone.
5822 * linux-low.h (thread_db_init): Remove use_events argument.
5823 * thread-db.c (thread_db_use_event): Remove global variable.
5824 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5825 (struct thread_db) <td_create_bp>: Remove field.
5826 (thread_db_create_event): Remove function.
5827 (thread_db_enable_reporting): Likewise.
5828 (find_one_thread): Don't check for thread_db_use_events.
5829 (attach_thread): Likewise.
5830 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5831 (try_thread_db_load_1): Don't check for thread_db_use_events.
5832 (thread_db_init): Remove use_events argument and thread events
5833 handling.
5834 (remove_thread_event_breakpoints): Remove function.
5835 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5836
7d00775e
AT
58372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5838
5839 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5840 New function.
5841 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5842 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5843 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5844 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5845 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5846 Initialize.
5847 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5848 New function.
5849 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5850 * linux-low.c (can_hardware_single_step): Use
5851 supports_hardware_single_step.
5852 (can_software_single_step): New function.
5853 (start_step_over): Call can_software_single_step.
5854 (linux_supports_hardware_single_step): New function.
5855 (struct target_ops) <supports_software_single_step>: Initialize.
5856 * linux-low.h (struct linux_target_ops)
5857 <supports_hardware_single_step>: Initialize.
5858 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5859 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5860 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5861 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5862 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5863 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5864 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5866 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5867 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5868 Initialize.
5869 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5870 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5871 Initialize.
5872 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5873 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5874 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5875 New function.
5876 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5877 * target.h (struct target_ops): <supports_software_single_step>:
5878 New field.
5879 (target_supports_software_single_step): New macro.
5880
2d97cd35
AT
58812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5882
5883 * linux-low.c (linux_wait_1): Fix pc advance condition.
5884 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5885 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5886
769ef81f
AT
58872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5888
5889 * linux-arm-low.c (arm_is_thumb_mode): New function.
5890 (arm_breakpoint_at): Use arm_is_thumb_mode.
5891 (arm_breakpoint_kind_from_current_state): New function.
5892 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5893 Initialize.
5894 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5895 (linux_breakpoint_kind_from_current_state): New function.
5896 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5897 * linux-low.h (struct linux_target_ops)
5898 <breakpoint_kind_from_current_state>: New field.
5899 * target.h (struct target_ops): Likewise.
5900 (target_breakpoint_kind_from_current_state): New macro.
5901
1bebeeca
PA
59022015-11-30 Pedro Alves <palves@redhat.com>
5903
5904 * linux-low.c (linux_resume): Wake up the event loop before
5905 returning.
5906
a67a9fae
PA
59072015-11-30 Pedro Alves <palves@redhat.com>
5908
5909 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5910 check.
5911 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5912 to -1.
5913 * target.c (struct thread_search): New structure.
5914 (thread_search_callback): New function.
5915 (prev_general_thread): New global.
5916 (prepare_to_access_memory, done_accessing_memory): New functions.
5917 * target.h (prepare_to_access_memory, done_accessing_memory):
5918 Replace macros with function declarations.
5919
f2faf941
PA
59202015-11-30 Pedro Alves <palves@redhat.com>
5921
5922 PR 14618
5923 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5924 report TARGET_WAITKIND_NO_RESUMED.
5925 * remote-utils.c (prepare_resume_reply): Handle
5926 TARGET_WAITKIND_NO_RESUMED.
5927 * server.c (report_no_resumed): New global.
5928 (handle_query) <qSupported>: Handle "no-resumed+". Report
5929 "no-resumed+" support.
5930 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5931 return error if the client doesn't support no-resumed events.
5932 (push_stop_notification): New function.
5933 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5934 events if the client supports them.
5935
a681f9c9
PA
59362015-11-30 Pedro Alves <palves@redhat.com>
5937
5938 * linux-low.c (thread_still_has_status_pending_p): Don't check
5939 vCont;t here.
5940 (lwp_resumed): New function.
5941 (status_pending_p_callback): Return early if the LWP is not
5942 supposed to be resumed.
5943
65706a29
PA
59442015-11-30 Pedro Alves <palves@redhat.com>
5945
5946 * linux-low.c (handle_extended_wait): Assert that the LWP's
5947 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5948 thread create events, leave the new child's status pending.
5949 (linux_low_filter_event): If GDB wants to hear about thread exit
5950 events, leave the LWP marked dead and don't delete it.
5951 (linux_wait_for_event_filtered): Don't check for thread exit.
5952 (filter_exit_event): New function.
5953 (linux_wait_1): Use it, when returning an exit event.
5954 (linux_resume_one_lwp_throw): Assert that the LWP's
5955 waitstatus is TARGET_WAITKIND_IGNORE.
5956 * remote-utils.c (prepare_resume_reply): Handle
5957 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5958 * server.c (report_thread_events): New global.
5959 (handle_general_set): Handle QThreadEvents.
5960 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5961 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5962 TARGET_WAITKIND_THREAD_EXITED.
5963 * server.h (report_thread_events): Declare.
5964
56cf4bed
PA
59652015-11-30 Pedro Alves <palves@redhat.com>
5966
5967 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5968 the thread's last_resume_kind was resume_stop.
5969
500c1d85
PA
59702015-11-30 Pedro Alves <palves@redhat.com>
5971
5972 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5973 before returning.
5974
de979965
PA
59752015-11-30 Pedro Alves <palves@redhat.com>
5976
5977 * server.c (handle_v_requests): Handle vCtrlC.
5978
34c65914
PA
59792015-11-30 Pedro Alves <palves@redhat.com>
5980
5981 * gdbthread.h (find_any_thread_of_pid): Declare.
5982 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5983 functions.
5984 * server.c (handle_query): If current_thread is NULL, look for
5985 another thread of the selected process.
5986
79efa585 59872015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5988 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5989
5990 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5991 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5992 name in reply.
5993 * target.h (struct target_ops) <thread_name>: New field.
5994 (target_thread_name): New macro.
5995
80d82c19
JB
59962015-11-23 Joel Brobecker <brobecker@adacore.com>
5997
5998 * regcache.h (regcache_invalidate_pid): Add declaration.
5999 * regcache.c (regcache_invalidate_pid): New function, extracted
6000 from regcache_invalidate.
6001 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6002 Add trivial documentation comment.
6003 * lynx-low.c: Use regcache_invalidate_pid instead of
6004 regcache_invalidate.
6005
64da5dd5
JB
60062015-11-23 Joel Brobecker <brobecker@adacore.com>
6007
6008 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6009 and Elf64_auxv_t if the target is Android.
6010
37ce4055
DE
60112015-11-22 Doug Evans <xdje42@gmail.com>
6012
6013 * target.h: #include <sys/types.h>.
6014
06e03fff
PA
60152015-11-19 Pedro Alves <palves@redhat.com>
6016
6017 * linux-low.c (linux_process_qsupported): Change prototype.
6018 Adjust.
6019 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6020 Change prototype.
6021 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6022 and adjust to loop over all features.
6023 * server.c (handle_query) <qSupported>: Adjust to call
6024 target_process_qsupported once, passing it a vector of unprocessed
6025 features.
6026 * target.h (struct target_ops) <process_qsupported>: Change
6027 prototype.
6028 (target_process_qsupported): Adjust.
6029
9a084706
PA
60302015-11-19 Pedro Alves <palves@redhat.com>
6031
6032 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6033 mode.
6034 * configure: Regenerate.
6035
dad44a1f
PA
60362015-11-19 Pedro Alves <palves@redhat.com>
6037
6038 * configure: Regenerate.
6039
231c0592
YQ
60402015-11-19 Yao Qi <yao.qi@linaro.org>
6041
6042 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6043 type to uint32_t.
6044
6c1c9a8b
YQ
60452015-11-19 Yao Qi <yao.qi@linaro.org>
6046
6047 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6048 (struct aarch64_operand): Move enum out.
6049
9caa3311
YQ
60502015-11-19 Yao Qi <yao.qi@linaro.org>
6051
6052 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6053 struct user_fpsimd_state *.
6054 (aarch64_store_fpregset): Likewise.
6055
6a69a054
YQ
60562015-11-19 Yao Qi <yao.qi@linaro.org>
6057
6058 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6059 struct user_pt_regs *.
6060 (aarch64_store_gregset): Likewise.
6061
1798301e
PA
60622015-11-18 Pedro Alves <palves@redhat.com>
6063
6064 * Makefile.in (all_object_files): Add $IPA_OBJS.
6065
ce7715e2
PA
60662015-11-17 Pedro Alves <palves@redhat.com>
6067
6068 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6069 GDB_SIGNAL_0 and gdb_signal_to_string.
6070
c0879059
PA
60712015-11-17 Pedro Alves <palves@redhat.com>
6072
6073 * win32-low.c (handle_output_debug_string): Remove parameter.
6074 (win32_kill): Remove our_status local and adjust call to
6075 handle_output_debug_string.
6076 (get_child_debug_event): Adjust call to
6077 handle_output_debug_string.
6078
1996e237
SM
60792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6080
6081 * linux-mips-low.c (mips_fill_gregset): Add cast.
6082 (mips_store_gregset): Likewise.
6083 (mips_fill_fpregset): Likewise.
6084 (mips_store_fpregset): Likewise.
6085
cbec665b
SM
60862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6087
6088 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6089 priv.
6090
eb3e3c67
SM
60912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6092
6093 * linux-mips-low.c (mips_linux_new_thread): Change type of
6094 watch_type to enum target_hw_bp_type.
6095
171de4b8
SM
60962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6097
6098 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6099 Change return type to arm_hwbp_type.
6100
04248ead
SM
61012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6102
6103 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6104 (arm_store_gregset): Likewise.
6105 * linux-arm-low.c (arm_get_hwcap): Likewise.
6106 (arm_read_description): Likewise.
6107
04b3479c
SM
61082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6109
6110 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6111
2bc84e8a
SM
61122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6113
6114 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6115 (ppc_fill_vsxregset): Likewise.
6116 (ppc_store_vsxregset): Likewise.
6117 (ppc_fill_vrregset): Likewise.
6118 (ppc_store_vrregset): Likewise.
6119 (ppc_fill_evrregset): Likewise.
6120 (ppc_store_evrregset): Likewise.
6121
e6c5bb05
SM
61222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6123
6124 * linux-ppc-low.c (ppc_usrregs_info): Remove
6125 forward-declaration.
6126 (ppc_arch_setup): Move lower in file.
6127
7ea45d72
SM
61282015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6129
6130 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6131 (ps_pdwrite): Likewise.
6132
69291610
HW
61332015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6134
6135 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6136 to after assert checks.
6137
b42945fd
SM
61382015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6139
6140 * proc-service.c (ps_pdread): Add/adjust casts.
6141 (ps_pdwrite): Add/adjust casts.
6142
d6f85c84
SM
61432015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6144
6145 * server.c (handle_search_memory_1): Cast return value of
6146 memmem.
6147
f98cd059
SM
61482015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6149
6150 * server.c (write_qxfer_response): Change type of data to
6151 gdb_byte *.
6152
d2412fa5
PA
61532015-10-29 Pedro Alves <palves@redhat.com>
6154
6155 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6156
c17414a2
PA
61572015-10-29 Pedro Alves <palves@redhat.com>
6158
6159 * tracepoint.c (clear_installed_tracepoints): Add casts.
6160
e053fbc4
PA
61612015-10-29 Pedro Alves <palves@redhat.com>
6162
6163 * server.c (handle_v_cont, process_serial_event): Add enum
6164 gdb_signal casts to signal parsing code.
6165
add67df8
PA
61662015-10-29 Pedro Alves <palves@redhat.com>
6167
6168 * linux-low.h (NULL_REGSET): Define.
6169 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6170 * linux-arm-low.c (arm_regsets): Likewise.
6171 * linux-crisv32-low.c (cris_regsets): Likewise.
6172 * linux-m68k-low.c (m68k_regsets): Likewise.
6173 * linux-mips-low.c (mips_regsets): Likewise.
6174 * linux-nios2-low.c (nios2_regsets): Likewise.
6175 * linux-ppc-low.c (ppc_regsets): Likewise.
6176 * linux-s390-low.c (s390_regsets): Likewise.
6177 * linux-sh-low.c (sh_regsets): Likewise.
6178 * linux-sparc-low.c (sparc_regsets): Likewise.
6179 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6180 * linux-tile-low.c (tile_regsets): Likewise.
6181 * linux-x86-low.c (x86_regsets): Likewise.
6182 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6183
50bc912a
PA
61842015-10-29 Pedro Alves <palves@redhat.com>
6185
6186 * linux-low.h (NULL_REGSET): Define.
6187 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6188 * linux-arm-low.c (arm_regsets): Likewise.
6189 * linux-crisv32-low.c (cris_regsets): Likewise.
6190 * linux-m68k-low.c (m68k_regsets): Likewise.
6191 * linux-mips-low.c (mips_regsets): Likewise.
6192 * linux-nios2-low.c (nios2_regsets): Likewise.
6193 * linux-ppc-low.c (ppc_regsets): Likewise.
6194 * linux-s390-low.c (s390_regsets): Likewise.
6195 * linux-sh-low.c (sh_regsets): Likewise.
6196 * linux-sparc-low.c (sparc_regsets): Likewise.
6197 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6198 * linux-tile-low.c (tile_regsets): Likewise.
6199 * linux-x86-low.c (x86_regsets): Likewise.
6200 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6201
682b2546
DE
62022015-10-26 Doug Evans <dje@google.com>
6203
6204 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6205
963843d4
DE
62062015-10-26 Doug Evans <dje@google.com>
6207
6208 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6209
d41401ac
DE
62102015-10-26 Doug Evans <dje@google.com>
6211
6212 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6213 for debug_printf.
6214 (attach_thread, find_new_threads_callback): Ditto.
6215
3db28855
AT
62162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6217
6218 * mem-break.h (set_breakpoint_data): Remove.
6219
fb78e89c
AT
62202015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6221
6222 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6223 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6224 (initialize_low): Remove set_breakpoint_data call.
6225 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6226 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6227 (initialize_low): Remove set_breakpoint_data call.
6228 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6229 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6230 (initialize_low): Remove set_breakpoint_data call.
6231
2e6ee069
AT
62322015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6233
6234 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6235 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6236 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6237 * target.h (target_breakpoint_kind_from_pc): New macro.
6238
1652a986
AT
62392015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6240
6241 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6242 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6243 the default breakpoint kind.
6244
abeead09
AT
62452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6246
6247 * linux-arm-low.c (arm_supports_z_point_type): Add software
6248 breakpoint support.
6249
b0b4b501
AT
62502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6251
6252 * linux-arm-low.c: Refactor breakpoint definitions.
6253 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6254 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6255
8689682c
AT
62562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6257
6258 * Makefile.in: Add arm.c/o.
6259 * configure.srv: Likewise.
6260 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6261 (arm_breakpoint_kind_from_pc): New function.
6262 (arm_sw_breakpoint_from_kind): Return proper kind.
6263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6264
27165294
AT
62652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6266
6267 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6268 removal.
6269 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6270 (struct raw_breakpoint) <size>: Remove.
6271 (struct raw_breakpoint) <kind>: Add.
6272 (bp_size): New function.
6273 (bp_opcode): Likewise.
6274 (find_raw_breakpoint_at): Adjust for kind.
6275 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6276 (remove_memory_breakpoint): Adjust for kind call bp_size.
6277 (set_raw_breakpoint_at): Adjust for kind.
6278 (set_breakpoint): Likewise.
6279 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6280 (delete_raw_breakpoint): Adjust for kind.
6281 (delete_breakpoint): Likewise.
6282 (find_gdb_breakpoint): Likewise.
6283 (set_gdb_breakpoint_1): Likewise.
6284 (set_gdb_breakpoint): Likewise.
6285 (delete_gdb_breakpoint_1): Likewise.
6286 (delete_gdb_breakpoint): Likewise.
6287 (uninsert_raw_breakpoint): Likewise.
6288 (reinsert_raw_breakpoint): Likewise.
6289 (set_breakpoint_data): Remove.
6290 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6291 (check_mem_read): Adjust for kind call bp_size.
6292 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6293 (clone_one_breakpoint): Adjust for kind.
6294 * mem-break.h (set_gdb_breakpoint): Likewise.
6295 (delete_gdb_breakpoint): Likewise.
6296 * server.c (process_serial_event): Likewise.
6297
dd373349
AT
62982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6299
6300 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6301 (struct linux_target_ops) <breakpoint>: Remove.
6302 (struct linux_target_ops) <breakpoint_len>: Remove.
6303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6305 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6306 (arm_sw_breakpoint_from_kind): New function.
6307 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6308 (struct linux_target_ops) <breakpoint>: Remove.
6309 (struct linux_target_ops) <breakpoint_len>: Remove.
6310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6312 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6313 (struct linux_target_ops) <breakpoint>: Remove.
6314 (struct linux_target_ops) <breakpoint_len>: Remove.
6315 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6316 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6317 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6318 (struct linux_target_ops) <breakpoint>: Remove.
6319 (struct linux_target_ops) <breakpoint_len>: Remove.
6320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6321 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6322 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6323 and sw_breakpoint_from_kind to increment the pc.
6324 (linux_breakpoint_kind_from_pc): New function.
6325 (linux_sw_breakpoint_from_kind): New function.
6326 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6327 (initialize_low): Call breakpoint_kind_from_pc and
6328 sw_breakpoint_from_kind to replace breakpoint_data/len.
6329 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6330 New field.
6331 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6332 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6333 (struct linux_target_ops) <breakpoint>: Remove.
6334 (struct linux_target_ops) <breakpoint_len>: Remove.
6335 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6336 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6337 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6338 (struct linux_target_ops) <breakpoint>: Remove.
6339 (struct linux_target_ops) <breakpoint_len>: Remove.
6340 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6341 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6342 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6343 (struct linux_target_ops) <breakpoint>: Remove.
6344 (struct linux_target_ops) <breakpoint_len>: Remove.
6345 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6346 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6347 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6348 (struct linux_target_ops) <breakpoint>: Remove.
6349 (struct linux_target_ops) <breakpoint_len>: Remove.
6350 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6351 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6352 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6353 (struct linux_target_ops) <breakpoint>: Remove.
6354 (struct linux_target_ops) <breakpoint_len>: Remove.
6355 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6356 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6357 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6358 (struct linux_target_ops) <breakpoint>: Remove.
6359 (struct linux_target_ops) <breakpoint_len>: Remove.
6360 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6361 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6362 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6363 (struct linux_target_ops) <breakpoint>: Remove.
6364 (struct linux_target_ops) <breakpoint_len>: Remove.
6365 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6366 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6367 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6368 (struct linux_target_ops) <breakpoint>: Remove.
6369 (struct linux_target_ops) <breakpoint_len>: Remove.
6370 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6371 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6372 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6373 (struct linux_target_ops) <breakpoint>: Remove.
6374 (struct linux_target_ops) <breakpoint_len>: Remove.
6375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6377 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6378 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6379 (struct linux_target_ops) <breakpoint>: Remove.
6380 (struct linux_target_ops) <breakpoint_len>: Remove.
6381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6383 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6384 (struct linux_target_ops) <breakpoint>: Remove.
6385 (struct linux_target_ops) <breakpoint_len>: Remove.
6386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6388
4cd98a19
AT
63892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6390
6391 * linux-cris-low.c (cris_get_pc): Remove void arg.
6392
774ee6d2
AR
63932015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6394
6395 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6396 variable name.
6397
833dcd29
AR
63982015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6399
6400 * inferiors.c (thread_pid_matches_callback): New function.
6401 (find_thread_process): New function.
6402 (remove_thread): Reset current_thread.
6403 (remove_process): Assert threads have been removed first.
6404
8d689ee5
YQ
64052015-10-15 Yao Qi <yao.qi@linaro.org>
6406
6407 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6408 if it is 3.
6409 (aarch64_remove_point): Likewise.
6410 * regcache.c (regcache_register_size): New function.
6411
1c2e1515
YQ
64122015-10-12 Yao Qi <yao.qi@linaro.org>
6413
6414 * linux-aarch64-low.c: Update all callers as emit_load_store
6415 is renamed to aarch64_emit_load_store.
6416
e1c587c3
YQ
64172015-10-12 Yao Qi <yao.qi@linaro.org>
6418
6419 * linux-aarch64-low.c: Update all callers of function renaming
6420 from emit_insn to aarch64_emit_insn.
6421
b6542f81
YQ
64222015-10-12 Yao Qi <yao.qi@linaro.org>
6423
6424 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6425 arch/aarch64-insn.h.
6426 (struct aarch64_memory_operand): Likewise.
6427 (ENCODE): Likewise.
6428 (emit_insn): Move to arch/aarch64-insn.c.
6429 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6430 (emit_load_store): Move to arch/aarch64-insn.c.
6431 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6432 (can_encode_int32): Remove.
6433
246994ce
YQ
64342015-10-12 Yao Qi <yao.qi@linaro.org>
6435
6436 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6437 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6438 (aarch64_relocate_instruction): Likewise.
6439 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6440 (struct aarch64_insn_visitor): Likewise.
6441
0badd99f
YQ
64422015-10-12 Yao Qi <yao.qi@linaro.org>
6443
6444 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6445 (struct aarch64_insn_visitor): New.
6446 (struct aarch64_insn_relocation_data): New.
6447 (aarch64_ftrace_insn_reloc_b): New function.
6448 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6449 (aarch64_ftrace_insn_reloc_cb): Likewise.
6450 (aarch64_ftrace_insn_reloc_tb): Likewise.
6451 (aarch64_ftrace_insn_reloc_adr): Likewise.
6452 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6453 (aarch64_ftrace_insn_reloc_others): Likewise.
6454 (visitor): New.
6455 (aarch64_relocate_instruction): Use visitor.
6456
dfaffe9d
YQ
64572015-10-12 Yao Qi <yao.qi@linaro.org>
6458
6459 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6460 int. Add argument buf.
6461 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6462 aarch64_relocate_instruction.
6463
70b439f0
YQ
64642015-10-12 Yao Qi <yao.qi@linaro.org>
6465
6466 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6467 argument insn. Remove local variable insn. Don't call
6468 target_read_uint32.
6469 (aarch64_install_fast_tracepoint_jump_pad): Call
6470 target_read_uint32.
6471
7781c06f
YQ
64722015-09-30 Yao Qi <yao.qi@linaro.org>
6473
6474 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6475 (emit_load_store_pair): Likewise.
6476
9a3c8263
SM
64772015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6478
6479 * dll.c (match_dll): Add cast(s).
6480 (unloaded_dll): Likewise.
6481 * linux-low.c (second_thread_of_pid_p): Likewise.
6482 (delete_lwp_callback): Likewise.
6483 (count_events_callback): Likewise.
6484 (select_event_lwp_callback): Likewise.
6485 (linux_set_resume_request): Likewise.
6486 * server.c (accumulate_file_name_length): Likewise.
6487 (emit_dll_description): Likewise.
6488 (handle_qxfer_threads_worker): Likewise.
6489 (visit_actioned_threads): Likewise.
6490 * thread-db.c (any_thread_of): Likewise.
6491 * tracepoint.c (same_process_p): Likewise.
6492 (match_blocktype): Likewise.
6493 (build_traceframe_info_xml): Likewise.
6494
224c3ddb
SM
64952015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6496
6497 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6498 assignment.
6499 (gdb_unparse_agent_expr): Likewise.
6500 * hostio.c (require_data): Likewise.
6501 (handle_pread): Likewise.
6502 * linux-low.c (disable_regset): Likewise.
6503 (fetch_register): Likewise.
6504 (store_register): Likewise.
6505 (get_dynamic): Likewise.
6506 (linux_qxfer_libraries_svr4): Likewise.
6507 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6508 (set_fast_tracepoint_jump): Likewise.
6509 (uninsert_fast_tracepoint_jumps_at): Likewise.
6510 (reinsert_fast_tracepoint_jumps_at): Likewise.
6511 (validate_inserted_breakpoint): Likewise.
6512 (clone_agent_expr): Likewise.
6513 * regcache.c (init_register_cache): Likewise.
6514 * remote-utils.c (putpkt_binary_1): Likewise.
6515 (decode_M_packet): Likewise.
6516 (decode_X_packet): Likewise.
6517 (look_up_one_symbol): Likewise.
6518 (relocate_instruction): Likewise.
6519 (monitor_output): Likewise.
6520 * server.c (handle_search_memory): Likewise.
6521 (handle_qxfer_exec_file): Likewise.
6522 (handle_qxfer_libraries): Likewise.
6523 (handle_qxfer): Likewise.
6524 (handle_query): Likewise.
6525 (handle_v_cont): Likewise.
6526 (handle_v_run): Likewise.
6527 (captured_main): Likewise.
6528 * target.c (write_inferior_memory): Likewise.
6529 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6530 * tracepoint.c (init_trace_buffer): Likewise.
6531 (add_tracepoint_action): Likewise.
6532 (add_traceframe): Likewise.
6533 (add_traceframe_block): Likewise.
6534 (cmd_qtdpsrc): Likewise.
6535 (cmd_qtdv): Likewise.
6536 (cmd_qtstatus): Likewise.
6537 (response_source): Likewise.
6538 (response_tsv): Likewise.
6539 (cmd_qtnotes): Likewise.
6540 (gdb_collect): Likewise.
6541 (initialize_tracepoint): Likewise.
6542
afbe19f8
PL
65432015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6544
6545 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6546 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6547 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6548 <NOP>: New.
6549 (enum aarch64_condition_codes): New enum.
6550 (w0): New static global.
6551 (fp): Likewise.
6552 (lr): Likewise.
6553 (struct aarch64_memory_operand) <type>: New
6554 MEMORY_OPERAND_POSTINDEX type.
6555 (postindex_memory_operand): New helper function.
6556 (emit_ret): New function.
6557 (emit_load_store_pair): New function, factored out of emit_stp
6558 with support for MEMORY_OPERAND_POSTINDEX.
6559 (emit_stp): Rewrite using emit_load_store_pair.
6560 (emit_ldp): New function.
6561 (emit_load_store): Likewise.
6562 (emit_ldr): Mention post-index instruction in comment.
6563 (emit_ldrh): New function.
6564 (emit_ldrb): New function.
6565 (emit_ldrsw): Mention post-index instruction in comment.
6566 (emit_str): Likewise.
6567 (emit_subs): New function.
6568 (emit_cmp): Likewise.
6569 (emit_and): Likewise.
6570 (emit_orr): Likewise.
6571 (emit_orn): Likewise.
6572 (emit_eor): Likewise.
6573 (emit_mvn): Likewise.
6574 (emit_lslv): Likewise.
6575 (emit_lsrv): Likewise.
6576 (emit_asrv): Likewise.
6577 (emit_mul): Likewise.
6578 (emit_sbfm): Likewise.
6579 (emit_sbfx): Likewise.
6580 (emit_ubfm): Likewise.
6581 (emit_ubfx): Likewise.
6582 (emit_csinc): Likewise.
6583 (emit_cset): Likewise.
6584 (emit_nop): Likewise.
6585 (emit_ops_insns): New helper function.
6586 (emit_pop): Likewise.
6587 (emit_push): Likewise.
6588 (aarch64_emit_prologue): New function.
6589 (aarch64_emit_epilogue): Likewise.
6590 (aarch64_emit_add): Likewise.
6591 (aarch64_emit_sub): Likewise.
6592 (aarch64_emit_mul): Likewise.
6593 (aarch64_emit_lsh): Likewise.
6594 (aarch64_emit_rsh_signed): Likewise.
6595 (aarch64_emit_rsh_unsigned): Likewise.
6596 (aarch64_emit_ext): Likewise.
6597 (aarch64_emit_log_not): Likewise.
6598 (aarch64_emit_bit_and): Likewise.
6599 (aarch64_emit_bit_or): Likewise.
6600 (aarch64_emit_bit_xor): Likewise.
6601 (aarch64_emit_bit_not): Likewise.
6602 (aarch64_emit_equal): Likewise.
6603 (aarch64_emit_less_signed): Likewise.
6604 (aarch64_emit_less_unsigned): Likewise.
6605 (aarch64_emit_ref): Likewise.
6606 (aarch64_emit_if_goto): Likewise.
6607 (aarch64_emit_goto): Likewise.
6608 (aarch64_write_goto_address): Likewise.
6609 (aarch64_emit_const): Likewise.
6610 (aarch64_emit_call): Likewise.
6611 (aarch64_emit_reg): Likewise.
6612 (aarch64_emit_pop): Likewise.
6613 (aarch64_emit_stack_flush): Likewise.
6614 (aarch64_emit_zero_ext): Likewise.
6615 (aarch64_emit_swap): Likewise.
6616 (aarch64_emit_stack_adjust): Likewise.
6617 (aarch64_emit_int_call_1): Likewise.
6618 (aarch64_emit_void_call_2): Likewise.
6619 (aarch64_emit_eq_goto): Likewise.
6620 (aarch64_emit_ne_goto): Likewise.
6621 (aarch64_emit_lt_goto): Likewise.
6622 (aarch64_emit_le_goto): Likewise.
6623 (aarch64_emit_gt_goto): Likewise.
6624 (aarch64_emit_ge_got): Likewise.
6625 (aarch64_emit_ops_impl): New static global variable.
6626 (aarch64_emit_ops): New target function, return
6627 &aarch64_emit_ops_impl.
6628 (struct linux_target_ops): Install it.
6629
bb903df0
PL
66302015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6631
6632 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6633 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6634 aarch64-ipa.o.
6635 * linux-aarch64-ipa.c: New file.
6636 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6637 and endian.h.
6638 (aarch64_get_thread_area): New target method.
6639 (extract_signed_bitfield): New helper function.
6640 (aarch64_decode_ldr_literal): New function.
6641 (enum aarch64_opcodes): New enum.
6642 (struct aarch64_register): New struct.
6643 (struct aarch64_operand): New struct.
6644 (x0): New static global.
6645 (x1): Likewise.
6646 (x2): Likewise.
6647 (x3): Likewise.
6648 (x4): Likewise.
6649 (w2): Likewise.
6650 (ip0): Likewise.
6651 (sp): Likewise.
6652 (xzr): Likewise.
6653 (aarch64_register): New helper function.
6654 (register_operand): Likewise.
6655 (immediate_operand): Likewise.
6656 (struct aarch64_memory_operand): New struct.
6657 (offset_memory_operand): New helper function.
6658 (preindex_memory_operand): Likewise.
6659 (enum aarch64_system_control_registers): New enum.
6660 (ENCODE): New macro.
6661 (emit_insn): New helper function.
6662 (emit_b): New function.
6663 (emit_bcond): Likewise.
6664 (emit_cb): Likewise.
6665 (emit_tb): Likewise.
6666 (emit_blr): Likewise.
6667 (emit_stp): Likewise.
6668 (emit_ldp_q_offset): Likewise.
6669 (emit_stp_q_offset): Likewise.
6670 (emit_load_store): Likewise.
6671 (emit_ldr): Likewise.
6672 (emit_ldrsw): Likewise.
6673 (emit_str): Likewise.
6674 (emit_ldaxr): Likewise.
6675 (emit_stxr): Likewise.
6676 (emit_stlr): Likewise.
6677 (emit_data_processing_reg): Likewise.
6678 (emit_data_processing): Likewise.
6679 (emit_add): Likewise.
6680 (emit_sub): Likewise.
6681 (emit_mov): Likewise.
6682 (emit_movk): Likewise.
6683 (emit_mov_addr): Likewise.
6684 (emit_mrs): Likewise.
6685 (emit_msr): Likewise.
6686 (emit_sevl): Likewise.
6687 (emit_wfe): Likewise.
6688 (append_insns): Likewise.
6689 (can_encode_int32_in): New helper function.
6690 (aarch64_relocate_instruction): New function.
6691 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6692 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6693 (struct linux_target_ops): Install aarch64_get_thread_area,
6694 aarch64_install_fast_tracepoint_jump_pad and
6695 aarch64_get_min_fast_tracepoint_insn_len.
6696
787749ea
PL
66972015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6698
6699 * Makefile.in (aarch64-insn.o): New rule.
6700 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6701
9812b2e6
YQ
67022015-09-21 Yao Qi <yao.qi@linaro.org>
6703
6704 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6705
18fe412b
YQ
67062015-09-21 Yao Qi <yao.qi@linaro.org>
6707
6708 * tracepoint.c (max_jump_pad_size): Remove.
6709
a0cc84cd
YQ
67102015-09-18 Yao Qi <yao.qi@linaro.org>
6711
6712 * linux-aarch64-low.c: Don't include sys/uio.h.
6713 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6714
d78908cf
WW
67152015-09-16 Wei-cheng Wang <cole945@gmail.com>
6716
6717 * tracepoint.c (eval_result_type): Change prototype.
6718 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6719
d57e0d50
PA
67202015-09-15 Pedro Alves <palves@redhat.com>
6721
6722 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6723 Check whether to report exec events instead of checking whether
6724 multiprocess is enabled.
6725
5a676acc
PA
67262015-09-15 Pedro Alves <palves@redhat.com>
6727
6728 PR remote/18965
6729 * remote-utils.c (prepare_resume_reply): Merge
6730 TARGET_WAITKIND_VFORK_DONE switch case with the
6731 TARGET_WAITKIND_FORKED case.
6732
7c5d0fad
YQ
67332015-09-15 Yao Qi <yao.qi@linaro.org>
6734
6735 * server.c (handle_query): Check string comparison using
6736 "else if" instead of "if".
6737
750ce8d1
YQ
67382015-09-15 Yao Qi <yao.qi@linaro.org>
6739
6740 * server.c (vCont_supported): New global variable.
6741 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6742 matches. Append ";vContSupported+" to own_buf.
6743 (handle_v_requests): Append ";s;S" to own_buf if target supports
6744 hardware single step or vCont_supported is false.
6745 (capture_main): Set vCont_supported to zero.
6746
70b90b91
YQ
67472015-09-15 Yao Qi <yao.qi@linaro.org>
6748
6749 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6750 it to ...
6751 (linux_supports_hardware_single_step): ... New function.
6752 (linux_target_ops): Update.
6753 * lynx-low.c (lynx_target_ops): Set field
6754 supports_hardware_single_step to target_can_do_hardware_single_step.
6755 * nto-low.c (nto_target_ops): Likewise.
6756 * spu-low.c (spu_target_ops): Likewise.
6757 * win32-low.c (win32_target_ops): Likewise.
6758 * target.c (target_can_do_hardware_single_step): New function.
6759 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6760 Remove. <supports_hardware_single_step>: New field.
6761 (target_supports_conditional_breakpoints): Remove.
6762 (target_supports_hardware_single_step): New macro.
6763 (target_can_do_hardware_single_step): Declare.
6764 * server.c (handle_query): Use target_supports_hardware_single_step
6765 instead of target_supports_conditional_breakpoints.
6766
ade90bde
YQ
67672015-09-15 Yao Qi <yao.qi@linaro.org>
6768
6769 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6770 function.
6771 (struct linux_target_ops the_low_target): Install
6772 aarch64_linux_siginfo_fixup.
6773
94585166
DB
67742015-09-11 Don Breazeal <donb@codesourcery.com>
6775 Luis Machado <lgustavo@codesourcery.com>
6776
6777 * linux-low.c (linux_mourn): Static declaration.
6778 (linux_arch_setup): Move in front of
6779 handle_extended_wait.
6780 (linux_arch_setup_thread): New function.
6781 (handle_extended_wait): Handle exec events. Call
6782 linux_arch_setup_thread. Make event_lwp argument a
6783 pointer-to-a-pointer.
6784 (check_zombie_leaders): Do not check stopped threads.
6785 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6786 (linux_low_filter_event): Add lwp and thread for exec'ing
6787 non-leader thread if leader thread has been deleted.
6788 Refactor code into linux_arch_setup_thread and call it.
6789 Pass child lwp pointer by reference to handle_extended_wait.
6790 (linux_wait_for_event_filtered): Update comment.
6791 (linux_wait_1): Prevent clobbering exec event status.
6792 (linux_supports_exec_events): New function.
6793 (linux_target_ops) <supports_exec_events>: Initialize new member.
6794 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6795 new member.
6796 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6797 * server.c (report_exec_events): New global variable.
6798 (handle_query): Handle qSupported query for exec-events feature.
6799 (captured_main): Initialize report_exec_events.
6800 * server.h (report_exec_events): Declare new global variable.
6801 * target.h (struct target_ops) <supports_exec_events>: New
6802 member.
6803 (target_supports_exec_events): New macro.
6804 * win32-low.c (win32_target_ops) <supports_exec_events>:
6805 Initialize new member.
6806
0568462b
MM
68072015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6808
6809 * linux-low.c (linux_low_enable_btrace): Remove.
6810 (linux_target_ops): Replace linux_low_enable_btrace with
6811 linux_enable_btrace.
6812
39edd165
YQ
68132015-09-03 Yao Qi <yao.qi@linaro.org>
6814
6815 * linux-aarch64-low.c (aarch64_insert_point): Call
6816 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6817 returns true.
6818
1db33b5a
UW
68192015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6820
6821 * linux-low.c (check_stopped_by_breakpoint): Use
6822 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6823
ab290430
PA
68242015-08-27 Pedro Alves <palves@redhat.com>
6825
6826 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6827
8d749320
SM
68282015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6829
6711b7f8
SM
6830 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6831 the XNEW-family equivalent.
8d749320
SM
6832 (compile_bytecodes): Likewise.
6833 * dll.c (loaded_dll): Likewise.
6834 * event-loop.c (append_callback_event): Likewise.
6835 (create_file_handler): Likewise.
6836 (create_file_event): Likewise.
6837 * hostio.c (handle_open): Likewise.
6838 * inferiors.c (add_thread): Likewise.
6839 (add_process): Likewise.
6840 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6841 * linux-arm-low.c (arm_new_process): Likewise.
6842 (arm_new_thread): Likewise.
6843 * linux-low.c (add_to_pid_list): Likewise.
6844 (linux_add_process): Likewise.
6845 (handle_extended_wait): Likewise.
6846 (add_lwp): Likewise.
6847 (enqueue_one_deferred_signal): Likewise.
6848 (enqueue_pending_signal): Likewise.
6849 (linux_resume_one_lwp_throw): Likewise.
6850 (linux_resume_one_thread): Likewise.
6851 (linux_read_memory): Likewise.
6852 (linux_write_memory): Likewise.
6853 * linux-mips-low.c (mips_linux_new_process): Likewise.
6854 (mips_linux_new_thread): Likewise.
6855 (mips_add_watchpoint): Likewise.
6856 * linux-x86-low.c (initialize_low_arch): Likewise.
6857 * lynx-low.c (lynx_add_process): Likewise.
6858 * mem-break.c (set_raw_breakpoint_at): Likewise.
6859 (set_breakpoint): Likewise.
6860 (add_condition_to_breakpoint): Likewise.
6861 (add_commands_to_breakpoint): Likewise.
6862 (clone_agent_expr): Likewise.
6863 (clone_one_breakpoint): Likewise.
6864 * regcache.c (new_register_cache): Likewise.
6865 * remote-utils.c (look_up_one_symbol): Likewise.
6866 * server.c (queue_stop_reply): Likewise.
6867 (start_inferior): Likewise.
6868 (queue_stop_reply_callback): Likewise.
6869 (handle_target_event): Likewise.
6870 * spu-low.c (fetch_ppc_memory): Likewise.
6871 (store_ppc_memory): Likewise.
6872 * target.c (set_target_ops): Likewise.
6873 * thread-db.c (thread_db_load_search): Likewise.
6874 (try_thread_db_load_1): Likewise.
6875 * tracepoint.c (add_tracepoint): Likewise.
6876 (add_tracepoint_action): Likewise.
6877 (create_trace_state_variable): Likewise.
6878 (cmd_qtdpsrc): Likewise.
6879 (cmd_qtro): Likewise.
6880 (add_while_stepping_state): Likewise.
6881 * win32-low.c (child_add_thread): Likewise.
6882 (get_image_name): Likewise.
6883
ed8b7b42
YQ
68842015-08-25 Yao Qi <yao.qi@linaro.org>
6885
6886 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6887
db3cb7cb
YQ
68882015-08-25 Yao Qi <yao.qi@linaro.org>
6889
6890 * Makefile.in (aarch64-linux.o): New rule.
6891 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6892 srv_tgtobj.
6893 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6894 (aarch64_init_debug_reg_state): Make it extern.
6895 (aarch64_linux_prepare_to_resume): Remove.
6896
f6011a1c
YQ
68972015-08-25 Yao Qi <yao.qi@linaro.org>
6898
6899 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6900 lwp_arch_private_info and ptid_of_lwp.
6901
88e2cf7e
YQ
69022015-08-25 Yao Qi <yao.qi@linaro.org>
6903
6904 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6905 Find proc_info by find_process_pid. All callers updated.
6906
5e35436e
YQ
69072015-08-25 Yao Qi <yao.qi@linaro.org>
6908
6909 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6910 Remove.
6911 (debug_reg_change_callback): Remove.
6912 (aarch64_notify_debug_reg_change): Remove.
6913
4a8a7965
YQ
69142015-08-25 Yao Qi <yao.qi@linaro.org>
6915
6916 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6917 Call current_lwp_ptid.
6918
32a271ee
YQ
69192015-08-25 Yao Qi <yao.qi@linaro.org>
6920
6921 * linux-aarch64-low.c (debug_reg_change_callback): Use
6922 debug_printf.
6923
0d51c8d7
YQ
69242015-08-25 Yao Qi <yao.qi@linaro.org>
6925
6926 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6927
31a43dd5
YQ
69282015-08-25 Yao Qi <yao.qi@linaro.org>
6929
6930 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6931
8ee52567
YQ
69322015-08-25 Yao Qi <yao.qi@linaro.org>
6933
6934 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6935 the code.
6936
ff3f0f45
YQ
69372015-08-25 Yao Qi <yao.qi@linaro.org>
6938
6939 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6940 Remove.
6941 (debug_reg_change_callback): Remove argument entry and add argument
6942 lwp. Remove local variable thread. Don't print thread id in the
6943 debugging output. Don't check whether pid of thread equals to pid.
6944 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6945 iterate_over_lwps instead find_inferior.
6946
3d40fbb5
PA
69472015-08-24 Pedro Alves <palves@redhat.com>
6948
6949 * inferiors.c (get_first_process): New function.
6950 * inferiors.h (get_first_process): New declaration.
6951 * remote-utils.c (read_ptid): Default to the first process in the
6952 list, instead of to the current thread's process.
6953
438e1e42
PA
69542015-08-24 Pedro Alves <palves@redhat.com>
6955
6956 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6957 * event-loop.c: Likewise.
6958 * remote-utils.c: Likewise.
6959 * tracepoint.c: Likewise.
6960
a8c6d4fc
PA
69612015-08-24 Pedro Alves <palves@redhat.com>
6962
6963 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6964 ptid_get_lwp.
6965
99b0bb12
PA
69662015-08-21 Pedro Alves <palves@redhat.com>
6967
6968 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6969 instead of literal 1.
6970
f8904751
PA
69712015-08-21 Pedro Alves <palves@redhat.com>
6972
6973 * tdesc.c (default_description): Explicitly zero-initialize.
6974
465a859e
PA
69752015-08-21 Pedro Alves <palves@redhat.com>
6976
6977 PR gdb/18749
6978 * inferiors.c (remove_thread): Discard any pending stop reply for
6979 this thread.
6980 * server.c (remove_all_on_match_pid): Rename to ...
6981 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6982 instead of a pid.
6983 (discard_queued_stop_replies): Change parameter to a ptid. Now
6984 extern.
6985 (handle_v_kill, kill_inferior_callback, captured_main)
6986 (process_serial_event): Adjust.
6987 * server.h (discard_queued_stop_replies): Declare.
6988
f0db101d
PA
69892015-08-21 Pedro Alves <palves@redhat.com>
6990
6991 * linux-low.c (wait_for_sigstop): Always switch to no thread
6992 selected if the previously current thread dies.
6993 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6994 process instead of the current thread's.
6995 * remote-utils.c (input_interrupt): Don't check if there's no
6996 current thread.
6997 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6998 current thread to the general thread fails, error out.
6999 (handle_qxfer_auxv, handle_qxfer_libraries)
7000 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7001 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7002 (handle_query): Check if there's a thread selected instead of
7003 checking whether there's any thread in the thread list.
7004 (handle_qxfer_threads, handle_qxfer_btrace)
7005 (handle_qxfer_btrace_conf): Don't error out early if there's no
7006 thread in the thread list.
7007 (handle_v_cont, myresume): Don't set the current thread to the
7008 continue thread.
7009 (process_serial_event) <Hg handling>: Also set thread_id if the
7010 previous general thread is still alive.
7011 (process_serial_event) <g/G handling>: If setting the current
7012 thread to the general thread fails, error out.
7013 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7014 thread's lwp instead of the current thread's.
7015 * target.c (set_desired_thread): If the desired thread was not
7016 found, leave the current thread pointing to NULL. Return an int
7017 (boolean) indicating success.
7018 * target.h (set_desired_thread): Change return type to int.
7019
40045d91
MF
70202015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7021
7022 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7023 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7024 #includes.
7025 (ps_get_thread_area): New function.
7026
45face3b
GB
70272015-08-19 Gary Benson <gbenson@redhat.com>
7028
7029 * hostio.c (handle_pread): Do not attempt to read more data
7030 than hostio_reply_with_data can fit in a packet.
7031
16d5f642
JB
70322015-08-18 Joel Brobecker <brobecker@adacore.com>
7033
7034 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7035
a738da3a
MF
70362015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7037
7038 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7039
33ebda9d
PA
70402015-08-06 Pedro Alves <palves@redhat.com>
7041
7042 * tracepoint.c (expr_eval_result): Now an int.
7043
a44892be
PA
70442015-08-06 Pedro Alves <palves@redhat.com>
7045
7046 * gdbthread.h (struct regcache): Forward declare.
7047 (struct thread_info) <regcache_data>: Now a struct regcache
7048 pointer.
7049 * inferiors.c (inferior_regcache_data)
7050 (set_inferior_regcache_data): Now work with struct regcache
7051 pointers.
7052 * inferiors.h (struct regcache): Forward declare.
7053 (inferior_regcache_data, set_inferior_regcache_data): Now work
7054 with struct regcache pointers.
7055 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7056 (free_register_cache_thread): Remove struct regcache pointer
7057 casts.
7058
608a1e46
PA
70592015-08-06 Pedro Alves <palves@redhat.com>
7060
7061 * server.c (captured_main): On error, print the exception message
7062 to stderr, and if run_once is set, throw a quit.
7063
f0ce0d3a
PA
70642015-08-06 Pedro Alves <palves@redhat.com>
7065
7066 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7067 the current thread.
7068
bf47e248
PA
70692015-08-06 Pedro Alves <palves@redhat.com>
7070
7071 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7072 reading beyond the passed in buffer length.
7073
b6b9ffcc
PL
70742015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7075
7076 * tracepoint.c (symbol_list) <required>: Remove.
7077
863d01bd
PA
70782015-08-06 Pedro Alves <palves@redhat.com>
7079
7080 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7081 count if stopping and suspending threads.
7082 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7083 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7084 (linux_detach): Complete an ongoing step-over.
7085 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7086 throughout.
7087 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7088 (linux_wait_1): If passing a signal to the inferior after
7089 finishing a step-over, unsuspend and re-resume all lwps. If we
7090 see a single-step event but the thread should be continuing, don't
7091 pass the trap to gdb.
7092 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7093 internal_error instead of gdb_assert.
7094 (enqueue_pending_signal): New function.
7095 (check_ptrace_stopped_lwp_gone): Add debug output.
7096 (start_step_over): Use internal_error instead of gdb_assert.
7097 (complete_ongoing_step_over): New function.
7098 (linux_resume_one_thread): Don't resume a suspended thread.
7099 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7100 it stepping.
7101
00db26fa
PA
71022015-08-06 Pedro Alves <palves@redhat.com>
7103
7104 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7105 (linux_thread_alive): Use lwp_is_marked_dead.
7106 (extended_event_reported): Delete.
7107 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7108 instead of extended_event_reported.
7109 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7110 as well.
7111 (lwp_is_marked_dead): New function.
7112 (lwp_running): Use lwp_is_marked_dead.
7113 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7114 comment.
7115
ad071a30
PA
71162015-08-06 Pedro Alves <palves@redhat.com>
7117
7118 * linux-low.c (linux_wait_1): Move fork event output out of the
7119 !report_to_gdb check. Pass event_child->waitstatus to
7120 target_waitstatus_to_string instead of ourstatus.
7121
524b57e6
YQ
71222015-08-04 Yao Qi <yao.qi@linaro.org>
7123
7124 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7125 if current_thread is 32 bit.
7126
6085d6f6
YQ
71272015-08-04 Yao Qi <yao.qi@linaro.org>
7128
7129 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7130 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7131 * server.c (extended_protocol): Remove "static".
7132 * server.h (extended_protocol): Declare it.
7133
8a7e4587
YQ
71342015-08-04 Yao Qi <yao.qi@linaro.org>
7135
7136 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7137 both aarch64 and aarch32.
7138 (aarch64_set_pc): Likewise.
7139
3b53ae99
YQ
71402015-08-04 Yao Qi <yao.qi@linaro.org>
7141
7142 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7143 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7144 arm-with-neon.xml to srv_xmlfiles.
7145 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7146 (is_64bit_tdesc): New function.
7147 (aarch64_linux_read_description): New function.
7148 (aarch64_arch_setup): Call aarch64_linux_read_description.
7149 (regs_info): Rename to regs_info_aarch64.
7150 (aarch64_regs_info): Return right regs_info.
7151 (initialize_low_arch): Call initialize_low_arch_aarch32.
7152
bd9e6534
YQ
71532015-08-04 Yao Qi <yao.qi@linaro.org>
7154
7155 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7156 * linux-aarch32-low.c: New file.
7157 * linux-aarch32-low.h: New file.
7158 * linux-arm-low.c (arm_fill_gregset): Move it to
7159 linux-aarch32-low.c.
7160 (arm_store_gregset): Likewise.
7161 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7162 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7163 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7164 (regs_info): Rename to regs_info_arm.
7165 (arm_regs_info): Return regs_info_aarch32 if
7166 have_ptrace_getregset is 1 and target description is
7167 arm_with_neon or arm_with_vfpv3.
7168 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7169 Call initialize_low_arch_aarch32 instead.
7170
ded48a5e
YQ
71712015-08-04 Yao Qi <yao.qi@linaro.org>
7172
7173 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7174 * linux-low.c: ... here.
7175 * linux-low.h (have_ptrace_getregset): Declare it.
7176
96e9210f
PA
71772015-08-04 Pedro Alves <palves@redhat.com>
7178
7179 * thread-db.c (struct thread_db): Use new typedefs.
7180 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7181 CHK calls.
7182 (disable_thread_event_reporting): Cast result of dlsym to
7183 destination function pointer type.
7184 (thread_db_mourn): Use td_ta_delete_ftype.
7185
af60a1ef
SL
71862015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7187
7188 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7189 arch variant.
7190 (CDX_BREAKPOINT): Define for R2.
7191 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7192 (the_low_target): Add comments.
7193
e8b41681
YQ
71942015-07-30 Yao Qi <yao.qi@linaro.org>
7195
7196 * linux-arm-low.c (arm_hwcap): Remove it.
7197 (arm_read_description): New local variable arm_hwcap. Don't
7198 set arm_hwcap to zero.
7199
89abb039
YQ
72002015-07-30 Yao Qi <yao.qi@linaro.org>
7201
7202 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7203 Use regcache->tdesc instead.
7204 (arm_store_wmmxregset): Likewise.
7205 (arm_fill_vfpregset): Likewise.
7206 (arm_store_vfpregset): Likewise.
7207
deca266c
YQ
72082015-07-30 Yao Qi <yao.qi@linaro.org>
7209
7210 * linux-arm-low.c: Include arch/arm.h.
7211 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7212 (arm_store_gregset): Likewise.
7213
aa58a496
SM
72142015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7215
7216 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7217 ptrace's 4th parameter.
7218
50904b25
YQ
72192015-07-27 Yao Qi <yao.qi@linaro.org>
7220
7221 * configure.srv (case aarch64*-*-linux*): Don't set
7222 srv_linux_usrregs.
7223
5826e159
PA
72242015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7225
7226 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7227 sys/ptrace.h.
7228 * linux-arm-low.c: Likewise.
7229 * linux-cris-low.c: Likewise.
7230 * linux-crisv32-low.c: Likewise.
7231 * linux-low.c: Likewise.
7232 * linux-m68k-low.c: Likewise.
7233 * linux-mips-low.c: Likewise.
7234 * linux-nios2-low.c: Likewise.
7235 * linux-s390-low.c: Likewise.
7236 * linux-sparc-low.c: Likewise.
7237 * linux-tic6x-low.c: Likewise.
7238 * linux-tile-low.c: Likewise.
7239 * linux-x86-low.c: Likewise.
7240
54019719
PA
72412015-07-24 Pedro Alves <palves@redhat.com>
7242
7243 * config.in: Regenerate.
7244 * configure: Regenerate.
7245
eb7aa561
PA
72462015-07-24 Pedro Alves <palves@redhat.com>
7247
7248 * acinclude.m4: Include ../ptrace.m4.
7249 * configure.ac: Call GDB_AC_PTRACE.
7250 * config.in, configure: Regenerate.
7251
55d7b841
YQ
72522015-07-24 Yao Qi <yao.qi@linaro.org>
7253
7254 * linux-low.c (linux_create_inferior): Remove setting to
7255 proc->priv->new_inferior.
7256 (linux_attach): Likewise.
7257 (linux_low_filter_event): Likewise.
7258 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7259
c06cbd92
YQ
72602015-07-24 Yao Qi <yao.qi@linaro.org>
7261
7262 * linux-low.c (linux_arch_setup): New function.
7263 (linux_low_filter_event): If proc->tdesc is NULL and
7264 proc->attached is true, call the_low_target.arch_setup.
7265 Otherwise, keep status pending, and return.
7266 (linux_resume_one_lwp_throw): Don't call get_pc if
7267 thread->while_stepping isn't NULL. Don't call
7268 get_thread_regcache if proc->tdesc is NULL.
7269 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7270 (linux_target_ops): Install arch_setup.
7271 * server.c (start_inferior): Call the_target->arch_setup.
7272 * target.h (struct target_ops) <arch_setup>: New field.
7273 (target_arch_setup): New marco.
7274 * lynx-low.c (lynx_target_ops): Update.
7275 * nto-low.c (nto_target_ops): Update.
7276 * spu-low.c (spu_target_ops): Update.
7277 * win32-low.c (win32_target_ops): Update.
7278
5ae3ebba
YQ
72792015-07-24 Yao Qi <yao.qi@linaro.org>
7280
7281 * linux-low.c (linux_add_process): Don't set
7282 proc->priv->new_inferior.
7283 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7284 (linux_attach): Likewise.
7285
eb97750b
YQ
72862015-07-24 Yao Qi <yao.qi@linaro.org>
7287
7288 * server.c (start_inferior): Code refactor.
7289
51aee833
YQ
72902015-07-24 Yao Qi <yao.qi@linaro.org>
7291
7292 * server.c (process_serial_event): Set general_thread.
7293
af1b22f3
YQ
72942015-07-21 Yao Qi <yao.qi@linaro.org>
7295
7296 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7297 aarch64_linux_get_debug_reg_capacity.
7298
554717a3
YQ
72992015-07-17 Yao Qi <yao.qi@linaro.org>
7300
7301 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7302 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7303 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7304 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7305 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7306 (AARCH64_HWP_ALIGNMENT): Likewise.
7307 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7308 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7309 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7310 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7311 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7312 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7313 (struct aarch64_debug_reg_state): Likewise.
7314 (struct arch_lwp_info): Likewise.
7315 (aarch64_align_watchpoint): Likewise.
7316 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7317 (aarch64_watchpoint_length): Likewise.
7318 (aarch64_point_encode_ctrl_reg): Likewise
7319 (aarch64_point_is_aligned): Likewise.
7320 (aarch64_align_watchpoint): Likewise.
7321 (aarch64_linux_set_debug_regs):
7322 (aarch64_dr_state_insert_one_point): Likewise.
7323 (aarch64_dr_state_remove_one_point): Likewise.
7324 (aarch64_handle_breakpoint): Likewise.
7325 (aarch64_handle_aligned_watchpoint): Likewise.
7326 (aarch64_handle_unaligned_watchpoint): Likewise.
7327 (aarch64_handle_watchpoint): Likewise.
7328
c67ca4de
YQ
73292015-07-17 Yao Qi <yao.qi@linaro.org>
7330
7331 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7332 and don't aarch64_get_debug_reg_state. All callers update.
7333 (aarch64_handle_aligned_watchpoint): Likewise.
7334 (aarch64_handle_unaligned_watchpoint): Likewise.
7335 (aarch64_handle_watchpoint): Likewise.
7336 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7337 (aarch64_remove_point): Likewise.
7338
25abf979
YQ
73392015-07-17 Yao Qi <yao.qi@linaro.org>
7340
7341 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7342 debug_printf.
7343 (aarch64_handle_unaligned_watchpoint): Likewise.
7344
db1ff28b
JK
73452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7346
7347 Revert the previous 3 commits:
7348 Move gdb_regex* to common/
7349 Move linux_find_memory_regions_full & co.
7350 gdbserver build-id attribute generator
7351
700ca40f
JK
73522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7353 Jan Kratochvil <jan.kratochvil@redhat.com>
7354
7355 gdbserver build-id attribute generator.
7356 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7357 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7358 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7359 (find_phdr): New.
7360 (get_dynamic): Use find_pdhr to traverse program headers.
7361 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7362 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7363 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7364 (get_hex_build_id): New.
7365 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7366 to reply XML document.
7367
9904185c
JK
73682015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7369 Jan Kratochvil <jan.kratochvil@redhat.com>
7370
7371 * target.c: Include target/target-utils.h and fcntl.h.
7372 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7373 (target_fileio_read_stralloc): New functions.
7374
6e5b4429
JK
73752015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7376
7377 * Makefile.in (OBS): Add gdb_regex.o.
7378 (gdb_regex.o): New.
7379 * config.in: Rebuilt.
7380 * configure: Rebuilt.
7381
ddc98fbf
JK
73822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7383 Jan Kratochvil <jan.kratochvil@redhat.com>
7384
7385 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7386 * Makefile.in (OBS): Add target-utils.o.
7387 (linux-maps.o, target-utils.o): New.
7388 * configure.srv (srv_linux_obj): Add linux-maps.o.
7389
e57bb7a0
PL
73902015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7391
7392 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7393 function, return 1.
7394 (the_low_target): Install it.
7395
586b02a9
PA
73962015-07-14 Pedro Alves <palves@redhat.com>
7397
7398 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7399 Instead, ignore ECHILD, and throw an error for other errnos.
7400
58c1b36c
PA
74012015-07-10 Pedro Alves <palves@redhat.com>
7402
7403 * event-loop.c (struct callback_event) <data>: Change type to
7404 gdb_client_data instance instead of gdb_client_data pointer.
7405 (append_callback_event): Adjust.
7406
421530db
PL
74072015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7408
7409 * linux-aarch64-low.c: Add comments for each linux_target_ops
7410 method. Remove comments already covered in target_ops and
7411 linux_target_ops definitions.
7412 (the_low_target): Add comments for each unimplemented method.
7413
c2d65f38
YQ
74142015-07-09 Yao Qi <yao.qi@linaro.org>
7415
7416 * linux-aarch64-low.c (aarch64_regmap): Remove.
7417 (aarch64_usrregs_info): Remove.
7418 (regs_info): Set field usrregs to NULL.
7419
b20a6524
MM
74202015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7421
7422 * linux-low.c: Include "rsp-low.h"
7423 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7424 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7425 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7426 (handle_btrace_enable_pt): New.
7427 (handle_btrace_general_set): Support "pt".
7428 (handle_btrace_conf_general_set): Support "pt:size".
7429
96c97461
PL
74302015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7431
7432 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7433 Z_PACKET_SW_BP.
7434
37d66942
PL
74352015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7436
7437 * linux-aarch64-low.c: Remove comment about endianness.
7438 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7439 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7440 memcmp.
7441
dc06243f
GB
74422015-06-24 Gary Benson <gbenson@redhat.com>
7443
7444 * linux-i386-ipa.c (stdint.h): Do not include.
7445 * lynx-i386-low.c (stdint.h): Likewise.
7446 * lynx-ppc-low.c (stdint.h): Likewise.
7447 * mem-break.c (stdint.h): Likewise.
7448 * thread-db.c (stdint.h): Likewise.
7449 * tracepoint.c (stdint.h): Likewise.
7450 * win32-low.c (stdint.h): Likewise.
7451
124e13d9
SM
74522015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7453
7454 * server.c (write_qxfer_response): Update call to
7455 remote_escape_output.
7456
909c2cda
JK
74572015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7458 Jan Kratochvil <jan.kratochvil@redhat.com>
7459
7460 Merge multiple hex conversions.
7461 * gdbreplay.c (tohex): Rename to 'fromhex'.
7462 (logchar): Use fromhex.
7463
24c05f46
JK
74642015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7465
7466 * server.c (handle_qxfer_libraries): Set `version' attribute for
7467 <library-list>.
7468
14d2069a
GB
74692015-06-10 Gary Benson <gbenson@redhat.com>
7470
7471 * target.h (struct target_ops) <multifs_open>: New field.
7472 <multifs_unlink>: Likewise.
7473 <multifs_readlink>: Likewise.
7474 * linux-low.c (nat/linux-namespaces.h): New include.
7475 (linux_target_ops): Initialize the_target->multifs_open,
7476 the_target->multifs_unlink and the_target->multifs_readlink.
7477 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7478 * hostio.c (hostio_fs_pid): New static variable.
7479 (hostio_handle_new_gdb_connection): New function.
7480 (handle_setfs): Likewise.
7481 (handle_open): Use the_target->multifs_open as appropriate.
7482 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7483 (handle_readlink): Use the_target->multifs_readlink as
7484 appropriate.
7485 (handle_vFile): Handle vFile:setfs packets.
7486 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7487 after target_handle_new_gdb_connection.
7488
4b8b5e72
GB
74892015-06-10 Gary Benson <gbenson@redhat.com>
7490
7491 * configure.ac (AC_CHECK_FUNCS): Add setns.
7492 * config.in: Regenerate.
7493 * configure: Likewise.
7494 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7495 (linux-namespaces.o): New rule.
7496 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7497
3ac2e371
GB
74982015-06-09 Gary Benson <gbenson@redhat.com>
7499
7500 * hostio.c (handle_open): Process mode argument with
7501 fileio_to_host_mode.
7502
ca9b78ce
YQ
75032015-06-01 Yao Qi <yao.qi@linaro.org>
7504
7505 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7506 * linux-x86-low.c: Likewise.
7507
bfacd19d
DB
75082015-05-28 Don Breazeal <donb@codesourcery.com>
7509
7510 * linux-low.c (handle_extended_wait): Initialize
7511 thread_info.last_resume_kind for new fork children.
7512
452003ef
PA
75132015-05-15 Pedro Alves <palves@redhat.com>
7514
7515 * target.h (target_handle_new_gdb_connection): Rewrite using if
7516 wrapped in do/while.
7517
1041a03c
JB
75182015-05-14 Joel Brobecker <brobecker@adacore.com>
7519
7520 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7521 * configure, config.in: Regenerate.
7522 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7523 Declare typedef.
7524
c269dbdb
DB
75252015-05-12 Don Breazeal <donb@codesourcery.com>
7526
7527 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7528 PTRACE_EVENT_VFORK_DONE.
7529 (linux_low_ptrace_options, extended_event_reported): Add vfork
7530 events.
7531 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7532 and "vforkdone" for RSP 'T' Stop Reply Packet.
7533 * server.h (report_vfork_events): Declare
7534 global variable.
7535
3a8a0396
DB
75362015-05-12 Don Breazeal <donb@codesourcery.com>
7537
7538 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7539 (the_low_target) <new_fork>: Initialize new member.
7540 * linux-arm-low.c (arm_new_fork): New function.
7541 (the_low_target) <new_fork>: Initialize new member.
7542 * linux-low.c (handle_extended_wait): Call new target function
7543 new_fork.
7544 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7545 * linux-mips-low.c (mips_add_watchpoint): New function
7546 extracted from mips_insert_point.
7547 (the_low_target) <new_fork>: Initialize new member.
7548 (mips_linux_new_fork): New function.
7549 (mips_insert_point): Call mips_add_watchpoint.
7550 * linux-x86-low.c (x86_linux_new_fork): New function.
7551 (the_low_target) <new_fork>: Initialize new member.
7552
de0d863e
DB
75532015-05-12 Don Breazeal <donb@codesourcery.com>
7554
7555 * linux-low.c (handle_extended_wait): Implement return value,
7556 rename argument 'event_child' to 'event_lwp', handle
7557 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7558 (linux_low_ptrace_options): New function.
7559 (linux_low_filter_event): Call linux_low_ptrace_options,
7560 use different argument fo linux_enable_event_reporting,
7561 use return value from handle_extended_wait.
7562 (extended_event_reported): New function.
7563 (linux_wait_1): Call extended_event_reported and set
7564 status to report fork events.
7565 (linux_write_memory): Add pid to debug message.
7566 (reset_lwp_ptrace_options_callback): New function.
7567 (linux_handle_new_gdb_connection): New function.
7568 (linux_target_ops): Initialize new structure member.
7569 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7570 * lynx-low.c: Initialize new structure member.
7571 * remote-utils.c (prepare_resume_reply): Implement stop reason
7572 "fork" for "T" stop message.
7573 * server.c (handle_query): Call handle_new_gdb_connection.
7574 * server.h (report_fork_events): Declare global flag.
7575 * target.h (struct target_ops) <handle_new_gdb_connection>:
7576 New member.
7577 (target_handle_new_gdb_connection): New macro.
7578 * win32-low.c: Initialize new structure member.
7579
ddcbc397
DB
75802015-05-12 Don Breazeal <donb@codesourcery.com>
7581
7582 * mem-break.c (APPEND_TO_LIST): Define macro.
7583 (clone_agent_expr): New function.
7584 (clone_one_breakpoint): New function.
7585 (clone_all_breakpoints): New function.
7586 * mem-break.h: Declare new functions.
7587
89245bc0
DB
75882015-05-12 Don Breazeal <donb@codesourcery.com>
7589
7590 * linux-low.c (linux_supports_fork_events): New function.
7591 (linux_supports_vfork_events): New function.
7592 (linux_target_ops): Initialize new structure members.
7593 (initialize_low): Call linux_check_ptrace_features.
7594 * lynx-low.c (lynx_target_ops): Initialize new structure
7595 members.
7596 * server.c (report_fork_events, report_vfork_events):
7597 New global flags.
7598 (handle_query): Add new features to qSupported packet and
7599 response.
7600 (captured_main): Initialize new global variables.
7601 * target.h (struct target_ops) <supports_fork_events>:
7602 New member.
7603 <supports_vfork_events>: New member.
7604 (target_supports_fork_events): New macro.
7605 (target_supports_vfork_events): New macro.
7606 * win32-low.c (win32_target_ops): Initialize new structure
7607 members.
7608
835205d0
GB
76092015-05-12 Gary Benson <gbenson@redhat.com>
7610
7611 * server.c (handle_qxfer_exec_file): Use current process
7612 if annex is empty.
7613
21e94bd9
SL
76142015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7615
7616 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7617 Remove HAVE_PTRACE_GETREGS conditionals.
7618 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7619 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7620
45614f15
YQ
76212015-05-08 Yao Qi <yao.qi@linaro.org>
7622
7623 * linux-low.c (linux_supports_conditional_breakpoints): New
7624 function.
7625 (linux_target_ops): Install new target method.
7626 * lynx-low.c (lynx_target_ops): Install NULL hook for
7627 supports_conditional_breakpoints.
7628 * nto-low.c (nto_target_ops): Likewise.
7629 * spu-low.c (spu_target_ops): Likewise.
7630 * win32-low.c (win32_target_ops): Likewise.
7631 * server.c (handle_query): Check
7632 target_supports_conditional_breakpoints.
7633 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7634 New field.
7635 (target_supports_conditional_breakpoints): New macro.
7636
80ad801e
PA
76372015-05-06 Pedro Alves <palves@redhat.com>
7638
7639 PR server/18081
7640 * server.c (start_inferior): If the process exits, mourn it.
7641
819843c7
GB
76422015-04-21 Gary Benson <gbenson@redhat.com>
7643
7644 * hostio.c (fileio_open_flags_to_host): Factored out to
7645 fileio_to_host_openflags in common/fileio.c. Single use
7646 updated.
7647
a2d5a9d7
MF
76482015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7649
7650 * linux-xtensa-low.c (xtensa_fill_gregset)
7651 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7652 XCHAL_HAVE_LOOP.
7653
deb44829
MF
76542015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7655
7656 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7657 (regs_info): Replace usrregs pointer with NULL.
7658
e57f1de3
GB
76592015-04-17 Gary Benson <gbenson@redhat.com>
7660
7661 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7662 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7663 * server.c (handle_qxfer_exec_file): New function.
7664 (qxfer_packets): Add exec-file entry.
7665 (handle_query): Report qXfer:exec-file:read as supported packet.
7666
62828379
RN
76672015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7668
7669 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7670
b88bb450
GB
76712015-04-09 Gary Benson <gbenson@redhat.com>
7672
7673 * hostio-errno.c (errno_to_fileio_error): Remove function.
7674 Update caller to use remote_fileio_to_fio_error.
7675
c8f4bfdd
YQ
76762015-04-09 Yao Qi <yao.qi@linaro.org>
7677
7678 * linux-low.c (linux_insert_point): Call
7679 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7680 (linux_remove_point): Call remove_memory_breakpoint if type is
7681 raw_bkpt_type_sw.
7682 * linux-x86-low.c (x86_insert_point): Don't call
7683 insert_memory_breakpoint.
7684 (x86_remove_point): Don't call remove_memory_breakpoint.
7685
41f98f02
PA
76862015-04-01 Pedro Alves <palves@redhat.com>
7687 Cleber Rosa <crosa@redhat.com>
7688
7689 * server.c (gdbserver_usage): Reorganize and extend the usage
7690 message.
7691
2bf6fb9d
PA
76922015-03-24 Pedro Alves <palves@redhat.com>
7693
7694 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7695 output. Also dump TRAP_TRACE.
7696 (linux_low_filter_event): In debug output, distinguish a
7697 resume_stop SIGSTOP from a delayed SIGSTOP.
7698
369f6daa
GB
76992015-03-24 Gary Benson <gbenson@redhat.com>
7700
7701 * linux-x86-low.c (x86_linux_new_thread): Moved to
7702 nat/x86-linux.c.
7703 (x86_linux_prepare_to_resume): Likewise.
7704
8e5d4070
GB
77052015-03-24 Gary Benson <gbenson@redhat.com>
7706
7707 * Makefile.in (x86-linux-dregs.o): New rule.
7708 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7709 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7710 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7711 (x86_linux_dr_get): Likewise.
7712 (x86_linux_dr_set): Likewise.
7713 (update_debug_registers_callback): Likewise.
7714 (x86_linux_dr_set_addr): Likewise.
7715 (x86_linux_dr_get_addr): Likewise.
7716 (x86_linux_dr_set_control): Likewise.
7717 (x86_linux_dr_get_control): Likewise.
7718 (x86_linux_dr_get_status): Likewise.
7719 (x86_linux_update_debug_registers): Likewise.
7720
2b95d440
GB
77212015-03-24 Gary Benson <gbenson@redhat.com>
7722
7723 * linux-x86-low.c (x86_linux_update_debug_registers):
7724 New function, factored out from...
7725 (x86_linux_prepare_to_resume): ...this.
7726
14b0bc68
GB
77272015-03-24 Gary Benson <gbenson@redhat.com>
7728
7729 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7730 (x86_linux_dr_set): Likewise.
7731 (update_debug_registers_callback): Likewise.
7732 (x86_linux_dr_set_addr): Likewise.
7733 (x86_linux_dr_get_addr): Likewise.
7734 (x86_linux_dr_set_control): Likewise.
7735 (x86_linux_dr_get_control): Likewise.
7736 (x86_linux_dr_get_status): Likewise.
7737 (x86_linux_prepare_to_resume): Likewise.
7738
5dfe6ca8
GB
77392015-03-24 Gary Benson <gbenson@redhat.com>
7740
7741 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7742 Use perror_with_name. Pass string through gettext.
7743 (x86_linux_dr_set): Likewise.
7744
d33472ad
GB
77452015-03-24 Gary Benson <gbenson@redhat.com>
7746
7747 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7748 (x86_linux_dr_set_addr): ...this.
7749 (x86_dr_low_get_addr): Rename to...
7750 (x86_linux_dr_get_addr): ...this.
7751 (x86_dr_low_set_control): Rename to...
7752 (x86_linux_dr_set_control): ...this.
7753 (x86_dr_low_get_control): Rename to...
7754 (x86_linux_dr_get_control): ...this.
7755 (x86_dr_low_get_status): Rename to...
7756 (x86_linux_dr_get_status): ...this.
7757 (x86_dr_low): Update with new function names.
7758
4b134ca1
GB
77592015-03-24 Gary Benson <gbenson@redhat.com>
7760
7761 * Makefile.in (x86-linux.o): New rule.
7762 * configure.srv: Add x86-linux.o to relevant targets.
7763 * linux-low.c (lwp_set_arch_private_info): New function.
7764 (lwp_arch_private_info): Likewise.
7765 * linux-x86-low.c: Include nat/x86-linux.h.
7766 (arch_lwp_info): Removed structure.
7767 (update_debug_registers_callback):
7768 Use lwp_set_debug_registers_changed.
7769 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7770 and lwp_set_debug_registers_changed.
7771 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7772
34c703da
GB
77732015-03-24 Gary Benson <gbenson@redhat.com>
7774
7775 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7776 * linux-arm-low.c (arm_new_thread): Likewise.
7777 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7778 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7779 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7780 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7781
cff068da
GB
77822015-03-24 Gary Benson <gbenson@redhat.com>
7783
7784 * linux-low.c (ptid_of_lwp): New function.
7785 (lwp_is_stopped): Likewise.
7786 (lwp_stop_reason): Likewise.
7787 * linux-x86-low.c (update_debug_registers_callback):
7788 Use lwp_is_stopped.
7789 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7790 lwp_stop_reason.
7791
b2f7c7e8
GB
77922015-03-24 Gary Benson <gbenson@redhat.com>
7793
7794 * linux-low.h (linux_stop_lwp): Remove declaration.
7795
6d4ee8c6
GB
77962015-03-24 Gary Benson <gbenson@redhat.com>
7797
7798 * linux-low.h: Include nat/linux-nat.h.
7799 * linux-low.c (iterate_over_lwps_args): New structure.
7800 (iterate_over_lwps_filter): New function.
7801 (iterate_over_lwps): Likewise.
7802 * linux-x86-low.c (update_debug_registers_callback):
7803 Update signature to what iterate_over_lwps expects.
7804 Remove PID check that iterate_over_lwps now performs.
7805 (x86_dr_low_set_addr): Use iterate_over_lwps.
7806 (x86_dr_low_set_control): Likewise.
7807
70a0bb6b
GB
78082015-03-24 Gary Benson <gbenson@redhat.com>
7809
7810 * linux-x86-low.c (x86_debug_reg_state): New function.
7811 (x86_linux_prepare_to_resume): Use the above.
7812
7b669087
GB
78132015-03-24 Gary Benson <gbenson@redhat.com>
7814
7815 * linux-low.c (current_lwp_ptid): New function.
7816 * linux-x86-low.c: Include nat/linux-nat.h.
7817 (x86_dr_low_get_addr): Use current_lwp_ptid.
7818 (x86_dr_low_get_control): Likewise.
7819 (x86_dr_low_get_status): Likewise.
7820
eef49a3d
PA
78212015-03-20 Pedro Alves <palves@redhat.com>
7822
7823 * tracepoint.c (cmd_qtstatus): Make "str" const.
7824
b2333d22
PA
78252015-03-20 Pedro Alves <palves@redhat.com>
7826
7827 * server.c (handle_general_set): Make "req_str" const.
7828
23f238d3
PA
78292015-03-19 Pedro Alves <palves@redhat.com>
7830
7831 * linux-low.c (linux_resume_one_lwp): Rename to ...
7832 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7833 instead call perror_with_name.
7834 (check_ptrace_stopped_lwp_gone): New function.
7835 (linux_resume_one_lwp): Reimplement as wrapper around
7836 linux_resume_one_lwp_throw that swallows errors if the LWP is
7837 gone.
7838
91baf43f
PA
78392015-03-19 Pedro Alves <palves@redhat.com>
7840
7841 * linux-low.c (count_events_callback, select_event_lwp_callback):
7842 No longer check whether the thread has resume_stop as last resume
7843 kind.
7844
8bf3b159
PA
78452015-03-19 Pedro Alves <palves@redhat.com>
7846
7847 * linux-low.c (count_events_callback, select_event_lwp_callback):
7848 Use the lwp's status_pending_p field, not the thread's.
7849
b90fc188
PA
78502015-03-19 Pedro Alves <palves@redhat.com>
7851
7852 * linux-low.c (select_event_lwp_callback): Update comments to
7853 no longer mention SIGTRAP.
7854
464b0089
GB
78552015-03-18 Gary Benson <gbenson@redhat.com>
7856
7857 * server.c (handle_query): Do not report vFile:fstat as supported.
7858
aa9e327f
GB
78592015-03-11 Gary Benson <gbenson@redhat.com>
7860
7861 * hostio.c (sys/types.h): New include.
7862 (sys/stat.h): Likewise.
7863 (common-remote-fileio.h): Likewise.
7864 (handle_fstat): New function.
7865 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7866
791c0056
GB
78672015-03-11 Gary Benson <gbenson@redhat.com>
7868
7869 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7870 struct stat.st_blocks and struct stat.st_blksize.
7871 * configure: Regenerate.
7872 * config.in: Likewise.
7873 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7874 (OBS): Add common-remote-fileio.o.
7875 (common-remote-fileio.o): New rule.
7876
9a9df970
PA
78772015-03-09 Pedro Alves <palves@redhat.com>
7878
7879 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7880 'struct sockaddr' pointer in 'accept' call.
7881
9eb1356e
PA
78822015-03-09 Pedro Alves <palves@redhat.com>
7883
7884 Revert:
7885 2015-03-07 Pedro Alves <palves@redhat.com>
7886 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7887 or <winsock2.h> here. Instead include "gdb_socket.h".
7888 (remote_open): Use union gdb_sockaddr_u.
7889 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7890 or <winsock2.h> here. Instead include "gdb_socket.h".
7891 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7892 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7893 or <sys/un.h>.
7894 (init_named_socket, gdb_agent_helper_thread): Use union
7895 gdb_sockaddr_u.
7896
aac331e4
PA
78972015-03-07 Pedro Alves <palves@redhat.com>
7898
7899 * configure.ac (build_warnings): Move
7900 -Wdeclaration-after-statement to the C-specific set.
7901 * configure: Regenerate.
7902
366c75fc
PA
79032015-03-07 Pedro Alves <palves@redhat.com>
7904
7905 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7906 or <winsock2.h> here. Instead include "gdb_socket.h".
7907 (remote_open): Use union gdb_sockaddr_u.
7908 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7909 or <winsock2.h> here. Instead include "gdb_socket.h".
7910 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7911 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7912 or <sys/un.h>.
7913 (init_named_socket, gdb_agent_helper_thread): Use union
7914 gdb_sockaddr_u.
7915
492d29ea
PA
79162015-03-07 Pedro Alves <palves@redhat.com>
7917
7918 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7919 instead.
7920
60a191ed
YQ
79212015-03-06 Yao Qi <yao.qi@linaro.org>
7922
7923 * linux-aarch64-low.c (aarch64_insert_point): Use
7924 show_debug_regs as a boolean.
7925 (aarch64_remove_point): Likewise.
7926
f5771b1d
PA
79272015-03-05 Pedro Alves <palves@redhat.com>
7928
7929 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7930 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7931 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7932 * nto-low.c (nto_target_ops): Likewise.
7933 * spu-low.c (spu_target_ops): Likewise.
7934 * win32-low.c (win32_target_ops): Likewise.
7935
3e572f71
PA
79362015-03-04 Pedro Alves <palves@redhat.com>
7937
72f4393d 7938 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7939 Decide whether a breakpoint triggered based on the SIGTRAP's
7940 siginfo.si_code.
72f4393d
L
7941 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7942 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7943 (linux_low_filter_event): Check for breakpoints before checking
7944 watchpoints.
7945 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7946 siginfo.si_code.
72f4393d
L
7947 (linux_stopped_by_sw_breakpoint)
7948 (linux_supports_stopped_by_sw_breakpoint)
7949 (linux_stopped_by_hw_breakpoint)
7950 (linux_supports_stopped_by_hw_breakpoint): New functions.
7951 (linux_target_ops): Install new target methods.
3e572f71 7952
1ec68e26
PA
79532015-03-04 Pedro Alves <palves@redhat.com>
7954
7955 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7956 * server.c (swbreak_feature, hwbreak_feature): New globals.
7957 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7958 (captured_main): Clear swbreak_feature and hwbreak_feature.
7959 * server.h (swbreak_feature, hwbreak_feature): Declare.
7960 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7961 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7962 supports_stopped_by_hw_breakpoint>: New fields.
7963 (target_supports_stopped_by_sw_breakpoint)
7964 (target_stopped_by_sw_breakpoint)
7965 (target_supports_stopped_by_hw_breakpoint)
7966 (target_stopped_by_hw_breakpoint): Declare.
7967
15c66dd6
PA
79682015-03-04 Pedro Alves <palves@redhat.com>
7969
7970 enum lwp_stop_reason -> enum target_stop_reason
7971 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7972 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7973 (linux_wait_1, stuck_in_jump_pad_callback)
7974 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7975 (linux_stopped_by_watchpoint):
7976 * linux-low.h (enum lwp_stop_reason): Delete.
7977 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7978 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7979
98fc70d6
YQ
79802015-03-04 Yao Qi <yao.qi@linaro.org>
7981
7982 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7983
dd2ac174
GB
79842015-03-03 Gary Benson <gbenson@redhat.com>
7985
7986 * hostio.c (handle_vFile): Fix prefix lengths.
7987
d68e53f4
MM
79882015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7989
7990 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7991 ptr_bits.
7992
bf2d68ab
AA
79932015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7994
7995 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7996 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7997 (clean): Add "rm -f" for above C files.
7998 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7999 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8000 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8001 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8002 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8003 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8004 (init_registers_s390x_vx_linux64)
8005 (init_registers_s390x_tevx_linux64)
8006 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8007 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8008 declarations.
8009 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8010 (s390_store_vxrs_high): New functions.
8011 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8012 NT_S390_VXRS_HIGH.
8013 (s390_arch_setup): Add logic for selecting one of the new target
8014 descriptions. Activate the new vector regsets if applicable.
8015 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8016 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8017 and init_registers_s390x_tevx_linux64.
8018
c966a859
PA
80192015-03-01 Pedro Alves <palves@redhat.com>
8020
8021 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8022 parameter.
8023
4180215b
PA
80242015-02-27 Pedro Alves <palves@redhat.com>
8025
8026 * linux-x86-low.c (u_debugreg_offset): New function.
8027 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8028
749bab01
PA
80292015-02-27 Pedro Alves <palves@redhat.com>
8030
8031 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8032 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8033 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8034 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8035 (ps_lsetfpregs, ps_getpid)
8036 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8037 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8038 (ps_lsetxregs, ps_plog): Declare.
8039
3c14e5a3
PA
80402015-02-27 Pedro Alves <palves@redhat.com>
8041
8042 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8043 IP_AGENT_EXPORT_FUNC.
8044 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8045 IP_AGENT_EXPORT_FUNC.
8046 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8047 (IP_AGENT_EXPORT): Delete.
8048 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8049 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8050 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8051 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8052 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8053 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8054 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8055 (traceframe_read_count, traceframe_write_count)
8056 (traceframes_created, trace_state_variables, get_raw_reg)
8057 (get_trace_state_variable_value, set_trace_state_variable_value)
8058 (ust_loaded, helper_thread_id, cmd_buf): Use
8059 IPA_SYM_EXPORTED_NAME.
8060 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8061 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8062 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8063 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8064 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8065 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8066 EXTERN_C_PUSH/EXTERN_C_POP.
8067 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8068 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8069 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8070 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8071 (traceframe_write_count, traceframe_read_count)
8072 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8073 (about_to_request_buffer_space, get_trace_state_variable_value)
8074 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8075 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8076 EXTERN_C_PUSH/EXTERN_C_POP.
8077 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8078 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8079 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8080 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8081 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8082 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8083 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8084 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8085 Define.
8086 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8087 (IP_AGENT_EXPORT_VAR_DECL): Define.
8088 (tracing): Declare.
8089 (gdb_agent_get_raw_reg): Declare.
8090
fe978cb0
PA
80912015-02-27 Tom Tromey <tromey@redhat.com>
8092 Pedro Alves <palves@redhat.com>
8093
8094 Rename symbols whose names are reserved C++ keywords throughout.
8095
3bc3d82a
PA
80962015-02-27 Pedro Alves <palves@redhat.com>
8097
8098 * Makefile.in (COMPILER): New, get it from autoconf.
8099 (CXX): Get from autoconf instead.
8100 (COMPILE.pre): Use COMPILER.
8101 (CC-LD): Rename to ...
8102 (CC_LD): ... this. Use COMPILER.
8103 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8104 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8105 * acinclude.m4: Include build-with-cxx.m4.
8106 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8107 Disable -Werror by default if building in C++ mode.
8108 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8109 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8110 the C++ compiler. Save/restore CXXFLAGS too.
8111 * configure: Regenerate.
8112
07697489
PA
81132015-02-27 Pedro Alves <palves@redhat.com>
8114
8115 * acinclude.m4: Include libiberty.m4.
8116 * configure.ac: Call libiberty_INIT.
8117 * config.in, configure: Regenerate.
8118
9beb7c4e
PA
81192015-02-26 Pedro Alves <palves@redhat.com>
8120
8121 * linux-low.c (linux_wait_1): When incrementing the PC past a
8122 program breakpoint always use the_low_target.breakpoint_len as
8123 increment, rather than the maximum between that and
8124 the_low_target.decr_pc_after_break.
8125
8090aef2
PA
81262015-02-23 Pedro Alves <palves@redhat.com>
8127
8128 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8129 thread was doing a step-over; always adjust the PC if
8130 we stepped over a permanent breakpoint.
8131 (linux_wait_1): If we stepped over breakpoint that was on top of a
8132 permanent breakpoint, manually advance the PC past it.
8133
bc9540e8
PA
81342015-02-23 Pedro Alves <palves@redhat.com>
8135
8136 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8137 modes.
8138 (x86_fill_gregset, x86_store_gregset): Use it when handling
8139 $orig_eax.
8140
2db9a427
PA
81412015-02-20 Pedro Alves <palves@redhat.com>
8142
8143 * thread-db.c: Include "nat/linux-procfs.h".
8144 (thread_db_init): Skip listing new threads if the kernel supports
8145 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8146
afa8d396
PA
81472015-02-20 Pedro Alves <palves@redhat.com>
8148
8149 * linux-low.c (status_pending_p_callback): Use ptid_match.
8150
c9587f88
AT
81512015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8152
8153 PR breakpoints/16812
8154 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8155 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8156 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8157
b05ec7a5
AT
81582015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8159
8160 PR breakpoints/15956
8161 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8162
d33501a5
MM
81632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8164
8165 * linux-low.c (linux_low_btrace_conf): Print size.
8166 * server.c (handle_btrace_conf_general_set): New.
8167 (hanle_general_set): Call handle_btrace_conf_general_set.
8168 (handle_query): Report Qbtrace-conf:bts:size as supported.
8169
f4abbc16
MM
81702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8171
8172 * linux-low.c (linux_low_enable_btrace): Update parameters.
8173 (linux_low_btrace_conf): New.
8174 (linux_target_ops)<to_btrace_conf>: Initialize.
8175 * server.c (current_btrace_conf): New.
8176 (handle_btrace_enable): Rename to ...
8177 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8178 to target_enable_btrace. Update comment. Update users.
8179 (handle_qxfer_btrace_conf): New.
8180 (qxfer_packets): Add btrace-conf entry.
8181 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8182 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8183 (target_ops)<read_btrace_conf>: New.
8184 (target_enable_btrace): Update parameters.
8185 (target_read_btrace_conf): New.
8186
043c3577
MM
81872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8188
8189 * server.c (handle_btrace_general_set): Remove call to
8190 target_supports_btrace.
8191 (supported_btrace_packets): New.
8192 (handle_query): Call supported_btrace_packets.
8193 * target.h: include btrace-common.h.
8194 (btrace_target_info): Removed.
8195 (supports_btrace, target_supports_btrace): Update parameters.
8196
734b0e4b
MM
81972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8198
8199 * Makefile.in (SFILES): Add common/btrace-common.c.
8200 (OBS): Add common/btrace-common.o.
8201 (btrace-common.o): Add build rules.
8202 * linux-low: Include btrace-common.h.
8203 (linux_low_read_btrace): Use struct btrace_data. Call
8204 btrace_data_init and btrace_data_fini.
8205
d6c146e9
PA
82062015-02-06 Pedro Alves <palves@redhat.com>
8207
8208 * thread-db.c (find_new_threads_callback): Add debug output.
8209
20ba1ce6
PA
82102015-02-04 Pedro Alves <palves@redhat.com>
8211
8212 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8213 (resume_stopped_resumed_lwps): New function.
8214 (linux_wait_for_event_filtered): Use it.
8215
8cc73a39
SDJ
82162015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8217
8218 * Makefile.in (SFILES): Add linux-personality.c.
8219 (linux-personality.o): New rule.
8220 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8221 list of objects to be built.
8222 * linux-low.c: Include nat/linux-personality.h.
8223 (linux_create_inferior): Remove code to disable address space
8224 randomization (moved to ../nat/linux-personality.c). Create
8225 cleanup to disable address space randomization.
8226
fb23d554
SDJ
82272015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8228
8229 * Makefile.in (posix-strerror.o): New rule.
8230 (mingw-strerror.o): Likewise.
8231 * configure: Regenerated.
8232 * configure.ac: Source file ../common/common.host. Initialize new
8233 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8234
cdf43629
YQ
82352015-01-14 Yao Qi <yao@codesourcery.com>
8236
8237 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8238 (ppc-linux.o): New rule.
8239 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8240 * configure.ac: AC_CHECK_FUNCS(getauxval).
8241 * config.in: Re-generated.
8242 * configure: Re-generated.
8243 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8244 ppc64_64bit_inferior_p
8245
514c5338
YQ
82462015-01-14 Yao Qi <yao@codesourcery.com>
8247
8248 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8249 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8250 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8251 (PT_ORIG_R3, PT_TRAP): Likewise.
8252 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8253 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8254 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8255
3368c1e5
JB
82562015-01-10 Joel Brobecker <brobecker@adacore.com>
8257
8258 * i387-fp.c (i387_cache_to_xsave): In look over
8259 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8260 zmmh_low_space field by use of zmmh_high_space.
8261
582511be
PA
82622015-01-09 Pedro Alves <palves@redhat.com>
8263
8264 * linux-low.c (step_over_bkpt): Move higher up in the file.
8265 (handle_extended_wait): Don't store the stop_pc here.
8266 (get_stop_pc): Adjust comments and rename to ...
8267 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8268 stopped for a software breakpoint or hardware breakpoint.
8269 (thread_still_has_status_pending_p): New function.
8270 (status_pending_p_callback): Use
8271 thread_still_has_status_pending_p. If the event is no longer
8272 interesting, resume the LWP.
8273 (handle_tracepoints): Add assert.
8274 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8275 (wstatus_maybe_breakpoint): New function.
8276 (cancel_breakpoint): Delete function.
8277 (check_stopped_by_watchpoint): New function, factored out from
8278 linux_low_filter_event.
8279 (lp_status_maybe_breakpoint): Delete function.
8280 (linux_low_filter_event): Remove filter_ptid argument.
8281 Leave thread group exits pending here. Store the LWP's stop PC.
8282 Always leave events pending.
8283 (linux_wait_for_event_filtered): Pull all events out of the
8284 kernel, and leave them all pending.
8285 (count_events_callback, select_event_lwp_callback): Consider all
8286 events.
8287 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8288 (select_event_lwp): Only give preference to the stepping LWP in
8289 all-stop mode. Adjust comments.
8290 (ignore_event): New function.
8291 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8292 references to cancel_breakpoints. Adjust to renames. Also give
8293 equal priority to all LWPs that have had events in non-stop mode.
8294 If reporting a software breakpoint event, unadjust the LWP's PC.
8295 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8296 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8297 Adjust.
8298 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8299 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8300 (linux_stopped_by_watchpoint): Adjust.
8301 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8302 * linux-low.h (enum lwp_stop_reason): New.
8303 (struct lwp_info) <stop_pc>: Adjust comment.
8304 <stopped_by_watchpoint>: Delete field.
8305 <stop_reason>: New field.
8306 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8307 * mem-break.c (software_breakpoint_inserted_here)
8308 (hardware_breakpoint_inserted_here): New function.
8309 * mem-break.h (software_breakpoint_inserted_here)
8310 (hardware_breakpoint_inserted_here): Declare.
8311 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8312 (cancel_breakpoints): Delete.
8313 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8314 (upload_fast_traceframes): Remove references to
8315 cancel_breakpoints.
8316
a33e3959
PA
83172015-01-09 Pedro Alves <palves@redhat.com>
8318
8319 * thread-db.c (find_new_threads_callback): Ignore thread if the
8320 kernel thread ID is -1.
8321
8784d563
PA
83222015-01-09 Pedro Alves <palves@redhat.com>
8323
8324 * linux-low.c (linux_attach_fail_reason_string): Move to
8325 nat/linux-ptrace.c, and rename.
8326 (linux_attach_lwp): Update comment.
8327 (attach_proc_task_lwp_callback): New function.
8328 (linux_attach): Adjust to rename and use
8329 linux_proc_attach_tgid_threads.
8330 (linux_attach_fail_reason_string): Delete declaration.
8331
76f2b779
JB
83322015-01-01 Joel Brobecker <brobecker@adacore.com>
8333
8334 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8335 * server.c (gdbserver_version): Likewise.
8336
fafcc06a
SDJ
83372014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8338
8339 * remote-utils.c: Include ctype.h.
8340 (input_interrupt): Explicitly handle the case when the char
8341 received is the NUL byte. Improve the printing of non-ASCII
8342 characters.
8343
beed38b8
JB
83442014-12-16 Joel Brobecker <brobecker@adacore.com>
8345
8346 * linux-low.c (linux_low_filter_event): Update call to
8347 linux_enable_event_reporting following the addition of
8348 a new parameter to that function.
8349
bf330350
CU
83502014-12-16 Catalin Udma <catalin.udma@freescale.com>
8351
8352 PR server/17457
8353 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8354 (AARCH64_FPCR_REGNO): Likewise.
8355 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8356 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8357 (aarch64_store_fpregset): Likewise.
8358
5227d625
JB
83592014-12-15 Joel Brobecker <brobecker@adacore.com>
8360
8361 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8362 Remove FIXME comment about assumption about N.
8363
f93b65a0
JB
83642014-12-13 Joel Brobecker <brobecker@adacore.com>
8365
8366 * configure.ac: If large-file support is disabled in GDBserver,
8367 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8368 * configure: Regenerate.
8369
e5a9158d
AA
83702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8371
8372 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8373 warning upon ENODATA from ptrace.
8374 * linux-s390-low.c (s390_store_tdb): New.
8375 (s390_regsets): Add regset for NT_S390_TDB.
8376
feea5f36
AA
83772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8378
8379 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8380 without a fill_function.
8381 * linux-s390-low.c (s390_fill_last_break): Remove.
8382 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8383 (s390_arch_setup): Use regset's size instead of fill_function for
8384 loop end condition.
8385
098dbe61
AA
83862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8387
8388 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8389 the regset's store function when ptrace returned an error.
8390 * regcache.c (get_thread_regcache): Invalidate register cache
8391 before fetching inferior's registers.
8392
28eef672
AA
83932014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8394
8395 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8396 while-loop as for-loop.
8397 (regsets_store_inferior_registers): Likewise.
8398
bdca27a2
YQ
83992014-11-28 Yao Qi <yao@codesourcery.com>
8400
8401 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8402 * config.in, configure: Re-generate.
8403 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8404 is defined.
8405
9c232dda
YQ
84062014-11-21 Yao Qi <yao@codesourcery.com>
8407
8408 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8409 (AC_CHECK_HEADERS): Remove malloc.h.
8410 * configure: Re-generated.
8411 * config.in: Re-generated.
8412 * server.h: Don't include alloca.h and malloc.h.
8413 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8414 Don't include malloc.h.
8415
43968415
JB
84162014-11-17 Joel Brobecker <brobecker@adacore.com>
8417
8418 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8419 corresponding ERRNO check in same block.
8420
40e91bc7
PA
84212014-11-12 Pedro Alves <palves@redhat.com>
8422
8423 * server.c (cont_thread): Update comment.
8424 (start_inferior, attach_inferior): No longer clear cont_thread.
8425 (handle_v_cont): No longer set cont_thread.
8426 (captured_main): Clear cont_thread each time a GDB connects.
8427
c2c118cf
PA
84282014-11-12 Pedro Alves <palves@redhat.com>
8429
8430 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8431 thread, and don't resume all threads if the Hc thread has exited.
8432
78708b7c
PA
84332014-11-12 Pedro Alves <palves@redhat.com>
8434
8435 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8436 the process group instead of to a specific LWP.
8437
a2abc7de
PA
84382014-10-15 Pedro Alves <palves@redhat.com>
8439
8440 PR server/17487
8441 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8442 parameter.
8443 (arm_set_thread_context): Delete.
8444 (the_low_target): Adjust.
8445 * win32-i386-low.c (debug_registers_changed)
8446 (debug_registers_used): Delete.
8447 (update_debug_registers_callback): New function.
8448 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8449 needing to update their debug registers.
8450 (win32_get_current_dr): New function.
8451 (x86_dr_low_get_addr, x86_dr_low_get_control)
8452 (x86_dr_low_get_status): Fetch the debug register from the thread
8453 record's context.
8454 (i386_initial_stuff): Adjust.
8455 (i386_get_thread_context): Remove current_event parameter. Don't
8456 clear debug_registers_changed nor copy DR values to
8457 debug_reg_state.
8458 (i386_set_thread_context): Delete.
8459 (i386_prepare_to_resume): New function.
8460 (i386_thread_added): Mark the thread as needing to update irs
8461 debug registers.
8462 (the_low_target): Remove i386_set_thread_context and install
8463 i386_prepare_to_resume.
8464 * win32-low.c (win32_get_thread_context): Adjust.
8465 (win32_set_thread_context): Use SetThreadContext
8466 directly.
8467 (win32_prepare_to_resume): New function.
8468 (win32_require_context): New function, factored out from ...
8469 (thread_rec): ... this.
8470 (continue_one_thread): Call win32_prepare_to_resume on each thread
8471 we're about to continue.
8472 (win32_resume): Call win32_prepare_to_resume on the event thread.
8473 * win32-low.h (struct win32_thread_info)
8474 <debug_registers_changed>: New field.
8475 (struct win32_target_ops): Change prototype of set_thread_context,
8476 delete set_thread_context and add prepare_to_resume.
8477 (win32_require_context): New declaration.
8478
a442d071
GB
84792014-10-08 Gary Benson <gbenson@redhat.com>
8480
8481 * server.h: Do not include common-exceptions.h.
8482
6f1947e8
GB
84832014-10-08 Gary Benson <gbenson@redhat.com>
8484
8485 * server.h: Do not include cleanups.h.
8486
63b434a4
JH
84872014-09-30 James Hogan <james.hogan@imgtec.com>
8488
8489 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8490 mips64-dsp-linux.c.
8491
c4d9ceb6
YQ
84922014-09-23 Yao Qi <yao@codesourcery.com>
8493
8494 * linux-low.c (lp_status_maybe_breakpoint): New function.
8495 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8496 (count_events_callback): Likewise.
8497 (select_event_lwp_callback): Likewise.
8498 (cancel_breakpoints_callback): Likewise.
8499
89a5711c
DB
85002014-09-19 Don Breazeal <donb@codesourcery.com>
8501
8502 * linux-low.c (handle_extended_wait): Call
8503 linux_ptrace_get_extended_event.
8504 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8505 linux_is_extended_waitstatus.
8506
bffc0964
JB
85072014-09-16 Joel Brobecker <brobecker@adacore.com>
8508
8509 * Makefile.in (CPPFLAGS): Define.
8510 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8511 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8512
0bfdf32f
GB
85132014-09-16 Gary Benson <gbenson@redhat.com>
8514
8515 * inferiors.h (current_inferior): Renamed as...
8516 (current_thread): New variable. All uses updated.
8517 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8518 (maybe_move_out_of_jump_pad): Likewise.
8519 (cancel_breakpoint): Likewise.
8520 (linux_low_filter_event): Likewise.
8521 (wait_for_sigstop): Likewise.
8522 (linux_resume_one_lwp): Likewise.
8523 (need_step_over_p): Likewise.
8524 (start_step_over): Likewise.
8525 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8526 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8527 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8528 and save_inferior as saved_thread.
8529 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8530 saved_thread.
8531 (regcache_invalidate_thread): Likewise.
8532 * remote-utils.c (prepare_resume_reply): Likewise.
8533 * thread-db.c (thread_db_get_tls_address): Likewise.
8534 (disable_thread_event_reporting): Likewise.
8535 (remove_thread_event_breakpoints): Likewise.
8536 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8537 as saved_thread.
8538 * target.h (set_desired_inferior): Renamed as...
8539 (set_desired_thread): New declaration. All uses updated.
8540 * server.c (myresume): Updated comment to reference thread instead
8541 of inferior.
8542 (handle_serial_event): Likewise.
8543 (handle_target_event): Likewise.
8544
361c8ade
GB
85452014-09-12 Tom Tromey <tromey@redhat.com>
8546 Gary Benson <gbenson@redhat.com>
8547
8548 * regcache.h: Include common-regcache.h.
8549 (regcache_read_pc): Don't declare.
8550 * regcache.c (get_thread_regcache_for_ptid): New function.
8551
bd9269f7
GB
85522014-09-11 Tom Tromey <tromey@redhat.com>
8553 Gary Benson <gbenson@redhat.com>
8554
8555 * symbol.c: New file.
8556 * Makefile.in (SFILES): Add symbol.c.
8557 (OBS): Add symbol.o.
8558
f8c1d06b
GB
85592014-09-11 Gary Benson <gbenson@redhat.com>
8560
8561 * target.c (target_stop_ptid, target_continue_ptid): New
8562 functions.
8563
721ec300
GB
85642014-09-11 Tom Tromey <tromey@redhat.com>
8565 Gary Benson <gbenson@redhat.com>
8566
8567 * target.h: Include target/target.h.
8568 * target.c (target_read_memory, target_read_uint32)
8569 (target_write_memory): New functions.
8570
c5e92cca
GB
85712014-09-11 Gary Benson <gbenson@redhat.com>
8572
8573 * server.h (debug_hw_points): Don't declare.
8574 * server.c (debug_hw_points): Don't define. Replace all uses
8575 with show_debug_regs.
8576 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8577 all uses with show_debug_regs.
8578
2e4bb98a
EBM
85792014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8580
8581 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8582 endianness into account.
8583 (ppc_supply_ptrace_register): Likewise.
8584
ac740bc7
JH
85852014-09-03 James Hogan <james.hogan@imgtec.com>
8586
8587 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8588 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8589
97ea6506
GB
85902014-09-03 Gary Benson <gbenson@redhat.com>
8591
8592 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8593 ALL_DEBUG_ADDRESS_REGISTERS.
8594
df7e5265
GB
85952014-09-02 Gary Benson <gbenson@redhat.com>
8596
8597 * i386-low.h: Renamed as...
8598 * x86-low.h: New file. All type, function and variable name
8599 prefixes changed from "i386_" to "x86_". All references updated.
8600 * i386-low.c: Renamed as...
8601 * x86-low.c: New file. All type, function and variable name
8602 prefixes changed from "i386_" to "x86_". All references updated.
8603
ed859da7
GB
86042014-09-02 Gary Benson <gbenson@redhat.com>
8605
8606 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8607 (x86_linux_new_thread): Likewise.
8608
860789c7
GB
86092014-08-29 Gary Benson <gbenson@redhat.com>
8610
8611 * server.h (setjmp.h): Do not include.
8612 (toplevel): Do not declare.
8613 (common-exceptions.h): Include.
8614 (cleanups.h): Likewise.
8615 * server.c (toplevel): Do not define.
8616 (exit_code): New static global.
8617 (detach_or_kill_for_exit_cleanup): New function.
8618 (main): New function. Original main renamed to...
8619 (captured_main): New function.
8620 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8621
ff55e1b5
GB
86222014-08-29 Gary Benson <gbenson@redhat.com>
8623
8624 * Makefile.in (SFILES): Add common/common-exceptions.c.
8625 (OBS): Add common-exceptions.o.
8626 (common-exceptions.o): New rule.
8627 * utils.c (prepare_to_throw_exception): New function.
8628
e9bcb658
GB
86292014-08-29 Gary Benson <gbenson@redhat.com>
8630
8631 * config.in: Regenerate.
8632 * configure: Likewise.
8633
e3180625
GB
86342014-08-29 Gary Benson <gbenson@redhat.com>
8635
8636 * Makefile.in (SFILES): Add common/cleanups.c.
8637 (OBS): cleanups.o.
8638 (cleanups.o): New rule.
8639
e3d6ba5d
GB
86402014-08-29 Gary Benson <gbenson@redhat.com>
8641
8642 * utils.c (internal_vwarning): New function.
8643
7096e886
GB
86442014-08-28 Gary Benson <gbenson@redhat.com>
8645
8646 * utils.h (fatal): Remove declaration.
8647 * utils.c (fatal): Remove function.
8648
14ce3192
GB
86492014-08-28 Gary Benson <gbenson@redhat.com>
8650
8651 * tracepoint.c (gdb_agent_init): Replace fatal with
8652 perror_with_name.
8653 (initialize_tracepoint): Likewise.
8654
50278d59
GB
86552014-08-28 Gary Benson <gbenson@redhat.com>
8656
8657 * remote-utils.c (remote_prepare): Replace fatal with error.
8658
aa96c426
GB
86592014-08-28 Gary Benson <gbenson@redhat.com>
8660
8661 * linux-low.c (linux_async): Replace fatal with warning.
8662 Tidy up and return.
8663 (linux_start_non_stop): Return -1 if linux_async failed.
8664
f7160e97
GB
86652014-08-28 Gary Benson <gbenson@redhat.com>
8666
8667 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8668 gdb_assert.
8669 (i386_dr_low_get_addr): Remove vague comment.
8670 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8671 gdb_assert.
8672
38e08fca
GB
86732014-08-28 Gary Benson <gbenson@redhat.com>
8674
8675 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8676 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8677 internal_error.
8678 (linux_resume_one_lwp): Likewise.
8679 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8680 gdb_assert.
8681 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8682 with internal_error.
8683 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8684 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8685 (find_register_by_name): Replace fatal with internal_error.
8686 (find_regno): Likewise.
8687 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8688 * thread-db.c (thread_db_create_event): Likewise.
8689 (thread_db_load_search): Likewise.
8690 (try_thread_db_load_1): Likewise.
8691 * tracepoint.c (get_jump_space_head): Replace fatal with
8692 internal_error.
8693 (claim_trampoline_space): Likewise.
8694 (have_fast_tracepoint_trampoline_buffer): Likewise.
8695 (cmd_qtstart): Likewise.
8696 (stop_tracing): Likewise.
8697 (fast_tracepoint_collecting): Likewise.
8698 (target_malloc): Likewise.
8699 (download_tracepoint): Likewise.
8700 (download_trace_state_variables): Replace check with gdb_assert.
8701 (upload_fast_traceframes): Replace fatal with internal_error.
8702
34abf635
GB
87032014-08-19 Tom Tromey <tromey@redhat.com>
8704 Gary Benson <gbenson@redhat.com>
8705
8706 * Makefile.in (SFILES): Add common/common-debug.c.
8707 (OBS): Add common-debug.o.
8708 (common-debug.o): New rule.
8709 * debug.h (debug_printf): Don't declare.
8710 * debug.c (debug_printf): Renamed and rewritten as...
8711 (debug_vprintf): New function.
8712
f6e94d78
GB
87132014-08-19 Gary Benson <gbenson@redhat.com>
8714
8715 * utils.h: Do not include print-utils.h.
8716
9239eeab
GB
87172014-08-19 Tom Tromey <tromey@redhat.com>
8718 Gary Benson <gbenson@redhat.com>
8719
8720 * server.h: Add static assertion.
8721 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8722
ef87c8bb
GB
87232014-08-19 Tom Tromey <tromey@redhat.com>
8724 Gary Benson <gbenson@redhat.com>
8725
8726 * Makefile.in (SFILES): Add common/errors.c.
8727 (OBS): Add errors.o.
8728 (IPA_OBS): Add errors-ipa.o.
8729 (errors.o): New rule.
8730 (errors-ipa.o): Likewise.
8731 * utils.h (perror_with_name, error, warning): Don't declare.
8732 * utils.c (warning): Renamed and rewritten as...
8733 (vwarning): New function.
8734 (error): Renamed and rewritten as...
8735 (verror): New function.
8736 (internal_error): Renamed and rewritten as...
8737 (internal_verror): New function.
8738
bb974a24
GB
87392014-08-07 Gary Benson <gbenson@redhat.com>
8740
8741 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8742 * configure: Regenerate.
8743 * config.in: Likewise.
8744 * server.h: Do not include errno.h.
8745 * event-loop.c: Likewise.
8746 * hostio-errno.c: Likewise.
8747 * linux-low.c: Likewise.
8748 * remote-utils.c: Likewise.
8749 * spu-low.c: Likewise.
8750 * utils.c: Likewise.
8751 * gdbreplay.c: Unconditionally include errno.h.
8752
6d3d12eb
GB
87532014-08-07 Gary Benson <gbenson@redhat.com>
8754
8755 * server.h: Do not include string.h.
8756 * event-loop.c: Likewise.
8757 * linux-low.c: Likewise.
8758 * regcache.c: Likewise.
8759 * remote-utils.c: Likewise.
8760 * spu-low.c: Likewise.
8761 * utils.c: Likewise.
8762
dccbb609
GB
87632014-08-07 Gary Benson <gbenson@redhat.com>
8764
8765 * server.h: Do not include gdb_assert.h.
8766
e76df0d0
GB
87672014-08-07 Gary Benson <gbenson@redhat.com>
8768
8769 * server.h: Do not include common-utils.h.
8770
4cb9c816
GB
87712014-08-07 Gary Benson <gbenson@redhat.com>
8772
8773 * server.h: Do not include ptid.h.
8774 * notif.h: Likewise.
8775
3995eeee
GB
87762014-08-07 Gary Benson <gbenson@redhat.com>
8777
8778 * server.h: Do not include gdb_locale.h.
8779
cb9f1a9b
GB
87802014-08-07 Gary Benson <gbenson@redhat.com>
8781
8782 * server.h: Do not include gdb/signals.h.
8783 * win32-low.c: Likewise.
8784
a5fceff8
GB
87852014-08-07 Gary Benson <gbenson@redhat.com>
8786
8787 * server.h: Do not include pathmax.h.
8788
b9391142
GB
87892014-08-07 Gary Benson <gbenson@redhat.com>
8790
8791 * server.h: Do not include libiberty.h.
8792 * linux-bfin-low.c: Likewise.
8793
0e443c87
GB
87942014-08-07 Gary Benson <gbenson@redhat.com>
8795
8796 * server.h: Do not include ansidecl.h.
8797
8ebb3f56
GB
87982014-08-07 Gary Benson <gbenson@redhat.com>
8799
8800 * linux-x86-low.c: Do not include stddef.h.
8801 * lynx-ppc-low.c: Likewise.
8802 * tracepoint.c: Likewise.
8803
8980bdf6
GB
88042014-08-07 Gary Benson <gbenson@redhat.com>
8805
8806 * server.h: Do not include stdarg.h.
8807 * nto-low.c: Likewise.
8808
d7096f71
GB
88092014-08-07 Gary Benson <gbenson@redhat.com>
8810
8811 * server.h: Do not include stdlib.h.
8812 * inferiors.c: Likewise.
8813 * linux-low.c: Likewise.
8814 * regcache.c: Likewise.
8815 * spu-low.c: Likewise.
8816 * tracepoint.c: Likewise.
8817 * utils.c: Likewise.
8818
d02f550d
GB
88192014-08-07 Gary Benson <gbenson@redhat.com>
8820
8821 * server.h: Do not include stdio.h.
8822 * linux-low.c: Likewise.
8823 * remote-utils.c: Likewise.
8824 * spu-low.c: Likewise.
8825 * utils.c: Likewise.
8826 * wincecompat.c: Likewise.
8827
87f6c4e3
GB
88282014-08-06 Gary Benson <gbenson@redhat.com>
8829
8830 * regcache.c (init_register_cache): Move conditionals inside if.
8831
7089dca4
GB
88322014-08-06 Gary Benson <gbenson@redhat.com>
8833
8834 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8835
462f517e
GB
88362014-07-31 Gary Benson <gbenson@redhat.com>
8837
8838 * ax.h: Do not include server.h.
8839 * gdbthread.h: Likewise.
8840 * lynx-low.h: Likewise.
8841 * notif.h: Likewise.
8842
976411d6
GB
88432014-07-30 Gary Benson <gbenson@redhat.com>
8844
8845 * server.h: Include common-defs.h.
8846 Do not include config.h or build-gnulib-gdbserver/config.h.
8847
d41f6d8e
GB
88482014-07-30 Gary Benson <gbenson@redhat.com>
8849
8850 * hostio-errno.c: Move server.h to top of includes list.
8851 * inferiors.c: Likewise.
8852 * linux-x86-low.c: Likewise.
8853 * notif.c: Include server.h.
8854
314c6a35
TT
88552014-07-24 Tom Tromey <tromey@redhat.com>
8856 Gary Benson <gbenson@redhat.com>
8857
8858 * server.h (CORE_ADDR): Now unsigned.
8859
69ff6be5
PA
88602014-07-16 Pedro Alves <palves@redhat.com>
8861
8862 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8863
ce9e3fe7
PA
88642014-07-15 Pedro Alves <palves@redhat.com>
8865
8866 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8867 copy.
8868
e76126e8
PA
88692014-07-11 Pedro Alves <palves@redhat.com>
8870
8871 * linux-low.c (kill_wait_lwp): New function, based on
8872 kill_one_lwp_callback, but use my_waitpid directly.
8873 (kill_one_lwp_callback, linux_kill): Use it.
8874
8e9db26e
PA
88752014-06-23 Pedro Alves <palves@redhat.com>
8876
8877 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8878 before setting DR0..DR3.
8879
698b3e08
GB
88802014-06-20 Gary Benson <gbenson@redhat.com>
8881
8882 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8883 * configure: Regenerated.
8884 * config.in: Likewise.
8885
125f8a3d
GB
88862014-06-20 Gary Benson <gbenson@redhat.com>
8887
8888 * Makefile.in (SFILES): Update locations for files moved
8889 from common to nat.
8890 (object file files): Reordered.
8891
42995dbd
GB
88922014-06-20 Gary Benson <gbenson@redhat.com>
8893
8894 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8895 (i386_dr_low_set_addr): Likewise.
8896 (i386_dr_low_get_addr): Likewise.
8897 (i386_dr_low_can_set_control): Likewise.
8898 (i386_dr_low_set_control): Likewise.
8899 (i386_dr_low_get_control): Likewise.
8900 (i386_dr_low_get_status): Likewise.
8901 (i386_get_debug_register_length): Likewise.
8902 * linux-x86-low.c (i386_dr_low_set_addr):
8903 Changed signature. Made static.
8904 (i386_dr_low_get_addr): Likewise.
8905 (i386_dr_low_set_control): Likewise.
8906 (i386_dr_low_get_control): Likewise.
8907 (i386_dr_low_get_status): Likewise.
8908 (i386_dr_low): New global variable.
8909 * win32-i386-low.c (i386_dr_low_set_addr):
8910 Changed signature. Made static.
8911 (i386_dr_low_get_addr): Likewise.
8912 (i386_dr_low_set_control): Likewise.
8913 (i386_dr_low_get_control): Likewise.
8914 (i386_dr_low_get_status): Likewise.
8915 (i386_dr_low): New global variable.
8916
e1d2394b
MS
89172014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8918
8919 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8920 * Makefile.in (AR, AR_FLAGS): Define.
8921 * configure: Regenerate.
8922
3a8ee006
GB
89232014-06-19 Gary Benson <gbenson@redhat.com>
8924
8925 * Makefile.in (i386-dregs.o): New rule.
8926 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8927 * i386-low.c (target.h): Remove include.
8928 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8929 (DR_CONTROL_SHIFT): Likewise.
8930 (DR_CONTROL_SIZE): Likewise.
8931 (DR_RW_EXECUTE): Likewise.
8932 (DR_RW_WRITE): Likewise.
8933 (DR_RW_READ): Likewise.
8934 (DR_RW_IORW): Likewise.
8935 (DR_LEN_1): Likewise.
8936 (DR_LEN_2): Likewise.
8937 (DR_LEN_4): Likewise.
8938 (DR_LEN_8): Likewise.
8939 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8940 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8941 (DR_ENABLE_SIZE): Likewise.
8942 (DR_LOCAL_SLOWDOWN): Likewise.
8943 (DR_GLOBAL_SLOWDOWN): Likewise.
8944 (DR_CONTROL_RESERVED): Likewise.
8945 (I386_DR_CONTROL_MASK): Likewise.
8946 (I386_DR_VACANT): Likewise.
8947 (I386_DR_LOCAL_ENABLE): Likewise.
8948 (I386_DR_GLOBAL_ENABLE): Likewise.
8949 (I386_DR_DISABLE): Likewise.
8950 (I386_DR_SET_RW_LEN): Likewise.
8951 (I386_DR_GET_RW_LEN): Likewise.
8952 (I386_DR_WATCH_HIT): Likewise.
8953 (i386_wp_op_t): Likewise.
8954 (i386_show_dr): Likewise.
8955 (i386_length_and_rw_bits): Likewise.
8956 (i386_insert_aligned_watchpoint): Likewise.
8957 (i386_remove_aligned_watchpoint): Likewise.
8958 (i386_handle_nonaligned_watchpoint): Likewise.
8959 i386_update_inferior_debug_regs(): Likewise.
8960 (i386_dr_insert_watchpoint): Likewise.
8961 (i386_dr_remove_watchpoint): Likewise.
8962 (i386_dr_region_ok_for_watchpoint): Likewise.
8963 (i386_dr_stopped_data_address): Likewise.
8964 (i386_dr_stopped_by_watchpoint): Likewise.
8965
8f26655c
GB
89662014-06-19 Gary Benson <gbenson@redhat.com>
8967
8968 * i386-low.c (i386_dr_show): Renamed to
8969 i386_show_dr and made static. All uses updated.
8970 (i386_dr_length_and_rw_bits): Renamed to
8971 i386_length_and_rw_bits and made static.
8972 All uses updated.
8973 (i386_dr_insert_aligned_watchpoint): Renamed to
8974 i386_insert_aligned_watchpoint and made static.
8975 All uses updated.
8976 (i386_dr_remove_aligned_watchpoint): Renamed to
8977 i386_remove_aligned_watchpoint and made static.
8978 All uses updated.
8979 (i386_dr_update_inferior_debug_regs): Renamed to
8980 i386_update_inferior_debug_regs and made static.
8981 All uses updated.
8982
b9228891
GB
89832014-06-18 Gary Benson <gbenson@redhat.com>
8984
5171def3
GB
8985 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8986 (i386_dr_low_can_set_control): Likewise.
8987 (i386_get_debug_register_length): Likewise.
8988 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8989 (i386_dr_low_can_set_control): Likewise.
8990 (i386_get_debug_register_length): Likewise.
8991
89922014-06-17 Gary Benson <gbenson@redhat.com>
8993
b9228891
GB
8994 * i386-low.h (i386-dregs.h): New include.
8995 (DR_FIRSTADDR): Now in i386-dregs.h.
8996 (DR_LASTADDR): Likewise.
8997 (DR_NADDR): Likewise.
8998 (DR_STATUS): Likewise.
8999 (DR_CONTROL): Likewise.
9000 (i386_debug_reg_state): Likewise.
9001 (i386_dr_insert_watchpoint): Likewise.
9002 (i386_dr_remove_watchpoint): Likewise.
9003 (i386_dr_region_ok_for_watchpoint): Likewise.
9004 (i386_dr_stopped_data_address): Likewise.
9005 (i386_dr_stopped_by_watchpoint): Likewise.
9006 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9007
4be83cc2
GB
90082014-06-18 Gary Benson <gbenson@redhat.com>
9009
9010 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9011 i386_dr_insert_watchpoint.
9012 (i386_low_remove_watchpoint): Renamed to
9013 i386_dr_remove_watchpoint.
9014 (i386_low_region_ok_for_watchpoint): Renamed to
9015 i386_dr_region_ok_for_watchpoint.
9016 (i386_low_stopped_data_address): Renamed to
9017 i386_dr_stopped_data_address.
9018 (i386_low_stopped_by_watchpoint): Renamed to
9019 i386_dr_stopped_by_watchpoint.
9020 * i386-low.c (i386_show_dr): Renamed to
9021 i386_dr_show and made nonstatic. All uses updated.
9022 (i386_length_and_rw_bits): Renamed to
9023 i386_dr_length_and_rw_bits and made nonstatic.
9024 All uses updated.
9025 (i386_insert_aligned_watchpoint): Renamed to
9026 i386_dr_insert_aligned_watchpoint and made nonstatic.
9027 All uses updated.
9028 (i386_remove_aligned_watchpoint): Renamed to
9029 i386_dr_remove_aligned_watchpoint and made nonstatic.
9030 All uses updated.
9031 (i386_update_inferior_debug_regs): Renamed to
9032 i386_dr_update_inferior_debug_regs and made nonstatic.
9033 All uses updated.
9034 (i386_low_insert_watchpoint): Renamed to
9035 i386_dr_insert_watchpoint. All uses updated.
9036 (i386_low_remove_watchpoint): Renamed to
9037 i386_dr_remove_watchpoint. All uses updated.
9038 (i386_low_region_ok_for_watchpoint): Renamed to
9039 i386_dr_region_ok_for_watchpoint. All uses updated.
9040 (i386_low_stopped_data_address): Renamed to
9041 i386_dr_stopped_data_address. All uses updated.
9042 (i386_low_stopped_by_watchpoint): Renamed to
9043 i386_dr_stopped_by_watchpoint. All uses updated.
9044
131aa0d4
GB
90452014-06-18 Gary Benson <gbenson@redhat.com>
9046
9047 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9048 (i386_dr_low_can_set_control): Likewise.
9049 (i386_insert_aligned_watchpoint): New check.
9050
d9305f7f
GB
90512014-06-18 Gary Benson <gbenson@redhat.com>
9052
9053 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9054 Renamed to state.
9055
e927c9fc
GB
90562014-06-18 Gary Benson <gbenson@redhat.com>
9057
9058 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9059 instead of fatal and error.
9060 (i386_handle_nonaligned_watchpoint): Likewise.
9061
1b6d4134
GB
90622014-06-18 Gary Benson <gbenson@redhat.com>
9063
9064 * i386-low.c (i386_get_debug_register_length): New macro.
9065 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9066 (i386_show_dr): Use debug_printf instead of fprintf. Use
9067 phex to format values.
9068
6e62758f
GB
90692014-06-18 Gary Benson <gbenson@redhat.com>
9070
9071 * i386-low.h: Comment changes.
9072 * i386-low.c: Likewise.
9073
fc6e2f03
GB
90742014-06-18 Gary Benson <gbenson@redhat.com>
9075
9076 * i386-low.c: Whitespace changes.
9077
f9d1eeed
TT
90782014-06-12 Tom Tromey <tromey@redhat.com>
9079
9080 * utils.c (freeargv): Remove.
9081
0b04e523
TT
90822014-06-12 Tom Tromey <tromey@redhat.com>
9083
9084 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9085 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9086 (parse_debug_format_options): Likewise.
9087 (gdbserver_usage): Likewise.
9088 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9089 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9090 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9091 against libiberty.
9092 ($(LIBGNU)): Depend on libiberty.
9093 (all-lib): Recurse into all subdirs.
9094 (install-only): Invoke "install" target in subdirs.
9095 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9096 targets.
9097 * configure: Rebuild.
9098 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9099 for vasprintf, vsnprintf, or gettimeofday.
9100 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9101 srv_tgtobj.
9102
270c9937
JB
91032014-06-05 Joel Brobecker <brobecker@adacore.com>
9104
9105 * development.sh: Delete.
9106 * Makefile.in (config.status): Adjust dependency on development.sh.
9107 * configure.ac: Adjust development.sh source call.
9108 * configure: Regenerate.
9109
0a261ed8
PA
91102014-06-02 Pedro Alves <palves@redhat.com>
9111
9112 * ax.c (gdb_free_agent_expr): New function.
9113 * ax.h (gdb_free_agent_expr): New declaration.
9114 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9115 list.
9116 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9117 static.
9118 (clear_breakpoint_conditions_and_commands): New function.
9119 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9120 (clear_breakpoint_conditions_and_commands): New declaration.
9121
e9dae05e
RR
91222014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9123
9124 * linux-aarch64-low.c (asm/ptrace.h): Include.
9125
5876f503
JK
91262014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9127
9128 Fix TLS access for -static -pthread.
9129 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9130 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9131 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9132
802e8e6d
PA
91332014-05-20 Pedro Alves <palves@redhat.com>
9134
9135 * linux-aarch64-low.c (aarch64_insert_point)
9136 (aarch64_remove_point): No longer check whether the type is
9137 supported here. Adjust to new interface.
9138 (the_low_target): Install aarch64_supports_z_point_type as
9139 supports_z_point_type method.
9140 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9141 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9142 instead of a Z packet char. Adjust.
9143 (arm_supports_z_point_type): New function.
9144 (arm_insert_point, arm_remove_point): Adjust to new interface.
9145 (the_low_target): Install arm_supports_z_point_type.
9146 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9147 (cris_insert_point, cris_remove_point): Adjust to new interface.
9148 Don't check whether the type is supported here.
9149 (the_low_target): Install cris_supports_z_point_type.
9150 * linux-low.c (linux_supports_z_point_type): New function.
9151 (linux_insert_point, linux_remove_point): Adjust to new interface.
9152 * linux-low.h (struct linux_target_ops) <insert_point,
9153 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9154 raw_breakpoint pointer parameter.
9155 <supports_z_point_type>: New method.
9156 * linux-mips-low.c (mips_supports_z_point_type): New function.
9157 (mips_insert_point, mips_remove_point): Adjust to new interface.
9158 Use mips_supports_z_point_type.
9159 (the_low_target): Install mips_supports_z_point_type.
9160 * linux-ppc-low.c (the_low_target): Install NULL as
9161 supports_z_point_type method.
9162 * linux-s390-low.c (the_low_target): Install NULL as
9163 supports_z_point_type method.
9164 * linux-sparc-low.c (the_low_target): Install NULL as
9165 supports_z_point_type method.
9166 * linux-x86-low.c (x86_supports_z_point_type): New function.
9167 (x86_insert_point): Adjust to new insert_point interface. Use
9168 insert_memory_breakpoint. Adjust to new
9169 i386_low_insert_watchpoint interface.
9170 (x86_remove_point): Adjust to remove_point interface. Use
9171 remove_memory_breakpoint. Adjust to new
9172 i386_low_remove_watchpoint interface.
9173 (the_low_target): Install x86_supports_z_point_type.
9174 * lynx-low.c (lynx_target_ops): Install NULL as
9175 supports_z_point_type callback.
9176 * nto-low.c (nto_supports_z_point_type): New.
9177 (nto_insert_point, nto_remove_point): Adjust to new interface.
9178 (nto_target_ops): Install nto_supports_z_point_type.
9179 * mem-break.c: Adjust intro comment.
9180 (struct raw_breakpoint) <raw_type, size>: New fields.
9181 <inserted>: Update comment.
9182 <shlib_disabled>: Delete field.
9183 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9184 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9185 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9186 (raw_bkpt_type_to_target_hw_bp_type): New function.
9187 (find_enabled_raw_code_breakpoint_at): New function.
9188 (find_raw_breakpoint_at): New type and size parameters. Use them.
9189 (insert_memory_breakpoint): New function, based off
9190 set_raw_breakpoint_at.
9191 (remove_memory_breakpoint): New function.
9192 (set_raw_breakpoint_at): Reimplement.
9193 (set_breakpoint): New, based on set_breakpoint_at.
9194 (set_breakpoint_at): Reimplement.
9195 (delete_raw_breakpoint): Go through the_target->remove_point
9196 instead of assuming memory breakpoints.
9197 (find_gdb_breakpoint_at): Delete.
9198 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9199 (find_gdb_breakpoint): New function.
9200 (set_gdb_breakpoint_at): Delete.
9201 (z_type_supported): New function.
9202 (set_gdb_breakpoint_1): New function, loosely based off
9203 set_gdb_breakpoint_at.
9204 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9205 (delete_gdb_breakpoint_at): Delete.
9206 (delete_gdb_breakpoint_1): New function, loosely based off
9207 delete_gdb_breakpoint_at.
9208 (delete_gdb_breakpoint): New function.
9209 (clear_gdb_breakpoint_conditions): Rename to ...
9210 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9211 breakpoint.
9212 (add_condition_to_breakpoint): Make static.
9213 (add_breakpoint_condition): Take a struct breakpoint pointer
9214 instead of an address. Adjust.
9215 (gdb_condition_true_at_breakpoint): Rename to ...
9216 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9217 z_type parameter.
9218 (gdb_condition_true_at_breakpoint): Reimplement.
9219 (add_breakpoint_commands): Take a struct breakpoint pointer
9220 instead of an address. Adjust.
9221 (gdb_no_commands_at_breakpoint): Rename to ...
9222 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9223 parameter. Return true if no breakpoint was found. Change debug
9224 output.
9225 (gdb_no_commands_at_breakpoint): Reimplement.
9226 (run_breakpoint_commands): Rename to ...
9227 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9228 and change return type to boolean.
9229 (run_breakpoint_commands): New function.
9230 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9231 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9232 breakpoint. Go through the_target->remove_point instead of
9233 assuming memory breakpoint.
9234 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9235 software and hardware breakpoints.
9236 (reinsert_raw_breakpoint): Go through the_target->insert_point
9237 instead of assuming memory breakpoint.
9238 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9239 software and hardware breakpoints.
9240 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9241 Check both software and hardware breakpoints.
9242 (validate_inserted_breakpoint): Assert the breakpoint is a
9243 software breakpoint. Set the inserted flag to -1 instead of
9244 setting shlib_disabled.
9245 (delete_disabled_breakpoints): Adjust.
9246 (validate_breakpoints): Only validate software breakpoints.
9247 Adjust to inserted flag change.
9248 (check_mem_read, check_mem_write): Skip breakpoint types other
9249 than software breakpoints. Adjust to inserted flag change.
9250 * mem-break.h (enum raw_bkpt_type): New enum.
9251 (raw_breakpoint, struct process_info): Forward declare.
9252 (Z_packet_to_target_hw_bp_type): Delete declaration.
9253 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9254 (set_gdb_breakpoint, delete_gdb_breakpoint)
9255 (clear_breakpoint_conditions): New declarations.
9256 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9257 (breakpoint_inserted_here): Update comment.
9258 (add_breakpoint_condition, add_breakpoint_commands): Replace
9259 address parameter with a breakpoint pointer parameter.
9260 (gdb_breakpoint_here): Update comment.
9261 (delete_gdb_breakpoint_at): Delete.
9262 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9263 * server.c (process_point_options): Take a struct breakpoint
9264 pointer instead of an address. Adjust.
9265 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9266 delete_gdb_breakpoint.
9267 * spu-low.c (spu_target_ops): Install NULL as
9268 supports_z_point_type method.
9269 * target.h: Include mem-break.h.
9270 (struct target_ops) <prepare_to_access_memory>: Update comment.
9271 <supports_z_point_type>: New field.
9272 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9273 instead of a char. Also take a raw breakpoint pointer.
9274 * win32-arm-low.c (the_low_target): Install NULL as
9275 supports_z_point_type.
9276 * win32-i386-low.c (i386_supports_z_point_type): New function.
9277 (i386_insert_point, i386_remove_point): Adjust to new interface.
9278 (the_low_target): Install i386_supports_z_point_type.
9279 * win32-low.c (win32_supports_z_point_type): New function.
9280 (win32_insert_point, win32_remove_point): Adjust to new interface.
9281 (win32_target_ops): Install win32_supports_z_point_type.
9282 * win32-low.h (struct win32_target_ops):
9283 <supports_z_point_type>: New method.
9284 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9285 instead of a char. Also take a raw breakpoint pointer.
9286
932539e3
PA
92872014-05-20 Pedro Alves <palves@redhat.com>
9288
9289 * mem-break.h: Include break-common.h.
9290 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9291 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9292 (Z_packet_to_target_hw_bp_type): New declaration.
9293 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9294 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9295 (Z_PACKET_ACCESS_WP): Delete macros.
9296 (Z_packet_to_hw_type): Delete function.
9297 * i386-low.h: Don't include break-common.h here.
9298 (Z_packet_to_hw_type): Delete declaration.
9299 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9300 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9301 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9302 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9303 * linux-aarch64-low.c: Don't include break-common.h here.
9304 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9305 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9306 (Z_packet_to_target_hw_bp_type): Delete function.
9307 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9308 function.
9309 (mips_insert_point, mips_remove_point): Use
9310 Z_packet_to_target_hw_bp_type.
9311
4ff0d3d8
PA
93122014-05-20 Pedro Alves <palves@redhat.com>
9313
9314 * linux-aarch64-low.c: Include break-common.h.
9315 (enum target_point_type): Delete.
9316 (Z_packet_to_point_type): Rename to ...
9317 (Z_packet_to_target_hw_bp_type): ... this, and return a
9318 target_hw_bp_type instead.
9319 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9320 instead of an enum target_point_type.
9321 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9322 breakpoint type.
9323 (aarch64_dr_state_insert_one_point)
9324 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9325 (aarch64_handle_aligned_watchpoint)
9326 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9327 Take an enum target_hw_bp_type instead of an enum
9328 target_point_type.
9329 (aarch64_supports_z_point_type): New function.
9330 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9331 use Z_packet_to_target_hw_bp_type.
9332
786dc519
JB
93332014-05-20 Joel Brobecker <brobecker@adacore.com>
9334
9335 * configure.ac: Only use -Werror by default when DEVELOPMENT
9336 is true.
9337 * configure: Regenerate.
9338
9e0aa64f
JK
93392014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9340
9341 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9342 * linux-x86-low.c (X86_64_USER_REGS): New.
9343 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9344
2b577b92
YQ
93452014-04-28 Yao Qi <yao@codesourcery.com>
9346
9347 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9348 name.
9349
94611da2
PA
93502014-04-25 Pedro Alves <palves@redhat.com>
9351
9352 PR server/16255
9353 * linux-low.c (linux_attach_fail_reason_string): New function.
9354 (linux_attach_lwp): Delete.
9355 (linux_attach_lwp_1): Rename to ...
9356 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9357 argument. Remove "initial" parameter. Return int instead of
9358 void. Don't error or warn here.
9359 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9360 failure to attach to the tgid. Call warning when failing to
9361 attach to an lwp.
9362 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9363 argument. Remove "initial" parameter. Return int instead of
9364 void. Don't error or warn here.
9365 (linux_attach_fail_reason_string): New declaration.
9366 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9367 interface change. Use linux_attach_fail_reason_string.
9368
01f9f808
MS
93692014-04-24 Michael Sturm <michael.sturm@mintel.com>
9370 Walfred Tedeschi <walfred.tedeschi@intel.com>
9371
9372 * Makefile.in: Added rules to handle new files
9373 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9374 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9375 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9376 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9377 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9378 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9379 x32-avx512-linux.o.
9380 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9381 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9382 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9383 i386/x32-avx512.xml.
9384 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9385 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9386 i386/x32-avx512-linux.xml.
9387 * i387-fp.c (num_avx512_k_registers): New constant for number
9388 of K registers.
9389 (num_avx512_zmmh_low_registers): New constant for number of
9390 lower ZMM registers (0-15).
9391 (num_avx512_zmmh_high_registers): New constant for number of
9392 higher ZMM registers (16-31).
9393 (num_avx512_ymmh_registers): New contant for number of higher
9394 YMM registers (ymm16-31 added by avx521 on x86_64).
9395 (num_avx512_xmm_registers): New constant for number of higher
9396 XMM registers (xmm16-31 added by AVX512 on x86_64).
9397 (struct i387_xsave): Add space for AVX512 registers.
9398 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9399 Add code to handle AVX512 registers.
9400 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9401 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9402 prototypei from generated file.
9403 (tdesc_amd64_avx512_linux): Likewise.
9404 (init_registers_x32_avx512_linux): Likewise.
9405 (tdesc_x32_avx512_linux): Likewise.
9406 (init_registers_i386_avx512_linux): Likewise.
9407 (tdesc_i386_avx512_linux): Likewise.
9408 (x86_64_regmap): Add AVX512 registers.
9409 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9410 mask.
9411 (initialize_low_arch): Add code to initialize AVX512 registers.
9412
51aa91f9
PA
94132014-04-23 Pedro Alves <palves@redhat.com>
9414
9415 * mem-break.c (find_gdb_breakpoint_at): Make static.
9416 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9417
a4165e94
PA
94182014-04-23 Pedro Alves <palves@redhat.com>
9419
9420 * i386-low.c: Don't include break-common.h here.
9421 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9422 prototype to take target_hw_bp_type as argument instead of a Z
9423 packet char.
9424 * i386-low.h: Include break-common.h here.
9425 (Z_packet_to_hw_type): Declare.
9426 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9427 prototypes.
9428 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9429 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9430 (x86_remove_point): Convert the packet number to a
9431 target_hw_bp_type before calling i386_low_remove_watchpoint.
9432 * win32-i386-low.c (i386_insert_point): Convert the packet number
9433 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9434 (i386_remove_point): Convert the packet number to a
9435 target_hw_bp_type before calling i386_low_remove_watchpoint.
9436
b8acf843
PA
94372014-04-23 Pedro Alves <palves@redhat.com>
9438
9439 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9440
d708bcd1
PA
94412014-04-10 Pedro Alves <palves@redhat.com>
9442
9443 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9444 Check if the condition or command is NULL before checking if the
9445 breakpoint is known. On success, return true.
9446 * mem-break.h (add_breakpoint_condition): Document return.
9447 (add_breakpoint_commands): Add describing comment.
9448 * server.c (skip_to_semicolon): New function.
9449 (process_point_options): Use it.
9450
2eec7d5b
PA
94512014-04-09 Pedro Alves <palves@redhat.com>
9452
9453 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9454 to lwpid_of.
9455
fa96cb38
PA
94562014-02-27 Pedro Alves <palves@redhat.com>
9457
9458 PR 12702
9459 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9460 macros.
9461 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9462 output.
9463 (last_thread_of_process_p): Take a PID argument instead of a
9464 thread pointer.
9465 (linux_wait_for_lwp): Delete.
9466 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9467 functions.
9468 (linux_low_filter_event): New function, party factored out from
9469 linux_wait_for_event.
9470 (linux_wait_for_event): Rename to ...
9471 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9472 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9473 sigsuspend. Check for zombie leaders.
9474 (linux_wait_for_event): Reimplement as wrapper around
9475 linux_wait_for_event_filtered.
9476 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9477 a normal or signal exit is seen, it's the whole process exiting.
9478 (wait_for_sigstop): No longer a for_each_inferior callback.
9479 Rewrite on top of linux_wait_for_event_filtered.
9480 (stop_all_lwps): Call wait_for_sigstop directly.
9481 * server.c (resume, handle_target_event): Handle
9482 TARGET_WAITKIND_NO_RESUMED.
9483
d763de10
JB
94842014-02-26 Joel Brobecker <brobecker@adacore.com>
9485
9486 * win32-low.c (psapi_get_dll_name,
9487 * win32_CreateToolhelp32Snapshot): Delete.
9488 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9489 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9490 Delete.
9491 (handle_load_dll): Add function description.
9492 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9493
850a0f76
JB
94942014-02-26 Joel Brobecker <brobecker@adacore.com>
9495
9496 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9497 Add comment.
9498 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9499 base address when calling win32_add_one_solib.
9500 (handle_load_dll): Delete local variable load_addr.
9501 Remove 0x1000 offset applied to DLL base address when calling
9502 win32_add_one_solib.
9503 (handle_unload_dll): Add comment.
9504
f25b3fc3
JB
95052014-02-26 Joel Brobecker <brobecker@adacore.com>
9506
9507 * win32-low.c (win32_add_all_dlls): Renames
9508 win32_ensure_ntdll_loaded. Rewrite function documentation.
9509 Adjust implementation to always load all DLLs.
9510 Add 0x1000 offset to DLL base address when calling
9511 win32_add_one_solib.
9512 (child_initialization_done): New static global.
9513 (do_initial_child_stuff): Set child_initialization_done to
9514 zero during child initialization, and 1 after. Replace call
9515 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9516 Add comment.
9517 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9518 (handle_unload_dll): Add function documentation.
9519 (get_child_debug_event): Ignore load and unload DLL events
9520 during child initialization.
9521
d86d4aaf
DE
95222014-02-20 Doug Evans <dje@google.com>
9523
3bc32da3 9524 Remove global all_lwps.
d86d4aaf
DE
9525 * inferiors.h (ptid_of): Move here from linux-low.h.
9526 (pid_of, lwpid_of): Ditto.
9527 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9528 parameter is a struct thread_info * now.
9529 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9530 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9531 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9532 directly.
9533 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9534 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9535 * linux-arm-low.c (update_registers_callback): Update, "entry"
9536 parameter is a struct thread_info * now.
9537 Fetch lwpid from current_inferior directly.
9538 (arm_insert_point): Pass &all_threads to find_inferior instead of
9539 &all_lwps.
9540 (arm_remove_point): Ditto.
9541 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9542 (arm_prepare_to_resume): Fetch pid from thread.
9543 (arm_read_description): Fetch lwpid from current_inferior directly.
9544 * linux-low.c (all_lwps): Delete.
9545 (delete_lwp): Delete call to remove_inferior.
9546 (handle_extended_wait): Fetch lwpid from thread.
9547 (add_lwp): Don't set lwp->entry.id. Remove call to
9548 add_inferior_to_list.
9549 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9550 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9551 (kill_one_lwp_callback): Ditto.
9552 (linux_kill): Don't dereference NULL pointer.
9553 Fetch ptid,lwpid from thread.
9554 (get_detach_signal): Fetch ptid from thread.
9555 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9556 Simplify call to regcache_invalidate_thread.
9557 (delete_lwp_callback): Update, "entry" parameter is a
9558 struct thread_info * now. Fetch pid from thread.
9559 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9560 (status_pending_p_callback): Update, "entry" parameter is a
9561 struct thread_info * now. Fetch ptid from thread.
9562 (find_lwp_pid): Update, "entry" parameter is a
9563 struct thread_info * now.
9564 (linux_wait_for_lwp): Fetch pid from thread.
9565 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9566 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9567 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9568 (dequeue_one_deferred_signal): Ditto.
9569 (cancel_breakpoint): Fetch ptid from current_inferior.
9570 (linux_wait_for_event): Pass &all_threads to find_inferior,
9571 not &all_lwps. Fetch ptid, lwpid from thread.
9572 (count_events_callback): Update, "entry" parameter is a
9573 struct thread_info * now.
9574 (select_singlestep_lwp_callback): Ditto.
9575 (select_event_lwp_callback): Ditto.
9576 (cancel_breakpoints_callback): Ditto.
9577 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9578 not &all_lwps.
9579 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9580 (unsuspend_one_lwp): Update, "entry" parameter is a
9581 struct thread_info * now.
9582 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9583 not &all_lwps.
9584 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9585 Fetch lwpid from thread, not lwp.
9586 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9587 Pass &all_threads to find_inferior, not &all_lwps.
9588 (send_sigstop): Fetch lwpid from thread, not lwp.
9589 (send_sigstop_callback): Update, "entry" parameter is a
9590 struct thread_info * now.
9591 (suspend_and_send_sigstop_callback): Ditto.
9592 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9593 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9594 struct thread_info * now.
9595 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9596 from thread, lwp.
9597 (lwp_running): Update, "entry" parameter is a
9598 struct thread_info * now.
9599 (stop_all_lwps): Fetch ptid from thread.
9600 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9601 (linux_resume_one_lwp): Fetch lwpid from thread.
9602 (linux_set_resume_request): Update, "entry" parameter is a
9603 struct thread_info * now. Fetch pid, lwpid from thread.
9604 (resume_status_pending_p): Update, "entry" parameter is a
9605 struct thread_info * now.
9606 (need_step_over_p): Ditto. Fetch lwpid from thread.
9607 (start_step_over): Fetch lwpid from thread.
9608 (linux_resume_one_thread): Update, "entry" parameter is a
9609 struct thread_info * now. Fetch lwpid from thread.
9610 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9611 (proceed_one_lwp): Update, "entry" parameter is a
9612 struct thread_info * now. Fetch lwpid from thread.
9613 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9614 struct thread_info * now.
9615 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9616 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9617 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9618 directly.
9619 (regsets_store_inferior_registers): Ditto.
9620 (fetch_register, store_register): Ditto.
9621 (linux_read_memory, linux_write_memory): Ditto.
9622 (linux_request_interrupt): Ditto.
9623 (linux_read_auxv): Ditto.
9624 (linux_xfer_siginfo): Ditto.
9625 (linux_qxfer_spu): Ditto.
9626 (linux_qxfer_libraries_svr4): Ditto.
9627 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9628 moved to inferiors.h.
9629 (get_lwp): Delete.
9630 (get_thread_lwp): Update.
9631 (struct lwp_info): Delete member "entry". Simplify comment for
9632 member "thread".
9633 (all_lwps): Delete.
9634 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9635 current_inferior directly.
9636 (update_watch_registers_callback): Update, "entry" parameter is a
9637 struct thread_info * now. Fetch pid from thread.
9638 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9639 (mips_insert_point): Fetch lwpid from current_inferior.
9640 Pass &all_threads to find_inferior, not &all_lwps.
9641 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9642 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9643 directly.
9644 (mips_stopped_data_address): Ditto.
9645 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9646 directly.
9647 * linux-tile-low.c (tile_arch_setup): Ditto.
9648 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9649 (update_debug_registers_callback): Update, "entry" parameter is a
9650 struct thread_info * now. Fetch pid from thread.
9651 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9652 Pass &all_threads to find_inferior, not &all_lwps.
9653 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9654 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9655 Pass &all_threads to find_inferior, not &all_lwps.
9656 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9657 (i386_dr_low_get_status): Ditto.
9658 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9659 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9660 (x86_linux_read_description): Ditto.
9661 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9662
3b8361aa
DE
96632014-02-20 Doug Evans <dje@google.com>
9664
9665 * inferiors.c (get_first_inferior): Fix buglet.
9666
f7667f0d
DE
96672014-02-19 Doug Evans <dje@google.com>
9668
9669 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9670 * inferiors.c (add_thread): Change result type to struct thread_info *.
9671 All callers updated.
9672 (add_lwp): Call add_thread here instead of in callers.
9673 All callers updated.
9674 * linux-low.h (get_lwp_thread): Rewrite.
9675 (struct lwp_info): New member "thread".
9676
b3312d80
DE
96772014-02-19 Doug Evans <dje@google.com>
9678
9679 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9680 All callers updated.
9681
ecc6f45c
DE
96822014-02-19 Doug Evans <dje@google.com>
9683
9684 * inferiors.c (add_thread): Fix whitespace.
9685
649ebbca
DE
96862014-02-19 Doug Evans <dje@google.com>
9687
9688 * dll.c (clear_dlls): Replace accessing list implemention details
9689 with API function.
9690 * gdbthread.h (get_first_thread): Declare.
9691 * inferiors.c (for_each_inferior_with_data): New function.
9692 (get_first_thread): New function.
9693 (find_thread_ptid): Simplify.
9694 (get_first_inferior): New function.
9695 (clear_list): Delete.
9696 (one_inferior_p): New function.
9697 (clear_inferior_list): New function.
9698 (clear_inferiors): Update.
9699 * inferiors.h (for_each_inferior_with_data): Declare.
9700 (clear_inferior_list): Declare.
9701 (one_inferior_p): Declare.
9702 (get_first_inferior): Declare.
9703 * linux-low.c (linux_wait_for_event): Replace accessing list
9704 implemention details with API function.
9705 * server.c (target_running): Ditto.
9706 (accumulate_file_name_length): New function.
9707 (emit_dll_description): New function.
9708 (handle_qxfer_libraries): Replace accessing list implemention
9709 details with API function.
9710 (handle_qxfer_threads_worker): New function.
9711 (handle_qxfer_threads_proper): Replace accessing list implemention
9712 details with API function.
9713 (handle_query): Ditto.
9714 (visit_actioned_threads_callback_ftype): New typedef.
9715 (visit_actioned_threads_data): New struct.
9716 (visit_actioned_threads): Rewrite to be find_inferior callback.
9717 (resume): Call find_inferior.
9718 (handle_status): Replace accessing list implemention
9719 details with API function.
9720 (process_serial_event): Replace accessing list implemention details
9721 with API function.
9722 * target.c (set_desired_inferior): Replace accessing list implemention
9723 details with API function.
9724 * tracepoint.c (same_process_p): New function.
9725 (gdb_agent_about_to_close): Replace accessing list implemention
9726 details with API function.
9727 * win32-low.c (child_delete_thread): Replace accessing list
9728 implemention details with API function.
9729 (match_dll_by_basename): New function.
9730 (dll_is_loaded_by_basename): New function.
9731 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9732 details call to dll_is_loaded_by_basename.
9733
80894984
DE
97342014-02-19 Doug Evans <dje@google.com>
9735
9736 * dll.h (struct dll_info): Add comment.
9737 * gdbthread.h (struct thread_info): Add comment.
9738 (current_ptid): Simplify.
9739 * inferiors.c (add_process): Update.
9740 (remove_process): Update.
9741 * inferiors.h (struct process_info): Rename member "head" to "entry".
9742 * linux-low.c (delete_lwp): Update.
9743 (add_lwp): Update.
9744 (last_thread_of_process_p): Update.
9745 (kill_one_lwp_callback, linux_kill): Update.
9746 (status_pending_p_callback): Update.
9747 (wait_for_sigstop): Update. Simplify read of ptid.
9748 (start_step_over): Update.
9749 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9750 (get_lwp_thread): Update.
9751 (struct lwp_info): Rename member "head" to "entry".
9752 * regcache.h (inferior_list_entry): Delete.
9753 * server.c (kill_inferior_callback): Update.
9754 (detach_or_kill_inferior_callback): Update.
9755 (print_started_pid): Update.
9756 (print_attached_pid): Update.
9757 (process_serial_event): Simplify read of ptid.
9758 * thread-db.c (thread_db_create_event): Update.
9759 (thread_db_get_tls_address): Update.
9760 * win32-low.c (current_inferior_ptid): Simplify.
9761
46917d26
TT
97622014-02-19 Tom Tromey <tromey@redhat.com>
9763
9764 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9765 argument.
9766 (target_supports_btrace): Update.
9767
0759a81e
YQ
97682014-02-14 Yao Qi <yao@codesourcery.com>
9769
9770 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9771 (rsp-low-ipa.o): New target.
9772
a7191e8b
TT
97732014-02-12 Tom Tromey <tromey@redhat.com>
9774
9775 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9776 convert_ascii_to_int.
9777 * regcache.c (registers_to_string): Likewise.
9778 * remote-utils.c (decode_M_packet): Likewise.
9779 * server.c (process_serial_event): Likewise.
9780
ff0e980e
TT
97812014-02-12 Tom Tromey <tromey@redhat.com>
9782
9783 * server.c (handle_query, handle_v_run): Use hex2bin, not
9784 unhexify.
9785 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9786
e9371aff
TT
97872014-02-12 Tom Tromey <tromey@redhat.com>
9788
9789 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9790 convert_int_to_ascii.
9791 * regcache.c (registers_to_string, collect_register_as_string):
9792 Likewise.
9793 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9794 Likewise.
9795 * server.c (process_serial_event): Likewise.
9796 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9797 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9798
971dc0b8
TT
97992014-02-12 Tom Tromey <tromey@redhat.com>
9800
9801 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9802 bin2hex, not hexify.
9803 * tracepoint.c (cmd_qtstatus): Likewise.
9804
0a822afb
TT
98052014-02-12 Tom Tromey <tromey@redhat.com>
9806
9807 * remote-utils.c (monitor_output): Pass explicit length to
9808 hexify.
9809
9c3d6531
TT
98102014-02-12 Tom Tromey <tromey@redhat.com>
9811
9812 * tracepoint.c: Include rsp-low.h.
9813 * server.c: Include rsp-low.h.
9814 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9815 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9816 declare.
9817 * remote-utils.c: Include rsp-low.h.
9818 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9819 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9820 (convert_int_to_ascii, convert_ascii_to_int): Move to
9821 common/rsp-low.c.
9822 * regcache.c: Include rsp-low.h.
9823 * ax.c: Include rsp-low.h.
9824 * Makefile.in (SFILES): Add common/rsp-low.c.
9825 (OBS): Add rsp-low.o.
9826 (rsp-low.o): New target.
9827
01fd3ea5
TT
98282014-02-12 Tom Tromey <tromey@redhat.com>
9829
9830 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9831 Include print-utils.h.
9832 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9833 (plongest, thirty_two, phex_nz): Remove.
9834 * Makefile.in (SFILES): Add common/print-utils.c.
9835 (OBS): Add print-utils.o.
9836 (print-utils-ipa.o): New target.
9837 (print-utils.o): New target.
9838 (IPA_OBJS): Add print-utils-ipa.o.
9839
e99dc820
TT
98402014-02-06 Tom Tromey <tromey@redhat.com>
9841
9842 * Makefile.in (SFILES): Fix indentation.
9843
ee1e2d4f
DE
98442014-02-05 Doug Evans <dje@google.com>
9845
9846 * linux-low.c (linux_wait_for_event): Improve comment.
9847 (linux_wait_1): Keep current_inferior in sync with event_child.
9848
f5a02773
DE
98492014-01-22 Doug Evans <dje@google.com>
9850
9851 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9852
87ce2a04
DE
98532014-01-22 Doug Evans <dje@google.com>
9854
9855 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9856 * configure: Regenerate.
9857 * config.in: Regenerate.
9858 * Makefile.in (SFILES): Add debug.c.
9859 (OBS): Add debug.o.
9860 * debug.c: New file.
9861 * debug.h: New file.
9862 * linux-aarch64-low.c (*): Update all debugging printfs to use
9863 debug_printf instead of fprintf.
9864 * linux-arm-low.c (*): Ditto.
9865 * linux-cris-low.c (*): Ditto.
9866 * linux-crisv32-low.c (*): Ditto.
9867 * linux-m32r-low.c (*): Ditto.
9868 * linux-sparc-low.c (*): Ditto.
9869 * linux-x86.c (*): Ditto.
9870 * linux-low.c (*): Ditto.
9871 (linux_wait_1): Add calls to debug_enter, debug_exit.
9872 (linux_wait): Remove redundant debugging printf.
9873 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9874 (linux_resume, unstop_all_lwps): Ditto.
9875 * mem-break.c (*): Update all debugging printfs to use
9876 debug_printf instead of fprintf.
9877 * remote-utils.c (*): Ditto.
9878 * thread-db.c (*): Ditto.
9879 * server.c #include <ctype.h>, "gdb_vecs.h".
9880 (debug_threads): Moved to debug.c.
9881 (*): Update all debugging printfs to use debug_printf instead of
9882 fprintf.
9883 (start_inferior): Replace call to fflush with call to debug_flush.
9884 (monitor_show_help): Mention set debug-format.
9885 (parse_debug_format_options): New function.
9886 (handle_monitor_command): Handle "monitor set debug-format".
9887 (gdbserver_usage): Mention --debug-format.
9888 (main): Parse --debug-format.
9889 * server.h (debug_threads): Declaration moved to debug.h.
9890 #include "debug.h".
9891 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9892 trace_debug_1 that uses debug_printf.
9893 (tracepoint_look_up_symbols): Update all debugging printfs to use
9894 debug_printf instead of fprintf.
9895
e671835b
BS
98962014-01-20 Baruch Siach <baruch@tkos.co.il>
9897
9898 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9899 sys/ptrace.h.
9900
b5737fa9
PA
99012014-01-17 Pedro Alves <palves@redhat.com>
9902
ea38d2a9 9903 PR build/16445
c7faa97a
PA
9904 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9905 defined after including gdb_proc_service.h.
b5737fa9 9906
40ed484e
DE
99072014-01-16 Doug Evans <dje@google.com>
9908
9909 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9910 (match_dll): Use it.
9911
969c39fb
MM
99122014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9913
9914 * target.h (target_ops) <read_btrace>: Change parameters and
9915 return type to allow error reporting.
9916 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9917 trace reading errors on.
9918 * linux-low.c (linux_low_read_btrace): Pass trace reading
9919 errors on.
9920 (linux_low_disable_btrace): New.
9921
ab7f45ba
DE
99222014-01-15 Doug Evans <dje@google.com>
9923
9924 * inferiors.c (thread_id_to_gdb_id): Delete.
9925 * inferiors.h (thread_id_to_gdb_id): Delete.
9926
66af0f44
EZ
99272014-01-13 Eli Zaretskii <eliz@gnu.org>
9928
9929 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9930 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9931 versions.
9932
9939e131
PA
99332014-01-08 Pedro Alves <palves@redhat.com>
9934
9935 * server.c (handle_status): Don't discard previous queued stop
9936 replies or thread's pending status here.
9937 (main) <disconnection>: Do it here instead.
9938
b7ea362b
PA
99392014-01-08 Pedro Alves <palves@redhat.com>
9940
9941 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9942 * server.c (visit_actioned_threads, handle_pending_status): New
9943 function.
9944 (handle_v_cont): Factor out parts to ...
9945 (resume): ... this new function. If in all-stop, and a thread
9946 being resumed has a pending status, report it without actually
9947 resuming.
9948 (myresume): Adjust to use the new 'resume' function.
9949 (clear_pending_status_callback, set_pending_status_callback)
9950 (find_status_pending_thread_callback): New functions.
9951 (handle_status): Handle the case of multiple threads having
9952 interesting statuses to report. Report threads' real last signal
9953 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9954 with an interesting thread to report the status for, instead of
9955 always reporting the status of the first thread.
9956
28498c42
JB
99572014-01-01 Joel Brobecker <brobecker@adacore.com>
9958
9959 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9960 * gdbreplay.c (gdbreplay_version): Likewise.
9961
f45c82da
YZ
99622013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9963
9964 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9965 iov.iov_len with the real length in use.
9966
379a5e2d
JB
99672013-12-13 Joel Brobecker <brobecker@adacore.com>
9968
9969 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9970 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9971 for all targets that use win32-low.c.
9972 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9973 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9974
4210d83e
PA
99752013-12-13 Pedro Alves <palves@redhat.com>
9976
9977 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9978 if equal to TARGET_WAITKIND_LOADED.
9979 * win32-low.c (cached_status): New static global.
9980 (win32_wait): Add declaration.
9981 (do_initial_child_stuff): Flush all initial pending debug events
9982 up to the initial breakpoint.
9983 (win32_wait): If CACHED_STATUS was set, return that instead
9984 of doing a real wait. Remove the code resuming the execution
9985 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9986 during the initial phase. Also remove the code changing
9987 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9988 TARGET_WAITKIND_STOPPED.
9989
e7f0d979
YQ
99902013-12-11 Yao Qi <yao@codesourcery.com>
9991
9992 * notif.c (handle_notif_ack): Return 0 if no notification
9993 matches.
9994
ebcf782c
DE
99952013-11-20 Doug Evans <dje@google.com>
9996
9997 * linux-low.c (linux_set_resume_request): Fix comment.
9998
20ad9378
DE
99992013-11-20 Doug Evans <dje@google.com>
10000
10001 * linux-low.c (resume_status_pending_p): Tweak comment.
10002
a196ebeb
WT
100032013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10004
10005 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10006 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10007 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10008 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10009 (srv_amd64_regobj): Add amd64-mpx.o.
10010 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10011 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10012 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10013 * i387-fp.c (num_pl_bnd_register) Added constant.
10014 (num_pl_bnd_cfg_registers) Added constant.
10015 (struct i387_xsave) Added reserved area and MPX fields.
10016 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10017 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10018 function.
10019 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10020 (init_registers_amd64_mpx_linux): Declare new function.
10021 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10022 (x86_64_regmap): Add MPX registers.
10023 (x86_linux_read_description): Add MPX case.
10024 (initialize_low_arch): Initialize MPX targets.
10025
0080a2f6
TT
100262013-11-18 Tom Tromey <tromey@redhat.com>
10027
10028 * configure: Rebuild.
10029 * configure.ac: Don't check for stdlib.h.
10030 * gdbreplay.c: Unconditionally include stdlib.h.
10031
2978b111
TT
100322013-11-18 Tom Tromey <tromey@redhat.com>
10033
10034 * config.in: Rebuild.
10035 * configure: Rebuild.
10036 * configure.ac: Don't use AC_HEADER_DIRENT.
10037
a3d08894
TT
100382013-11-18 Tom Tromey <tromey@redhat.com>
10039
10040 * server.h: Don't check HAVE_STRING_H.
10041 * gdbreplay.c: Don't check HAVE_STRING_H.
10042 * configure: Rebuild.
10043
0a5dd17d
TT
100442013-11-18 Tom Tromey <tromey@redhat.com>
10045
10046 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10047 LIBGNU.
10048
1bd2f0ba
TT
100492013-11-08 Tom Tromey <tromey@redhat.com>
10050
10051 * configure, config.in: Rebuild.
10052 * configure.ac: Remove unused configury.
10053
3266f10b
TT
100542013-11-08 Tom Tromey <tromey@redhat.com>
10055
10056 * acinclude.m4: Include common.m4, codeset.m4.
10057 * configure, config.in: Rebuild.
10058 * configure.ac: Use GDB_AC_COMMON.
10059
6682d959
AA
100602013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10061
10062 * linux-s390-low.c (HWCAP_S390_TE): New define.
10063 (s390_arch_setup): Consider the TE field in the HWCAP for
10064 determining 'have_regset_tdb'.
10065
fd0a4d76
SDJ
100662013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10067
10068 PR gdb/16014
10069 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10070 call to sizeof.
10071
1a3d890b
PA
100722013-10-02 Pedro Alves <palves@redhat.com>
10073
10074 * server.c (process_serial_event): Don't output "GDBserver
10075 exiting" if GDB is connected through stdio.
10076 * target.c (mywait): Likewise, be silent if GDB is connected
10077 through stdio.
10078
97ad4581
JB
100792013-10-01 Joel Brobecker <brobecker@adacore.com>
10080
10081 * lynx-low.c (lynx_add_threads_after_attach): New function.
10082 (lynx_attach): Remove call to add_thread. Add call to
10083 lynx_add_threads_after_attach instead.
10084
5b4e221c
MF
100852013-09-28 Mike Frysinger <vapier@gentoo.org>
10086
10087 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10088 * config.in, configure: Regenerated.
10089
ee47b2f8
YQ
100902013-09-18 Yao Qi <yao@codesourcery.com>
10091
10092 PR server/15959
10093 * server.c (start_inferior): Clear 'resume_info'.
10094
d6707650 100952013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10096
d6707650
JW
10097 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10098 for each register.
10099
9243dd0e 101002013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10101
9243dd0e
JW
10102 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10103 linux-tile-low.o to srv_tgtobj.
10104
c623a6ef
WN
101052013-09-16 Will Newton <will.newton@linaro.org>
10106
10107 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10108 out regs.
10109
fb71d39e
PA
101102013-09-06 Pedro Alves <palves@redhat.com>
10111
10112 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10113 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10114 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10115 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10116 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10117 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10118
8e7e9910
PA
101192013-09-06 Pedro Alves <palves@redhat.com>
10120
10121 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10122 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10123
7c3a12ca
PA
101242013-09-06 Pedro Alves <palves@redhat.com>
10125
10126 * linux-amd64-ipa.c: Include tracepoint.h.
10127 * linux-i386-ipa.c: Include tracepoint.h.
10128
8eb3d7b6
RW
101292013-09-06 Ricard Wanderlof <ricardw@axis.com>
10130
10131 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10132 (ps_get_thread_area): New function.
10133
eddddb9d
RW
101342013-09-06 Ricard Wanderlof <ricardw@axis.com>
10135
10136 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10137 (initialize_low_arch): Call init_registers_crisv32 rather than
10138 init_register_crisv32.
10139
533b0600
PA
101402013-09-05 Pedro Alves <palves@redhat.com>
10141
10142 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10143 to ...
10144 * hostio.h: ... this new file.
10145 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10146 win32-low.c: Include hostio.h.
10147
0ce3d3b5
PA
101482013-09-05 Pedro Alves <palves@redhat.com>
10149
10150 * server.h (gdb_client_data, handler_func, callback_handler_func)
10151 (delete_file_handler, add_file_handler, append_callback_event)
10152 (delete_callback_event, start_event_loop, initialize_event_loop):
10153 Move to event-loop.h and include it.
10154 * event-loop.h: New file.
10155
799cdc37
PA
101562013-09-05 Pedro Alves <palves@redhat.com>
10157
10158 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10159 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10160 (loaded_dll, unloaded_dll): Move to ...
10161 * dll.h: ... this new file.
10162 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10163
6a6bbd9d
PA
101642013-09-05 Pedro Alves <palves@redhat.com>
10165
10166 * server.h (current_process, get_thread_process, all_processes)
10167 (add_inferior_to_list, for_each_inferior, current_inferior)
10168 (remove_inferior, add_process, remove_process, find_process_pid)
10169 (have_started_inferiors_p, have_attached_inferiors_p)
10170 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10171 (clear_inferiors, find_inferior, find_inferior_id)
10172 (inferior_target_data, set_inferior_target_data)
10173 (inferior_regcache_data, set_inferior_regcache_data): Move to
10174 inferiors.h, and include it.
10175 * inferiors.h: New file.
10176
f699aaba
PA
101772013-09-05 Pedro Alves <palves@redhat.com>
10178
10179 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10180 Move ...
72f4393d 10181 * ax.h: ... here.
f699aaba 10182
c144c7a0
PA
101832013-09-05 Pedro Alves <palves@redhat.com>
10184
10185 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10186 tracepoint.h.
10187 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10188 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10189 (handle_tracepoint_general_set, handle_tracepoint_query)
10190 (tracepoint_finished_step, tracepoint_was_hit)
10191 (release_while_stepping_state_list, current_traceframe)
10192 (in_readonly_region, traceframe_read_mem)
10193 (fetch_traceframe_registers, traceframe_read_sdata)
10194 (traceframe_read_info, struct fast_tpoint_collect_status)
10195 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10196 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10197 (supply_fast_tracepoint_registers)
10198 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10199 (ipa_tdesc, claim_trampoline_space)
10200 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10201 (agent_mem_read, agent_get_trace_state_variable_value)
10202 (agent_set_trace_state_variable_value, agent_tsv_read)
10203 (agent_mem_read_string, get_raw_reg_func_addr)
10204 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10205 * tracepoint.h: ... this new file.
10206
ff42e6ab
PA
102072013-09-05 Pedro Alves <palves@redhat.com>
10208
10209 * server.h (perror_with_name, error, fatal, warning, paddress)
10210 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10211 include it.
10212 * utils.h: New file.
10213
541af0f4
PA
102142013-09-05 Pedro Alves <palves@redhat.com>
10215
10216 * server.h (remote_debug, noack_mode, transport_is_reliable)
10217 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10218 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10219 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10220 (write_enn, initialize_async_io, enable_async_io)
10221 (disable_async_io, check_remote_input_interrupt_request)
10222 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10223 (dead_thread_notify, prepare_resume_reply)
10224 (decode_address_to_semicolon, decode_address, decode_m_packet)
10225 (decode_M_packet, decode_X_packet, decode_xfer_write)
10226 (decode_search_memory_packet, unhexify, hexify)
10227 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10228 (look_up_one_symbol, relocate_instruction)
10229 (monitor_output): Move to remote-utils.h, and include it.
10230 * remote-utils.h: New file.
10231
eebdf26b
PA
102322013-09-05 Pedro Alves <palves@redhat.com>
10233
10234 * server.h (_): Delete.
10235
3aafd2ff
PA
102362013-09-02 Pedro Alves <palves@redhat.com>
10237
10238 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10239 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10240 allocated.
10241 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10242
cee83bcb
PM
102432013-09-02 Pierre Muller <muller@sourceware.org>
10244
10245 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10246 or WriteProcessMemory complete successfully and handle
10247 ERROR_PARTIAL_COPY error.
10248
9a13b2fa
PA
102492013-09-02 Pedro Alves <palves@redhat.com>
10250
10251 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10252 error instead of EIO.
10253
602e3198
JK
102542013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10255
10256 PR server/15604
10257 * linux-low.c: Include filestuff.h.
10258 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10259 * lynx-low.c: Include filestuff.h.
10260 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10261 * server.c: Include filestuff.h.
10262 (main): Call notice_open_fds.
10263 * spu-low.c: Include filestuff.h.
10264 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10265
96d7229d
LM
102662013-08-22 Luis Machado <lgustavo@codesourcery.com>
10267
10268 * Makefile.in: Explain why ../target and ../nat are not
10269 listed as include file search paths.
10270 (linux-waitpid.o): New object file rule.
10271 * configure.srv (srv_native_linux_obj): New variable.
10272 Replace all occurrences of linux native object files with
10273 $srv_native_linux_obj.
10274 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10275 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10276 (linux_enable_event_reporting): Remove declaration.
10277 (my_waitpid): Moved to common/linux-waitpid.c.
10278 (linux_wait_for_event): Pass ptid when calling
10279 linux_enable_event_reporting.
10280 (linux_supports_tracefork_flag): Remove.
10281 (linux_enable_event_reporting): Likewise.
10282 (linux_tracefork_grandchild): Remove.
10283 (STACK_SIZE): Moved to common/linux-ptrace.c.
10284 (linux_tracefork_child): Remove.
10285 (linux_test_for_tracefork): Remove.
10286 (linux_look_up_symbols): Call linux_supports_traceclone.
10287 (initialize_low): Remove call to linux_test_for_tracefork.
10288 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10289 common/linux-ptrace.h.
10290 (PTRACE_TYPE_ARG4): Likewise.
10291 Include linux-ptrace.h.
10292
32940073
PA
102932013-08-21 Pedro Alves <palves@redhat.com>
10294
10295 * config.in: Renegerate.
10296
33b60d58 102972013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 10298
33b60d58
LM
10299 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10300 (SFILES): Remove $(srcdir)/common/target-common.c and
10301 add $(srcdir)/target/waitstatus.c.
10302 (OBS): Remove target-common.o and add waitstatus.o.
10303 (server_h): Remove $(srcdir)/../common/target-common.h and
10304 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10305 and $(srcdir)/../target/waitstatus.h.
10306 (target-common.o): Remove.
10307 (waitstatus.o): New target object file.
10308 * target.h: Do not include target-common.h and
10309 include target/resume.h, target/wait.h and
10310 target/waitstatus.h.
10311
b8e1b30e
LM
103122013-08-13 Luis Machado <lgustavo@codesourcery.com>
10313
10314 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10315 to PTRACE_TYPE_ARG3.
10316 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10317 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10318 PTRACE_TYPE_ARG4.
10319 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10320 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10321
7a60ad40
YQ
103222013-07-27 Jie Zhang <jie@codesourcery.com>
10323 Daniel Jacobowitz <dan@codesourcery.com>
10324 Yao Qi <yao@codesourcery.com>
10325
10326 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10327 (mips-linux-watch.o): New rule.
10328 (mips_linux_watch_h): New variable.
10329 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10330 srv_tgtobj.
10331 * linux-mips-low.c: Include mips-linux-watch.h.
10332 (struct arch_process_info, struct arch_lwp_info): New.
10333 (update_watch_registers_callback): New function.
10334 (mips_linux_new_process, mips_linux_new_thread) New functions.
10335 (mips_linux_prepare_to_resume, mips_insert_point): New
10336 functions.
10337 (mips_remove_point, mips_stopped_by_watchpoint): New
10338 functions.
10339 (rsp_bp_type_to_target_hw_bp_type): New function.
10340 (mips_stopped_data_address): New function.
10341 (the_low_target): Add watchpoint support functions.
10342
de6f69ad
YQ
103432013-07-27 Yao Qi <yao@codesourcery.com>
10344
10345 * i386-low.c: Include break-common.h.
10346 (enum target_hw_bp_type): Remove.
10347
3360c0bf
LM
103482013-07-24 Luis Machado <lgustavo@codesourcery.com>
10349
10350 * Makefile.in (SFILES): /common/target-common.c.
10351 (OBS): Add target-common.o.
10352 (server_h): Add $(srcdir)/../common/target-common.h.
10353 (target-common.o): New target.
10354 * server.c (queue_stop_reply_callback): Free
10355 status string after use.
10356 * target.c (target_waitstatus_to_string): Remove.
10357 * target.h: Include target-common.h.
10358 (resume_kind): Likewise.
10359 (target_waitkind): Likewise.
10360 (target_waitstatus): Likewise.
10361 (TARGET_WNOHANG): Likewise.
10362
bd885420
YQ
103632013-07-04 Yao Qi <yao@codesourcery.com>
10364
10365 * Makefile.in (host_alias): Use @host_noncanonical@.
10366 (target_alias): Use @target_noncanonical@.
10367 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10368 ACX_NONCANONICAL_HOST.
10369 * configure: Regenerated.
10370
10371 Revert:
10372 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10373
10374 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10375 * configure: Rebuild.
10376 * Makefile.in (version_host, version_target): Get from configure.
10377 (version.c): Use $(version_host) and $(version_target).
10378
17ef446e
PA
103792013-07-03 Pedro Alves <palves@redhat.com>
10380
10381 * Makefile.in (config.status): Depend on development.sh.
10382 * acinclude.m4: Include libmcheck.m4.
10383 * configure: Regenerate.
10384
7a9a7487
MG
103852013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10386
10387 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10388 attribute inside the parentheses.
10389 (winapi_DebugSetProcessKillOnExit): Ditto.
10390 (winapi_DebugBreakProcess): Ditto.
10391 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 10392
49b64de6
MG
103932013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10394
10395 * notif.h (notif_event): Add a dummy member to avoid compiler
10396 errors.
10397
d5749ee7
PA
103982013-07-01 Pedro Alves <palves@redhat.com>
10399
10400 * hostio.c (HOSTIO_PATH_MAX): Define.
10401 (require_filename, handle_open, handle_unlink, handle_readlink):
10402 Use it.
10403
d8d2a3ee
PA
104042013-07-01 Pedro Alves <palves@redhat.com>
10405
10406 * server.h: Include "pathmax.h".
10407 * linux-low.c: Don't include sys/param.h.
10408 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10409 MAXPATHLEN.
10410 * win32-low.c: Don't include sys/param.h.
10411 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10412
bc7dea8d
PA
104132013-07-01 Pedro Alves <palves@redhat.com>
10414
10415 * event-loop.c: Don't check HAVE_UNISTD_H before including
10416 <unistd.h>.
10417 * gdbreplay.c: Likewise.
10418 * remote-utils.c: Likewise.
10419 * server.c: Likewise.
10420 * configure.ac: Don't check for unistd.h.
10421 * configure: Regenerate.
10422
d6c2da54
TT
104232013-06-28 Tom Tromey <tromey@redhat.com>
10424
10425 * Makefile.in (version.c): Use version.in, not
10426 common/version.in.
10427
257b6bec
MG
104282013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10429
10430 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10431 * configure: Rebuild.
10432 * Makefile.in (version_host, version_target): Get from configure.
10433 (version.c): Use $(version_host) and $(version_target).
10434
86ebe149
DK
104352013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10436
10437 Fix trace-status to output user name without trailing colon.
10438 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10439
f30aa5af
DK
104402013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10441
10442 Fix trace-status to output proper start-time and stop-time.
10443 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10444 output start time and stop time in hex as gdb expects.
10445
28a93511
YQ
104462013-06-26 Pedro Alves <pedro@codesourcery.com>
10447
10448 * tracepoint.c (build_traceframe_info_xml): Output trace state
10449 variables present in the trace buffer.
10450
01208463
TT
104512013-06-24 Tom Tromey <tromey@redhat.com>
10452
10453 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10454 create-version.sh.
10455 (version.o): Remove.
10456 * gdbreplay.c: Include version.h.
10457 (version, host_name): Don't declare.
10458 * server.h: Include version.h.
10459 (version, host_name): Don't declare.
10460
760256f9
PA
104612013-06-12 Pedro Alves <palves@redhat.com>
10462
10463 * linux-x86-low.c (linux_is_elf64): Delete global.
10464 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10465 with local linux_pid_exe_is_elf_64_file use.
10466
030031ee
PA
104672013-06-11 Pedro Alves <palves@redhat.com>
10468
10469 * linux-low.c (regset_disabled, disable_regset): New functions.
10470 (regsets_fetch_inferior_registers)
10471 (regsets_store_inferior_registers): Use them.
10472 (initialize_regsets_info); Don't allocate the disabled_regsets
10473 array here.
10474 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10475 comment.
10476
5da6eb0a
PA
104772013-06-11 Pedro Alves <palves@redhat.com>
10478
10479 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10480 xmalloc.
10481
7e5aaa09
PA
104822013-06-11 Pedro Alves <palves@redhat.com>
10483
10484 * linux-x86-low.c (initialize_low_arch): Call
10485 init_registers_x32_avx_linux.
10486
d878444c
JK
104872013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10488
10489 Fix compatibility with Android Bionic.
10490 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10491 it is not empty.
10492
3aee8918
PA
104932013-06-07 Pedro Alves <palves@redhat.com>
10494
5f2b57b5 10495 PR server/14823
3aee8918
PA
10496 * Makefile.in (OBS): Add tdesc.o.
10497 (IPA_OBJS): Add tdesc-ipa.o.
10498 (tdesc-ipa.o): New rule.
10499 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10500 interface.
10501 * linux-low.c (new_inferior): Delete.
10502 (disabled_regsets, num_regsets): Delete.
10503 (linux_add_process): Adjust to set the new per-process
10504 new_inferior flag.
10505 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10506 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10507 was a stop. When calling arch_setup, switch the current inferior
10508 to the thread that got an event.
10509 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10510 (regsets_fetch_inferior_registers)
10511 (regsets_store_inferior_registers): New regsets_info parameter.
10512 Adjust to use it.
10513 (linux_register_in_regsets): New regs_info parameter. Adjust to
10514 use it.
10515 (register_addr, fetch_register, store_register): New usrregs_info
10516 parameter. Adjust to use it.
10517 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10518 parameter regs_info. Adjust to use it.
10519 (linux_fetch_registers): Get the current inferior's regs_info, and
10520 adjust to use it.
10521 (linux_store_registers): Ditto.
10522 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10523 (initialize_low): Don't initialize the target_regsets here. Call
10524 initialize_low_arch.
10525 * linux-low.h (target_regsets): Delete declaration.
10526 (struct regsets_info): New.
10527 (struct usrregs_info): New.
10528 (struct regs_info): New.
10529 (struct process_info_private) <new_inferior>: New field.
10530 (struct linux_target_ops): Delete the num_regs, regmap, and
10531 regset_bitmap fields. New field regs_info.
10532 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10533 * i387-fp.c (num_xmm_registers): Delete.
10534 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10535 calls to new interface.
10536 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10537 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10538 Infer the number of xmm registers from the regcache's target
10539 description.
10540 * i387-fp.h (num_xmm_registers): Delete.
10541 * inferiors.c (add_thread): Don't install the thread's regcache
10542 here.
10543 * proc-service.c (gregset_info): Fetch the current inferior's
10544 regs_info. Adjust to use it.
10545 * regcache.c: Include tdesc.h.
10546 (register_bytes, reg_defs, num_registers)
10547 (gdbserver_expedite_regs): Delete.
10548 (get_thread_regcache): If the thread doesn't have a regcache yet,
10549 create one, instead of aborting gdbserver.
10550 (regcache_invalidate_one): Rename to ...
10551 (regcache_invalidate_thread): ... this.
10552 (regcache_invalidate_one): New.
10553 (regcache_invalidate): Only invalidate registers of the current
10554 process.
10555 (init_register_cache): Add target_desc parameter, and use it.
10556 (new_register_cache): Ditto. Assert the target description has a
10557 non zero registers_size.
10558 (regcache_cpy): Add assertions. Adjust.
10559 (realloc_register_cache, set_register_cache): Delete.
10560 (registers_to_string, registers_from_string): Adjust.
10561 (find_register_by_name, find_regno, find_register_by_number)
10562 (register_cache_size): Add target_desc parameter, and use it.
10563 (free_register_cache_thread, free_register_cache_thread_one)
10564 (regcache_release, register_cache_size): New.
10565 (register_size): Add target_desc parameter, and use it.
10566 (register_data, supply_register, supply_register_zeroed)
10567 (supply_regblock, supply_register_by_name, collect_register)
10568 (collect_register_as_string, collect_register_by_name): Adjust.
10569 * regcache.h (struct target_desc): Forward declare.
10570 (struct regcache) <tdesc>: New field.
10571 (init_register_cache, new_register_cache): Add target_desc
10572 parameter.
10573 (regcache_invalidate_thread): Declare.
10574 (regcache_invalidate_one): Delete declaration.
10575 (regcache_release): Declare.
10576 (find_register_by_number, register_cache_size, register_size)
10577 (find_regno): Add target_desc parameter.
10578 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10579 declarations.
10580 * remote-utils.c: Include tdesc.h.
10581 (outreg, prepare_resume_reply): Adjust.
10582 * server.c: Include tdesc.h.
10583 (gdbserver_xmltarget): Delete declaration.
10584 (get_features_xml, process_serial_event): Adjust.
10585 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10586 declare.
10587 (struct process_info) <tdesc>: New field.
10588 (ipa_tdesc): Declare.
10589 * tdesc.c: New file.
10590 * tdesc.h: New file.
10591 * tracepoint.c: Include tdesc.h.
10592 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10593 (get_context_regcache): Adjust to pass ipa_tdesc down.
10594 (do_action_at_tracepoint): Adjust to get the register cache size
10595 from the context regcache's description.
10596 (traceframe_walk_blocks): Adjust to get the register cache size
10597 from the current trace frame's description.
10598 (traceframe_get_pc): Adjust to get current trace frame's
10599 description and pass it down.
10600 (gdb_collect): Adjust to get the register cache size from the
10601 IPA's description.
10602 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10603 (gdbserver_xmltarget): Delete.
10604 (initialize_low_tracepoint): Set the ipa's target description.
10605 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10606 (initialize_low_tracepoint): Set the ipa's target description.
10607 * linux-x86-low.c: Include tdesc.h.
10608 [__x86_64__] (is_64bit_tdesc): New.
10609 (ps_get_thread_area, x86_get_thread_area): Use it.
10610 (i386_cannot_store_register): Rename to ...
10611 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10612 (i386_cannot_fetch_register): Rename to ...
10613 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10614 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10615 to new interface.
10616 (target_regsets): Rename to ...
10617 (x86_regsets): ... this.
10618 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10619 interface.
10620 (x86_siginfo_fixup): Use is_64bit_tdesc.
10621 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10622 (tdesc_x32_avx_linux, tdesc_x32_linux)
10623 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10624 Declare.
10625 (x86_linux_update_xmltarget): Delete.
10626 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10627 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10628 (AMD64_LINUX_USER64_CS): New.
10629 (x86_linux_read_description): New, based on
10630 x86_linux_update_xmltarget.
10631 (same_process_callback): New.
10632 (x86_arch_setup_process_callback): New.
10633 (x86_linux_update_xmltarget): New.
10634 (x86_regsets_info): New.
10635 (amd64_linux_regs_info): New.
10636 (i386_linux_usrregs_info): New.
10637 (i386_linux_regs_info): New.
10638 (x86_linux_regs_info): New.
10639 (x86_arch_setup): Reimplement.
10640 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10641 (x86_emit_ops): Ditto.
10642 (the_low_target): Adjust. Install x86_linux_regs_info,
10643 x86_cannot_fetch_register, and x86_cannot_store_register.
10644 (initialize_low_arch): New.
10645 * linux-ia64-low.c (tdesc_ia64): Declare.
10646 (ia64_fetch_register): Adjust.
10647 (ia64_usrregs_info, regs_info): New globals.
10648 (ia64_regs_info): New function.
10649 (the_low_target): Adjust.
10650 (initialize_low_arch): New function.
10651 * linux-sparc-low.c (tdesc_sparc64): Declare.
10652 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10653 Adjust.
10654 (sparc_arch_setup): New function.
10655 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10656 (the_low_target): Adjust.
10657 (initialize_low_arch): New function.
10658 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10659 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10660 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10661 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10662 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10663 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10664 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10665 (tdesc_powerpc_isa205_vsx64l): Declare.
10666 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10667 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10668 (ppc_set_pc, ppc_get_hwcap): Adjust.
10669 (ppc_usrregs_info): Forward declare.
10670 (!__powerpc64__) ppc_regmap_adjusted: New global.
10671 (ppc_arch_setup): Adjust to the current process'es target
10672 description.
10673 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10674 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10675 (ppc_store_evrregset): Adjust.
10676 (target_regsets): Rename to ...
10677 (ppc_regsets): ... this, and make static.
10678 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10679 (ppc_regs_info): New function.
10680 (the_low_target): Adjust.
10681 (initialize_low_arch): New function.
10682 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10683 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10684 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10685 (tdesc_s390x_linux64v2): Declare.
10686 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10687 (s390_fill_gregset, s390_store_last_break): Adjust.
10688 (target_regsets): Rename to ...
10689 (s390_regsets): ... this, and make static.
10690 (s390_get_pc, s390_set_pc): Adjust.
10691 (s390_get_hwcap): New target_desc parameter, and use it.
10692 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10693 (s390_arch_setup): Adjust to set the current process'es target
10694 description. Don't adjust the regmap.
10695 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10696 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10697 (regs_info_3264): New globals.
10698 (s390_regs_info): New function.
10699 (the_low_target): Adjust.
10700 (initialize_low_arch): New function.
10701 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10702 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10703 [__mips64] (init_registers_mips_linux)
10704 (init_registers_mips_dsp_linux): Delete defines.
10705 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10706 (have_dsp): New global.
10707 (mips_read_description): New, based on mips_arch_setup.
10708 (mips_arch_setup): Reimplement.
10709 (get_usrregs_info): New function.
10710 (mips_cannot_fetch_register, mips_cannot_store_register)
10711 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10712 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10713 (target_regsets): Rename to ...
10714 (mips_regsets): ... this, and make static.
10715 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10716 (dsp_regs_info, regs_info): New globals.
10717 (mips_regs_info): New function.
10718 (the_low_target): Adjust.
10719 (initialize_low_arch): New function.
10720 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10721 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10722 Declare.
10723 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10724 (arm_read_description): New, with bits factored from
10725 arm_arch_setup.
10726 (arm_arch_setup): Reimplement.
10727 (target_regsets): Rename to ...
10728 (arm_regsets): ... this, and make static.
10729 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10730 (arm_regs_info): New function.
10731 (the_low_target): Adjust.
10732 (initialize_low_arch): New function.
10733 * linux-m68k-low.c (tdesc_m68k): Declare.
10734 (target_regsets): Rename to ...
10735 (m68k_regsets): ... this, and make static.
10736 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10737 (m68k_regs_info): New function.
10738 (m68k_arch_setup): New function.
10739 (the_low_target): Adjust.
10740 (initialize_low_arch): New function.
10741 * linux-sh-low.c (tdesc_sharch): Declare.
10742 (target_regsets): Rename to ...
10743 (sh_regsets): ... this, and make static.
10744 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10745 (sh_regs_info, sh_arch_setup): New functions.
10746 (the_low_target): Adjust.
10747 (initialize_low_arch): New function.
10748 * linux-bfin-low.c (tdesc_bfin): Declare.
10749 (bfin_arch_setup): New function.
10750 (bfin_usrregs_info, regs_info): New globals.
10751 (bfin_regs_info): New function.
10752 (the_low_target): Adjust.
10753 (initialize_low_arch): New function.
10754 * linux-cris-low.c (tdesc_cris): Declare.
10755 (cris_arch_setup): New function.
10756 (cris_usrregs_info, regs_info): New globals.
10757 (cris_regs_info): New function.
10758 (the_low_target): Adjust.
10759 (initialize_low_arch): New function.
10760 * linux-cris-low.c (tdesc_crisv32): Declare.
10761 (cris_arch_setup): New function.
10762 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10763 (cris_regs_info): New function.
10764 (the_low_target): Adjust.
10765 (initialize_low_arch): New function.
10766 * linux-m32r-low.c (tdesc_m32r): Declare.
10767 (m32r_arch_setup): New function.
10768 (m32r_usrregs_info, regs_info): New globals.
10769 (m32r_regs_info): Adjust.
10770 (initialize_low_arch): New function.
10771 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10772 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10773 (tic6x_usrregs_info): Forward declare.
10774 (tic6x_read_description): New function, based on ...
10775 (tic6x_arch_setup): ... this. Reimplement.
10776 (target_regsets): Rename to ...
10777 (tic6x_regsets): ... this, and make static.
10778 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10779 (tic6x_regs_info): New function.
10780 (the_low_target): Adjust.
10781 (initialize_low_arch): New function.
10782 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10783 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10784 (target_regsets): Rename to ...
10785 (xtensa_regsets): ... this, and make static.
10786 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10787 globals.
10788 (xtensa_arch_setup, xtensa_regs_info): New functions.
10789 (the_low_target): Adjust.
10790 (initialize_low_arch): New function.
10791 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10792 (nios2_arch_setup): Set the current process'es tdesc.
10793 (target_regsets): Rename to ...
10794 (nios2_regsets): ... this.
10795 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10796 (nios2_regs_info): New function.
10797 (the_low_target): Adjust.
10798 (initialize_low_arch): New function.
a261b8f5
PA
10799 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10800 (aarch64_arch_setup): Set the current process'es tdesc.
10801 (target_regsets): Rename to ...
10802 (aarch64_regsets): ... this.
10803 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10804 (aarch64_regs_info): New function.
10805 (the_low_target): Adjust.
10806 (initialize_low_arch): New function.
3aee8918
PA
10807 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10808 globals.
10809 (target_regsets): Rename to ...
10810 (tile_regsets): ... this.
10811 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10812 (tile_regs_info): New function.
10813 (tile_arch_setup): Set the current process'es tdesc.
10814 (the_low_target): Adjust.
10815 (initialize_low_arch): New function.
10816 * spu-low.c (tdesc_spu): Declare.
10817 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10818 * win32-arm-low.c (tdesc_arm): Declare.
10819 (arm_arch_setup): New function.
10820 (the_low_target): Install arm_arch_setup instead of
10821 init_registers_arm.
10822 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10823 (init_windows_x86): Rename to ...
10824 (i386_arch_setup): ... this. Set `win32_tdesc'.
10825 (the_low_target): Adjust.
10826 * win32-low.c (win32_tdesc): New global.
10827 (child_add_thread): Don't create the thread cache here.
10828 (do_initial_child_stuff): Set the new process'es tdesc.
10829 * win32-low.h (struct target_desc): Forward declare.
10830 (win32_tdesc): Declare.
10831 * lynx-i386-low.c (tdesc_i386): Declare global.
10832 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10833 * lynx-low.c (lynx_tdesc): New global.
10834 (lynx_add_process): Set the new process'es tdesc.
10835 * lynx-low.h (struct target_desc): Forward declare.
10836 (lynx_tdesc): Declare global.
10837 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10838 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10839 * nto-low.c (nto_tdesc): New global.
10840 (do_attach): Set the new process'es tdesc.
10841 * nto-low.h (struct target_desc): Forward declare.
10842 (nto_tdesc): Declare.
10843 * nto-x86-low.c (tdesc_i386): Declare.
10844 (nto_x86_arch_setup): Set `nto_tdesc'.
10845
b1fbec62
GB
108462013-06-04 Gary Benson <gbenson@redhat.com>
10847
10848 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10849 to qSupported response when appropriate.
10850 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10851 with nonzero-length annex.
10852 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10853 arguments supplied in annex.
10854
d1ec4ce7
DE
108552013-05-31 Doug Evans <dje@google.com>
10856
ac44adcb 10857 PR server/15594
d1ec4ce7
DE
10858 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10859 64 bits in 64-cross-32 environment.
10860
9b25f2d3
PA
108612013-05-28 Pedro Alves <palves@redhat.com>
10862
10863 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10864 (aarch64-without-fpu.c): Delete rule.
10865 * configure.srv (aarch64*-*-linux*): Remove references to
10866 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10867 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10868 declaration.
10869
6740dc9c
PA
108702013-05-24 Pedro Alves <palves@redhat.com>
10871
10872 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10873 instead of strchr/decode_address. Error if the range isn't split
10874 with a ','. Don't assume there's be a ':' in the action.
10875
c2d6af84
PA
108762013-05-23 Yao Qi <yao@codesourcery.com>
10877 Pedro Alves <palves@redhat.com>
10878
10879 * linux-low.c (lwp_in_step_range): New function.
10880 (linux_wait_1): If the thread was range stepping and stopped
10881 outside the stepping range, report the stop to GDB. Otherwise,
10882 continue stepping. Add range stepping debug output.
10883 (linux_set_resume_request): Copy the step range from the resume
10884 request to the lwp.
10885 (linux_supports_range_stepping): New.
10886 (linux_target_ops) <supports_range_stepping>: Set to
10887 linux_supports_range_stepping.
10888 * linux-low.h (struct linux_target_ops)
10889 <supports_range_stepping>: New field.
10890 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10891 * linux-x86-low.c (x86_supports_range_stepping): New.
10892 (the_low_target) <supports_range_stepping>: Set to
10893 x86_supports_range_stepping.
10894 * server.c (handle_v_cont): Handle 'r' action.
10895 (handle_v_requests): Append ";r" if the target supports range
10896 stepping.
10897 * target.h (struct thread_resume) <step_range_start,
10898 step_range_end>: New fields.
10899 (struct target_ops) <supports_range_stepping>:
10900 New field.
10901 (target_supports_range_stepping): New macro.
10902
58794e1a
JB
109032013-05-17 Joel Brobecker <brobecker@adacore.com>
10904
10905 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10906 confusion in comment.
10907
d631c5a7
JB
109082013-05-17 Joel Brobecker <brobecker@adacore.com>
10909
10910 * lynx-low.c (struct process_info_private): New type.
10911 (lynx_add_process): New function.
10912 (lynx_create_inferior, lynx_attach): Replace calls to
10913 add_process by calls to lynx_add_process.
10914 (lynx_resume): If PTID is null, then try using
10915 current_process()->private->last_wait_event_ptid.
10916 Add comments.
10917 (lynx_clear_inferiors): Delete. The contents of that function
10918 has been inlined in lynx_mourn;
10919 (lynx_wait_1): Save the ptid in the process's private data.
10920 (lynx_mourn): Free the process' private data. Replace call
10921 to lynx_clear_inferiors by call to clear_inferiors.
10922
96f7a20f
YQ
109232013-05-17 Yao Qi <yao@codesourcery.com>
10924
10925 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10926 the right place.
10927
db0dfaa0
LM
109282013-05-16 Luis Machado <lgustavo@codesourcery.com>
10929
10930 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10931 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10932 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10933 PT_TEXT_END_ADDR guards. Update comments.
10934 (linux_target_op) <read_offsets>: Conditionally define to
10935 linux_read_offsets if the target is UCLIBC and if it defines
10936 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10937
68f5f838
SL
109382013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10939 Andrew Jenner <andrew@codesourcery.com>
10940
10941 * Makefile.in (SFILES): Add linux-nios2-low.c.
10942 (clean): Add action to delete nios2-linux.c.
10943 (nios2-linux.c): New rule.
10944 * configure.srv: Add nios2*-*-linux*.
10945 * linux-nios2-low.c: New.
10946
1ebff1fd
HAQ
109472013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10948
10949 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10950
f6150862
HZ
109512013-04-25 Hui Zhu <hui@codesourcery.com>
10952
10953 PR gdb/15186
f6150862
HZ
10954 * ax.c (ax_printf): Add fflush.
10955
614c279d
TT
109562013-04-22 Tom Tromey <tromey@redhat.com>
10957
10958 * Makefile.in (SFILES): Add filestuff.c.
10959 (OBS): Add filestuff.o.
10960 (filestuff.o): New target.
10961 * config.in, configure: Rebuild.
10962 * configure.ac: Check for fdwalk, pipe2.
10963
7d4e5717
PA
109642013-04-17 Pedro Alves <palves@redhat.com>
10965
10966 * configure.ac (USE_THREAD_DB): Delete variable.
10967 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10968 Don't AC_SUBST USE_THREAD_DB.
10969 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10970 * config.in, configure: Regenerate.
10971
d5c93e41
PA
109722013-04-16 Pedro Alves <palves@redhat.com>
10973
10974 * linux-low.h (struct lwp_info) <thread_known>: Move under
10975 the USE_THREAD_DB #ifdef.
10976
04f5fe89
PA
109772013-04-16 Pedro Alves <palves@redhat.com>
10978
10979 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10980 (linux-low.o): Delete rule.
10981 * linux-low.h: Always include "gdb_thread_db.h" instead of
10982 conditionally including thread_db.h.
10983 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10984 HAVE_THREAD_DB_H.
10985
480b27bf
JK
109862013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10987
10988 * Makefile.in (install-only): Fix make install regression.
10989
43662968
JK
109902013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10991
10992 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10993 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10994 installation.
10995 * gdbserver.1: Remove.
10996
3e74e146
PA
109972013-03-22 Pedro Alves <palves@redhat.com>
10998
10999 * linux-low.c (handle_extended_wait): Don't call
11000 linux_enable_event_reporting.
11001
a8347a2a
TT
110022013-03-15 Tony Theodore <tonyt@logyst.com>
11003
11004 PR build/9098:
11005 * Makefile.in (SHELL): Use @SHELL@.
11006
eeb56fa7
SDJ
110072013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11008
11009 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11010 compiler warning.
11011
4fa7e2ff
JB
110122013-03-13 Joel Brobecker <brobecker@adacore.com>
11013
11014 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11015 Remove extraneous NULL element.
11016
8ddb1965
YQ
110172013-03-13 Yao Qi <yao@codesourcery.com>
11018
11019 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11020 'V' block in trace frame.
11021
9accd112
MM
110222013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11023
11024 * target.h (struct target_ops): Add btrace ops.
11025 (target_supports_btrace): New macro.
11026 (target_enable_btrace): New macro.
11027 (target_disable_btrace): New macro.
11028 (target_read_btrace): New macro.
11029 * gdbthread.h (struct thread_info): Add btrace field.
11030 * server.c: Include btrace-common.h.
11031 (handle_btrace_general_set): New function.
11032 (handle_btrace_enable): New function.
11033 (handle_btrace_disable): New function.
11034 (handle_general_set): Call handle_btrace_general_set.
11035 (handle_qxfer_btrace): New function.
11036 (struct qxfer qxfer_packets[]): Add btrace entry.
11037 * inferiors.c (remove_thread): Disable btrace.
11038 * linux-low: Include linux-btrace.h.
11039 (linux_low_enable_btrace): New function.
11040 (linux_low_read_btrace): New function.
11041 (linux_target_ops): Add btrace ops.
11042 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11043 Add srv_linux_btrace=yes.
11044 (x86_64-*-linux*): Add linux-btrace.o.
11045 Add srv_linux_btrace=yes.
11046 * configure.ac: Define HAVE_LINUX_BTRACE.
11047 * config.in: Regenerated.
11048 * configure: Regenerated.
11049
5cc22e4c
MM
110502013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11051
11052 * server.c (handle_qxfer): Preserve error message if -3 is
11053 returned.
11054 (qxfer): Document the -3 return value.
11055
7c97f91e
MM
110562013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11057
11058 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11059 (linux_btrace_h): New variable.
11060 (linux-btrace.o): New rule.
11061
be9a119c 110622013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
11063 Hafiz Abid Qadeer <abidh@codesourcery.com>
11064
11065 * tracepoint.c (trace_buffer_size): New global.
11066 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11067 (init_trace_buffer): Change to one-argument function. Allocate
11068 trace buffer memory.
11069 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11070 handle QTBuffer:size packet.
11071 (cmd_bigqtbuffer_size): New function.
11072 (initialize_tracepoint): Call init_trace_buffer with
11073 DEFAULT_TRACE_BUFFER_SIZE.
11074 * server.c (handle_query): Add QTBuffer:size in the
11075 supported packets.
11076
e64f7499
YQ
110772013-03-07 Yao Qi <yao@codesourcery.com>
11078
11079 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11080 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11081 of -1.
11082 (cmd_qtsp): Adjust condition. Do post increment.
11083 Set cur_action and cur_step_action back to 0.
11084
f0ae6fc3
PA
110852013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11086
11087 PR server/15236
11088 * linux-low.c (linux_write_memory): Return early success if LEN is
11089 zero.
11090
b5b0b0af
CV
110912013-03-05 Corinna Vinschen <vinschen@redhat.de>
11092
334ad4a8 11093 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 11094
589bc927
TT
110952013-02-28 Tom Tromey <tromey@redhat.com>
11096
11097 * configure.ac: Invoke AC_SYS_LARGEFILE.
11098 * configure, config.in: Rebuild.
11099
dfe07582
CV
111002013-02-28 Corinna Vinschen <vinschen@redhat.com>
11101
11102 * win32-low.c: Throughout, fix format strings and casts of
11103 printf-like functions to avoid type related warnings on all
11104 platforms.
11105 (get_child_debug_event): Print dwDebugEventCode as hex since
11106 that's how it's usually documented.
11107
736cd585
YQ
111082013-02-28 Yao Qi <yao@codesourcery.com>
11109
11110 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11111 pulongest.
11112
e1f58301
JW
111132013-02-27 Jiong Wang <jiwang@tilera.com>
11114
11115 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11116 (reg-tilegx32.c): New rule.
11117 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11118 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11119 different register info initializer according to elf class.
11120 (init_registers_tilgx32): New function. The tilegx32 register info
11121 initializer.
11122 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11123 (tile_store_gregset): Likewise.
11124
d171ca78
YQ
111252013-02-27 Yao Qi <yao@codesourcery.com>
11126
11127 * server.c (process_point_options): Print debug message when
11128 debug_threads is true.
11129
282bbdf3
YQ
111302013-02-26 Yao Qi <yao@codesourcery.com>
11131
11132 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11133
aca22551
PA
111342013-02-19 Pedro Alves <palves@redhat.com>
11135 Kai Tietz <ktietz@redhat.com>
11136
11137 PR gdb/15161
11138
11139 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11140 instead of strtoul to extract address from packet.
11141 (process_serial_event) <'z'>: Likewise.
11142
4f3cee1c
YQ
111432013-02-18 Yao Qi <yao@codesourcery.com>
11144
11145 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11146
8e1d55a3
PA
111472013-02-14 Pedro Alves <palves@redhat.com>
11148
11149 Plug memory leak.
11150
11151 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11152 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11153
458820da
PA
111542013-02-14 Pedro Alves <palves@redhat.com>
11155
11156 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11157
baea0dae
PA
111582013-02-14 Pedro Alves <palves@redhat.com>
11159
11160 * tracepoint.c (save_string): Delete.
11161 (add_tracepoint_action): Use savestring instead of save_string.
11162
0b1afbb3
PA
111632013-02-12 Pedro Alves <palves@redhat.com>
11164
11165 * linux-xtensa-low.c: Ditto.
11166 * xtensa-xtregs.c: Ditto.
11167
8a4ac37e
PA
111682013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11169
11170 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11171 thread_db.
11172
148de6bb
MS
111732013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11174
11175 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11176 aarch64_num_wp_regs and aarch64_num_bp_regs to
11177 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11178
55fac6e0
MS
111792013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11180
11181 * linux-aarch64-low.c (ps_get_thread_area): Replace
11182 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11183
176eb98c
MS
111842013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11185 Marcus Shawcroft <marcus.shawcroft@arm.com>
11186 Nigel Stephens <nigel.stephens@arm.com>
11187 Yufeng Zhang <yufeng.zhang@arm.com>
11188
11189 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11190 (aarch64.c, aarch64-without-fpu.c): New targets.
11191 * configure.srv (aarch64*-*-linux*): New.
11192 * linux-aarch64-low.c: New file.
11193
56f7af9c
MS
111942013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11195
43aaf8b6 11196 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
11197 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11198 (dequeue_one_deferred_signal, linux_resume_one_thread)
11199 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11200 (linux_tracefork_grandchild, linux_test_for_tracefork)
11201 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11202 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11203 where the argument is 0.
11204
60f662b0
YQ
112052013-01-25 Yao Qi <yao@codesourcery.com>
11206
11207 * event-loop.c: Include "queue.h".
11208 (gdb_event_p): New typedef.
11209 (struct gdb_event) <next_event>: Remove.
11210 (event_queue): Change to QUEUE(gdb_event_p).
11211 (async_queue_event): Remove.
11212 (gdb_event_xfree): New.
11213 (initialize_event_loop): New.
11214 (process_event): Use API from QUEUE.
11215 (wait_for_event): Likewise.
11216 * server.c (main): Call initialize_event_loop.
11217 * server.h (initialize_event_loop): Declare.
11218
5ae4861a
YQ
112192013-01-18 Yao Qi <yao@codesourcery.com>
11220
11221 * ax.h (struct eval_agent_expr_context): New.
11222 (gdb_eval_agent_expr): Update declaration.
11223 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11224 TFRAME. Add new argument CTX.
11225 * server.h (struct eval_agent_expr_context): Declare.
11226 (agent_mem_read, agent_tsv_read): Update declaration.
11227 (agent_mem_read_string): Likewise.
11228 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11229 (add_traceframe_block): Add new argument TPOINT.
11230 Increase TPOINT->traceframe_usage.
11231 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11232 eval_tracepoint_agent_expr.
11233 (condition_true_at_tracepoint): Likewise.
11234 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11235 (agent_mem_read_string, agent_tsv_read): Likewise.
11236
85e00e85
YQ
112372013-01-16 Yao Qi <yao@codesourcery.com>
11238
11239 * linux-low.c (linux_resume_one_lwp): Don't check
11240 'lwp->bp_reinsert != 0'.
11241
4039cf45
JB
112422013-01-07 Joel Brobecker <brobecker@adacore.com>
11243 Pedro Alves <palves@redhat.com>
11244
11245 * lynx-low.c (ptrace_request_to_str): Define a temporary
11246 macro and use it to simplify this function's implementation.
11247
9044dee2
JB
112482013-01-07 Joel Brobecker <brobecker@adacore.com>
11249
11250 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11251 sets errno.
11252
e6352c8f
JB
112532013-01-07 Joel Brobecker <brobecker@adacore.com>
11254
11255 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11256
50681a27
JB
112572013-01-07 Joel Brobecker <brobecker@adacore.com>
11258
11259 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11260
3f6e77ef
JB
112612013-01-07 Joel Brobecker <brobecker@adacore.com>
11262
11263 * lynx-low.c (lynx_resume): Use the resume_info parameter
11264 to determine the ptid for the lynx_ptrace call, unless
11265 it is equal to minus_one_ptid, in which case we use the
11266 ptid of the current_inferior.
11267 (lynx_wait_1): After having received a thread create/exit
11268 event, resume the inferior's execution using the signaling
11269 thread's ptid, rather than the old ptid.
11270
7fda33ae
JB
112712013-01-07 Joel Brobecker <brobecker@adacore.com>
11272
11273 * lynx-low.c (lynx_resume): Delete variable ret.
11274
b9786c74
JB
112752013-01-01 Joel Brobecker <brobecker@adacore.com>
11276
11277 * gdbreplay.c (gdbreplay_version): Update copyright year.
11278 * server.c (gdbserver_version): Likewise.
11279
8b93d60f
JB
112802012-12-17 Joel Brobecker <brobecker@adacore.com>
11281
11282 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11283 new thread.
11284
037335a7
JB
112852012-12-17 Joel Brobecker <brobecker@adacore.com>
11286
11287 * lynx-low.c (ptrace_request_to_str): Add handling for
11288 PTRACE_GETTRACESIG.
11289
52d4cbd8
JB
112902012-12-17 Joel Brobecker <brobecker@adacore.com>
11291
11292 * lynx-low.c (lynx_attach): Delete variable new_process.
11293
ab8f6ca9
JB
112942012-12-17 Joel Brobecker <brobecker@adacore.com>
11295
11296 * lynx-low.c (lynx_create_inferior): Delete variable
11297 new_process.
11298
78cbc024
JB
112992012-12-17 Joel Brobecker <brobecker@adacore.com>
11300
11301 * lynx-low.c (ptrace_request_to_str): Do not handle
11302 PTRACE_GETTHREADLIST if this macro does not exist.
11303
14a00470
YQ
113042012-12-15 Yao Qi <yao@codesourcery.com>
11305
11306 * Makefile.in (OBS): Add notif.o.
11307 * notif.c, notif.h: New.
11308 * server.c: Include "notif.h".
11309 (struct vstop_notif) <next>: Remove.
11310 <base>: New field.
11311 (queue_stop_reply): Update.
11312 (push_event, send_next_stop_reply): Remove.
11313 (discard_queued_stop_replies): Update.
11314 (notif_stop): New variable.
11315 (handle_v_stopped): Remove.
11316 (handle_v_requests): Don't call handle_v_stopped. Call
11317 handle_ack_notif instead.
11318 (queue_stop_reply_callback): Call notif_event_enque instead
11319 of queue_stop_reply.
11320 (handle_status): Don't call send_next_stop_reply, call
11321 notif_write_event instead.
11322 (kill_inferior_callback): Likewise.
11323 (detach_or_kill_inferior_callback): Likewise.
11324 (main): Call initialize_notif.
11325 (process_serial_event): Call QUEUE_is_empty.
11326 (handle_target_event): Call notif_push instead of push event.
11327 * server.h (push_event): Remove declaration.
11328
61c125b9
TT
113292012-12-10 Tom Tromey <tromey@redhat.com>
11330
11331 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11332 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11333 macros.
11334 (.c.o): Rewrite.
11335 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11336 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11337 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11338 (amd64-linux-ipa.o, ax.o): Rewrite.
11339 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11340 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11341 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11342 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11343 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11344 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11345 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11346 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11347 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11348 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11349 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11350 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11351 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11352 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11353 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11354 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11355 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11356 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11357 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11358 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11359 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11360 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11361 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11362 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11363 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11364 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11365 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11366 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11367 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11368 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11369 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11370 (reg-tilegx.o): Remove.
11371 (all_object_files): New macro.
11372 Include .deps files.
11373 * aclocal.m4, configure: Rebuild.
11374 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11375 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11376 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11377
e90e9ad9
TT
113782012-12-05 Tom Tromey <tromey@redhat.com>
11379
11380 PR gdb/14917:
11381 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11382
02d403bf 113832012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
11384
11385 * configure.ac: Check for linux/perf_event.h.
11386 * config.in: Regenerated.
11387 * configure: Regenerated.
11388
0270a750
PA
113892012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11390
11391 * hostio.c (handle_readlink): Decrease buffer size
11392 parameter passed to readlink by one byte.
11393
8c29b58e
YQ
113942012-11-26 Yao Qi <yao@codesourcery.com>
11395
11396 * configure.ac (build_warnings): Append '-Wempty-body'.
11397 * configure: Regenerated.
11398 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11399 body.
11400
8bdce1ff
PM
114012012-11-15 Pierre Muller <muller@sourceware.org>
11402
11403 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11404 * config.in: Regenerate.
11405 * configure: Regenerate.
11406 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11407 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11408 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11409 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11410 header.
11411 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11412 instead of <sys/wait.h> header.
11413 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11414
02d403bf 114152012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11416
11417 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11418 (various make rules): Remove -DGDBSERVER
11419
fbd5db48
YQ
114202012-11-09 Yao Qi <yao@codesourcery.com>
11421
11422 * spu-low.c (current_ptid): Move it to ..
11423 * gdbthread.h: ... here. New.
11424 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11425 * server.c (myresume, process_serial_event): Likewise.
11426 * thread-db.c (thread_db_find_new_threads): Likewise.
11427 * tracepoint.c (run_inferior_command): Likewise.
11428
b3dc46ff
AB
114292012-10-01 Andrew Burgess <aburgess@broadcom.com>
11430
11431 * server.c (handle_search_memory_1): Include access length in
11432 warning message.
11433
07c04788
HPN
114342012-09-05 Michael Brandt <michael.brandt@axis.com>
11435
11436 * linux-crisv32-low.c: Fix compile errors.
11437
918d227b
YQ
114382012-09-04 Yao Qi <yao@codesourcery.com>
11439
11440 * tracepoint.c (cmd_qtsv): Adjust debug message.
11441 Don't check CUR_TPOINT.
11442
18c1b81a
YQ
114432012-08-28 Yao Qi <yao@codesourcery.com>
11444
11445 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11446 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11447 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11448 Remove declarations of xmalloc, xreallloc, xstrdup and
11449 freeargv.
11450 * Makefile.in (libiberty_h): New.
11451 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11452 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11453
dc82f37b
YQ
114542012-08-23 Yao Qi <yao@codesourcery.com>
11455
11456 * server.h: Remove declaration of 'xsnprintf'.
11457
406b1477
KS
114582012-08-22 Keith Seitz <keiths@redhat.com>
11459
11460 * server.h: Include build-gnulib-gbserver/config.h.
11461 * gdbreplay.c: Likewise.
11462
e6712ff1
DE
114632012-08-08 Doug Evans <dje@google.com>
11464
11465 * Makefile.in (SFILES): Add gdb_vecs.c.
11466 (OBS): Add gdb_vecs.o.
11467 (gdb_vecs_h, host_defs_h): New variables.
11468 (thread-db.o): Add $(gdb_vecs_h) dependency.
11469 (gdb_vecs.o): New rule.
11470 * thread-db.c: #include "gdb_vecs.h".
11471 (thread_db_load_search): Use a vector to iterate over path elements.
11472 Handle text appearing after "$pdir".
11473
11474 * configure.ac: Add check for strstr.
11475 * config.in: Regenerate.
11476 * configure: Regenerate.
11477
7c3270ae
UW
114782012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11479
11480 * hostio.c (handle_pread): If pread fails, fall back to attempting
11481 lseek/read.
11482 (handle_pwrite): Likewise for pwrite.
11483
b62e2b27
UW
114842012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11485
11486 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11487 between unsupported TYPE and unimplementable ADDR/LEN combination.
11488 (arm_insert_point): Act on new return value.
11489
78a99e91
PA
114902012-07-31 Pedro Alves <palves@redhat.com>
11491
11492 * server.c (process_point_options): Only skip tokens if we find
11493 one that is unrecognized. Don't treat 'X' specially while
11494 skipping unrecognized tokens.
11495
fcf303ab
UW
114962012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11497
11498 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11499 to 4-byte-align HW breakpoint addresses for Thumb.
11500
7255706c
YQ
115012012-07-27 Yao Qi <yao@codesourcery.com>
11502
11503 PR remote/14161.
11504
11505 * server.h: Declare gdb_agent_about_to_close.
11506 * target.c (kill_inferior): Include "agent.h".
11507 New. Send command 'kill'.
11508 * target.h (kill_inferior): Removed macro.
11509 * tracepoint.c (gdb_agent_about_to_close): New.
11510 (gdb_agent_helper_thread): Handle command 'close'.
11511 Wait endlessly until the inferior stops.
11512 Install gdb_agent_remove_socket to atexit hook.
11513 (agent_socket_name): New static variable.
11514 (gdb_agent_socket_init): Replace local variable 'name' with
11515 'agent_socket_name'.
11516 (gdb_agent_remove_socket): New.
11517
5a3f286f
YQ
115182012-07-27 Yao Qi <yao@codesourcery.com>
11519
11520 * server.c (process_point_options): Stop at 'X' when parsing.
11521
961bd387
ME
115222012-07-19 Michael Eager <eager@eagercon.com>
11523
a261b8f5 11524 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
11525 to hw_execute.
11526 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11527 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11528 hardware breakpoint.
11529
aa7c7447
JK
115302012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11531
11532 * gdbserver/linux-low.c (initialize_low): Call
11533 linux_ptrace_init_warnings.
11534
7f216e7c
DE
115352012-07-02 Doug Evans <dje@google.com>
11536
11537 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11538 pointer to int.
11539
d3ce09f5
SS
115402012-07-02 Stan Shebs <stan@codesourcery.com>
11541
11542 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11543 (ax.o): Add it to build rule.
11544 (ax-ipa.o): Ditto.
11545 (OBS): Add format.o.
11546 (IPA_OBS): Add format.o.
11547 * server.c (handle_query): Claim support for breakpoint commands.
11548 (process_point_options): Add command case.
11549 (process_serial_event): Leave running if there are printfs in
11550 effect.
11551 * mem-break.h (any_persistent_commands): Declare.
11552 (add_breakpoint_commands): Declare.
11553 (gdb_no_commands_at_breakpoint): Declare.
11554 (run_breakpoint_commands): Declare.
11555 * mem-break.c (struct point_command_list): New struct.
11556 (struct breakpoint): New field command_list.
11557 (any_persistent_commands): New function.
11558 (add_commands_to_breakpoint): New function.
11559 (add_breakpoint_commands): New function.
11560 (gdb_no_commands_at_breakpoint): New function.
11561 (run_breakpoint_commands): New function.
11562 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11563 locally.
11564 * ax.c: Include format.h.
11565 (ax_printf): New function.
11566 (gdb_eval_agent_expr): Add printf opcode.
11567
2f8f6aed
YQ
115682012-06-13 Yao Qi <yao@codesourcery.com>
11569
11570 * server.c (start_inferior): Remove duplicated writes to fields
11571 'last_resume_kind' and 'last_status' of 'current_inferior'.
11572
0c9070b3
YQ
115732012-06-12 Yao Qi <yao@codesourcery.com>
11574 Pedro Alves <palves@redhat.com>
11575
11576 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11577 comment.
11578 * server.c (handle_v_cont): Extend comment.
11579
c52daf70
YQ
115802012-06-11 Yao Qi <yao@codesourcery.com>
11581
11582 * linux-low.c (linux_attach): Add 'static'.
11583
d38bbb0a
YQ
115842012-06-06 Yao Qi <yao@codesourcery.com>
11585
11586 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11587
89dc0afd
JK
115882012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11589
11590 Fix gcc -flto compilation warning.
11591 * server.c (main): Make variable multi_mode and attach volatile.
11592
75f62ce7
TJB
115932012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11594
11595 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11596 if the platform doesn't know about it.
11597
65f479b6
PA
115982012-05-30 Jeff Kenton <jkenton@tilera.com>
11599
11600 * Makefile.in (SFILES): Add linux-tile-low.c.
11601 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11602 * configure.srv: Handle tilegx-*-linux*.
11603 * linux-tile-low.c: New file.
11604
0c5bf5a9
JK
116052012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11606
11607 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11608
a493e3e2
PA
116092012-05-24 Pedro Alves <palves@redhat.com>
11610
11611 PR gdb/7205
11612
43aaf8b6 11613 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11614
2ea28649
PA
116152012-05-24 Pedro Alves <palves@redhat.com>
11616
11617 PR gdb/7205
11618
11619 Replace target_signal with gdb_signal throughout.
11620
8d409d16
MR
116212012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11622
11623 * linux-low.c (linux_store_registers): Avoid the copying sequence
11624 when no data has been retrieved by ptrace.
11625
23512c01
MGD
116262012-05-22 Will Deacon <will.deacon@arm.com>
11627
11628 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11629 Include asm/ptrace.h.
11630 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11631 already defined.
11632
4934b29e
MR
116332012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11634
11635 * linux-low.c (linux_store_registers): Don't re-retrieve data
11636 with ptrace that has already been obtained from /proc. Always
11637 copy any data retrieved with ptrace to the buffer supplied.
11638
bde24c0a
PA
116392012-05-11 Yao Qi <yao@codesourcery.com>
11640 Pedro Alves <palves@redhat.com>
11641
11642 * linux-low.c (enum stopping_threads_kind): New.
11643 (stopping_threads): Change type to `enum stopping_threads_kind'.
11644 (handle_extended_wait): If stopping and suspending threads, leave
11645 the new_lwp suspended too.
11646 (linux_wait_for_event): Adjust.
11647 (stop_all_lwps): Set `stopping_threads' to
11648 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11649 whether we're suspending threads or just stopping them. Assert no
11650 recursion happens.
11651
623b6bdf
YQ
116522012-04-29 Yao Qi <yao@codesourcery.com>
11653
11654 * server.h: Move some code to ...
11655 * gdbthread.h: ... here. New.
11656 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11657 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11658 (nto-low.o, win32-low.o): Likewise.
11659 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11660 * regcache.c, remote-utils.c, server.c: Likewise.
11661 * target.c, tracepoint.c, win32-low.c: Likewise.
11662
f15f9948
TJB
116632012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11664
11665 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11666 (PTRACE_ARG4_TYPE): Likewise.
11667 (PTRACE_XFER_TYPE): Likewise.
11668 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11669 ptrace to PTRACE_ARG3_TYPE.
11670 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11671 (PTRACE_ARG4_TYPE): Likewise.
11672 (PTRACE_XFER_TYPE): Likewise.
11673 (linux_detach_one_lwp): Cast fourth argument of
11674 ptrace to long then PTRACE_ARG4_TYPE.
11675 (regsets_fetch_inferior_registers): Cast third argument of
11676 ptrace to long then PTRACE_ARG3_TYPE.
11677 (regsets_store_inferior_registers): Likewise.
11678
38ea300a
PA
116792012-04-20 Pedro Alves <palves@redhat.com>
11680
11681 * configure: Regenerate.
11682
c971b7fa
PA
116832012-04-19 Pedro Alves <palves@redhat.com>
11684
43aaf8b6 11685 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11686 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11687 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11688 (all, install-only, uninstall, clean-info, all-lib, clean): No
11689 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11690 (maintainer-clean realclean distclean): Use subdir_do.
11691 (subdir_do): New.
11692 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11693 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11694 * acinclude.m4: Include acx_configure_dir.m4.
11695 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11696 calls. Call AC_PROG_RANLIB. Configure gnulib using
11697 ACX_CONFIGURE_DIR.
11698 (GNULIB): New.
11699 (GNULIB_STDINT_H): Adjust.
11700 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11701 * gdbreplay.c: Include build-gnulib/config.h.
11702 * server.h: Likewise.
11703 * aclocal.m4: Regenerate.
11704 * config.in: Regenerate.
11705 * configure: Regenerate.
c971b7fa 11706
809277f8
PA
117072012-04-19 Pedro Alves <palves@redhat.com>
11708
11709 * Makefile.in (LIBGNU, INCGNU): Adjust.
11710 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11711 (all, install-only, uninstall, clean-info, all-lib, clean)
11712 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11713 * configure.ac: Adjust AC_OUTPUT output.
11714 * aclocal.m4: Regenerate.
11715 * configure: Regenerate.
11716
fd9bb8b8
PA
117172012-04-19 Pedro Alves <palves@redhat.com>
11718
11719 * Makefile.in (generated_files): New.
11720 (server_h): Remove the explicit dependency on config.h, and depend
11721 on $generated_files.
11722
1c298c66
PA
117232012-04-19 Pedro Alves <palves@redhat.com>
11724
11725 * Makefile.in (INCGNU): Add -Ignulib.
11726
57c4b50b
PA
117272012-04-19 Pedro Alves <palves@redhat.com>
11728
11729 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11730 (INCGNU): ... this, and spell out -I here.
11731 (GNULIB_LIB): Rename to ...
11732 (LIBGNU): ... this.
11733 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11734
1030e047
PA
117352012-04-19 Pedro Alves <palves@redhat.com>
11736
11737 * config.in: Regenerate.
11738
447d4319
PA
117392012-04-19 Pedro Alves <palves@redhat.com>
11740
11741 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11742 * server.h (memmem): Remove declaration.
11743 * config.in: Regenerate.
11744 * configure: Regenerate.
11745
aad9eab9
YQ
117462012-04-19 Yao Qi <yao@codesourcery.com>
11747
11748 * Makefile.in (SFILES): Add common/vec.c.
11749 (OBS): Add vec.o.
11750 (vec.o): New rule.
11751
3e10640f
YQ
117522012-04-19 Yao Qi <yao@codesourcery.com>
11753
11754 * remote-utils.c (prepare_resume_reply): Replace with macro
11755 target_core_of_thread.
11756 * server.c (handle_qxfer_threads_proper): Likewise.
11757 * target.h (traget_core_of_thread): New macro.
11758
71622373
PA
117592012-04-18 Pedro Alves <palves@redhat.com>
11760
11761 * aclocal.m4: Regenerate.
11762 * configure: Regenerate.
11763
80d26939
YQ
117642012-04-16 Yao Qi <yao@codesourcery.com>
11765
11766 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11767 duplicated on address.
11768
42476b70
YQ
117692012-04-16 Yao Qi <yao@codesourcery.com>
11770
11771 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11772 (struct tracepoint_action_ops) <send>: New field.
11773 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11774 (agent_expr_send, x_tracepoint_action_send): New.
11775 (l_tracepoint_action_send): New.
11776 (cmd_qtdp): Download and install tracepoint
11777 according to `use_agent'.
11778 (run_inferior_command): Add one more parameter `len'.
11779 Update callers.
11780 (tracepoint_send_agent): New.
11781 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11782
7bc83639
YQ
117832012-04-16 Yao Qi <yao@codesourcery.com>
11784
11785 * tracepoint.c (download_tracepoints): Moved to ...
11786 (cmd_qtstart): ... here.
11787
5f18041e
YQ
117882012-04-14 Yao Qi <yao@codesourcery.com>
11789
11790 * tracepoint.c: Include inttypes.h.
11791 (struct collect_memory_action): Use sized types.
11792 (struct tracepoint): Likewise.
11793 (cmd_qtdp, stop_tracing): Update print specifiers.
11794 (cmd_qtp, response_tracepoint): Likewise.
11795 (collect_data_at_tracepoint): Likewise.
11796 (collect_data_at_step): Likewise.
11797
55a8c076
YQ
117982012-04-14 Yao Qi <yao@codesourcery.com>
11799
11800 Import gnulib module inttypes.
11801 * aclocal.m4, config.in, configure: Regenerated.
11802
dc750257
YQ
118032012-04-14 Yao Qi <yao@codesourcery.com>
11804
11805 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11806 Makefile and config.status at last.
11807
0ab5faf9
YQ
118082012-04-13 Yao Qi <yao@codesourcery.com>
11809
11810 * tracepoint.c: Include stdint.h unconditionally.
11811
18f5fd81
TJB
118122012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11813
11814 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11815 on BFD_HAVE_SYS_PROCFS_TYPE.
11816 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11817 * configure: Regenerate.
11818 * config.in: Likewise.
11819
4d47af5c
L
118202012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11821
11822 * Makefile.in (clean): Also remove x32.c x32-linux.c
11823 x32-avx.c x32-avx-linux.c.
11824 (x32.o): New target.
11825 (x32.c): Likewise.
11826 (x32-linux.o): Likewise.
11827 (x32-linux.c): Likewise.
11828 (x32-avx.o): Likewise.
11829 (x32-avx.c): Likewise.
11830 (x32-avx-linux.o): Likewise.
11831 (x32-avx-linux.c): Likewise.
11832
11833 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11834 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11835 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11836 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11837 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11838 i386/x32-avx-linux.xml.
11839
11840 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11841 (init_registers_x32_avx_linux): Likwise.
11842 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11843 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11844
ecedbe58
PA
118452012-04-13 Pedro Alves <palves@redhat.com>
11846
11847 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11848 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11849 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11850 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11851 the sub-make.
11852
c92b5177
L
118532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11854
11855 * linux-x86-low.c (compat_x32_clock_t): New.
11856 (compat_x32_siginfo_t): Likewise.
11857 (compat_x32_siginfo_from_siginfo): Likewise.
11858 (siginfo_from_compat_x32_siginfo): Likewise.
11859 (linux_is_elf64): Likewise.
11860 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11861 and siginfo_from_compat_x32_siginfo for x32.
11862 (x86_arch_setup): Set linux_is_elf64.
11863
214d508e
L
118642012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11865
11866 PR gdb/13969
11867 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11868 e_machine field.
11869 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11870 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11871 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11872 compatible with process.
11873
c9a1864a
YQ
118742012-04-12 Yao Qi <yao@codesourcery.com>
11875
11876 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11877 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11878 (install-only, install-info, clean): Handle sub dir gnulib.
11879 (all-lib, am--refresh): New targets.
11880 (memmem.o): Remove target.
11881 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11882 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11883 (AC_REPLACE_FUNCS): Remove memmem.
11884 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11885 (AC_OUTPUT): Generate Makefile in gnulib/.
11886 * aclocal.m4, config.in, configure: Regenerated.
11887
367ba2c2
MR
118882012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11889
11890 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11891
9d236627
PA
118922012-04-05 Pedro Alves <palves@redhat.com>
11893
11894 -Werror=strict-aliasing
11895
11896 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11897 pointer.
11898
111217b3
PA
118992012-04-04 Pedro Alves <palves@redhat.com>
11900
11901 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11902 (sparc_store_gregset_from_stack, sparc_store_gregset)
11903 (sparc_breakpoint_at): Fix formatting.
11904
8365dcf5
TJB
119052012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11906
11907 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11908 are available.
11909 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11910 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11911 * config.in: Regenerate.
11912 * configure: Likewise.
11913
689cc2ae
PA
119142012-03-29 Pedro Alves <palves@redhat.com>
11915
11916 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11917 Correct ptrace arguments.
11918
c14dfd32
PA
119192012-03-28 Pedro Alves <palves@redhat.com>
11920
11921 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11922 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11923 (IA64_FR1_REGNUM): New defines.
11924 (ia64_fetch_register): New.
11925 (the_low_target): Install it.
11926 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11927 field.
11928 * linux-low.c (linux_fetch_registers): Try the
11929 the_low_target.fetch_register hook first.
11930
11931 * linux-arm-low.c (the_low_target): Adjust.
11932 * linux-bfin-low.c (the_low_target): Adjust.
11933 * linux-cris-low.c (the_low_target): Adjust.
11934 * linux-crisv32-low.c (the_low_target): Adjust.
11935 * linux-m32r-low.c (the_low_target): Adjust.
11936 * linux-m68k-low.c (the_low_target): Adjust.
11937 * linux-mips-low.c (the_low_target): Adjust.
11938 * linux-ppc-low.c (the_low_target): Adjust.
11939 * linux-s390-low.c (the_low_target): Adjust.
11940 * linux-sh-low.c (the_low_target): Adjust.
11941 * linux-sparc-low.c (the_low_target): Adjust.
11942 * linux-tic6x-low.c (the_low_target): Adjust.
11943 * linux-x86-low.c (the_low_target): Adjust.
11944 * linux-xtensa-low.c (the_low_target): Adjust.
11945
63c88e13
PA
119462012-03-26 Pedro Alves <palves@redhat.com>
11947
11948 * server.c (handle_qxfer_libraries): Don't bail early if
11949 the_target->qxfer_libraries_svr4 is not NULL.
11950
fb723180
PA
119512012-03-26 Pedro Alves <palves@redhat.com>
11952
11953 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11954
0afae3cf
PA
119552012-03-23 Pedro Alves <palves@redhat.com>
11956
11957 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11958 "library-list-svr4" element's start tag when the the DSO list is
11959 empty.
11960
485f1ee4
PA
119612012-03-23 Pedro Alves <palves@redhat.com>
11962
11963 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11964 a variable whose type size is the same as the inferior's pointer
11965 size.
11966
a5362b9a
TS
119672012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11968
11969 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11970 struct siginfo.
11971 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11972 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11973 * linux-low.h: Include <signal.h>.
11974 (struct siginfo): Remove forward declaration.
11975 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11976 struct siginfo.
11977
d226c142
MF
119782012-03-21 Mike Frysinger <vapier@gentoo.org>
11979
11980 * .gitignore: Ignore more files.
11981
122f36ef
PA
119822012-03-19 Pedro Alves <palves@redhat.com>
11983 Jan Kratochvil <jan.kratochvil@redhat.com>
11984
11985 * server.c (cont_thread, general_thread): Add describing comments.
11986 (start_inferior): Clear `cont_thread'.
11987 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11988 of a process.
11989
fc3e5175
YQ
119902012-03-15 Yao Qi <yao@codesourcery.com>
11991
11992 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11993 handling to ...
11994 (cmd_qtdp): ... here.
11995
8d0d92cd
YQ
119962012-03-15 Yao Qi <yao@codesourcery.com>
11997
11998 * tracepoint.c (struct tracepoint_action_ops): New.
11999 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12000 (m_tracepoint_action_download): New.
12001 (r_tracepoint_action_download): New.
12002 (x_tracepoint_action_download): New.
12003 (l_tracepoint_action_download): New.
12004 (add_tracepoint_action): Install `action->ops' according type.
12005 (download_tracepoint_1): Move code `download' function pointer
12006 of various tracepoint_action_ops.
12007
87b0bb13
JK
120082012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12009
12010 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12011 linux_ptrace_attach_warnings.
12012
5f572dec
JK
120132012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12014
12015 * Makefile.in (linux-ptrace.o): New.
12016 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12017 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12018 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12019 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12020 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12021 of these targets.
12022 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12023
f4647387
YQ
120242012-03-08 Yao Qi <yao@codesourcery.com>
12025 Pedro Alves <palves@redhat.com>
12026
12027 Fix PR server/13392.
12028 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12029 offset of JMP insn.
12030 * tracepoint.c (remove_tracepoint): New.
12031 (cmd_qtdp): Call remove_tracepoint when failed to install.
12032
9b224c5e
PA
120332012-03-07 Pedro Alves <palves@redhat.com>
12034
12035 * linux-low.c (get_detach_signal): New.
12036 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12037 Pass on pending signals to PTRACE_DETACH. Check the result of the
12038 ptrace call.
12039 * server.c (program_signals, program_signals_p): New.
12040 (handle_general_set): Handle QProgramSignals.
12041 * server.h (program_signals, program_signals_p): Declare.
12042
e237a7e2
JK
120432012-03-05 Pedro Alves <palves@redhat.com>
12044 Jan Kratochvil <jan.kratochvil@redhat.com>
12045
12046 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12047 New comment why.
12048
5808517f
YQ
120492012-03-03 Yao Qi <yao@codesourcery.com>
12050
12051 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12052 agent_look_up_symbols.
12053
58b4daa5
YQ
120542012-03-03 Yao Qi <yao@codesourcery.com>
12055
12056 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12057 (linux-x86-low.o): Likewise.
12058 * server.h: Remove in_process_agent_loaded.
12059 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12060 common/agent.c.
12061 Update callers.
12062
8ffcbaaf
YQ
120632012-03-03 Yao Qi <yao@codesourcery.com>
12064
12065 * tracepoint.c (gdb_agent_capability): New global.
12066 (in_process_agent_loaded_ust): Renamed to
12067 `in_process_agent_supports_ust'.
12068 Update callers.
12069 (in_process_agent_supports_ust): Call agent_capability_check.
12070 (clear_installed_tracepoints): Assert that agent supports
12071 agent.
12072
d1feda86
YQ
120732012-03-03 Yao Qi <yao@codesourcery.com>
12074
12075 * linux-low.c (linux_supports_agent): New.
12076 (linux_target_ops): Initialize field `supports_agent' with
12077 linux_supports_agent.
12078 * target.h (struct target_ops) <supports_agent>: New.
12079 (target_supports_agent): New macro.
12080 * server.c (handle_general_set): Handle packet 'QAgent'.
12081 (handle_query): Send `QAgent+'.
12082 * Makefile.in (server.o): Depends on agent.h.
12083
2fa291ac
YQ
120842012-03-03 Yao Qi <yao@codesourcery.com>
12085
12086 * Makefile.in (OBS): Add agent.o.
12087 Add new rule for agent.o.
12088 Track dependence of tracepoint.c on agent.h.
12089 * tracepoint.c (run_inferior_command_1):
12090 (run_inferior_command): Call agent_run_command.
12091 (gdb_ust_connect_sync_socket): Deleted. Move it to
12092 common/agent.c.
12093 (resume_thread, stop_thread): Likewise.
12094 (gdb_ust_socket_init): Renamed to ...
12095 (gdb_agent_socket_init): ... New.
12096 (gdb_ust_thread): Renamed to ...
12097 (gdb_agent_helper_thread): ... New.
12098 (gdb_ust_init): Move some code to ...
12099 (gdb_agent_init): ... here. New.
12100 [HAVE_UST]: Call gdb_ust_init.
12101 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12102 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12103 * config.in, configure: Regenerated.
12104
05044653
PA
121052012-03-02 Pedro Alves <palves@redhat.com>
12106
12107 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12108 * linux-low.c (struct simple_pid_list): New.
12109 (stopped_pids): New a struct simple_pid_list pointer.
12110 (add_to_pid_list, pull_pid_from_list): New.
12111 (handle_extended_wait): Don't assume the first signal new children
12112 report is SIGSTOP. Adjust call to pull_pid_from_list.
12113 (linux_wait_for_lwp): Adjust.
12114
8d00225b
YQ
121152012-03-02 Yao Qi <yao@codesourcery.com>
12116
12117 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12118 debug log.
12119
19560ba5
YQ
121202012-03-02 Yao Qi <yao@codesourcery.com>
12121
12122 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12123 `stop_pc' and `tpoint'. Update caller.
12124
1faeff08
MR
121252012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12126
12127 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12128 * linux-low.c (use_linux_regsets): New macro.
12129 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12130 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12131 (linux_register_in_regsets): New function.
12132 (usr_fetch_inferior_registers): Skip registers covered by
12133 regsets.
12134 (usr_store_inferior_registers): Likewise.
12135 (usr_fetch_inferior_registers): New macro.
12136 (usr_store_inferior_registers): Likewise.
12137 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12138 (linux_store_registers): Likewise.
12139 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12140 prototype.
12141 (init_registers_mips64_dsp_linux): Likewise.
12142 (init_registers_mips_linux): New macro.
12143 (init_registers_mips_dsp_linux): Likewise.
12144 (mips_dsp_num_regs): Likewise.
12145 (DSP_BASE, DSP_CONTROL): New fallback macros.
12146 (mips_base_regs): New macro.
12147 (mips_regmap): Use it. Fix the size.
12148 (mips_dsp_regmap): New variable.
12149 (mips_dsp_regset_bitmap): Likewise.
12150 (mips_arch_setup): New function.
12151 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12152 than mips_regmap.
12153 (mips_cannot_store_register): Likewise.
12154 (the_low_target): Update .arch_setup, .num_regs and .regmap
12155 initializers. Add .regset_bitmap initializer.
12156 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12157 initializer.
12158 * linux-bfin-low.c (the_low_target): Likewise.
12159 * linux-cris-low.c (the_low_target): Likewise.
12160 * linux-crisv32-low.c (the_low_target): Likewise.
12161 * linux-ia64-low.c (the_low_target): Likewise.
12162 * linux-m32r-low.c (the_low_target): Likewise.
12163 * linux-m68k-low.c (the_low_target): Likewise.
12164 * linux-ppc-low.c (the_low_target): Likewise.
12165 * linux-s390-low.c (the_low_target): Likewise.
12166 * linux-sh-low.c (the_low_target): Likewise.
12167 * linux-sparc-low.c (the_low_target): Likewise.
12168 * linux-tic6x-low.c (the_low_target): Likewise.
12169 * linux-x86-low.c (the_low_target): Likewise.
12170 * linux-xtensa-low.c (the_low_target): Likewise.
12171 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12172 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12173 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12174 srv_xmlfiles.
12175 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12176 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12177
c03e6ccc
YQ
121782012-02-29 Yao Qi <yao@codesourcery.com>
12179 Pedro Alves <palves@redhat.com>
12180
12181 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12182 `step_over_finished' is true.
12183
644cebc9
PA
121842012-02-27 Pedro Alves <palves@redhat.com>
12185
12186 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12187 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12188
c14d7ab2
PA
121892012-02-27 Pedro Alves <palves@redhat.com>
12190
12191 PR server/9684
12192 * linux-low.c (pid_is_stopped): New.
12193 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12194
412c89dd
LM
121952012-02-25 Luis Machado <lgustavo@codesourcery.com>
12196
12197 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12198 of conditions.
12199
b745defe
MR
122002012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12201
12202 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12203
9f3a5c85
LM
122042012-02-24 Luis Machado <lgustavo@codesourcery>
12205
12206 * server.c (handle_query): Advertise support for target-side
12207 breakpoint condition evaluation.
12208 (process_point_options): New function.
12209 (process_serial_event): When inserting a breakpoint, check for
12210 a target-side condition that should be evaluated.
12211
12212 * mem-break.c: Include regcache.h and ax.h.
12213 (point_cond_list_t): New data structure.
12214 (breakpoint) <cond_list>: New field.
12215 (find_gdb_breakpoint_at): Make non-static.
12216 (delete_gdb_breakpoint_at): Clear any target-side
12217 conditions.
12218 (clear_gdb_breakpoint_conditions): New function.
12219 (add_condition_to_breakpoint): Likewise.
12220 (add_breakpoint_condition): Likewise.
12221 (gdb_condition_true_at_breakpoint): Likewise.
12222 (gdb_breakpoint_here): Return result directly instead
12223 of going through a local variable.
12224
12225 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12226 (clear_gdb_breakpoint_conditions): Likewise.
12227 (add_breakpoint_condition): Likewise.
12228 (gdb_condition_true_at_breakpoint): Likewise.
12229
12230 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12231 (need_step_over_p): Take target-side breakpoint condition into
12232 consideration.
12233
5e1dc496
LM
122342012-02-24 Luis Machado <lgustavo@codesourcery>
12235
12236 * server.h: Include tracepoint.h.
12237 (agent_mem_read, agent_get_trace_state_variable_value,
12238 agent_set_trace_state_variable_value,
12239 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12240 get_set_tsv_func_addr): New prototypes.
12241
12242 * ax.h: New include file.
12243 * ax.c: New source file.
12244
12245 * tracepoint.c: Include ax.h.
12246 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12247 agent_expr, eval_result_type): Move to ax.h.
12248 (parse_agent_expr): Rename to ...
12249 (gdb_parse_agent_expr): ... this, make it non-static and move
12250 to ax.h.
12251 (unparse_agent_expr) Rename to ...
12252 (gdb_unparse_agent_expr): ... this, make it non-static and move
12253 to ax.h.
12254 (eval_agent_expr): Rename to ...
12255 (eval_tracepoint_agent_expr): ... this.
12256 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12257 forward declarations.
12258 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12259 (agent_get_trace_state_variable_value): New function.
12260 (agent_set_trace_state_variable_value): New function.
12261 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12262 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12263 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12264 (condition_true_at_tracepoint): Likewise.
12265 (parse_agent_expr): Rename to ...
12266 (gdb_parse_agent_expr): ... this and move to ax.c.
12267 (unparse_agent_expr): Rename to ...
12268 (gdb_unparse_agent_expr): ... this and move to ax.c.
12269 (gdb_agent_op_name): Move to ax.c.
12270 (eval_agent_expr): Rename to ...
12271 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12272 and move to ax.c.
12273 (eval_tracepoint_agent_expr): New function.
12274 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 12275 non-static.
5e1dc496
LM
12276 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12277 ax.c.
12278 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12279 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12280 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12281 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12282 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12283 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12284 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12285 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12286 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12287 (compile_bytecodes): Remove forward declaration.
12288 (is_goto_target): Move to ax.c.
12289 (compile_bytecodes): Move to ax.c and call
12290 agent_get_trace_state_variable_value (...) and
12291 agent_set_trace_state_variable_value (...).
12292
12293 * Makefile.in: Update ax.c and IPA dependencies.
12294
277e4e52
PA
122952012-02-24 Pedro Alves <palves@redhat.com>
12296
12297 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12298 (cmd_bigqtbuffer_circular): ... this. Only handle
12299 'QTBuffer:circular:'.
12300 (handle_tracepoint_general_set): Adjust.
12301
bf4c19f7
YQ
123022012-02-16 Yao Qi <yao@codesourcery.com>
12303
12304 * inferiors.c: Move code to ...
12305 * dll.c: .... here. New.
12306 * server.h: Declare clear_dlls.
12307 * Makefile.in (SFILES): Add dll.c.
12308 (OBS): Add dll.o
12309 (dll.o): New rule.
12310
d73f2619
YQ
123112012-02-11 Yao Qi <yao@codesourcery.com>
12312
12313 * server.c: (handle_monitor_command): Add a new parameter
12314 `own_buf'.
12315 (handle_query): Update caller.
12316
f8255c2a
JB
123172012-02-09 Joel Brobecker <brobecker@adacore.com>
12318
12319 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12320 * configure, config.in: Regenerate.
12321 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12322 is not defined.
12323
da84f473
PA
123242012-02-02 Pedro Alves <palves@redhat.com>
12325
12326 Try SIGKILL first, then PTRACE_KILL.
12327 * linux-low.c (linux_kill_one_lwp): New.
12328 (linux_kill_one_lwp): Rename to ...
12329 (kill_one_lwp_callback): ... this. Use the new
12330 linux_kill_one_lwp.
12331
e886a173
PA
123322012-02-02 Pedro Alves <palves@redhat.com>
12333
12334 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12335 inferior.
12336
be07f1a2
PA
123372012-01-27 Pedro Alves <palves@redhat.com>
12338
12339 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12340 (elf_64_file_p): Make static.
12341 (linux_pid_exe_is_elf_64_file): New.
12342 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12343 Delete declarations.
12344 (linux_pid_exe_is_elf_64_file): Declare.
12345 * linux-x86-low.c (x86_arch_setup): Use
12346 linux_pid_exe_is_elf_64_file.
12347
d8301ad1
JK
123482012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12349
12350 * linux-low.c (linux_wait_for_event_1): Rename to ...
12351 (linux_wait_for_event): ... here and merge it with former
12352 linux_wait_for_event - new variable wait_ptid, use it.
12353 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12354
01b17894
PA
123552012-01-23 Pedro Alves <palves@redhat.com>
12356
12357 * server.c (main): Avoid yet another case of infinite loop while
12358 detaching/killing after a longjmp.
12359
e825046f
JK
123602012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12361
12362 Code cleanup.
12363 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12364
b9e7b9c3
UW
123652012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12366
12367 * hostio.c (handle_readlink): New function.
12368 (handle_vFile): Call it to handle "vFile:readlink" packets.
12369
901f9912
UW
123702012-01-20 Pedro Alves <palves@redhat.com>
12371 Ulrich Weigand <ulrich.weigand@linaro.org>
12372
12373 * server.c (handle_v_requests): Only support vAttach and vRun to
12374 start multiple processes when in extended protocol mode.
12375
fc1ab1a0
PA
123762012-01-17 Pedro Alves <palves@redhat.com>
12377
12378 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12379 memalign plus mprotect to allocate the scratch buffer.
12380
7d5d4e98
PA
123812012-01-13 Pedro Alves <palves@redhat.com>
12382
12383 * server.c (attach_inferior): Clear `cont_thread'.
12384
f128d5e9
PA
123852012-01-13 Pedro Alves <palves@redhat.com>
12386
12387 * server.c (main): Avoid infinite loop while detaching/killing
12388 after a longjmp.
12389
06db92f0
DE
123902012-01-09 Doug Evans <dje@google.com>
12391
12392 * server.c (start_inferior): Set last_ptid in --wrapper case.
12393
32d92999
YQ
123942012-01-06 Yao Qi <yao@codesourcery.com>
12395
12396 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12397 defined.
12398 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12399
5e0a92a9
YQ
124002012-01-04 Yao Qi <yao@codesourcery.com>
12401
12402 * tracepoint.c (cmd_qtdp): Print debug message
12403 for static tracepoint.
12404
ae639e8c
YQ
124052012-01-04 Yao Qi <yao@codesourcery.com>
12406
12407 * tracepoint.c (trace_vdebug): Differentiate debug message
12408 between gdbserver and IPA.
12409
f72429c5
YQ
124102012-01-03 Yao Qi <yao@codesourcery.com>
12411
12412 * tracepoint.c (tracepoint_was_hit): Don't collect for
12413 static tracepoint.
12414
12c3e59c
JB
124152012-01-02 Joel Brobecker <brobecker@adacore.com>
12416
12417 * terminal.h: Reformat copyright header.
12418
67827812
JB
124192012-01-02 Joel Brobecker <brobecker@adacore.com>
12420
12421 * server.c (gdbserver_version): Update copyright year.
12422 * gdbreplay.c (gdbreplay_version): Likewise.
12423
3e52c33d
JK
124242011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12425
12426 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12427
12428 Revert:
12429 2011-12-18 Hui Zhu <teawater@gmail.com>
12430 * linux-low.c (linux_create_inferior): Save return value to ret.
12431
66f1260e
HZ
124322011-12-18 Hui Zhu <teawater@gmail.com>
12433
12434 * linux-low.c (linux_create_inferior): Save return value to ret.
12435
e77616d7
DE
124362011-12-16 Doug Evans <dje@google.com>
12437
e7b06c57
DE
12438 * linux-low.c (linux_create_inferior): If stdio connection,
12439 redirect stdin from /dev/null, stdout to stderr.
12440 * remote-utils.c (remote_is_stdio): New static global.
12441 (remote_connection_is_stdio): New function.
12442 (remote_prepare): Handle stdio connection.
12443 (remote_open): Ditto.
12444 (remote_close): Don't close stdin for stdio connections.
12445 (read_prim,write_prim): New functions. Replace all calls to
12446 read/write to these.
12447 * server.c (main): Watch for "-" argument. Move call to
12448 remote_prepare before start_inferior.
12449 * server.h (STDIO_CONNECTION_NAME): New macro.
12450 (remote_connection_is_stdio): Declare.
12451
e77616d7
DE
12452 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12453 in debugging output.
12454
82067193
YQ
124552011-12-15 Yao Qi <yao@codesourcery.com>
12456
12457 * tracepoint.c: Include sys/syscall.h.
12458 (gdb_ust_thread): Remove preprocessor conditional.
12459
82bfbe7e
PA
124602011-12-14 Pedro Alves <pedro@codesourcery.com>
12461
12462 * linux-low.c (linux_detach_one_lwp): Call
12463 the_low_target.prepare_to_resume before detaching.
12464
712c6575
YQ
124652011-12-14 Yao Qi <yao@codesourcery.com>
12466
12467 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12468 of write.
12469
d54d1edf
YQ
124702011-12-14 Yao Qi <yao@codesourcery.com>
12471
12472 * i386-low.c (i386_low_stopped_data_address): Initialize local
12473 variable `control'.
12474
6210a125
PA
124752011-12-13 Pedro Alves <pedro@codesourcery.com>
12476
12477 PR remote/13492
12478
12479 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12480 DR_CONTROL unless necessary. Extend comments.
12481 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12482 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12483
2ece8244
YQ
124842011-12-13 Yao Qi <yao@codesourcery.com>
12485
12486 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12487 macros.
12488 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12489
784867a5
JK
124902011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12491
12492 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12493 Print new debug message for such case.
12494
6bf36717
JK
124952011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12496
12497 Fix overlapping memcpy.
12498 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12499 the read_inferior_memory transfer.
12500 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12501 write_inferior_memory transfer.
12502 (set_fast_tracepoint_jump): New variable buf. Use it for the
12503 read_inferior_memory and write_inferior_memory transfers.
12504 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12505 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12506 Use it for the write_inferior_memory transfer.
12507 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12508 buffers.
12509
50275556
MR
125102011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12511
12512 * linux-low.c (fetch_register, store_register): Make code
12513 consistent, fix formatting.
12514
7325beb4
MR
125152011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12516
12517 * linux-low.c (usr_store_inferior_registers): Factor out code
12518 to handle individual registers into...
12519 (store_register): ... this new function.
12520
c642a434
UW
125212011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12522
12523 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12524 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12525 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12526 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12527 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12528 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12529 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12530 (srv_xmlfiles): Add new XML files.
12531
12532 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12533 and <sys/uio.h>.
12534 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12535 (init_registers_s390_linux32v1): Add prototype.
12536 (init_registers_s390_linux32v2): Likewise.
12537 (init_registers_s390_linux64v1): Likewise.
12538 (init_registers_s390_linux64v2): Likewise.
12539 (init_registers_s390x_linux64v1): Likewise.
12540 (init_registers_s390x_linux64v2): Likewise.
12541 (s390_num_regs): Increment to 52.
12542 (s390_regmap): Add orig_r2 register.
12543 (s390_num_regs_3264): Increment to 68.
12544 (s390_regmap_3264): Add orig_r2 register.
12545 (s390_collect_ptrace_register): Handle orig_r2 register.
12546 (s390_supply_ptrace_register): Likewise.
12547 (s390_fill_last_break): New function.
12548 (s390_store_last_break): Likewise.
12549 (s390_fill_system_call): New function.
12550 (s390_store_system_call): Likewise.
12551 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12552 register sets.
12553 (s390_check_regset): New function.
12554 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12555 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12556 Update target_regsets for available register sets.
12557
2268b414
JK
125582011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12559 Jan Kratochvil <jan.kratochvil@redhat.com>
12560
12561 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12562 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12563 New.
12564 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12565 * linux-low.h (struct process_info_private): New member r_debug.
12566 * server.c (handle_qxfer_libraries): Call
12567 the_target->qxfer_libraries_svr4.
12568 (handle_qxfer_libraries_svr4): New function.
12569 (qxfer_packets): New entry "libraries-svr4".
12570 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12571 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12572 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12573 PACKET_qXfer_libraries_svr4.
12574
d6db1fab
UW
125752011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12576
12577 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12578 PSW address/mask between 8-byte and 16-byte formats.
12579 (s390_supply_ptrace_register): Likewise.
12580 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12581 basic addressing mode bit.
12582
242f5f1c
SS
125832011-11-24 Stan Shebs <stan@codesourcery.com>
12584
12585 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12586
f196051f
SS
125872011-11-17 Stan Shebs <stan@codesourcery.com>
12588
12589 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12590 (tracing_start_time): New global.
12591 (tracing_stop_time): New global.
12592 (tracing_user_name): New global.
12593 (tracing_notes): New global.
12594 (tracing_stop_note): New global.
12595 (cmd_qtstart): Set traceframe_usage, start_time.
12596 (stop_tracing): Set stop_time.
12597 (cmd_qtstatus): Report additional status.
12598 (cmd_qtp): New function.
12599 (handle_tracepoint_query): Call it.
12600 (cmd_qtnotes): New function.
12601 (handle_tracepoint_general_set): Call it.
12602 (get_timestamp): Rename from tsv_get_timestamp.
12603
405f8e94
SS
126042011-11-14 Stan Shebs <stan@codesourcery.com>
12605 Kwok Cheung Yeung <kcy@codesourcery.com>
12606
12607 * linux-x86-low.c (small_jump_insn): New.
12608 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12609 trampoline and error message, build a trampoline and issue a small
12610 jump instruction to it.
12611 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12612 trampoline and error message.
12613 (x86_get_min_fast_tracepoint_insn_len): New.
12614 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12615 * linux-low.h (struct linux_target_ops): Add arguments to
12616 install_fast_tracepoint_jump_pad operation, add new operation.
12617 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12618 arguments.
12619 (linux_get_min_fast_tracepoint_insn_len): New function.
12620 (linux_target_op): Add new operation.
12621 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12622 (gdb_trampoline_buffer_end): Ditto.
12623 (gdb_trampoline_buffer_error): Ditto.
12624 (struct ipa_sym_addresses): Add fields for new IPA variables.
12625 (symbol_list): Add entries for new IPA variables.
12626 (struct tracepoint): Add fields to hold the address range of the
12627 trampoline used by the tracepoint.
12628 (trampoline_buffer_head): New static variable.
12629 (trampoline_buffer_tail): Ditto.
12630 (claim_trampoline_space): New function.
12631 (have_fast_tracepoint_trampoline_buffer): New function.
12632 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12633 structure.
12634 (install_fast_tracepoint): Ditto, also add error buffer argument.
12635 (cmd_qtminftpilen): New function.
12636 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12637 (fast_tracepoint_from_trampoline_address): New function.
12638 (fast_tracepoint_collecting): Handle trampoline as part of jump
12639 pad space.
12640 (set_trampoline_buffer_space): New function.
12641 (initialize_tracepoint): Initialize new IPA variables.
12642 * target.h (struct target_ops): Add arguments to
12643 install_fast_tracepoint_jump_pad operation, add new
12644 get_min_fast_tracepoint_insn_len operation.
12645 (target_get_min_fast_tracepoint_insn_len): New.
12646 (install_fast_tracepoint_jump_pad): Add arguments.
12647 * server.h (IPA_BUFSIZ): Define.
12648 * linux-i386-ipa.c: Include extra header files.
12649 (initialize_fast_tracepoint_trampoline_buffer): New function.
12650 (initialize_low_tracepoint): Call it.
12651 * server.h (set_trampoline_buffer_space): Declare.
12652 (claim_trampoline_space): Ditto.
12653 (have_fast_tracepoint_trampoline_buffer): Ditto.
12654
1e4d1764
YQ
126552011-11-14 Yao Qi <yao@codesourcery.com>
12656
12657 * server.c (handle_query): Handle InstallInTrace for qSupported.
12658 * tracepoint.c (add_tracepoint): Sort list.
12659 (install_tracepoint, download_tracepoint): New.
12660 (cmd_qtdp): Call them to install and download tracepoints.
12661 (sort_tracepoints): Removed.
12662 (cmd_qtstart): Update.
12663
5c73ff4e
YQ
126642011-11-14 Yao Qi <yao@codesourcery.com>
12665
12666 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12667 * mem-break.h: Declare.
12668 * tracepoint.c (cmd_qtstart): Move some code to ...
12669 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12670 New.
12671 (download_tracepoints): Move some code to ...
12672 (download_tracepoint_1): ... here. New.
12673
86a30030
YQ
126742011-11-08 Yao Qi <yao@codesourcery.com>
12675
12676 * remote-utils.c (relocate_instruction): A comment fix.
12677
8d26e50c
JB
126782011-11-07 Joel Brobecker <brobecker@adacore.com>
12679
12680 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12681 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12682 dr_status_mirror and dr_control_mirror from debug_reg_state.
12683 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12684 (i386_initial_stuff): Remove use of deleted globals.
12685 (i386_get_thread_context, i386_set_thread_context,
12686 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12687 from debug_reg_state.
12688
a59306a3
YQ
126892011-11-05 Yao Qi <yao@codesourcery.com>
12690
12691 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12692 address as TPOINT's.
12693
3065dfb6
SS
126942011-11-02 Stan Shebs <stan@codesourcery.com>
12695
12696 * tracepoint.c (agent_mem_read_string): New function.
12697 (eval_agent_expr): Call it for tracenz.
12698 * server.c (handle_query): Report support for tracenz.
12699
fd0d8c7c
YQ
127002011-11-02 Yao Qi <yao@codesourcery.com>
12701
12702 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12703
609086b1
YQ
127042011-11-02 Yao Qi <yao@codesourcery.com>
12705
12706 * target.h: Fix a typo in comment.
12707
b9fd1791
PA
127082011-10-31 Pedro Alves <pedro@codesourcery.com>
12709
12710 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12711 clobber the breakpoints' shadows with fast tracepoint jumps.
12712 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12713 * target.c (write_inferior_memory): Also pass MYADDR down to
12714 check_mem_write.
12715
03583c20
UW
127162011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12717
12718 * configure.ac: Check support for personality routine.
12719 * configure: Regenerate.
12720 * config.in: Likewise.
12721 * linux-low.c: Include <sys/personality.h>.
12722 Define ADDR_NO_RANDOMIZE if necessary.
12723 (linux_create_inferior): Disable address space randomization when
12724 forking inferior, if requested.
12725 (linux_supports_disable_randomization): New function.
12726 (linux_target_ops): Install it.
12727 * server.h (disable_randomization): Declare.
12728 * server.c (disable_randomization): New global variable.
12729 (handle_general_set): Handle QDisableRandomization.
12730 (handle_query): Likewise for qSupported.
12731 (main): Support --disable-randomization and --no-disable-randomization
12732 command line arguments.
12733 * target.h (struct target_ops): Add supports_disable_randomization.
12734 (target_supports_disable_randomization): New macro.
12735
723b724b
MF
127362011-09-29 Mike Frysinger <vapier@gentoo.org>
12737
12738 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12739 ifdef check.
12740 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12741 [!PT_GETDSBT] (target_loadmap): New definition.
12742 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12743 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12744 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12745 and PT_GETDSBT to LINUX_LOADMAP.
12746 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12747 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12748
55329a5c 127492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12750
12751 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12752 (arm_linux_hwbp_cap): New static variable.
12753 (arm_linux_get_hwbp_cap): Replace by ...
12754 (arm_linux_init_hwbp_cap): ... this new function.
12755 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12756 (arm_linux_get_hw_watchpoint_count): Likewise.
12757 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12758 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12759 (arm_prepare_to_resume): Use perror_with_name instead of error.
12760
55329a5c 127612011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12762
12763 * linux-arm-low.c: Include <signal.h>.
12764 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12765 (struct arm_linux_hwbp_cap): New data type.
12766 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12767 (struct arm_linux_hw_breakpoint): New data type.
12768 (MAX_BPTS, MAX_WPTS): Define.
12769 (struct arch_process_info, struct arch_lwp_info): New data types.
12770 (arm_linux_get_hwbp_cap): New function.
12771 (arm_linux_get_hw_breakpoint_count): Likewise.
12772 (arm_linux_get_hw_watchpoint_count): Likewise.
12773 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12774 (arm_hwbp_control_initialize): Likewise.
12775 (arm_hwbp_control_is_enabled): Likewise.
12776 (arm_hwbp_control_is_initialized): Likewise.
12777 (arm_hwbp_control_disable): Likewise.
12778 (arm_linux_hw_breakpoint_equal): Likewise.
12779 (arm_linux_hw_point_initialize): Likewise.
12780 (struct update_registers_data): New data structure.
12781 (update_registers_callback: New function.
12782 (arm_insert_point): Likewise.
12783 (arm_remove_point): Likewise.
12784 (arm_stopped_by_watchpoint): Likewise.
12785 (arm_stopped_data_address): Likewise.
12786 (arm_new_process): Likewise.
12787 (arm_new_thread): Likewise.
12788 (arm_prepare_to_resume): Likewise.
12789 (the_low_target): Register arm_insert_point, arm_remove_point,
12790 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12791 arm_new_thread, and arm_prepare_to_resume.
12792
6b9801d4
SS
127932011-09-15 Stan Shebs <stan@codesourcery.com>
12794
12795 * server.h (struct emit_ops): Add compare-goto fields.
12796 * tracepoint.c (gdb_agent_op_sizes): New table.
12797 (emit_eq_goto): New function.
12798 (emit_ne_goto): New function.
12799 (emit_lt_goto): New function.
12800 (emit_le_goto): New function.
12801 (emit_gt_goto): New function.
12802 (emit_ge_goto): New function.
12803 (is_goto_target): New function.
12804 (compile_bytecodes): Recognize special cases of compare-goto
12805 combinations and call specialized emitters for them.
12806 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12807 (amd64_emit_ne_goto): New function.
12808 (amd64_emit_lt_goto): New function.
12809 (amd64_emit_le_goto): New function.
12810 (amd64_emit_gt_goto): New function.
12811 (amd64_emit_ge_goto): New function.
12812 (amd64_emit_ops): Add the new functions.
12813 (i386_emit_eq_goto): New function.
12814 (i386_emit_ne_goto): New function.
12815 (i386_emit_lt_goto): New function.
12816 (i386_emit_le_goto): New function.
12817 (i386_emit_gt_goto): New function.
12818 (i386_emit_ge_goto): New function.
12819 (i386_emit_ops): Add the new functions.
12820
bf15cbda
SS
128212011-09-08 Stan Shebs <stan@codesourcery.com>
12822
12823 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12824 (i386_emit_epilogue): Restore %ebx.
12825
943ca1dd
JZ
128262011-08-31 Jie Zhang <jzhang918@gmail.com>
12827
12828 * server.c (step_thread): Remove definition.
12829 (process_serial_event): Don't handle Hs.
12830 * server.h (step_thread): Remove declaration.
12831 * target.c (set_desired_inferior): Remove use of step_thread.
12832
e3deef73
LM
128332011-08-24 Luis Machado <lgustavo@codesourcery.com>
12834
12835 * linux-low.c: Include linux-procfs.h.
12836 (linux_attach_lwp_1): Update comments.
12837 (linux_attach): Scan for existing threads when attaching to a
12838 process that is the tgid.
12839 * Makefile.in: Update dependencies.
12840
13da1c97
LM
128412011-08-24 Luis Machado <lgustavo@codesourcery.com>
12842
12843 * configure.srv: Add linux-procfs.o dependencies.
12844
881127c9
YQ
128452011-08-14 Yao Qi <yao@codesourcery.com>
12846
12847 * target.h (struct target_ops): Fix indent.
12848 * win32-low.c (win32_target_ops): Fix comment.
12849
58dbd541
YQ
128502011-08-14 Andrew Jenner <andrew@codesourcery.com>
12851 Yao Qi <yao@codesourcery.com>
12852
12853 * Makefile.in (clean): Remove tic6x-*.c files.
12854 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12855 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12856 (tic6x-c64xp-linux.c): Likewise.
12857 * configure.srv: Add support for tic6x-*-uclinux.
12858 * linux-tic6x-low.c: New.
12859 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12860
78d85199
YQ
128612011-08-14 Andrew Stubbs <ams@codesourcery.com>
12862 Yao Qi <yao@codesourcery.com>
12863
12864 * target.h (struct target_ops): Add read_loadmap.
12865 * linux-low.c (struct target_loadseg): New type.
12866 (struct target_loadmap): New type.
12867 (linux_read_loadmap): New function.
12868 (linux_target_ops): Add linux_read_loadmap.
12869 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12870 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12871 to NULL.
78d85199 12872
a959a88d
EZ
128732011-08-05 Eli Zaretskii <eliz@gnu.org>
12874
12875 * win32-low.c: Include <stdint.h>.
12876
1ced966e
PA
128772011-07-22 Pedro Alves <pedro@codesourcery.com>
12878
12879 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12880 to the inferior here.
12881 (i386_remove_aligned_watchpoint): Ditto.
12882 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12883 fit part of the watchpoint in the debug registers.
12884 (i386_update_inferior_debug_regs): New.
12885 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12886 registers, and only update the inferior on success.
12887 (i386_low_remove_watchpoint): Ditto.
12888
d26e3629
KY
128892011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12890
12891 * linux-low.c (compare_ints, unique, list_threads, show_process,
12892 linux_core_of_thread): Delete.
12893 (linux_target_ops): Change linux_core_of_thread to
12894 linux_common_core_of_thread.
12895 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12896 * utils.c (malloc_failure): Change type of argument.
12897 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12898 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12899 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12900 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12901 (IPA_OBJS): Add common-utils-ipa.o.
12902 (ptid_h, linux_osdata_h): New macros.
12903 (server_h): Add common/common-utils.h, common/xml-utils.h,
12904 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12905 common/ptid.h.
12906 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12907 ptid.o, buffer.o): New rules.
12908 (linux-low.o): Add common/linux-osdata.h as a dependency.
12909 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12910 * configure.ac: Add AC_HEADER_DIRENT check.
12911 * config.in: Regenerate.
12912 * configure: Regenerate.
12913 * remote-utils.c (xml_escape_text): Delete.
12914 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12915 buffer_xml_printf): Move to common/buffer.c.
12916 * server.c (main): Remove call to initialize_inferiors.
12917 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12918 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12919 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12920 internal_error, gdb_assert, gdb_assert_fail): Delete.
12921 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12922 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12923 common/buffer.h.
12924 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12925 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12926 initialize_inferiors): Delete.
12927
2275a1a7
PA
129282011-07-20 Pedro Alves <pedro@codesourcery.com>
12929
12930 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12931 symbol error.
12932
0a5b1e09
PA
129332011-05-31 Pedro Alves <pedro@codesourcery.com>
12934
12935 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12936 assertion.
12937 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12938
6938fd34
YQ
129392011-05-26 Yao Qi <yao@codesourcery.com>
12940
12941 * Makefile.in (thread-db.o): Track dependence to
12942 common/gdb_thread_db.h.
12943 * thread-db.c: include gdb_thread_db.h from right place.
12944
b481f9e0
TT
129452011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12946
12947 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12948 __FILE__ and __LINE__ to internal_error.
12949
98a5dd13
DE
129502011-05-13 Doug Evans <dje@google.com>
12951
12952 * thread-db.c (try_thread_db_load_from_sdir): New function.
12953 (try_thread_db_load_from_dir): New function.
12954 (thread_db_load_search): Handle $sdir, ignore $pdir.
12955 Remove trying of system directories if search of
12956 libthread-db-search-path fails, that is now done via $sdir.
12957
d248b706
KY
129582011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12959
12960 * server.c (handle_query): Add EnableDisableTracepoints to the list
12961 of supported features.
43aaf8b6 12962 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12963 tracepoints.
43aaf8b6
PA
12964 (cmd_qtenable_disable): New.
12965 (cmd_qtstart): Install tracepoints even if disabled.
12966 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12967 receiving a QTEnable or QTDisable packet.
12968 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12969 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12970 tracepoints.
12971 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12972
84e578fb
DE
129732011-05-10 Doug Evans <dje@google.com>
12974
12975 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12976
71f55dd8
DE
129772011-05-04 Doug Evans <dje@google.com>
12978
12979 * linux-low.c (linux_join): Skip process lookup.
12980 * spu-low.c (spu_join): Ditto.
12981 * server.c (join_inferiors_callback): Delete.
12982 (process_serial_event): For 'D' packet (detach) call join_inferior
12983 directly.
12984
4d393d60
JM
129852011-05-04 Joseph Myers <joseph@codesourcery.com>
12986
12987 * README: Don't mention xscale*-*-linux*.
12988 * configure.srv (xscale*-*-linux*): Don't handle target.
12989
b00ad6ff
NF
129902011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12991
12992 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12993 casting pointers.
12994 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12995 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12996 (i386_emit_void_call_2): Likewise.
12997
af96c192
YQ
129982011-04-26 Yao Qi <yao@codesourcery.com>
12999
43aaf8b6
PA
13000 * linux-low.c: Move common macros to linux-ptrace.h.
13001 Include linux-ptrace.h.
af96c192
YQ
13002 * Makefile.in (linux_ptrace_h): New.
13003 (linux-low.o): Depends on linux-ptrace.h.
13004
03f2bd59
JK
130052011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13006
13007 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13008 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13009 (remote_prepare): New function with most of the TCP code from ...
13010 (remote_open): ... here. Detect PORT here unconditionally. Move also
13011 setting transport_is_reliable.
13012 * server.c (run_once): New variable.
13013 (gdbserver_usage): Document it.
13014 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13015 the first run if RUN_ONCE.
13016 * server.h (run_once, remote_prepare): New declarations.
13017
7a9dd1b2
TT
130182011-04-19 Tom Tromey <tromey@redhat.com>
13019
13020 * win32-low.c (handle_load_dll): Remove duplicate "the".
13021
81239425
PM
130222011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13023
13024 Remove support for old Cygwin 1.5 versions.
13025 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13026 function to avoid warning.
13027 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13028 warning.
13029
9e0627f1
PM
130302011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13031
13032 * gdbserver/server.h (Macro _): Define it if not available.
13033
588eebee
MS
130342011-03-14 Michael Snyder <msnyder@vmware.com>
13035
348af9f7 13036 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 13037
43f70d4c
JB
130382011-03-10 Joel Brobecker <brobecker@adacore.com>
13039
13040 * Makefile.in (maintainer-clean realclean distclean): Remove
13041 "make ... subdir_do" command.
13042
348af9f7
MS
130432011-03-10 Michael Snyder <msnyder@vmware.com>
13044
13045 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13046
13047 * server.c (handle_v_run): Free alloced buffer on early return.
13048
e637a4f5
YQ
130492011-03-09 Yao Qi <yao@codesourcery.com>
13050
13051 Revert:
13052 2011-03-04 Yao Qi <yao@codesourcery.com>
13053
13054 * Makefile.in: Remove GNU make feature --directory.
13055
13056 2011-03-05 Yao Qi <yao@codesourcery.com>
13057
13058 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13059 (subdir_do): New make target. Copied from gdb/Makefile.
13060 (maintainer-clean, realclean, distclean, clean): Call corresponding
13061 make targets in common/Makefile.
13062
13063 2011-02-11 Yao Qi <yao@codesourcery.com>
13064
13065 * configure.ac: Call AC_PROG_RANLIB.
13066 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13067 * configure: Regenerate.
13068
e6edda56
JK
130692011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13070
13071 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13072
e5141119
JB
130732011-03-06 Yao Qi <yao@codesourcery.com>
13074
13075 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13076
64794aa4
JB
130772011-03-05 Yao Qi <yao@codesourcery.com>
13078
13079 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13080 (subdir_do): New make target. Copied from gdb/Makefile.
13081 (maintainer-clean, realclean, distclean, clean): Call corresponding
13082 make targets in common/Makefile.
13083
7a762829
YQ
130842011-03-04 Yao Qi <yao@codesourcery.com>
13085
13086 * Makefile.in: Remove GNU make feature --directory.
13087
348af9f7
MS
130882011-03-04 Michael Snyder <msnyder@vmware.com>
13089
13090 * server.c (queue_stop_reply): Call xmalloc not malloc.
13091
130922011-03-02 Michael Snyder <msnyder@vmware.com>
13093
13094 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13095
9f72fee2
MS
130962011-02-28 Michael Snyder <msnyder@vmware.com>
13097
588eebee
MS
13098 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13099 (cmd_qtframe): Ditto.
13100 (cmd_qtbuffer): Ditto.
13101 (cmd_bigqtbuffer): Ditto.
13102
9f72fee2
MS
13103 * utils.c (decimal2str): Initialize 'width' to nine, then
13104 don't mess with it.
13105
8040bd49
UW
131062011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13107
13108 * hostio.c (require_data): Free *data, not data.
13109
7e52cbd0
JK
131102011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13111
13112 * hostio.c (require_data): Use free, not xfree.
13113
9130f83e
MS
131142011-02-27 Michael Snyder <msnyder@vmware.com>
13115
4b812f4e
MS
13116 * server.c (handle_query): Discard unused value.
13117
9130f83e
MS
13118 * hostio.c (require_data): Free malloc memory before returning
13119 error.
13120
69d37113
MS
131212011-02-26 Michael Snyder <msnyder@vmware.com>
13122
13123 * linux-low.c (list_threads): Call closedir for dirent.
13124
35f5825a
MS
131252011-02-27 Michael Snyder <msnyder@vmware.com>
13126
2a589cef
MS
13127 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13128 a case statement falls through.
13129
0adea5f7
MS
13130 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13131
35f5825a
MS
13132 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13133 in comparison.
13134
238f1c74
MS
131352011-02-26 Michael Snyder <msnyder@vmware.com>
13136
13137 * utils.c (decimal2str): Eliminate dead code and dead param.
13138 (pulongest): Drop dead param from call to decimal2str.
13139 (plongest): Ditto.
13140
633ff500
JB
131412011-02-24 Joel Brobecker <brobecker@adacore.com>
13142
13143 Revert the following patch (not approved yet):
13144 2011-02-21 Hui Zhu <teawater@gmail.com>
13145 * tracepoint.c (tp_printf): New function.
13146 (eval_agent_expr): Handle gdb_agent_op_printf.
13147
f9c6ff72
HZ
131482011-02-21 Hui Zhu <teawater@gmail.com>
13149
13150 * tracepoint.c (tp_printf): New function.
13151 (eval_agent_expr): Handle gdb_agent_op_printf.
13152
94d5e490
TT
131532011-02-18 Tom Tromey <tromey@redhat.com>
13154
13155 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13156 (tracepoint.o): Likewise.
13157 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13158 (gdb_agent_op_names): Likewise.
13159
c7f96d2b
TT
131602011-02-18 Tom Tromey <tromey@redhat.com>
13161
13162 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13163 gdb_agent_op_rot>: New constants.
13164 (gdb_agent_op_names): Add pick and roll.
13165 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13166 cases.
13167
0feedb2c
JK
131682011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13169
13170 * aclocal.m4: Regenerated with aclocal-1.11.1.
13171
b3b9301e
PA
131722011-02-14 Pedro Alves <pedro@codesourcery.com>
13173
13174 * server.c (handle_qxfer_traceframe_info): New.
13175 (qxfer_packets): Register "traceframe-info".
13176 (handle_query): Report support for qXfer:traceframe-info:read+.
13177 * tracepoint.c (match_blocktype): New.
13178 (traceframe_find_block_type): Rename to ...
13179 (traceframe_walk_blocks): ... this. Add callback filter argument,
13180 and use it.
13181 (traceframe_find_block_type): New, reimplemented on top of
13182 traceframe_walk_blocks.
13183 (build_traceframe_info_xml): New.
13184 (traceframe_read_info): New.
13185 * server.h (traceframe_read_info): Declare.
13186
4f3e6fb7
YQ
131872011-02-11 Yao Qi <yao@codesourcery.com>
13188
13189 * configure.ac: Call AC_PROG_RANLIB.
13190 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13191 * configure: Regenerate.
13192
764880b7
PA
131932011-02-07 Pedro Alves <pedro@codesourcery.com>
13194
13195 * server.c (gdb_read_memory): Change return semantics to allow
13196 partial transfers.
13197 (handle_search_memory_1): Adjust.
13198 (process_serial_event) <'m' packet>: Handle partial transfers.
13199 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13200
1c79eb8a
PA
132012011-01-28 Pedro Alves <pedro@codesourcery.com>
13202
13203 * regcache.c (init_register_cache): Initialize
13204 regcache->register_status.
13205 (free_register_cache): Release regcache->register_status.
13206 (regcache_cpy): Copy register_status.
13207 (registers_to_string): Print 'x's for unavailable registers.
13208 (supply_register): Mark the register's status valid or
13209 unavailable, depending on whether a buffer was passed in or not.
13210 (supply_register_zeroed): New.
13211 (supply_regblock): Mark the registers' status valid or
13212 unavailable, depending on whether a buffer was passed in or not.
13213 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13214 (struct regcache): New `register_status' field.
13215 (supply_register_zeroed): Declare.
13216 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13217 supply_register_zeroed, rather than passing a NULL buffer to
13218 supply_register.
13219 * tracepoint.c (fetch_traceframe_registers): Update comment.
13220
85724a0e
PA
132212011-01-28 Pedro Alves <pedro@codesourcery.com>
13222
13223 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13224 buffer explicit.
13225
d08aafef
PA
132262011-01-25 Pedro Alves <pedro@codesourcery.com>
13227
13228 * server.h (decode_xfer_write): Change prototype.
13229 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13230 and don't extract the annex here.
13231 * server.c (decode_xfer_read): Remove `annex' parameter,
13232 and don't extract the annex here.
13233 (decode_xfer): New.
13234 (struct qxfer): New.
13235 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13236 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13237 (handle_qxfer_statictrace): New functions, abstracted out from
13238 handle_query, and made to use the struct qxfer interface.
13239 (handle_threads_qxfer_proper): Rename to ...
13240 (handle_qxfer_threads_proper): ... this.
13241 (handle_threads_qxfer): Rename to ...
13242 (handle_qxfer_threads): ... this. Adjust.
13243 (qxfer_packets): New array.
13244 (handle_qxfer): New function.
13245 (handle_query): Use handle_qxfer.
13246
493e2a69
MS
132472011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13248
13249 * gdbreplay.c: Shorten lines of >= 80 columns.
13250 * linux-low.c: Ditto.
13251 * linux-ppc-low.c: Ditto.
13252 * linux-s390-low.c: Ditto.
13253 * linux-sparc-low.c: Ditto.
13254 * linux-x86-low.c: Ditto.
13255 * linux-xtensa-low.c: Ditto.
13256 * mem-break.c: Ditto.
13257 * nto-low.c: Ditto.
13258 * regcache.h: Ditto.
13259 * remote-utils.c: Ditto.
13260 * server.c: Ditto.
13261 * server.h: Ditto.
13262 * thread-db.c: Ditto.
13263 * tracepoint.c: Ditto.
13264 * utils.c: Ditto.
13265 * win32-low.h: Ditto.
13266
44944448
JB
132672011-01-05 Joel Brobecker <brobecker@adacore.com>
13268
13269 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13270 update.
13271
71ce852c
JB
132722011-01-01 Joel Brobecker <brobecker@adacore.com>
13273
13274 * server.c (gdbserver_version): Update copyright year in version
13275 output.
13276 * gdbreplay.c (gdbreplay_version): Ditto.
13277
eb826dc6
MF
132782010-12-29 Jie Zhang <jie.zhang@analog.com>
13279
13280 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13281 * linux-bfin-low.c: New file.
13282 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13283 PT_DATA_ADDR for BFIN targets.
13284 * Makefile.in (SFILES): Add linux-bfin-low.c.
13285 (clean): Remove reg-bfin.c.
13286 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13287 * README: Mention supported Blackfin targets.
13288
39ab222a
MF
132892010-12-23 Mike Frysinger <vapier@gentoo.org>
13290
13291 * .gitignore: New file.
13292
a1f2ce7d
MF
132932010-11-16 Mike Frysinger <vapier@gentoo.org>
13294
13295 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13296
f474844c
JZ
132972010-10-22 Jie Zhang <jie@codesourcery.com>
13298
13299 * Makefile.in: Add FLAGS_TO_PASS variable.
13300 (install): Remove dependency of install-only and recursively
13301 invoke make for install-only.
13302
f1048712
DE
133032010-10-04 Doug Evans <dje@google.com>
13304
13305 * Makefile.in (uninstall): Use $(DESTDIR).
13306
b53a1623
PA
133072010-09-24 Pedro Alves <pedro@codesourcery.com>
13308
e6ee044d
PA
13309 PR gdb/11842
13310
b53a1623
PA
13311 * linux-x86-low.c (compat_siginfo_from_siginfo)
13312 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13313 si_code is < 0. Check for si_code == SI_TIMER before checking for
13314 si_code < 0.
13315
fa1bd1e4
JB
133162010-09-13 Joel Brobecker <brobecker@adacore.com>
13317
13318 * lynx-i386-low.c: New file.
13319 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13320
47fac8f8
JB
133212010-09-13 Joel Brobecker <brobecker@adacore.com>
13322
13323 * lynx-low.c (ptrace_request_to_str): Remove handling for
13324 request values that have been removed in LynxOS 5.x.
13325
1adfc54d
JB
133262010-09-13 Joel Brobecker <brobecker@adacore.com>
13327
13328 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13329 <ptrace.h>
13330
c2a66c29
NS
133312010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13332
13333 * configure.ac: Add --enable-inprocess-agent option.
13334 * configure: Rebuilt.
13335
32fcada3
YQ
133362010-09-06 Yao Qi <yao@codesourcery.com>
13337
13338 * linux-low.c (linux_kill): Remove unused variable.
13339 (linux_stabilize_threads): Likewise.
13340 * server.c (start_inferior): Likewise.
13341 (queue_stop_reply_callback): Likewise.
13342 * tracepoint.c (do_action_at_tracepoint): Likewise.
13343
0cccb683
YQ
133442010-09-06 Yao Qi <yao@codesourcery.com>
13345
13346 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13347 on return.
13348
423ec54c
JK
133492010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13350
13351 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13352
12ac6819
PA
133532010-09-06 Pedro Alves <pedro@codesourcery.com>
13354
13355 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13356 "$(IPA_DEPFILES)".
13357
8ed54b31
JB
133582010-09-01 Joel Brobecker <brobecker@adacore.com>
13359
13360 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13361 gdbserver/lynx-ppc-low.c: New files.
13362 * Makefile.in (lynx_low_h): New variable.
13363 (lynx-low.o, lynx-ppc-low.o): New rules.
13364 * configure.ac: On LynxOS, link with -lnetinet.
13365 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13366 * configure: regenerate.
13367
bb0116a4
JB
133682010-09-01 Joel Brobecker <brobecker@adacore.com>
13369
13370 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13371 * configure.ac: Add check for vasprintf and vsnprintf.
13372 * configure, config.in: Regenerate.
13373 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13374
a778ab81 133752010-09-01 Joel Brobecker <brobecker@adacore.com>
13376
13377 * gdbreplay.c: Move include of alloca.h up, next to include of
13378 malloc.h.
13379 * server.h: Add include of malloc.h.
13380 * mem-break.c: Remove include of malloc.h.
13381 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13382
8b034a19 133832010-09-01 Joel Brobecker <brobecker@adacore.com>
13384
13385 * Makefile.in (memmem.o): Build with -Wno-error.
13386
133872010-09-01 Joel Brobecker <brobecker@adacore.com>
13388
13389 * utils.c (xsnprintf): Make non-static.
13390 * server.h: Add xsnprintf declaration.
13391 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13392 replace calls to snprintf by calls to xsnprintf throughout.
13393
133942010-09-01 Joel Brobecker <brobecker@adacore.com>
13395
13396 * configure.ac: Add configure check for alloca.
13397 * configure, config.in: Regenerate.
13398 * server.h: Include alloca.h if it exists.
13399 * gdbreplay.c: Include alloca.h if it exists.
13400
1a981360
PA
134012010-08-28 Pedro Alves <pedro@codesourcery.com>
13402
13403 * linux-low.c (__SIGRTMIN): Define if not already defined.
13404 (linux_create_inferior): Check for __ANDROID__ rather than
13405 __SIGRTMIN.
13406 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13407 are already deferred.
13408 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13409 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13410 stopped and already has a pending signal to report.
13411 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13412 a pending signal to report or is moving out of a jump pad.
13413 (linux_init_signals): Check for __ANDROID__ rather than
13414 __SIGRTMIN.
13415
b4d51a55
PA
134162010-08-28 Pedro Alves <pedro@codesourcery.com>
13417
13418 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13419 debug_threads check. Avoid a linear search when not doing debug
13420 output.
13421
ec48365d
PA
134222010-08-27 Pedro Alves <pedro@codesourcery.com>
13423
13424 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13425 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13426 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13427 (process_event): Change local fd's type to gdb_fildes_t.
13428 (create_file_handler): Adjust prototype.
13429 (delete_file_handler): Adjust prototype.
13430 (handle_file_event): Adjust prototype. Use pfildes.
13431 (create_file_event): Adjsut prototype.
13432 * remote-utils.c (remote_desc, listen_desc): Change type to
13433 gdb_fildes_t.
13434 * server.h: New gdb_fildes_t typedef.
13435 [USE_WIN32API]: Include winsock2.h.
13436 (delete_file_handler, add_file_handler): Adjust prototypes.
13437 (pfildes): Declare.
13438 * utils.c (pfildes): New.
13439
854d88f0
PA
134402010-08-27 Pedro Alves <pedro@codesourcery.com>
13441
13442 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13443 * configure: Regenerate.
13444
0146f85b
PA
134452010-08-27 Pedro Alves <pedro@codesourcery.com>
13446
13447 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13448 (linux_done_accessing_memory): ... this.
13449 (linux_target_ops): Adjust.
13450 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13451 * nto-low.c (nto_target_ops): Adjust comment.
13452 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13453 * spu-low.c (spu_target_ops): Adjust comment.
13454 * target.h (target_ops): Rename unprepare_to_access_memory field
13455 to done_accessing_memory.
13456 (unprepare_to_access_memory): Rename to ...
13457 (done_accessing_memory): ... this.
13458
90d74c30
PA
134592010-08-26 Pedro Alves <pedro@codesourcery.com>
13460
13461 * linux-low.c (linux_prepare_to_access_memory): New.
13462 (linux_unprepare_to_access_memory): New.
13463 (linux_target_ops): Install them.
13464 * server.c (read_memory): Rename to ...
13465 (gdb_read_memory): ... this. Use
13466 prepare_to_access_memory/prepare_to_access_memory.
13467 (write_memory): Rename to ...
13468 (gdb_write_memory): ... this. Use
13469 prepare_to_access_memory/prepare_to_access_memory.
13470 (handle_search_memory_1): Adjust.
13471 (process_serial_event): Adjust.
13472 * target.h (struct target_ops): New fields
13473 prepare_to_access_memory and unprepare_to_access_memory.
13474 (prepare_to_access_memory, unprepare_to_access_memory): New.
13475 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13476 prepare_to_access_memory/prepare_to_access_memory.
13477 * nto-low.c (nto_target_ops): Adjust.
13478 * spu-low.c (spu_target_ops): Adjust.
13479 * win32-low.c (win32_target_ops): Adjust.
13480
fd467969
PA
134812010-08-26 Pedro Alves <pedro@codesourcery.com>
13482
13483 * Makefile.in (WARN_CFLAGS): Get it from configure.
13484 (WERROR_CFLAGS): New.
13485 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13486 * configure.ac: Introduce --enable-werror, which adds -Werror to
13487 the compiler command line. Enabled by default. Disable with
13488 --disable-werror. Add -Wdeclaration-after-statement
13489 Wpointer-arith and -Wformat-nonliteral to warning flags.
13490 * configure: Regenerate.
13491
331e2f5f
PA
134922010-08-26 Pedro Alves <pedro@codesourcery.com>
13493
13494 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13495
e581f2b4
PA
134962010-08-26 Pedro Alves <pedro@codesourcery.com>
13497
13498 * gdbreplay.c (remote_error): New.
13499 (gdbchar): New.
13500 (expect): Use gdbchar. Check for error reading from GDB.
13501 Clarify sync error output.
13502 (play): Check for errors writing to GDB.
13503 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13504 * remote-utils.c (getpkt): Check for errors writing to the remote
13505 descriptor.
13506
3c11dd79
PA
135072010-08-25 Pedro Alves <pedro@codesourcery.com>
13508
13509 * linux-low.c (linux_wait_1): Move non-debugging code out of
13510 `debug_threads' control.
13511
d20a8ad9
PA
135122010-08-25 Pedro Alves <pedro@codesourcery.com>
13513
13514 * linux-low.c (linux_wait_1): Don't set last_status here.
13515 * server.c (push_event, queue_stop_reply_callback): Assert we're
13516 not pushing a TARGET_WAITKIND_IGNORE event.
13517 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13518 (myresume, handle_target_event): Set the thread's last_resume_kind
13519 and last_status from the target returned status.
13520
964e4306
PA
135212010-08-25 Pedro Alves <pedro@codesourcery.com>
13522
13523 PR threads/10729
13524
13525 * linux-x86-low.c (update_debug_registers_callback): New.
13526 (i386_dr_low_set_addr): Use it.
13527 (i386_dr_low_get_addr): New.
13528 (i386_dr_low_set_control): Use update_debug_registers_callback.
13529 (i386_dr_low_get_control): New.
13530 (i386_dr_low_get_status): Adjust.
13531 * linux-low.c (linux_stop_lwp): New.
13532 * linux-low.h (linux_stop_lwp): Declare.
13533
13534 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13535 argument instead of a i386_debug_reg_state.
13536 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13537 a i386_debug_reg_state.
13538 (i386_insert_aligned_watchpoint): Adjust.
13539 (i386_remove_aligned_watchpoint): Adjust.
13540 (i386_low_stopped_data_address): Read the debug registers from the
13541 inferior instead of from the mirrors.
13542 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13543 (i386_dr_low_get_addr): Declare.
13544 (i386_dr_low_get_control): Declare.
13545 (i386_dr_low_get_status): Change prototype.
13546
13547 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13548 (i386_dr_low_get_addr): New.
13549 (i386_dr_low_get_control): New.
13550 (i386_dr_low_get_status): Adjust prototype. Return
13551 dr_status_mirror.
13552 (i386_initial_stuff): Clear dr_status_mirror and
13553 dr_control_mirror.
13554 (i386_get_thread_context): Adjust.
13555 (i386_set_thread_context): Adjust.
13556 (i386_thread_added): Adjust.
13557
5f21a75b
PA
135582010-08-24 Pedro Alves <pedro@codesourcery.com>
13559
13560 * linux-low.h (linux_thread_area): Delete declaration.
13561
3e4c1235
TS
135622010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13563
13564 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13565 after its termination.
13566
1971b033
PA
135672010-08-09 Pedro Alves <pedro@codesourcery.com>
13568
13569 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13570 (gdb_wants_all_stopped): Delete.
13571 (linux_wait_1): Don't call them.
13572 * server.c (handle_v_cont): Tag all threads as want-stopped.
13573 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13574 stopped as "client-wants-stopped".
13575
310444ac
PA
135762010-07-31 Pedro Alves <pedro@codesourcery.com>
13577
13578 * Makefile.in (signals_h): New.
13579 (server_h): Depend on it.
13580 (server.o): Don't depend on $(signals_def).
13581 (signals.o): Depend on $(signals_def).
13582
a19cae16
JK
135832010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13584
13585 * Makefile.in (signals_def): New.
13586 (server_h): Append include/gdb/signals.h and signals_def.
13587 (server.o): Append signals_def.
13588
30d50328
JK
135892010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13590
13591 * server.c (handle_target_event): Use target_signal_to_host for
13592 resume_info.sig initialization.
13593 * target.h (struct thread_resume) <sig>: New comment.
13594
5c3216e2
OS
135952010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13596
c6f46ca0
OS
13597 * server.c (handle_query): strcpy() the returned string from paddress()
13598 instead of sprintf().
5c3216e2
OS
13599 * utils.c (paddress): Return phex_nz().
13600
6bd31874
JB
136012010-07-07 Joel Brobecker <brobecker@adacore.com>
13602
13603 * server.c (handle_v_cont): Call mourn_inferior if process
13604 just exited.
13605 (myresume): Likewise.
13606
0fb4aa4b
PA
136072010-07-01 Pedro Alves <pedro@codesourcery.com>
13608
13609 Static tracepoints, and integration with UST.
13610
13611 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13612 * mem-break.c (uninsert_all_breakpoints)
13613 (reinsert_all_breakpoints): New.
13614 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13615 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13616 (gdb_agent_ust_loaded, helper_thread_id)
13617 (gdb_agent_helper_thread_id): New macros.
13618 (struct ipa_sym_addresses): Add addr_ust_loaded,
13619 addr_helper_thread_id, addr_cmd_buf.
13620 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13621 (in_process_agent_loaded_ust): New.
13622 (write_e_ust_not_loaded): New.
13623 (maybe_write_ipa_ust_not_loaded): New.
13624 (struct collect_static_trace_data_action): New.
13625 (enum tracepoint_type) <static_tracepoint>: New.
13626 (struct tracepoint) <handle>: Mention static tracepoints.
13627 (struct static_tracepoint_ctx): New.
13628 (CMD_BUF_SIZE): New.
13629 (add_tracepoint_action): Handle static tracepoint actions.
13630 (unprobe_marker_at): New.
13631 (clear_installed_tracepoints): Handle static tracepoints.
13632 (cmd_qtdp): Handle static tracepoints.
13633 (probe_marker_at): New.
13634 (cmd_qtstart): Handle static tracepoints.
13635 (response_tracepoint): Handle static tracepoints.
13636 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13637 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13638 (get_context_regcache): Handle static tracepoints.
13639 (do_action_at_tracepoint): Handle static tracepoint actions.
13640 (traceframe_find_block_type): Handle static trace data blocks.
13641 (traceframe_read_sdata): New.
13642 (download_tracepoints): Download static tracepoint actions.
13643 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13644 (GDB_PROBE_NAME): New.
13645 (ust_ops): New.
13646 (GET_UST_SYM): New.
13647 (USTF): New.
13648 (dlsym_ust): New.
13649 (ust_marker_to_static_tracepoint): New.
13650 (gdb_probe): New.
13651 (collect_ust_data_at_tracepoint): New.
13652 (gdb_ust_probe): New.
13653 (UNIX_PATH_MAX, SOCK_DIR): New.
13654 (gdb_ust_connect_sync_socket): New.
13655 (resume_thread, stop_thread): New.
13656 (run_inferior_command): New.
13657 (init_named_socket): New.
13658 (gdb_ust_socket_init): New.
13659 (cstr_to_hexstr): New.
13660 (next_st): New.
13661 (first_marker, next_marker): New.
13662 (response_ust_marker): New.
13663 (cmd_qtfstm, cmd_qtsstm): New.
13664 (unprobe_marker_at, probe_marker_at): New.
13665 (cmd_qtstmat, gdb_ust_thread): New.
13666 (gdb_ust_init): New.
13667 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13668 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13669 (ST_REGENTRY): New.
13670 (x86_64_st_collect_regmap): New.
13671 (X86_64_NUM_ST_COLLECT_GREGS): New.
13672 (AMD64_RIP_REGNUM): New.
13673 (supply_static_tracepoint_registers): New.
13674 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13675 (ST_REGENTRY): New.
13676 (i386_st_collect_regmap): New.
13677 (i386_NUM_ST_COLLECT_GREGS): New.
13678 (supply_static_tracepoint_registers): New.
13679 * server.c (handle_query): Handle qXfer:statictrace:read.
13680 <qSupported>: Report support for StaticTracepoints, and
13681 qXfer:statictrace:read features.
13682 * server.h (traceframe_read_sdata)
13683 (supply_static_tracepoint_registers): Declare.
13684 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13685 (unpack_varlen_hex): Include in IPA build.
13686 * Makefile.in (ustlibs, ustinc): New.
13687 (IPA_OBJS): Add remote-utils-ipa.o.
13688 ($(IPA_LIB)): Link -ldl and -lpthread.
13689 (UST_CFLAGS): New.
13690 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13691 * config.in, configure: Regenerate.
13692
9e4344e5
PA
136932010-06-20 Ian Lance Taylor <iant@google.com>
13694 Pedro Alves <pedro@codesourcery.com>
13695
13696 * linux-x86-low.c (always_true): Delete.
13697 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13698 trying to fool the compiler with always_true.
13699
c6beb2cb
PA
137002010-06-20 Pedro Alves <pedro@codesourcery.com>
13701
13702 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13703 conditions in gdbserver.
13704
d2ed6730
UW
137052010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13706
13707 * spu-low.c (spu_read_memory): Wrap around local store limit.
13708 (spu_write_memory): Likewise.
13709
4e29fb54
PA
137102010-06-15 Pedro Alves <pedro@codesourcery.com>
13711
13712 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13713 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13714 LONGEST uses.
13715 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13716 uses.
13717 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13718 uses with LONGEST uses.
13719
6a271cae
PA
137202010-06-14 Stan Shebs <stan@codesourcery.com>
13721 Pedro Alves <pedro@codesourcery.com>
13722
13723 Bytecode compiler.
13724
13725 * linux-x86-low.c: Include limits.h.
13726 (add_insns): New.
13727 (always_true): New.
13728 (EMIT_ASM): New.
13729 (EMIT_ASM32): New.
13730 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13731 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13732 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13733 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13734 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13735 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13736 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13737 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13738 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13739 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13740 (amd64_emit_void_call_2): New.
13741 (amd64_emit_ops): New.
13742 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13743 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13744 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13745 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13746 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13747 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13748 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13749 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13750 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13751 (i386_emit_stack_adjust, i386_emit_int_call_1)
13752 (i386_emit_void_call_2): New.
13753 (i386_emit_ops): New.
13754 (x86_emit_ops): New.
13755 (the_low_target): Install x86_emit_ops.
13756 * server.h (struct emit_ops): New.
13757 (get_raw_reg_func_addr): Declare.
13758 (current_insn_ptr, emit_error): Declare.
13759 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13760 (set_trace_state_variable_value): New defines.
13761 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13762 addr_get_trace_state_variable_value and
13763 addr_set_trace_state_variable_value.
13764 (symbol_list): New fields for get_raw_reg,
13765 get_trace_state_variable_value and set_trace_state_variable_value.
13766 (condfn): New typedef.
13767 (struct tracepoint): New field `compiled_cond'.
13768 (do_action_at_tracepoint): Clear compiled_cond.
13769 (get_trace_state_variable_value, set_trace_state_variable_value):
13770 Export in the IPA.
13771 (condition_true_at_tracepoint): If there's a compiled condition,
13772 run that.
13773 (current_insn_ptr, emit_error): New globals.
13774 (struct bytecode_address): New.
13775 (get_raw_reg_func_addr): New.
13776 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13777 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13778 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13779 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13780 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13781 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13782 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13783 (compile_tracepoint_condition, compile_bytecodes): New.
13784 * target.h (emit_ops): Forward declare.
13785 (struct target_ops): New field emit_ops.
13786 (target_emit_ops): New.
13787 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13788 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13789 * linux-low.c (linux_emit_ops): New.
13790 (linux_target_ops): Install it.
13791 * linux-low.h (struct linux_target_ops): New field emit_ops.
13792
92b72907
UW
137932010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13794
13795 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13796 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13797
fa593d66
PA
137982010-06-01 Pedro Alves <pedro@codesourcery.com>
13799 Stan Shebs <stan@codesourcery.com>
13800
13801 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13802 (all): Depend on $(extra_libraries).
13803 (install-only): Install the IPA.
13804 (IPA_OBJS, IPA_LIB): New.
13805 (clean): Remove the IPA lib.
13806 (IPAGENT_CFLAGS): New.
13807 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13808 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13809 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13810 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13811 * configure.ac: Check for atomic builtins support in the compiler.
13812 (IPA_DEPFILES, extra_libraries): Define.
13813 * configure.srv (ipa_obj): Add description.
13814 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13815 (i[34567]86-*-linux*): Set ipa_obj.
13816 (x86_64-*-linux*): Set ipa_obj.
13817 * linux-low.c (stabilizing_threads): New.
13818 (supports_fast_tracepoints): New.
13819 (linux_detach): Stabilize threads before detaching.
13820 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13821 the lwp is either not stabilizing, or is moving out of a jump pad.
13822 (linux_fast_tracepoint_collecting): New.
13823 (maybe_move_out_of_jump_pad): New.
13824 (enqueue_one_deferred_signal): New.
13825 (dequeue_one_deferred_signal): New.
13826 (linux_wait_for_event_1): If moving out of a jump pad, defer
13827 pending signals to later.
13828 (linux_stabilize_threads): New.
13829 (linux_wait_1): Check if threads need moving out of jump pads, and
13830 do it if so.
13831 (stuck_in_jump_pad_callback): New.
13832 (move_out_of_jump_pad_callback): New.
13833 (lwp_running): New.
13834 (linux_resume_one_lwp): Handle moving out of jump pads.
13835 (linux_set_resume_request): Dequeue deferred signals.
13836 (need_step_over_p): Also step over fast tracepoint jumps.
13837 (start_step_over): Also uninsert fast tracepoint jumps.
13838 (finish_step_over): Also reinsert fast tracepoint jumps.
13839 (linux_install_fast_tracepoint_jump): New.
13840 (linux_target_ops): Install linux_stabilize_threads and
13841 linux_install_fast_tracepoint_jump_pad.
13842 * linux-low.h (linux_target_ops) <get_thread_area,
13843 install_fast_tracepoint_jump_pad>: New fields.
13844 (struct lwp_info) <collecting_fast_tracepoint,
13845 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13846 (linux_get_thread_area): Declare.
13847 * linux-x86-low.c (jump_insn): New.
13848 (x86_get_thread_area): New.
13849 (append_insns): New.
13850 (push_opcode): New.
13851 (amd64_install_fast_tracepoint_jump_pad): New.
13852 (i386_install_fast_tracepoint_jump_pad): New.
13853 (x86_install_fast_tracepoint_jump_pad): New.
13854 (the_low_target): Install x86_get_thread_area and
13855 x86_install_fast_tracepoint_jump_pad.
13856 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13857 (struct fast_tracepoint_jump): New.
13858 (fast_tracepoint_jump_insn): New.
13859 (fast_tracepoint_jump_shadow): New.
13860 (find_fast_tracepoint_jump_at): New.
13861 (fast_tracepoint_jump_here): New.
13862 (delete_fast_tracepoint_jump): New.
13863 (set_fast_tracepoint_jump): New.
13864 (uninsert_fast_tracepoint_jumps_at): New.
13865 (reinsert_fast_tracepoint_jumps_at): New.
13866 (set_breakpoint_at): Use write_inferior_memory.
13867 (uninsert_raw_breakpoint): Use write_inferior_memory.
13868 (check_mem_read): Mask out fast tracepoint jumps.
13869 (check_mem_write): Mask out fast tracepoint jumps.
13870 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13871 (set_fast_tracepoint_jump): Declare.
13872 (delete_fast_tracepoint_jump)
13873 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13874 (reinsert_fast_tracepoint_jumps_at): Declare.
13875 * regcache.c: Don't compile many functions when building the
13876 in-process agent library.
13877 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13878 the register buffer in the heap.
13879 (free_register_cache): If the register buffer isn't owned by the
13880 regcache, don't free it.
13881 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13882 pre-existing register caches.
13883 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13884 type.
13885 (convert_ascii_to_int): : Constify `from' parameter type.
13886 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13887 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13888 the needed buffer in-place.
13889 (relocate_instruction): New.
13890 * server.c (handle_query) <qSymbols>: If the target supports
13891 tracepoints, give it a chance of looking up symbols. Report
13892 support for fast tracepoints.
13893 (handle_status): Stabilize threads.
13894 (process_serial_event): Adjust.
13895 * server.h (struct fast_tracepoint_jump): Forward declare.
13896 (struct process_info) <fast_tracepoint_jumps>: New field.
13897 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13898 (decode_X_packet, decode_M_packet): Adjust.
13899 (relocate_instruction): Declare.
13900 (in_process_agent_loaded): Declare.
13901 (tracepoint_look_up_symbols): Declare.
13902 (struct fast_tpoint_collect_status): Declare.
13903 (fast_tracepoint_collecting): Declare.
13904 (force_unlock_trace_buffer): Declare.
13905 (handle_tracepoint_bkpts): Declare.
13906 (initialize_low_tracepoint)
13907 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13908 * target.h (struct target_ops) <stabilize_threads,
13909 install_fast_tracepoint_jump_pad>: New fields.
13910 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13911 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13912 [HAVE_STDINT_H]: Include stdint.h.
13913 (trace_debug_1): Rename to ...
13914 (trace_vdebug): ... this.
13915 (trace_debug): Rename to ...
13916 (trace_debug_1): ... this. Add `level' parameter.
13917 (trace_debug): New.
13918 (ATTR_USED, ATTR_NOINLINE): New.
13919 (IP_AGENT_EXPORT): New.
13920 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13921 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13922 (about_to_request_buffer_space, trace_buffer_is_full)
13923 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13924 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13925 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13926 (traceframe_write_count, traceframes_created)
13927 (trace_state_variables)
13928 New renaming defines.
13929 (struct ipa_sym_addresses): New.
13930 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13931 (symbol_list): New.
13932 (ipa_sym_addrs): New.
13933 (all_tracepoint_symbols_looked_up): New.
13934 (in_process_agent_loaded): New.
13935 (write_e_ipa_not_loaded): New.
13936 (maybe_write_ipa_not_loaded): New.
13937 (tracepoint_look_up_symbols): New.
13938 (debug_threads) [IN_PROCESS_AGENT]: New.
13939 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13940 (UNKNOWN_SIDE_EFFECTS): New.
13941 (stop_tracing): New.
13942 (flush_trace_buffer): New.
13943 (stop_tracing_bkpt): New.
13944 (flush_trace_buffer_bkpt): New.
13945 (read_inferior_integer): New.
13946 (read_inferior_uinteger): New.
13947 (read_inferior_data_pointer): New.
13948 (write_inferior_data_pointer): New.
13949 (write_inferior_integer): New.
13950 (write_inferior_uinteger): New.
13951 (struct collect_static_trace_data_action): Delete.
13952 (enum tracepoint_type): New.
13953 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13954 <actions_str, step_actions, step_actions_str>: Only include in
13955 GDBserver.
fa593d66
PA
13956 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13957 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13958 (tracepoints): Use IP_AGENT_EXPORT.
13959 (last_tracepoint): Don't include in the IPA.
13960 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13961 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13962 (alloced_trace_state_variables): New.
13963 (trace_state_variables): Use IP_AGENT_EXPORT.
13964 (traceframe_t): Delete unused variable.
13965 (circular_trace_buffer): Don't include in the IPA.
13966 (trace_buffer_start): Delete.
13967 (struct trace_buffer_control): New.
13968 (trace_buffer_free): Delete.
13969 (struct ipa_trace_buffer_control): New.
13970 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13971 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13972 New.
13973 (trace_buffer_ctrl): New.
13974 (TRACE_BUFFER_CTRL_CURR): New.
13975 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13976 Reimplement as macros.
13977 (trace_buffer_wrap): Delete.
13978 (traceframe_write_count, traceframe_read_count)
13979 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13980 (struct tracepoint_hit_ctx) <type>: New field.
13981 (struct fast_tracepoint_ctx): New.
13982 (memory_barrier): New.
13983 (cmpxchg): New.
13984 (record_tracepoint_error): Update atomically in the IPA.
13985 (clear_inferior_trace_buffer): New.
13986 (about_to_request_buffer_space): New.
13987 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13988 updating the same buffer.
13989 (add_tracepoint): Default the tracepoint's type to trap
13990 tracepoint, and orig_size to -1.
13991 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13992 internal variables.
13993 (create_trace_state_variable): New parameter `gdb'. Handle it.
13994 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13995 (cmd_qtdp): Handle fast tracepoints.
13996 (cmd_qtdv): Adjust.
13997 (max_jump_pad_size): New.
13998 (gdb_jump_pad_head): New.
13999 (get_jump_space_head): New.
14000 (claim_jump_space): New.
14001 (sort_tracepoints): New.
14002 (MAX_JUMP_SIZE): New.
14003 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14004 IPA.
14005 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14006 support. Upload fast traceframes, and delete internal IPA
14007 breakpoints.
14008 (stop_tracing_handler): New.
14009 (flush_trace_buffer_handler): New.
14010 (cmd_qtstop): Upload fast tracepoints.
14011 (response_tracepoint): Handle fast tracepoints.
14012 (tracepoint_finished_step): Upload fast traceframes. Set the
14013 tracepoint hit context's tracepoint type.
14014 (handle_tracepoint_bkpts): New.
14015 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14016 type. Add comment about fast tracepoints.
14017 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14018 non-existing action_str field.
14019 (get_context_regcache): Handle fast tracepoints.
14020 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14021 to the regcache.
14022 (fast_tracepoint_from_jump_pad_address): New.
14023 (fast_tracepoint_from_ipa_tpoint_address): New.
14024 (collecting_t): New.
14025 (force_unlock_trace_buffer): New.
14026 (fast_tracepoint_collecting): New.
14027 (collecting): New.
14028 (gdb_collect): New.
14029 (write_inferior_data_ptr): New.
14030 (target_tp_heap): New.
14031 (target_malloc): New.
14032 (download_agent_expr): New.
14033 (UALIGN): New.
14034 (download_tracepoints): New.
14035 (download_trace_state_variables): New.
14036 (upload_fast_traceframes): New.
14037 (IPA_FIRST_TRACEFRAME): New.
14038 (IPA_NEXT_TRACEFRAME_1): New.
14039 (IPA_NEXT_TRACEFRAME): New.
14040 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14041 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14042 (gdb_jump_pad_buffer_end): New.
14043 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14044 (initialize_tracepoint): Adjust.
14045 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14046 buffer. Initialize the low module.
14047 * utils.c (PREFIX, TOOLNAME): New.
14048 (malloc_failure): Use PREFIX.
14049 (error): In the IPA, an error causes an exit.
14050 (fatal, warning): Use PREFIX.
14051 (internal_error): Use TOOLNAME.
14052 (NUMCELLS): Increase to 10.
14053 * configure, config.in: Regenerate.
14054
d149dd1d
PA
140552010-06-01 Pedro Alves <pedro@codesourcery.com>
14056
14057 * server.c (handle_query) <qSupported>: Do two passes over the
14058 qSupported string to avoid nesting strtok.
14059
f6528abd
JK
140602010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14061
14062 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14063 (CDEPS): New.
14064 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14065 -Wl,--dynamic-list.
14066 * configure: Regenerate.
14067 * proc-service.list: New.
14068
ca2a87a0
JK
140692010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14070
14071 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14072 New comment.
14073
363a6e9f
OS
140742010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14075
14076 * gdbreplay.c (remote_open): Check error return from socket() call by
14077 its equality to -1 not by it being negative.
14078 * remote-utils.c (remote_open): Likewise.
14079
d23b6cb1
PA
140802010-05-23 Pedro Alves <pedro@codesourcery.com>
14081
14082 * config.h: Regenerate.
14083
28d3cf85
MK
140842010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14085
14086 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14087 doesn't provide PTRACE_GET_THREAD_AREA.
14088
fea36a59
MK
140892010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14090
14091 * linux-m68k-low.c: Include <asm/ptrace.h>
14092 (ps_get_thread_area): Implement.
14093
24b066ba
DE
140942010-05-03 Doug Evans <dje@google.com>
14095
14096 * event-loop.c (struct callback_event): New struct.
14097 (callback_list): New global.
14098 (append_callback_event, delete_callback_event): New functions.
14099 (process_callback): New function.
14100 (start_event_loop): Call it.
14101 * remote-utils.c (NOT_SCHEDULED): Define.
14102 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14103 moved out of readchar.
14104 (readchar): Rewrite. Call reschedule before returning.
14105 (reset_readchar): New function.
14106 (remote_close): Call it.
14107 (process_remaining, reschedule): New functions.
14108 * server.h (callback_handler_func): New typedef.
14109 (append_callback_event, delete_callback_event): Declare.
14110
9836d6ea
PA
141112010-05-03 Pedro Alves <pedro@codesourcery.com>
14112
14113 * proc-service.c (ps_pglobal_lookup): Use
14114 thread_db_look_up_one_symbol.
14115 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14116 parameter. Use it instead of all_symbols_looked_up.
14117 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14118 field.
14119 (all_symbols_looked_up): Don't declare.
14120 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14121 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14122 field.
14123 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14124 Set all_symbols_looked_up here.
14125 (thread_db_look_up_one_symbol): New.
14126 (thread_db_get_tls_address): Adjust.
14127 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14128 thread_db object on the heap, and tentatively set it in the
14129 process structure.
14130 (thread_db_init): Don't set all_symbols_looked_up here.
14131 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14132
7984d532
PA
141332010-05-03 Pedro Alves <pedro@codesourcery.com>
14134
14135 * linux-low.c (linux_kill, linux_detach): Adjust.
14136 (status_pending_p_callback): Remove redundant statement. Check
14137 for !TARGET_WAITIKIND_IGNORE, instead of
14138 TARGET_WAITKIND_STOPPED.
14139 (handle_tracepoints): Make sure LWP is locked. Adjust.
14140 (linux_wait_for_event_1): Adjust.
14141 (linux_cancel_breakpoints): New.
14142 (unsuspend_one_lwp): New.
14143 (unsuspend_all_lwps): New.
14144 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14145 (send_sigstop_callback): Change return type to int, add new
14146 `except' parameter and handle it.
14147 (suspend_and_send_sigstop_callback): New.
14148 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14149 pass them down. If SUSPEND, also increment the lwp's suspend
14150 count.
14151 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14152 (need_step_over_p): Don't consider suspended LWPs.
14153 (start_step_over): Adjust.
14154 (proceed_one_lwp): Change return type to int, add new `except'
14155 parameter and handle it.
14156 (unsuspend_and_proceed_one_lwp): New.
14157 (proceed_all_lwps): Use find_inferior instead of
14158 for_each_inferior.
14159 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14160 also decrement the suspend count of LWPs. Pass `except' down,
14161 instead of hacking its suspend count.
14162 (linux_pause_all): Add `freeze' parameter. Adjust.
14163 (linux_unpause_all): New.
14164 (linux_target_ops): Install linux_unpause_all.
14165 * server.c (handle_status): Adjust.
14166 * target.h (struct target_ops): New fields `unpause_all' and
14167 `cancel_breakpoints'. Add new parameter to `pause_all'.
14168 (pause_all): Add new `freeze' parameter.
14169 (unpause_all): New.
14170 (cancel_breakpoints): New.
14171 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14172 cancel breakpoints.
14173 (cmd_qtstart): Pause threads.
14174 (stop_tracing): Pause threads, and cancel breakpoints.
14175 * win32-low.c (win32_target_ops): Adjust.
14176
e471f25b
PA
141772010-05-03 Pedro Alves <pedro@codesourcery.com>
14178
14179 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14180 the inferior right away from here...
14181 (linux_wait_1): ... to here, and adjust to check the thread's
14182 last_resume_kind instead of the lwp's step or stop_expected flags.
14183
1915ef4f
PA
141842010-05-02 Pedro Alves <pedro@codesourcery.com>
14185
14186 * README: Use consistent `GDB' and `GDBserver' spellings.
14187
f9e39928
PA
141882010-05-02 Pedro Alves <pedro@codesourcery.com>
14189
14190 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14191 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14192 (linux_detach_one_lwp): Assume the lwp is stopped.
14193 (any_thread_of): Delete.
14194 (linux_detach): Stop all lwps here. Don't blindly delete all
14195 breakpoints.
14196 (delete_lwp_callback): New.
14197 (linux_mourn): Delete all lwps of the process that is gone.
14198 (linux_wait_1): Don't delete the last lwp of the process here.
14199 * mem-break.h (mark_breakpoints_out): Declare.
14200 * mem-break.c (mark_breakpoints_out): New.
14201 (free_all_breakpoints): Use it.
14202 * server.c (handle_target_event): If the process is gone, mark
14203 breakpoints out.
14204 * thread-db.c (struct thread_db) <create_bp>: New field.
14205 (thread_db_enable_reporting): Fix prototype. Store a thread event
14206 breakpoint reference in the thread_db struct.
14207 (thread_db_load_search): Clear the thread_db object.
14208 (try_thread_db_load_1): Ditto.
14209 (switch_to_process): New.
14210 (disable_thread_event_reporting): Use it.
14211 (remove_thread_event_breakpoints): New.
14212 (thread_db_detach, thread_db_mourn): Use it.
14213
1e7fc18c
PA
142142010-05-01 Pedro Alves <pedro@codesourcery.com>
14215
14216 * linux-low.c (linux_enable_event_reporting): New.
14217 (linux_wait_for_event_1, handle_extended_wait): Use it.
14218
02fc4de7
PA
142192010-04-30 Pedro Alves <pedro@codesourcery.com>
14220
14221 * linux-low.c (linux_kill_one_lwp, linux_kill)
14222 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14223 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14224 SIGSTOP even if the LWP is stopped.
14225 (send_sigstop_callback): New.
14226 (stop_all_lwps): Use send_sigstop_callback instead.
14227 (linux_resume_one_thread): Adjust.
14228 (proceed_one_lwp): Still proceed an LWP that the client has
14229 requested to stop, if we haven't reported it as stopped yet. Make
14230 sure that LWPs the client want stopped, have a pending SIGSTOP.
14231
bc3b5632
DE
142322010-04-26 Doug Evans <dje@google.com>
14233
ae1ada35
DE
14234 * server.c (handle_general_set): Make static.
14235
bc3b5632
DE
14236 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14237 Print received char after testing for error/eof instead of before.
14238 (input_interrupt): Tweak comment.
14239
65730243
DE
142402010-04-23 Doug Evans <dje@google.com>
14241
14242 * server.c (start_inferior): Print inferior argv if --debug.
14243
a8ae7dc0
AR
142442010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14245
14246 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14247 * nto-x86-low.c: Include server.h
14248
1c07cc19
PM
142492010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14250
14251 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14252 be consistent with other sources of this directory.
14253 (init_registers_amd64): Correct name of source file of this function
14254 in the comment.
14255
e0a61e09
PM
142562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14257
14258 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14259 64-bit executables.
14260
54709339
PM
142612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14262
14263 * win32-i386-low.c: Add 64-bit support.
14264 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14265 (init_registers_amd64): Declare.
14266 (mappings): Add 64-bit version of array.
14267 (init_windows_x86): New function.
14268 (the_low_target): Change init_arch field to init_windows_x86.
14269
e8f0053d
PM
142702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14271
14272 * win32-low.c: Adapt to support also 64-bit architecture.
14273 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14274 (get_image_name): Use SIZE_T type for local variable `done'.
14275 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14276 (toolhelp_get_dll_name): Idem.
14277 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14278 Use uintptr_t typecast to avoid warning.
14279 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14280 (handle_exception): Use phex_nz to avoid warning.
14281 (win32_wait): Remove unused local variable `process'.
14282
c481e77e
PM
142832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14284
14285 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14286 `amd64-avx.o'.
14287
12ea4b69
PM
142882010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14289
14290 * configure.ac: Use `ws2_32' library for srv_mingw.
14291 * configure: Regenerate.
14292 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14293 * remote-utils.c: Likewise.
14294
f6d1620c
L
142952010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14296
14297 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14298 if __x86_64__ is defined.
14299
8e642873
PM
143002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14301
14302 * configure: Regenerate.
14303
711e434b
PM
143042010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14305
14306 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14307 * target.h (target_ops): New get_tib_address field.
14308 * win32-low.h (win32_thread_info): Add thread_local_base field.
14309 * win32-low.c (child_add_thread): Add tlb argument.
14310 Set thread_local_base field to TLB.
14311 (get_child_debug_event): Adapt to child_add_thread change.
14312 (win32_get_tib_address): New function.
14313 (win32_target_ops): Set get_tib_address field to
14314 win32_get_tib_address.
14315 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14316
505106cd
PA
143172010-04-12 Pedro Alves <pedro@codesourcery.com>
14318
505106cd
PA
14319 * linux-low.c (linux_mourn): Also remove the process.
14320 * server.c (handle_target_event): Don't remove the process here.
14321 * nto-low.c (nto_mourn): New.
14322 (nto_target_ops): Install it.
14323 * spu-low.c (spu_mourn): New.
14324 (spu_target_ops): Install it.
14325 * win32-low.c (win32_mourn): New.
14326 (win32_target_ops): Install it.
14327
e8470a06
PA
143282010-04-12 Pedro Alves <pedro@codesourcery.com>
14329
14330 * server.h (buffer_xml_printf): Remove redundant `;'.
14331
45ba0d02
PA
143322010-04-12 Pedro Alves <pedro@codesourcery.com>
14333
14334 * regcache.c (set_register_cache): Invalidate regcaches before
14335 changing the register cache layout.
14336 (regcache_invalidate_one): Allow a NULL regcache.
14337 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14338 regcaches before changing the register cache layout or the target
14339 regsets.
14340
59e04013
L
143412010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14342
14343 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14344 variable warning on Linux/x86-64.
14345
8336d594
PA
143462010-04-11 Pedro Alves <pedro@codesourcery.com>
14347
14348 GDBserver disconnected tracing support.
14349
14350 * linux-low.c (linux_remove_process): Delete.
14351 (add_lwp): Don't set last_resume_kind here.
14352 (linux_kill): Use `mourn'.
14353 (linux_detach): Use `thread_db_detach', and `mourn'.
14354 (linux_mourn): New.
14355 (linux_attach_lwp_1): Adjust comment.
14356 (linux_attach): last_resume_kind moved the thread_info; adjust.
14357 (status_pending_p_callback): Adjust.
14358 (linux_wait_for_event_1): Adjust.
14359 (count_events_callback, select_singlestep_lwp_callback)
14360 (select_event_lwp_callback, cancel_breakpoints_callback)
14361 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14362 (proceed_one_lwp): Adjust.
14363 (linux_async): Add debug output.
14364 (linux_thread_stopped): New.
14365 (linux_pause_all): New.
14366 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14367 linux_pause_all.
14368 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14369 (thread_db_free): Delete declaration.
14370 (thread_db_detach, thread_db_mourn): Declare.
14371 * thread-db.c (thread_db_init): Use thread_db_mourn.
14372 (thread_db_free): Delete, split in two.
14373 (disable_thread_event_reporting): New.
14374 (thread_db_detach): New.
14375 (thread_db_mourn): New.
14376
14377 * server.h (struct thread_info) <last_resume_kind>: New field.
14378 <attached>: Add comment.
14379 <gdb_detached>: New field.
14380 (handler_func): Change return type to int.
14381 (handle_serial_event, handle_target_event): Ditto.
14382 (gdb_connected): Declare.
14383 (tracing): Delete.
14384 (disconnected_tracing): Declare.
14385 (stop_tracing): Declare.
14386
14387 * server.c (handle_query) <qSupported>: Report support for
14388 disconnected tracing.
14389 (queue_stop_reply_callback): Account for running threads.
14390 (gdb_wants_thread_stopped): New.
14391 (gdb_wants_all_threads_stopped): New.
14392 (gdb_reattached_process): New.
14393 (handle_status): Clear the `gdb_detached' flag of all processes.
14394 In all-stop, stop all threads.
14395 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14396 (process_serial_event): If the remote connection breaks, or if an
14397 exit was forced with "monitor exit", force an event loop exit.
14398 Handle disconnected tracing on detach.
14399 (handle_serial_event): Adjust.
14400 (handle_target_event): If GDB isn't connected, forward events back
14401 to the inferior, unless the last process exited, in which case,
14402 exit gdbserver. Adjust interface.
14403
14404 * remote-utils.c (remote_open): Don't block in accept. Instead
14405 register an event loop source on the listen socket file
14406 descriptor. Refactor bits into ...
14407 (listen_desc): ... this new global.
14408 (gdb_connected): ... this new function.
14409 (enable_async_notification): ... this new function.
14410 (handle_accept_event): ... this new function.
14411 (remote_close): Clear remote_desc.
14412
14413 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14414
14415 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14416 New fields.
14417 (mourn_inferior): Define.
14418 (target_process_qsupported): Avoid the dangling else problem.
14419 (thread_stopped): Define.
14420 (pause_all): Define.
14421 (target_waitstatus_to_string): Declare.
14422 * target.c (target_waitstatus_to_string): New.
14423
14424 * tracepoint.c (tracing): Make extern.
14425 (disconnected_tracing): New.
14426 (stop_tracing): Make extern. Handle tracing stops due to GDB
14427 disconnecting.
14428 (cmd_qtdisconnected): New.
14429 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14430 (handle_tracepoint_general_set): Handle QTDisconnected.
14431
14432 * event-loop.c (event_handler_func): Change return type to int.
14433 (process_event): Bail out if the event handler wants the event
14434 loop to stop.
14435 (handle_file_event): Ditto.
14436 (start_event_loop): Bail out if the event handler wants the event
14437 loop to stop.
14438
14439 * nto-low.c (nto_target_ops): Adjust.
14440 * spu-low.c (spu_wait): Don't remove the process here.
14441 (spu_target_ops): Adjust.
14442 * win32-low.c (win32_wait): Don't remove the process here.
14443 (win32_target_ops): Adjust.
14444
5d267c4c
PA
144452010-04-11 Pedro Alves <pedro@codesourcery.com>
14446
14447 * regcache.c (realloc_register_cache): Invalidate inferior's
14448 regcache before recreating it.
14449
623ccd72
PA
144502010-04-09 Pedro Alves <pedro@codesourcery.com>
14451
14452 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14453
219f2f23
PA
144542010-04-09 Stan Shebs <stan@codesourcery.com>
14455 Pedro Alves <pedro@codesourcery.com>
14456
14457 * server.h (LONGEST): New.
14458 (struct thread_info) <while_stepping>: New field.
14459 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14460 Declare.
14461 (initialize_tracepoint, handle_tracepoint_general_set)
14462 (handle_tracepoint_query, tracepoint_finished_step)
14463 (tracepoint_was_hit, release_while_stepping_state_list):
14464 (current_traceframe): Declare.
14465 * server.c (handle_general_set): Handle tracepoint packets.
14466 (read_memory): New.
14467 (write_memory): New.
14468 (handle_search_memory_1): Use read_memory.
14469 (handle_query): Report support for conditional tracepoints, trace
14470 state variables, and tracepoint sources. Handle tracepoint
14471 queries.
14472 (main): Initialize the tracepoints module.
14473 (process_serial_event): Handle traceframe reads/writes.
14474
14475 * linux-low.c (handle_tracepoints): New.
14476 (linux_wait_1): Call it.
14477 (linux_resume_one_lwp): Handle while-stepping.
14478 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14479 (linux_target_ops): Install them.
14480 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14481 New field.
14482 * linux-x86-low.c (x86_supports_tracepoints): New.
14483 (the_low_target). Install it.
14484
14485 * mem-break.h (delete_breakpoint): Declare.
14486 * mem-break.c (delete_breakpoint): Make external.
14487
14488 * target.h (struct target_ops): Add `supports_tracepoints',
14489 `read_pc', and `write_pc' fields.
14490 (target_supports_tracepoints): Define.
14491 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14492 (phex_nz): New.
14493
14494 * regcache.h (struct regcache) <registers_owned>: New field.
14495 (init_register_cache, regcache_cpy): Declare.
14496 (regcache_read_pc, regcache_write_pc): Declare.
14497 (register_cache_size): Declare.
14498 (supply_regblock): Declare.
14499 * regcache.c (init_register_cache): New.
14500 (new_register_cache): Use it.
14501 (regcache_cpy): New.
14502 (register_cache_size): New.
14503 (supply_regblock): New.
14504 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 14505
219f2f23
PA
14506 * tracepoint.c: New.
14507
14508 * Makefile.in (OBS): Add tracepoint.o.
14509 (tracepoint.o): New rule.
14510
3a13a53b
L
145112010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14512
14513 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14514 (i386-mmx.o): New.
14515 (i386-mmx.c): Likewise.
14516 (i386-mmx-linux.o): Likewise.
14517 (i386-mmx-linux.c): Likewise.
14518
14519 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14520 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14521 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14522 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14523
14524 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14525 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14526 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14527
1570b33e
L
145282010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14529
14530 * Makefile.in (clean): Updated.
14531 (i386-avx.o): New.
14532 (i386-avx.c): Likewise.
14533 (i386-avx-linux.o): Likewise.
14534 (i386-avx-linux.c): Likewise.
14535 (amd64-avx.o): Likewise.
14536 (amd64-avx.c): Likewise.
14537 (amd64-avx-linux.o): Likewise.
14538 (amd64-avx-linux.c): Likewise.
14539
14540 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14541 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14542 (srv_amd64_regobj): Add amd64-avx.o.
14543 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14544 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14545 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14546 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14547 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14548 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14549 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14550
14551 * i387-fp.c: Include "i386-xstate.h".
14552 (i387_xsave): New.
14553 (i387_cache_to_xsave): Likewise.
14554 (i387_xsave_to_cache): Likewise.
14555 (x86_xcr0): Likewise.
14556
14557 * i387-fp.h (i387_cache_to_xsave): Likewise.
14558 (i387_xsave_to_cache): Likewise.
14559 (x86_xcr0): Likewise.
14560
14561 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14562 * linux-crisv32-low.c (target_regsets): Likewise.
14563 * linux-m68k-low.c (target_regsets): Likewise.
14564 * linux-mips-low.c (target_regsets): Likewise.
14565 * linux-ppc-low.c (target_regsets): Likewise.
14566 * linux-s390-low.c (target_regsets): Likewise.
14567 * linux-sh-low.c (target_regsets): Likewise.
14568 * linux-sparc-low.c (target_regsets): Likewise.
14569 * linux-xtensa-low.c (target_regsets): Likewise.
14570
14571 * linux-low.c: Include <sys/uio.h>.
14572 (regsets_fetch_inferior_registers): Support nt_type.
14573 (regsets_store_inferior_registers): Likewise.
14574 (linux_process_qsupported): New.
14575 (linux_target_ops): Add linux_process_qsupported.
14576
14577 * linux-low.h (regset_info): Add nt_type.
14578 (linux_target_ops): Add process_qsupported.
14579
14580 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14581 and <sys/uio.h>.
14582 (init_registers_i386_avx_linux): New.
14583 (init_registers_amd64_avx_linux): Likewise.
14584 (xmltarget_i386_linux_no_xml): Likewise.
14585 (xmltarget_amd64_linux_no_xml): Likewise.
14586 (PTRACE_GETREGSET): Likewise.
14587 (PTRACE_SETREGSET): Likewise.
14588 (x86_fill_xstateregset): Likewise.
14589 (x86_store_xstateregset): Likewise.
14590 (use_xml): Likewise.
14591 (x86_linux_update_xmltarget): Likewise.
14592 (x86_linux_process_qsupported): Likewise.
14593 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14594 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14595 init_registers_i386_linux here. Call
14596 x86_linux_update_xmltarget.
14597 (the_low_target): Add x86_linux_process_qsupported.
14598
14599 * server.c (handle_query): Call target_process_qsupported.
14600
14601 * target.h (target_ops): Add process_qsupported.
14602 (target_process_qsupported): New.
14603
fc7238bb
PA
146042010-04-03 Pedro Alves <pedro@codesourcery.com>
14605
14606 * inferiors.c (add_thread): Set last_status kind to
14607 TARGET_WAITKIND_IGNORE.
14608 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14609 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14610 (linux_wait_1): Move `thread' local definition to block that uses
14611 it. Don't NULL initialize `event_child'.
14612 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14613 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14614 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14615
bdabb078
PA
146162010-04-01 Pedro Alves <pedro@codesourcery.com>
14617
14618 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14619 an extended waitstatus, or by a watchpoint.
14620 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14621 thread was stepping or has been stopped by a watchpoint.
14622
d3bbe7a0
PA
146232010-04-01 Pedro Alves <pedro@codesourcery.com>
14624
14625 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14626 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14627 of another, then delete the previous, and validate all
14628 breakpoints.
14629 (validate_inserted_breakpoint): New.
14630 (delete_disabled_breakpoints): New.
14631 (validate_breakpoints): New.
14632 (check_mem_read): Validate breakpoints before trusting their
14633 shadow. Delete disabled breakpoints.
14634 (check_mem_write): Validate breakpoints before trusting they
14635 should be inserted. Delete disabled breakpoints.
14636 * mem-break.h (validate_breakpoints):
14637 * server.c (handle_query): Validate breakpoints when we see a
14638 qSymbol query.
14639
8b07ae33
PA
146402010-04-01 Pedro Alves <pedro@codesourcery.com>
14641
14642 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14643 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14644 if we could tell there's a GDB breakpoint at stop_pc.
14645 (need_step_over_p): Don't do a step over if we find a GDB
14646 breakpoint at the resume PC.
14647
14648 * mem-break.c (struct raw_breakpoint): New.
14649 (enum bkpt_type): New type `gdb_breakpoint'.
14650 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14651 fields. New field `raw'.
14652 (find_raw_breakpoint_at): New.
14653 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14654 breakpoint instead.
14655 (set_breakpoint_at): Adjust.
14656 (delete_raw_breakpoint): New.
14657 (release_breakpoint): New.
14658 (delete_breakpoint): Rename to...
14659 (delete_breakpoint_1): ... this. Add proc parameter. Use
14660 release_breakpoint. Return ENOENT.
14661 (delete_breakpoint): Reimplement.
14662 (find_breakpoint_at): Delete.
14663 (find_gdb_breakpoint_at): New.
14664 (delete_breakpoint_at): Delete.
14665 (set_gdb_breakpoint_at): New.
14666 (delete_gdb_breakpoint_at): New.
14667 (gdb_breakpoint_here): New.
14668 (set_reinsert_breakpoint): Use release_breakpoint.
14669 (uninsert_breakpoint): Rename to ...
14670 (uninsert_raw_breakpoint): ... this.
14671 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14672 (reinsert_raw_breakpoint): Change parameter type to
14673 raw_breakpoint.
14674 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14675 instead.
14676 (check_breakpoints): Adjust. Use release_breakpoint.
14677 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14678 (breakpoint_inserted_here): Ditto.
14679 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14680 Don't trust the breakpoint's shadow if it is not inserted.
14681 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14682 (delete_all_breakpoints): Adjust.
14683 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14684 use delete_breakpoint_1.
14685
14686 * mem-break.h (breakpoints_supported): Delete declaration.
14687 (set_gdb_breakpoint_at): Declare.
14688 (gdb_breakpoint_here): Declare.
14689 (delete_breakpoint_at): Delete.
14690 (delete_gdb_breakpoint_at): Declare.
14691
14692 * server.h (struct raw_breakpoint): Forward declare.
14693 (struct process_info): New field `raw_breakpoints'.
14694
14695 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14696 breakpoints.
14697
6bf5e0ba
PA
146982010-03-24 Pedro Alves <pedro@codesourcery.com>
14699
14700 * linux-low.c (status_pending_p_callback): Fix comment.
14701 (linux_wait_for_event_1): Move most of the internal breakpoint
14702 handling from here...
14703 (linux_wait_1): ... to here.
14704 (count_events_callback): New.
14705 (select_singlestep_lwp_callback): New.
14706 (select_event_lwp_callback): New.
14707 (cancel_breakpoints_callback): New.
14708 (select_event_lwp): New.
14709 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14710 priority to all LWPs that have had events that should be reported
14711 to the client. Cancel breakpoints when about to reporting the
14712 event to the client, not while stopping lwps. No longer cancel
14713 finished single-steps here.
14714 (cancel_finished_single_step): Delete.
14715 (cancel_finished_single_steps): Delete.
14716
414a389f
PA
147172010-03-24 Pedro Alves <pedro@codesourcery.com>
14718
14719 * mem-break.c (enum bkpt_type): New.
14720 (struct breakpoint): New field `type'.
14721 (set_breakpoint_at): Change return type to struct breakpoint
14722 pointer. Set type to `other_breakpoint' by default.
14723 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14724 in the breakpoint list.
14725 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14726 (reinsert_breakpoint): Rename to ...
14727 (reinsert_raw_breakpoint): ... this.
14728 (reinsert_breakpoints_at): Adjust.
14729 * mem-break.h (struct breakpoint): Declare.
14730 (set_breakpoint_at): Change return type to struct breakpoint
14731 pointer.
14732
2280c721
PA
147332010-03-24 Pedro Alves <pedro@codesourcery.com>
14734
14735 * server.c (handle_query): Assign, not compare.
14736
d50171e4
PA
147372010-03-24 Pedro Alves <pedro@codesourcery.com>
14738
14739 Teach linux gdbserver to step-over-breakpoints.
14740
14741 * linux-low.c (can_hardware_single_step): New.
14742 (supports_breakpoints): New.
14743 (handle_extended_wait): If stopping threads, read the stop pc of
14744 the new cloned LWP.
14745 (get_pc): New.
14746 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14747 low target doesn't support retrieving the PC.
14748 (add_lwp): Set last_resume_kind to resume_continue.
14749 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14750 (linux_attach): Don't clear stop_expected. Set the lwp's
14751 last_resume_kind to resume_stop.
14752 (linux_detach_one_lwp): Don't check for removed breakpoints.
14753 (check_removed_breakpoint): Delete.
14754 (status_pending_p): Rename to ...
14755 (status_pending_p_callback): ... this. Don't check for removed
14756 breakpoints. Don't consider threads that are stopped from GDB's
14757 perspective.
14758 (linux_wait_for_lwp): Always read the stop_pc here.
14759 (cancel_breakpoint): New.
14760 (step_over_bkpt): New global.
14761 (linux_wait_for_event_1): Implement stepping over breakpoints.
14762 (gdb_wants_lwp_stopped): New.
14763 (gdb_wants_all_stopped): New.
14764 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14765 single-step traps here. Store the thread's last reported target
14766 wait status.
14767 (send_sigstop): Don't clear stop_expected. Always set it,
14768 instead.
14769 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14770 (cancel_finished_single_step): New.
14771 (cancel_finished_single_steps): New.
14772 (wait_for_sigstop): Don't cancel finished single-step traps here.
14773 (linux_resume_one_lwp): Don't check for removed breakpoints.
14774 Don't set `step' on non-hardware step archs.
14775 (linux_set_resume_request): Ignore resume_stop requests if already
14776 stopping or stopped. Set the lwp's last_resume_kind.
14777 (resume_status_pending_p): Don't check for removed breakpoints.
14778 (need_step_over_p): New.
14779 (start_step_over): New.
14780 (finish_step_over): New.
14781 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14782 requests. Clear the thread's last reported target waitstatus.
14783 Don't use the `suspended' flag. Don't consider pending breakpoints.
14784 (linux_resume): Start a step-over if necessary.
14785 (proceed_one_lwp): New.
14786 (proceed_all_lwps): New.
14787 (unstop_all_lwps): New.
14788 * linux-low.h (struct lwp_info): Rewrite comment for the
14789 `suspended' flag. Add the `stop_pc' field. Delete the
14790 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14791 Add `'last_resume_kind' and `need_step_over' fields.
14792 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14793 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14794 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14795 (set_raw_breakpoint_at): New.
14796 (set_breakpoint_at): Rewrite to use it.
14797 (reinsert_breakpoint_handler): Delete.
14798 (set_reinsert_breakpoint): New.
14799 (reinsert_breakpoint_by_bp): Delete.
14800 (delete_reinsert_breakpoints): New.
14801 (uninsert_breakpoint): Rewrite.
14802 (uninsert_breakpoints_at): New.
14803 (reinsert_breakpoint): Rewrite.
14804 (reinsert_breakpoints_at): New.
14805 (check_breakpoints): Rewrite.
14806 (breakpoint_here): New.
14807 (breakpoint_inserted_here): New.
14808 (check_mem_read): Adjust.
14809 * mem-break.h (breakpoints_supported, breakpoint_here)
14810 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14811 (reinsert_breakpoint_by_bp): Delete declaration.
14812 (delete_reinsert_breakpoints): Declare.
14813 (reinsert_breakpoint): Delete declaration.
14814 (reinsert_breakpoints_at): Declare.
14815 (uninsert_breakpoint): Delete declaration.
14816 (uninsert_breakpoints_at): Declare.
14817 (check_breakpoints): Adjust prototype.
14818 * server.h: Adjust include order.
14819 (struct thread_info): Declare here. Add a `last_status' field.
14820
30ba68cb
MS
148212010-03-23 Michael Snyder <msnyder@vmware.com>
14822
14823 * server.c (crc32): New function.
14824 (handle_query): Add handling for 'qCRC:' request.
14825
b9a881c2
PA
148262010-03-23 Pedro Alves <pedro@codesourcery.com>
14827
14828 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14829 lwp had been stopped by a watchpoint.
14830
e92d13d5
PA
148312010-03-16 Pedro Alves <pedro@codesourcery.com>
14832
14833 * server.h (internal_error): Declare.
14834 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14835 * utils.c (internal_error): New function.
14836
64daa791
AS
148372010-03-15 Andreas Schwab <schwab@redhat.com>
14838
14839 * configure.srv: Fix typo setting srv_regobj.
14840
f52cd8cd
PA
148412010-03-15 Pedro Alves <pedro@codesourcery.com>
14842
14843 * linux-low.c (fetch_register): Avoid passing a non string literal
14844 format to `error'.
14845 (usr_store_inferior_registers): Ditto.
14846
93ae6fdc
PA
148472010-03-14 Pedro Alves <pedro@codesourcery.com>
14848
14849 * linux-low.c (linux_write_memory): Bail out early if peeking
14850 memory failed.
14851
c3adc08c
PA
148522010-03-14 Pedro Alves <pedro@codesourcery.com>
14853
14854 * linux-low.h (struct lwp_info): New fields
14855 `stopped_by_watchpoint' and `stopped_data_address'.
14856 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14857 here, and cache them in the lwp object.
14858 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14859 directly.
14860 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14861 field.
14862 (linux_stopped_by_watchpoint): Rewrite.
14863 (linux_stopped_data_address): Rewrite.
14864
bce522a2
PA
148652010-03-06 Simo Melenius <simo.melenius@iki.fi>
14866
14867 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14868 switching the current inferior, not before.
14869
90884b2b
L
148702010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14871
14872 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14873 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14874 i386-linux.c and amd64-linux.c.
14875 (reg-i386.o): Removed.
14876 (reg-i386.c): Likewise.
14877 (reg-i386-linux.o): Likewise.
14878 (reg-i386-linux.c): Likewise.
14879 (reg-x86-64.o): Likewise.
14880 (reg-x86-64.c): Likewise.
14881 (reg-x86-64-linux.o): Likewise.
14882 (reg-x86-64-linux.c): Likewise.
14883 (i386.o): New.
14884 (i386.c): Likewise.
14885 (i386-linux.o): Likewise.
14886 (i386-linux.c): Likewise.
14887 (amd64.o): Likewise.
14888 (amd64.c): Likewise.
14889 (amd64-linux.o): Likewise.
14890 (amd64-linux.c): Likewise.
14891
14892 * configure.srv (srv_i386_regobj): New.
14893 (srv_i386_linux_regobj): Likewise.
14894 (srv_amd64_regobj): Likewise.
14895 (srv_amd64_linux_regobj): Likewise.
14896 (srv_i386_32bit_xmlfiles): Likewise.
14897 (srv_i386_64bit_xmlfiles): Likewise.
14898 (srv_i386_xmlfiles): Likewise.
14899 (srv_amd64_xmlfiles): Likewise.
14900 (srv_i386_linux_xmlfiles): Likewise.
14901 (srv_amd64_linux_xmlfiles): Likewise.
14902 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14903 srv_xmlfiles to $srv_i386_xmlfiles.
14904 (i[34567]86-*-mingw32ce*): Likewise.
14905 (i[34567]86-*-mingw*): Likewise.
14906 (i[34567]86-*-nto*): Likewise.
14907 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14908 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14909 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14910 (x86_64-*-linux*): Likewise.
14911
14912 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14913 (init_registers_amd64_linux): New.
14914 (x86_arch_setup): Replace init_registers_x86_64_linux with
14915 init_registers_amd64_linux.
14916
193f13e6
MK
149172010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14918
14919 * configure.ac: Check for libdl. If it is not available link against
14920 static libthread_db.
14921 * configure: Regenerate.
14922
85d721b8
PA
149232010-02-22 Pedro Alves <pedro@codesourcery.com>
14924
14925 PR9605
14926
14927 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14928 handing a read watchpoint.
14929 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14930
6076632b
DE
149312010-02-12 Doug Evans <dje@google.com>
14932
14933 * linux-low.c (linux_supports_tracefork_flag): Document.
14934 (linux_look_up_symbols): Add comment.
14935
3327ccf7
L
149362010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14937
14938 * regcache.c (supply_register): Clear regcache if buf is NULL.
14939
0718675c 149402010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14941 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14942
14943 * inferiors.c (find_inferior): Add function documentation.
14944 (unloaded_dll): Handle the case where the unloaded dll has not
14945 been previously registered in the dll list.
14946
177321bd
DJ
149472010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14948
14949 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14950 (thumb2_breakpoint): New.
14951 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14952
2b009048
DJ
149532010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14954
14955 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14956 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14957 breakpoints.
14958
3be029c7
PA
149592010-01-21 Pedro Alves <pedro@codesourcery.com>
14960
14961 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14962
18f5de3b
JK
149632010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14964
14965 * linux-s390-low.c (s390_collect_ptrace_register)
14966 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14967
3743bb4f
DE
149682010-01-21 Doug Evans <dje@google.com>
14969
14ce3065
DE
14970 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14971 (PTRACE_ARG4_TYPE): New macro.
14972 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14973 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14974 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14975 (usr_store_inferior_registers): Ditto.
14976 (linux_read_memory, linux_write_memory): Ditto.
14977 (linux_test_for_tracefork): Ditto.
14978
3743bb4f
DE
14979 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14980 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14981
8b315be5
PA
149822010-01-21 Pedro Alves <pedro@codesourcery.com>
14983
14984 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14985 target.
14986
85492558
PA
149872010-01-21 Pedro Alves <pedro@codesourcery.com>
14988
14989 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14990 prototype to take a regcache. Adjust.
14991
442ea881
PA
149922010-01-20 Pedro Alves <pedro@codesourcery.com>
14993
14994 * regcache.h (struct thread_info): Forward declare.
14995 (struct regcache): New.
14996 (new_register_cache): Adjust prototype.
14997 (get_thread_regcache): Declare.
14998 (free_register_cache): Adjust prototype.
14999 (registers_to_string, registers_from_string): Ditto.
15000 (supply_register, supply_register_by_name, collect_register)
15001 (collect_register_as_string, collect_register_by_name): Ditto.
15002 * regcache.c (struct inferior_regcache_data): Delete.
15003 (get_regcache): Rename to ...
15004 (get_thread_regcache): ... this. Adjust. Switch inferior before
15005 fetching registers.
15006 (regcache_invalidate_one): Adjust.
15007 (regcache_invalidate): Fix prototype.
15008 (new_register_cache): Return the new register cache.
15009 (free_register_cache): Change prototype.
15010 (realloc_register_cache): Adjust.
15011 (registers_to_string): Change prototype to take a regcache. Adjust.
15012 (registers_from_string): Ditto.
15013 (register_data): Ditto.
15014 (supply_register): Ditto.
15015 (supply_register_by_name): Ditto.
15016 (collect_register): Ditto.
15017 (collect_register_as_string): Ditto.
15018 (collect_register_by_name): Ditto.
15019 * server.c (process_serial_event): Adjust.
15020 * linux-low.h (regset_fill_func, regset_store_func): Change
15021 prototype.
15022 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15023 Change prototype.
15024 * linux-low.c (get_stop_pc): Adjust.
15025 (check_removed_breakpoint): Adjust.
15026 (linux_wait_for_event): Adjust.
15027 (linux_resume_one_lwp): Adjust.
15028 (fetch_register): Add regcache parameter. Adjust.
15029 (usr_store_inferior_registers): Ditto.
15030 (regsets_fetch_inferior_registers): Ditto.
15031 (regsets_store_inferior_registers): Ditto.
15032 (linux_fetch_registers, linux_store_registers): Ditto.
15033 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15034 regcache. Adjust.
43aaf8b6
PA
15035 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15036 Ditto.
442ea881
PA
15037 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15038 prototype to take a regcache.
15039 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15040 * remote-utils.c (convert_ascii_to_int, outreg)
15041 (prepare_resume_reply): Change prototype to take a regcache.
15042 Adjust.
15043 * target.h (struct target_ops) <fetch_registers, store_registers>:
15044 Change prototype to take a regcache.
15045 (fetch_inferior_registers, store_inferior_registers): Change
15046 prototype to take a regcache. Adjust.
15047 * proc-service.c (ps_lgetregs): Adjust.
15048 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15049 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15050 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15051 take a regcache. Adjust.
15052 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15053 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15054 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15055 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15056 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15057 (cris_cannot_fetch_register):
15058 (cris_breakpoint_at): Change prototype to take a regcache.
15059 Adjust.
15060 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15061 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15062 to take a regcache. Adjust.
15063 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15064 Adjust.
15065 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15066 take a regcache. Adjust.
15067 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15068 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15069 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15070 * linux-mips-low.c (mips_get_pc):
15071 (mips_set_pc): Change prototype to take a regcache. Adjust.
15072 (mips_reinsert_addr): Adjust.
15073 (mips_collect_register): Change prototype to take a regcache.
15074 Adjust.
15075 (mips_supply_register):
15076 (mips_collect_register_32bit, mips_supply_register_32bit)
15077 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15078 (mips_store_fpregset): Ditto.
43aaf8b6
PA
15079 * linux-ppc-low.c (ppc_supply_ptrace_register)
15080 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
15081 (parse_spufs_run): Adjust.
15082 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15083 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15084 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15085 take a regcache. Adjust.
15086 * linux-s390-low.c (s390_collect_ptrace_register)
15087 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15088 (s390_set_pc): Change prototype to take a regcache. Adjust.
15089 (s390_arch_setup): Adjust.
15090 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15091 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15092 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15093 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15094 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15095 regcache. Adjust.
15096 (sparc_breakpoint_at): Adjust.
15097 * linux-xtensa-low.c (xtensa_fill_gregset):
15098 (xtensa_store_gregset):
15099 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15100 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15101 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15102 prototype to take a regcache. Adjust.
15103 * win32-arm-low.c (arm_fetch_inferior_register)
15104 (arm_store_inferior_register): Change prototype to take a
15105 regcache. Adjust.
15106 * win32-i386-low.c (i386_fetch_inferior_register)
15107 (i386_store_inferior_register): Change prototype to take a
15108 regcache. Adjust.
15109 * win32-low.c (child_fetch_inferior_registers)
15110 (child_store_inferior_registers): Change prototype to take a
15111 regcache. Adjust.
15112 (win32_wait): Adjust.
15113 (win32_fetch_inferior_registers): Change prototype to take a
15114 regcache. Adjust.
15115 (win32_store_inferior_registers): Adjust.
15116 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15117 store_inferior_register>: Change prototype to take a regcache.
15118
60c3d7b0
DE
151192010-01-20 Doug Evans <dje@google.com>
15120
15121 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15122 #ifdef.
15123 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 15124 (W_STOPCODE): Provide definition if missing.
60c3d7b0 15125
dc146f7c
VP
151262010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15127
15128 * linux-low.c (linux_core_of_thread): New.
15129 (compare_ints, show_process, list_threads): New.
15130 (linux_qxfer_osdata): Report threads and cores.
15131 (linux_target_op): Register linux_core_of_thread.
15132 * remote-utils.c (prepare_resume_reply): Report the core.
15133 (buffer_xml_printf): Support %d specifier.
15134 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15135 New.
15136 (handle_query): Handle qXfer:threads. Announce availability
15137 thereof.
15138 * target.h (struct target_ops): New field core_of_thread.
15139
7803799a
UW
151402010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15141
15142 * Makefile.in (clean): Remove new generated files.
15143 (reg-s390.o, reg-s390.c): Remove rules.
15144 (reg-s390x.o, reg-s390x.c): Likewise.
15145 (s390-linux32.o, s390-linux32.c): Add rules.
15146 (s390-linux64.o, s390-linux64.c): Likewise.
15147 (s390x-linux64.o, s390x-linux64.c): Likewise.
15148 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15149 * linux-s390-low.c: Include <elf.h>.
15150 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15151 (init_registers_s390): Remove prototype.
15152 (init_registers_s390x): Likewise.
15153 (init_registers_s390_linux32): Add prototype.
15154 (init_registers_s390_linux64): Likewise.
15155 (init_registers_s390x_linux64): Likewise.
15156 (s390_num_regs_3264): New define.
15157 (s390_regmap_3264): New global variable.
15158 (s390_cannot_fetch_register): Remove obsolete check.
15159 (s390_cannot_store_register): Likewise.
15160 (s390_collect_ptrace_register): Handle upper/lower register halves.
15161 (s390_supply_ptrace_register): Likewise.
15162 (s390_fill_gregset): Update to register number changes.
15163 (s390_get_hwcap): New routine.
15164 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15165 Install appropriate regmap and register set.
15166
6e7ffa39
JB
151672010-01-01 Joel Brobecker <brobecker@adacore.com>
15168
15169 * server.c (gdbserver_version): Update copyright year to 2010.
15170 * gdbreplay.c (gdbreplay_version): Likewise.
15171
957f3f49
DE
151722009-12-28 Doug Evans <dje@google.com>
15173
15174 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15175 elf/external.h. Include <elf.h> instead but only if necessary.
15176
ca5c370d
PA
151772009-12-28 Pedro Alves <pedro@codesourcery.com>
15178
15179 * linux-low.c (linux_remove_process): Remove `detaching'
15180 parameter. Don't release/detach from thread_db here.
15181 (linux_kill): Release/detach from thread_db here, ...
15182 (linux_detach): ... and here, before actually detaching.
15183 (linux_wait_1): ... and here, when a process exits.
15184 * thread-db.c (any_thread_of): New.
15185 (thread_db_free): Switch the current inferior to a thread of the
15186 passed in process.
15187
4ee62156
DE
151882009-12-21 Doug Evans <dje@google.com>
15189
d90e6a88
DE
15190 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15191
c5f62d5f
DE
15192 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15193 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15194 warning ifndef __NR_tkill. Move setting of errno there too.
15195 Delete unnecessary resetting of errno after syscall.
15196 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15197
10e86dd7
DE
15198 * configure.ac: Check for dladdr.
15199 * config.in: Regenerate.
15200 * configure: Regenerate.
15201 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15202 (try_thread_db_load): Update.
15203
4ee62156
DE
15204 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15205
00f515da
DE
152062009-12-18 Doug Evans <dje@google.com>
15207
e9464885
DE
15208 * event-loop.c: Include unistd.h if it exists.
15209
07d4f67e
DE
15210 * linux-low.c (my_waitpid): Move definition away from being in
15211 between linux_tracefork_child/linux_test_for_tracefork.
15212
00f515da
DE
15213 * gdb_proc_service.h (psaddr_t): Fix type.
15214 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15215 signature to match glibc.
15216
1de1badb
DE
152172009-12-16 Doug Evans <dje@google.com>
15218
15219 * linux-low.c (linux_read_memory): Fix argument to read.
15220
aeeb81d1
PA
152212009-11-26 Pedro Alves <pedro@codesourcery.com>
15222
15223 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15224 events, don't leave current_inferior pointing at null.
15225
10357975
PA
152262009-11-26 Pedro Alves <pedro@codesourcery.com>
15227
15228 * win32-low.c (LOG): Delete.
15229 (OUTMSG): Output to stderr.
15230 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15231 on compile time LOG macro.
15232 (win32_wait): Fix debug output.
15233
cf6e3471
PA
152342009-11-26 Pedro Alves <pedro@codesourcery.com>
15235
15236 * win32-low.c (win32_add_one_solib): If the dll name is
15237 "ntdll.dll", prepend the system directory to the dll path.
15238
0c85e18e
MK
152392009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15240
15241 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15242
9ac544ce 152432009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 15244 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
15245
15246 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15247 * configure.ac: Check for __mcoldfire__ and set
15248 gdb_cv_m68k_is_coldfire.
15249 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15250 reg-cf.o and reg-m68k.o.
15251 * configure: Regenerated.
15252
fd7dd3e6
PA
152532009-11-16 Pedro Alves <pedro@codesourcery.com>
15254
15255 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15256 Pass it to thread_db_free.
15257 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15258 proper `detaching' argument to linux_remove_process.
15259 * linux-low.h (thread_db_free): Add `detaching' parameter.
15260 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15261 to thread_db_free.
15262 (thread_db_free): Add `detaching' parameter. Only
15263 call td_ta_clear_event if detaching from process.
15264
75aa492e
MK
152652009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15266
15267 * thread-db.c (thread_db_free): Fix typo.
15268
21e1bee4
PP
152692009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15270
15271 PR gdb/10838
15272 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15273
8838b45e
NS
152742009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15275
15276 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15277 with an i686 compiler.
15278 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15279 needed.
15280 * configure: Rebuilt.
15281
8a35fb51
SL
152822009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15283
15284 PR gdb/10783
15285
15286 * server.c (handle_search_memory_1): Correct read_addr initialization
15287 in loop for searching subsequent chunks.
15288
96f15937
PP
152892009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15290
15291 * configure.ac: New --with-libthread-db option.
15292 * thread-db.c: Allow direct dependence on libthread_db.
15293 (thread_db_free): Adjust.
15294 * config.in: Regenerate.
15295 * configure: Likewise.
889bf7c5 15296
5f7d1694
PP
152972009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15298
15299 PR gdb/10757
15300 * thread-db.c (attach_thread): New function.
15301 (maybe_attach_thread): Return success/failure.
15302 (find_new_threads_callback): Adjust.
889bf7c5
PA
15303 (thread_db_find_new_threads): Loop until no new threads.
15304
88e3b899
PA
153052009-10-13 Pedro Alves <pedro@codesourcery.com>
15306
15307 * proc-service.c (ps_lgetregs): Formatting.
15308
cdbfd419
PP
153092009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15310
15311 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15312 * configure.ac: Adjust.
15313 * linux-low.h (struct process_info_private): Move members to struct
15314 thread_db.
15315 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15316 * linux-low.c (linux_remove_process): Adjust.
15317 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15318 * server.c (handle_query): Move code ...
15319 (handle_monitor_command): ... here. New function.
15320 * target.h (struct target_ops): New member.
15321 * thread-db.c (struct thread_db): New.
15322 (libthread_db_search_path): New variable.
15323 (thread_db_create_event, thread_db_enable_reporting)
15324 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15325 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15326 (try_thread_db_load_1, dladdr_to_soname): New functions.
15327 (try_thread_db_load, thread_db_load_search): New functions.
15328 (thread_db_init): Search for libthread_db.
15329 (thread_db_free): New function.
15330 (thread_db_handle_monitor_command): Likewise.
15331 * config.in: Regenerate.
15332 * configure: Regenerate.
889bf7c5 15333
4168d2d6
UW
153342009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15335
15336 * spu-low.c (spu_kill): Wait for inferior to terminate.
15337 Call clear_inferiors.
15338 (spu_detach): Call clear_inferiors.
15339
81ecdfbb
RW
153402009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15341
15342 * aclocal.m4: Regenerate.
15343 * config.in: Likewise.
15344 * configure: Likewise.
15345
0b9ff2c0
UW
153462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15347
15348 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15349 (parse_spufs_run): New function.
15350 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15351 (ppc_breakpoint_at): Handle SPU breakpoints.
15352
efcbbd14
UW
153532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15354
15355 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15356 (SPUFS_MAGIC): Define.
15357 (spu_enumerate_spu_ids): New function.
15358 (linux_qxfer_spu): New function.
15359 (linux_target_ops): Install linux_qxfer_spu.
15360
f4d9bade
UW
153612009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15362
15363 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15364 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15365 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15366 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15367 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15368 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15369 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15370 (init_registers_powerpc_cell32l): Add prototype.
15371 (init_registers_powerpc_cell64l): Likewise.
15372 (ppc_arch_setup): Detect Cell/B.E. architecture.
15373
96e946ca
RW
153742009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15375
15376 * Makefile.in (datarootdir): New variable.
15377
58d6951d
DJ
153782009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15379
15380 * linux-low.c (linux_write_memory): Update debugging output.
15381 * Makefile.in (clean): Add new descriptions.
15382 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15383 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15384 * configure.srv: Add new files for arm*-*-linux*.
15385 * linux-arm-low.c: Add new declarations.
15386 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15387 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15388 (HWCAP_VFPv3D16): New.
15389 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15390 instead of __IWMMXT__.
15391 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15392 (arm_arch_setup): New.
15393 (target_regsets): Remove #ifdef. Add VFP regset.
15394 (the_low_target): Use arm_arch_setup.
15395
12b42a12
DJ
153962009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15397
15398 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15399 the main thread again.
15400
ac8c974e
AR
154012009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15402
15403 Adding Neutrino gdbserver.
15404 * configure: Regenerated.
15405 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15406 * configure.srv (i[34567]86-*-nto*): New target.
15407 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15408 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15409 (nto_comctrl) [__QNX__]: New function.
15410 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15411
4424e0c3 154122009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
15413
15414 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15415 srv_tgtobj.
15416
912cf4ba
PA
154172009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15418 Pedro Alves <pedro@codesourcery.com>
15419
15420 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15421 don't support CONTEXT_EXTENDED_REGISTERS.
15422 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15423 (the_low_target): Install them.
15424 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15425 failing with ERROR_PIPE_NOT_CONNECTED.
15426
aa5ca48f
DE
154272009-06-30 Doug Evans <dje@google.com>
15428 Pierre Muller <muller@ics.u-strasbg.fr>
15429
15430 Add h/w watchpoint support to x86-linux, win32-i386.
15431 * Makefile.in (SFILES): Add i386-low.c
15432 (i386_low_h): Define.
15433 (i386-low.o): Add dependencies.
15434 (linux-x86-low.o): Add i386-low.h dependency.
15435 (win32-i386-low.o): Ditto.
15436 * i386-low.c: New file.
15437 * i386-low.h: New file.
15438 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15439 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15440 * linux-low.c (linux_add_process): Initialize arch_private.
15441 (linux_remove_process): Free arch_private.
15442 (add_lwp): Initialize arch_private.
15443 (delete_lwp): Free arch_private.
15444 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15445 provided.
15446 * linux-low.h (process_info_private): New member arch_private.
15447 (lwp_info): New member arch_private.
15448 (linux_target_ops): New members new_process, new_thread,
15449 prepare_to_resume.
15450 (ptid_of): New macro.
15451 * linux-x86-low.c: Include stddef.h, i386-low.h.
15452 (arch_process_info): New struct.
15453 (arch_lwp_info): New struct.
15454 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15455 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15456 (i386_dr_low_get_status): New function.
15457 (x86_insert_point, x86_remove_point): New functions.
15458 (x86_stopped_by_watchpoint): New function.
15459 (x86_stopped_data_address): New function.
15460 (x86_linux_new_process, x86_linux_new_thread): New functions.
15461 (x86_linux_prepare_to_resume): New function.
15462 (the_low_target): Add entries for insert_point, remove_point,
15463 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15464 prepare_to_resume.
15465 * server.c (debug_hw_points): New global.
15466 (monitor_show_help): Document set debug-hw-points.
15467 (handle_query): Process "set debug-hw-points".
15468 * server.h (debug_hw_points): Declare.
15469 (paddress): Declare.
15470 * utils.c (NUMCELLS, CELLSIZE): New macros.
15471 (get_sell, xsnprintf, paddress): New functions.
15472 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15473 remove_point, stopped_by_watchpoint, stopped_data_address.
15474 * win32-i386-low.c: Include i386-low.h.
15475 (debug_reg_state): Replaces dr.
15476 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15477 (i386_dr_low_get_status): New function.
15478 (i386_insert_point, i386_remove_point): New functions.
15479 (i386_stopped_by_watchpoint): New function.
15480 (i386_stopped_data_address): New function.
15481 (i386_initial_stuff): Update.
15482 (get_thread_context,set_thread_context,i386_thread_added): Update.
15483 (the_low_target): Add entries for insert_point,
15484 remove_point, stopped_by_watchpoint, stopped_data_address.
15485 * win32-low.c (win32_insert_watchpoint): New function.
15486 (win32_remove_watchpoint): New function.
15487 (win32_stopped_by_watchpoint): New function.
15488 (win32_stopped_data_address): New function.
15489 (win32_target_ops): Add entries for insert_watchpoint,
15490 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15491 * win32-low.h (win32_target_ops): New members insert_point,
15492 remove_point, stopped_by_watchpoint, stopped_data_address.
15493
d993e290
PA
154942009-06-25 Pedro Alves <pedro@codesourcery.com>
15495
15496 * server.c (process_serial_event): Re-return unsupported, not
15497 error, if the type isn't recognized. Re-allow supporting only
15498 insert or remove packets. Also call require_running for
15499 breakpoints. Add missing break statement to default case. Tidy.
15500 * target.h (struct target_ops): Rename insert_watchpoint to
15501 insert_point, and remove_watchpoint to remove_point.
15502
15503 * linux-low.h (struct linux_target_ops): Likewise.
15504 * linux-low.c (linux_insert_watchpoint): Rename to ...
15505 (linux_insert_point): ... this. Adjust.
15506 (linux_remove_watchpoint): Rename to ...
15507 (linux_remove_point): ... this. Adjust.
15508 (linux_target_ops): Adjust.
15509 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15510 (cris_insert_point): ... this.
15511 (cris_remove_watchpoint): Rename to ...
15512 (cris_remove_point): ... this.
15513 (the_low_target): Adjust.
15514
0f54c268
PM
155152009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15516
15517 * server.c (handle_v_kill): Pass signal_pid to
15518 kill_inferior if multi_process is zero.
15519
c6314022
AR
155202009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15521
15522 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15523 * target.h (target_ops): Comment for *_watchpoint to make it clear
15524 the functions can get types '0' and '1'.
15525
4463ce24
AR
155262009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15527
15528 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15529 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15530 * regcache.c (get_regcache): Likewise.
15531 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15532 * win32-low.c (child_fetch_inferior_registers): Remove check for
15533 regno 0.
15534
cf8fd78b
PA
155352009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15536 Pedro Alves <pedro@codesourcery.com>
15537
15538 * target.h (struct target_ops) <supports_multi_process>: New
15539 callback.
15540 (target_supports_multi_process): New.
15541 * server.c (handle_query): Even if GDB reports support, only
15542 enable multi-process if the target also supports it. Report
15543 multi-process support only if the target backend supports it.
15544 * linux-low.c (linux_supports_multi_process): New function.
15545 (linux_target_ops): Install it as target_supports_multi_process
15546 callback.
15547
47c0c975
DE
155482009-05-24 Doug Evans <dje@google.com>
15549
e09875d4
DE
15550 Global renaming of find_thread_pid to find_thread_ptid.
15551 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15552 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15553 All callers updated.
15554
e27d73f6
DE
15555 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15556 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15557 directly.
15558
47c0c975
DE
15559 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15560 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15561 (linux_resume_one_lwp): Ditto.
15562
2acc282a
DE
155632009-05-23 Doug Evans <dje@google.com>
15564
15565 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15566 from struct inferior_list_entry * to struct lwp_info *.
15567 All callers updated.
15568
9f1036c1
DE
155692009-05-13 Doug Evans <dje@google.com>
15570
15571 * linux-x86-low.c: Don't include assert.h.
15572 (x86_siginfo_fixup): Use fatal, not assert.
15573 (x86_arch_setup): Fix comment.
15574
d0722149
DE
155752009-05-12 Doug Evans <dje@google.com>
15576
15577 Biarch support for i386/amd64 gdbserver.
15578 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15579 Add linux-x86-low.c.
15580 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15581 (linux-x86-low.o): Add.
15582 * linux-x86-64-low.c: Delete.
15583 * linux-i386-low.c: Delete.
15584 * linux-x86-low.c: New file.
15585 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15586 linux-x86-low.o.
15587 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15588 linux-x86-low.o.
15589 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15590 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15591 (linux_child_pid_to_exec_file): New function.
15592 (elf_64_header_p, elf_64_file_p): New functions.
15593 (siginfo_fixup): New function.
15594 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15595 give target a chance to convert layout.
15596 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15597 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15598
fdeb2a12
DE
155992009-05-07 Doug Evans <dje@google.com>
15600
15601 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15602 (regsets_store_inferior_registers): Ditto.
15603
a6dbe5df
PA
156042009-05-06 Pedro Alves <pedro@codesourcery.com>
15605
15606 PR server/10048
15607
15608 * linux-low.c (must_set_ptrace_flags): Delete.
15609 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15610 of the global.
15611 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15612 `lwp->must_set_ptrace_flags' instead.
ba42693b 15613 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15614 (linux_wait_1): ... not here.
15615
5091eb23
DE
156162009-04-30 Doug Evans <dje@google.com>
15617
9f767825
DE
15618 * inferiors.c (started_inferior_callback): New function.
15619 (attached_inferior_callback): New function.
15620 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15621 * server.c (print_started_pid, print_attached_pid): New functions.
15622 (detach_or_kill_for_exit): New function.
15623 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15624 * server.h (have_started_inferiors_p): Declare.
15625 (have_attached_inferiors_p): Declare.
15626
5091eb23
DE
15627 * inferiors.c (remove_process): Fix memory leak, free process.
15628 * linux-low.c (linux_remove_process): New function.
15629 (linux_kill): Call it instead of remove_process.
15630 (linux_detach, linux_wait_1): Ditto.
15631
155c8968
PA
156322009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15633
15634 * configure.srv: Add x86 Windows CE target.
15635
7fe519cb
UW
156362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15637
15638 * inferiors.c (get_thread_process): Make global.
15639 * server.h (get_thread_process): Add prototype.
15640 * thread-db.c (find_one_thread): Use get_thread_process
15641 instead of current_process.
15642 (thread_db_get_tls_address): Do not crash if called when
15643 thread layer is not yet initialized.
15644
5472f405
UW
156452009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15646
15647 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15648 * spu-low.c (current_tid): Rename to ...
15649 (current_ptid): ... this.
15650 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15651 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15652 ptid_get_lwp (current_ptid) instead of current_tid.
15653 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15654 instead of current_tid. Use find_process_pid to verify pid
15655 argument is valid. Pass proper argument to remove_process.
15656 (spu_thread_alive): Compare current_ptid instead of current_tid.
15657 (spu_resume): Likewise.
15658
55ac2b99
PA
156592009-04-02 Pedro Alves <pedro@codesourcery.com>
15660
15661 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15662 variable.
15663
95954743
PA
156642009-04-01 Pedro Alves <pedro@codesourcery.com>
15665
15666 Implement the multiprocess extensions, and add linux multiprocess
15667 support.
15668
15669 * server.h (ULONGEST): Declare.
15670 (struct ptid, ptid_t): New.
15671 (minus_one_ptid, null_ptid): Declare.
15672 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15673 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15674 (struct inferior_list_entry): Change `id' type from unsigned from
15675 to ptid_t.
15676 (struct sym_cache, struct breakpoint, struct
15677 process_info_private): Forward declare.
15678 (struct process_info): Declare.
15679 (current_process): Declare.
15680 (all_processes): Declare.
15681 (initialize_inferiors): Declare.
15682 (add_thread): Adjust to use ptid_t.
15683 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15684 (add_process, remove_process, find_thread_pid): Declare.
15685 (find_inferior_id): Adjust to use ptid_t.
15686 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15687 (multi_process): Declare.
15688 (push_event): Adjust to use ptid_t.
15689 (read_ptid, write_ptid): Declare.
15690 (prepare_resume_reply): Adjust to use ptid_t.
15691 (clear_symbol_cache): Declare.
15692 * inferiors.c (all_processes): New.
15693 (null_ptid, minus_one_ptid): New.
15694 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15695 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15696 (add_thread): Change unsigned long to ptid. Remove gdb_id
15697 parameter. Adjust.
15698 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15699 (gdb_id_to_thread): Rename to ...
15700 (find_thread_pid): ... this. Change unsigned long to ptid.
15701 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15702 (loaded_dll, pull_pid_from_list): Adjust.
15703 (add_process, remove_process, find_process_pid)
15704 (get_thread_process, current_process, initialize_inferiors): New.
15705 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15706 (struct target_waitstatus) <related_pid>: Ditto.
15707 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15708 return type to int.
15709 (struct target_ops) <join>: Add `pid' argument.
15710 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15711 (struct target_ops) <wait>: Add `ptid' field. Change return type
15712 to ptid.
15713 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15714 (mywait): Add `ptid' argument. Change return type to ptid_t.
15715 (target_pid_to_str): Declare.
15716 * target.c (set_desired_inferior): Adjust to use ptids.
15717 (mywait): Add new `ptid' argument. Adjust.
15718 (target_pid_to_str): New.
15719 * mem-break.h (free_all_breakpoints): Declare.
15720 * mem-break.c (breakpoints): Delelete.
15721 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15722 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15723 to use per-process breakpoint list.
15724 (free_all_breakpoints): New.
15725 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15726 (symbol_cache, all_symbols_looked_up): Delete.
15727 (hexchars): New.
15728 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15729 read_ptid): New.
15730 (prepare_resume_reply): Change ptid argument's type from unsigned
15731 long to ptid_t. Adjust. Implement W;process and X;process.
15732 (free_sym_cache, clear_symbol_cache): New.
15733 (look_up_one_symbol): Adjust to per-process symbol cache. *
15734 * server.c (cont_thread, general_thread, step_thread): Change type
15735 to ptid_t.
15736 (attached): Delete.
15737 (multi_process): New.
15738 (last_ptid): Change type to ptid_t.
15739 (struct vstop_notif) <ptid>: Change type to ptid_t.
15740 (queue_stop_reply, push_event): Change `ptid' argument's type to
15741 ptid_t.
15742 (discard_queued_stop_replies): Add `pid' argument.
15743 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15744 changes. Don't reference the `attached' global.
15745 (attach_inferior): Adjust to mywait interface changes.
15746 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15747 features. Handle and report "multiprocess+". Handle
15748 "qAttached:PID".
15749 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15750 changes.
15751 (handle_v_kill): New.
15752 (handle_v_stopped): Adjust to use target_pid_to_str.
15753 (handle_v_requests): Allow multiple attaches and runs when
15754 multiprocess extensions are in effect. Handle "vKill".
15755 (myresume): Adjust to use ptids.
15756 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15757 (handle_status): Adjust to discard_queued_stop_replies interface
15758 change.
15759 (first_thread_of, kill_inferior_callback)
15760 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15761 (main): Call initialize_inferiors. Adjust to use ptids, killing
15762 and detaching from all inferiors. Handle multiprocess packet
15763 variants.
15764 * linux-low.h: Include gdb_proc_service.h.
15765 (struct process_info_private): New.
15766 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15767 <lwpid_of>: Use ptid_get_lwp.
15768 (get_lwp_thread): Adjust.
15769 (struct lwp_info): Add `dead' member.
15770 (find_lwp_pid): Declare.
15771 * linux-low.c (thread_db_active): Delete.
15772 (new_inferior): Adjust comment.
15773 (inferior_pid): Delete.
15774 (linux_add_process): New.
15775 (handle_extended_wait): Adjust.
15776 (add_lwp): Change unsigned long to ptid.
15777 (linux_create_inferior): Add process to processes table. Adjust
15778 to use ptids. Don't set new_inferior here.
15779 (linux_attach_lwp): Rename to ...
15780 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15781 it. Adjust to use ptids.
15782 (linux_attach_lwp): New.
15783 (linux_attach): Add process to processes table. Don't set
15784 new_inferior here.
15785 (struct counter): New.
15786 (second_thread_of_pid_p, last_thread_of_process_p): New.
15787 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15788 multiple processes.
15789 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15790 processes. Remove process from process table.
15791 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15792 to multiple processes.
15793 (any_thread_of): New.
15794 (linux_detach): Add `pid' argument, and handle it. Remove process
15795 from processes table.
15796 (linux_join): Add `pid' argument. Handle it.
15797 (linux_thread_alive): Change unsighed long argument to ptid_t.
15798 Consider dead lwps as not being alive.
15799 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15800 threads we're not interested in.
15801 (same_lwp, find_lwp_pid): New.
15802 (linux_wait_for_lwp): Change `pid' argument's type from int to
15803 ptid_t. Adjust.
15804 (linux_wait_for_event): Rename to ...
15805 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15806 from int to ptid_t. Adjust.
15807 (linux_wait_for_event): New.
15808 (linux_wait_1): Add `ptid' argument. Change return type to
15809 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15810 that exit from the process table.
15811 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15812 Adjust.
15813 (mark_lwp_dead): New.
15814 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15815 stopping all threads, mark its main lwp as dead.
15816 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15817 ptids.
15818 (fetch_register, usr_store_inferior_registers)
15819 (regsets_fetch_inferior_registers)
15820 (regsets_store_inferior_registers, linux_read_memory)
15821 (linux_write_memory): Inline `inferior_pid'.
15822 (linux_look_up_symbols): Adjust to use per-process
15823 `thread_db_active'.
15824 (linux_request_interrupt): Adjust to use ptids.
15825 (linux_read_auxv): Inline `inferior_pid'.
15826 (initialize_low): Don't reference thread_db_active.
15827 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15828 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15829 (ps_getpid): Return the pid of the current inferior.
15830 * thread-db.c (proc_handle, thread_agent): Delete.
15831 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15832 per-process data.
15833 (find_one_thread): Change argument type to ptid_t. Adjust to
15834 per-process data.
15835 (maybe_attach_thread): Adjust to per-process data and ptids.
15836 (thread_db_find_new_threads): Ditto.
15837 (thread_db_init): Ditto.
15838 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15839 processes table. Adjust to use ptids.
15840 (spu_kill, spu_detach): Adjust interface. Remove process from
15841 processes table.
15842 (spu_join, spu_thread_alive): Adjust interface.
15843 (spu_wait): Adjust interface. Remove process from processes
15844 table. Adjust to use ptids.
15845 * win32-low.c (current_inferior_tid): Delete.
15846 (current_inferior_ptid): New.
15847 (debug_event_ptid): New.
15848 (thread_rec): Take a ptid. Adjust.
15849 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15850 (child_delete_thread): Ditto.
15851 (do_initial_child_stuff): Add `attached' argument. Add process to
15852 processes table.
15853 (child_fetch_inferior_registers, child_store_inferior_registers):
15854 Adjust.
15855 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15856 (win32_attach): Pass 1 to do_initial_child_stuff.
15857 (win32_kill): Adjust interface. Remove process from processes
15858 table.
15859 (win32_detach): Ditto.
15860 (win32_join): Adjust interface.
15861 (win32_thread_alive): Take a ptid.
15862 (win32_resume): Adjust to use ptids.
15863 (get_child_debug_event): Ditto.
15864 (win32_wait): Adjust interface. Remove exiting process from
15865 processes table.
15866
bd99dc85
PA
158672009-04-01 Pedro Alves <pedro@codesourcery.com>
15868
15869 Non-stop mode support.
15870
15871 * server.h (non_stop): Declare.
15872 (gdb_client_data, handler_func): Declare.
15873 (delete_file_handler, add_file_handler, start_event_loop):
15874 Declare.
15875 (handle_serial_event, handle_target_event, push_event)
15876 (putpkt_notif): Declare.
15877 * target.h (enum resume_kind): New.
15878 (struct thread_resume): Replace `step' field by `kind' field.
15879 (TARGET_WNOHANG): Define.
15880 (struct target_ops) <wait>: Add `options' argument.
15881 <supports_non_stop, async, start_non_stop>: New fields.
15882 (target_supports_non_stop, target_async): New.
15883 (start_non_stop): Declare.
15884 (mywait): Add `options' argument.
15885 * target.c (mywait): Add `options' argument. Print child exit
15886 notifications here.
15887 (start_non_stop): New.
15888 * server.c (non_stop, own_buf, mem_buf): New globals.
15889 (struct vstop_notif): New.
15890 (notif_queue): New global.
15891 (queue_stop_reply, push_event, discard_queued_stop_replies)
15892 (send_next_stop_reply): New.
15893 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15894 interface changes.
15895 (attach_inferior): In non-stop mode, don't wait for the target
15896 here.
15897 (handle_general_set): Handle QNonStop.
15898 (handle_query): When handling qC, return the current general
15899 thread, instead of the first thread of the list.
15900 (handle_query): If the backend supports non-stop mode, include
15901 QNonStop+ in the qSupported query response.
15902 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15903 and non-stop mode.
15904 (handle_v_attach, handle_v_run): Handle non-stop mode.
15905 (handle_v_stopped): New.
15906 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15907 (myresume): Adjust to use resume_kind. Handle non-stop.
15908 (queue_stop_reply_callback): New.
15909 (handle_status): Handle non-stop mode.
15910 (main): Clear non_stop flag on reconnection. Use the event-loop.
15911 Refactor serial protocol handling from here ...
15912 (process_serial_event): ... to this new function. When GDB
15913 selects any thread, select one here. In non-stop mode, wait until
15914 GDB acks all pending events before exiting.
15915 (handle_serial_event, handle_target_event): New.
15916 * remote-utils.c (remote_open): Install remote_desc in the event
15917 loop.
15918 (remote_close): Remove remote_desc from the event loop.
15919 (putpkt_binary): Rename to...
15920 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15921 (putpkt_binary): New as wrapper around putpkt_binary_1.
15922 (putpkt_notif): New.
15923 (prepare_resume_reply): In non-stop mode, don't change the
15924 general_thread.
15925 * event-loop.c: New.
15926 * Makefile.in (OBJ): Add event-loop.o.
15927 (event-loop.o): New rule.
15928
15929 * linux-low.h (pid_of): Moved here.
15930 (lwpid_of): New.
15931 (get_lwp_thread): Use lwpid_of.
15932 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15933 * linux-low.c (pid_of): Delete.
15934 (inferior_pid): Use lwpid_of.
15935 (linux_event_pipe): New.
15936 (target_is_async_p): New.
15937 (delete_lwp): New.
15938 (handle_extended_wait): Use lwpid_of.
15939 (add_lwp): Don't set lwpid field.
15940 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15941 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15942 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15943 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15944 first. Adjust to linux_wait_for_event interface changes. Use
15945 lwpid_of.
15946 (linux_detach): Don't delete the main lwp here.
15947 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15948 (status_pending_p): Don't consider explicitly suspended lwps.
15949 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15950 pointer. Add OPTIONS argument. Change return type to int. Use
15951 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15952 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15953 pointer. Add status pointer argument. Return a pid instead of a
15954 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15955 changes. In non-stop mode, don't switch to a random thread.
15956 (linux_wait): Rename to...
15957 (linux_wait_1): ... this. Add target_options argument, and handle
15958 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15959 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15960 clean exit and signal exit code. Don't stop all threads in
15961 non-stop mode. In all-stop mode, only stop all threads when
15962 reporting a stop to GDB. Handle explicit thread stop requests.
15963 (async_file_flush, async_file_mark): New.
15964 (linux_wait): New.
15965 (send_sigstop): Use lwpid_of.
15966 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15967 interface changes. In non-stop mode, don't switch to a random
15968 thread.
15969 (linux_resume_one_lwp): Use lwpid_of.
15970 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15971 (linux_resume_one_thread): ... this. Handle resume_stop. In
15972 non-stop mode, don't look for pending flag in all threads.
15973 (resume_status_pending_p): Don't consider explicitly suspended
15974 threads.
15975 (my_waitpid): Reimplement. Emulate __WALL.
15976 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15977 Use lwpid_of.
15978 (sigchld_handler, linux_supports_non_stop, linux_async)
15979 (linux_start_non_stop): New.
15980 (linux_target_ops): Register linux_supports_non_stop, linux_async
15981 and linux_start_non_stop.
15982 (initialize_low): Install SIGCHLD handler.
15983 * thread-db.c (thread_db_create_event, find_one_thread)
15984 (thread_db_get_tls_address): Use lwpid_of.
15985 * win32-low.c (win32_detach): Adjust to use resume_kind.
15986 (win32_wait): Add `options' argument.
15987 * spu-low.c (spu_resume): Adjust to use resume_kind.
15988 (spu_wait): Add `options' argument.
15989
5b1c542e
PA
159902009-04-01 Pedro Alves <pedro@codesourcery.com>
15991
15992 Decouple target code from remote protocol.
15993
15994 * target.h (enum target_waitkind): New.
15995 (struct target_waitstatus): New.
15996 (struct target_ops) <wait>: Return an unsigned long. Take a
15997 target_waitstatus pointer instead of a char pointer.
15998 (mywait): Likewise.
15999 * target.c (mywait): Change prototype to return an unsigned long.
16000 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16001 * server.h (thread_from_wait, old_thread_from_wait): Delete
16002 declarations.
16003 (prepare_resume_reply): Change prototype to take a
16004 target_waitstatus.
16005 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16006 (last_status, last_ptid): New.
16007 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16008 pid instead of a signal.
16009 (attach_inferior): Remove "status" and "signal" parameters.
16010 Adjust.
16011 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16012 not as an address.
16013 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16014 (handle_v_requests, myresume): Remove "status" and "signal"
16015 parameters. Adjust.
16016 (handle_status): New.
16017 (main): Delete local `status'. Adjust.
16018 * remote-utils.c: Include target.h.
16019 (prepare_resume_reply): Change prototype to take a
16020 target_waitstatus. Adjust.
16021
16022 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16023 interface.
16024 * spu-low.c (spu_wait): Adjust.
16025 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16026 Delete.
16027 (win32_wait): Adjust.
16028
2bd7c093
PA
160292009-04-01 Pedro Alves <pedro@codesourcery.com>
16030
16031 * target.h (struct thread_resume): Delete leave_stopped member.
16032 (struct target_ops): Add a `n' argument to the `resume' callback.
16033 * server.c (start_inferior): Adjust.
16034 (handle_v_cont, myresume): Adjust.
16035 * linux-low.c (check_removed_breakpoint): Adjust to resume
16036 interface change, and to removed leave_stopped field.
16037 (resume_ptr): Delete.
16038 (struct thread_resume_array): New.
16039 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16040 resume interface change.
16041 (linux_continue_one_thread, linux_queue_one_thread)
16042 (resume_status_pending_p): Check if the resume field is NULL
16043 instead of checking the leave_stopped member.
16044 (linux_resume): Adjust to the target resume interface change.
16045 * spu-low.c (spu_resume): Adjust to the target resume interface
16046 change.
16047 * win32-low.c (win32_detach, win32_resume): Ditto.
16048
c35fafde
PA
160492009-04-01 Pedro Alves <pedro@codesourcery.com>
16050
16051 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16052 flag.
16053 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16054 pending.
16055 (linux_continue_one_thread): Only preserve the stepping flag if
16056 there's a pending breakpoint.
16057
0a59d50b
PA
160582009-03-31 Pedro Alves <pedro@codesourcery.com>
16059
16060 * server.c (main): After the inferior having exited, call
16061 remote_close before exiting gdbserver.
16062
f04c6d38
TJB
160632009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16064
16065 Fix size of FPSCR in Power 7 processors.
16066 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16067 (PPC_FEATURE_HAS_DFP): New #define.
16068 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16069 size of the FPSCR.
16070
78e5cee6
PA
160712009-03-23 Pedro Alves <pedro@codesourcery.com>
16072
16073 * server.c (handle_query) Whitespace and formatting.
16074
1b3f6016
PA
160752009-03-22 Pedro Alves <pedro@codesourcery.com>
16076
16077 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16078 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16079 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16080 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16081 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16082 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16083 Makefile.in, configure.ac: Fix whitespace throughout.
16084 * configure: Regenerate.
16085
a07b2135
PA
160862009-03-22 Pedro Alves <pedro@codesourcery.com>
16087
16088 * inferiors.c (find_inferior): Make it safe for the callback
16089 function to delete the currently iterated inferior.
16090
67cc2626
PA
160912009-03-22 Pedro Alves <pedro@codesourcery.com>
16092
16093 * Makefile.in (linuw_low_h): Move higher.
16094 (thread-db.o): Depend on $(linux_low_h).
16095
54a0b537
PA
160962009-03-17 Pedro Alves <pedro@codesourcery.com>
16097
16098 Rename "process" to "lwp" throughout.
16099
16100 * linux-low.c (all_processes): Rename to...
16101 (all_lwps): ... this.
16102 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16103 (add_process): Rename to ...
16104 (add_lwp): ... this. Adjust.
16105 (linux_create_inferior): Adjust.
16106 (linux_attach_lwp): Adjust.
16107 (linux_attach): Adjust.
16108 (linux_kill_one_process): Rename to ...
16109 (linux_kill_one_lwp): ... this. Adjust.
16110 (linux_kill): Adjust.
16111 (linux_detach_one_process): Rename to ...
16112 (linux_detach_one_lwp): ... this. Adjust.
16113 (linux_detach): Adjust.
16114 (check_removed_breakpoint): Adjust.
16115 (status_pending_p): Adjust.
16116 (linux_wait_for_process): Rename to ...
16117 (linux_wait_for_lwp): ... this. Adjust.
16118 (linux_wait_for_event): Adjust.
16119 (send_sigstop): Adjust.
16120 (wait_for_sigstop): Adjust.
16121 (stop_all_processes): Rename to ...
16122 (stop_all_lwps): ... this.
16123 (linux_resume_one_process): Rename to ...
16124 (linux_resume_one_lwp): ... this. Adjust.
16125 (linux_set_resume_request, linux_continue_one_thread)
16126 (linux_queue_one_thread, resume_status_pending_p)
16127 (usr_store_inferior_registers, regsets_store_inferior_registers)
16128 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16129 Adjust.
16130 * linux-low.h (get_process): Rename to ...
16131 (get_lwp): ... this. Adjust.
16132 (get_thread_process): Rename to ...
16133 (get_thread_lwp): ... this. Adjust.
16134 (get_process_thread): Rename to ...
16135 (get_lwp_thread): ... this. Adjust.
16136 (struct process_info): Rename to ...
16137 (struct lwp_info): ... this.
16138 (all_processes): Rename to ...
16139 (all_lwps): ... this.
16140 * proc-service.c (ps_lgetregs): Adjust.
16141 * thread-db.c (thread_db_create_event, find_one_thread)
16142 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16143
0b16c5cf
PA
161442009-03-14 Pedro Alves <pedro@codesourcery.com>
16145
16146 * server.c (handle_query): Handle "qAttached".
16147
32de4b9d
NS
161482009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16149
16150 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16151 GPLv3, update license URL.
16152
2aecd87f
DE
161532009-03-01 Doug Evans <dje@google.com>
16154
93efd302 16155 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
16156 (server_h): Add gdb_signals.h.
16157 (signals.o): Update.
16158 * server.h (target_signal_from_host,target_signal_to_host_p)
16159 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16160
86b1f9c5
PM
161612009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16162
16163 * remote-utils.c (getpkt): Also generate remote-debug
16164 information if noack_mode is set.
16165
4aa995e1
PA
161662009-02-06 Pedro Alves <pedro@codesourcery.com>
16167
16168 * server.c (handle_query): Report qXfer:siginfo:read and
16169 qXfer:siginfo:write as supported and handle them.
16170 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16171 * linux-low.c (linux_xfer_siginfo): New.
16172 (linux_target_ops): Set it.
16173
62709adf
PA
161742009-01-26 Pedro Alves <pedro@codesourcery.com>
16175
16176 * server.c (gdbserver_usage): Mention --remote-debug.
16177 (main): Accept '--remote-debug' switch.
16178
aef93bd7
DE
161792009-01-18 Doug Evans <dje@google.com>
16180
16181 * regcache.c (new_register_cache): No need to check result of xcalloc.
16182 * server.c (handle_search_memory): Back out calls to xmalloc,
16183 result is checked and error is returned to user upon failure.
16184 (handle_query): Ditto. Add more checks for result of malloc.
16185 (handle_v_cont): Check result of malloc, report error back to
16186 user upon failure.
16187 (handle_v_run): Ditto. Call freeargv.
16188 * server.h (freeargv): Declare.
16189 * utils.c (freeargv): New fn.
16190
54363045
DE
161912009-01-15 Doug Evans <dje@google.com>
16192
f626972c
DE
16193 * gdbreplay.c (perror_with_name): Make arg const char *.
16194 * server.h (target_signal_to_name): Make return type const char *.
0842e787 16195 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 16196 * utils.c (perror_with_name): Make arg const char *.
54363045 16197
18aae699
PA
161982009-01-14 Pedro Alves <pedro@codesourcery.com>
16199
16200 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16201 when handling a EXIT_PROCESS_DEBUG_EVENT.
16202
ff703abe
JB
162032009-01-06 Joel Brobecker <brobecker@adacore.com>
16204
16205 * gdbreplay.c (gdbreplay_version): Update copyright year.
16206 * server.c (gdbserver_version): Likewise.
16207
f21cc1a2 162082009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
16209
16210 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 16211 (handle_extended_wait): Improve comment.
0e21c1ec 16212
bca929d3
DE
162132008-12-13 Doug Evans <dje@google.com>
16214
16215 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16216 * server.h (ATTR_MALLOC): New macro.
16217 (xmalloc,xcalloc,xstrdup): Declare.
16218 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16219 * inferiors.c: Ditto.
16220 * linux-low.c: Ditto.
16221 * mem-break.c: Ditto.
16222 * regcache.c: Ditto.
16223 * remote-utils.c: Ditto.
16224 * server.c: Ditto.
16225 * target.c: Ditto.
16226 * win32-low.c: Ditto.
16227
97438e3f
DE
162282008-12-12 Doug Evans <dje@google.com>
16229
896c7fbb
DE
16230 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16231 in debugging printf.
16232
97438e3f
DE
16233 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16234
e3b886f8
DE
162352008-12-09 Doug Evans <dje@google.com>
16236
16237 * linux-low.h (struct process_info): Delete member tid, unused.
16238 * thread-db.c (find_one_thread): Update.
16239 (maybe_attach_thread): Update.
16240
07e059b5
VP
162412008-12-02 Pedro Alves <pedro@codesourcery.com>
16242
889bf7c5
PA
16243 * target.h (struct target_ops): Add qxfer_osdata member.
16244 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16245 and dirent.h.
16246 (linux_qxfer_osdata): New functions.
16247 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16248 callback.
16249 * server.c (handle_query): Handle "qXfer:osdata:read:".
16250 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16251 (buffer_xml_printf): New functions.
16252 * server.h (struct buffer): New.
16253 (buffer_grow_str, buffer_grow_str0): New macros.
16254 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16255 (buffer_xml_printf): Declare.
07e059b5 16256
4cab47ab
DE
162572008-11-24 Doug Evans <dje@google.com>
16258
16259 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16260
f142445f
DJ
162612008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * server.c (handle_v_run): Always use the supplied argument list.
16264
d0107bb6 162652008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 16266
d0107bb6
BW
16267 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16268 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 16269
2c4ad781
TJB
162702008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16271
16272 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16273 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16274 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16275 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16276 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16277 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16278 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16279 XML target descriptions.
16280 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16281 when inferior is running on an ISA 2.05 or later processor. Add
16282 special case to return offset for full 64-bit slot of FPSCR when
16283 in 32-bits.
16284
dfb64f85
DJ
162852008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16286
16287 * Makefile.in (SFILES, clean): Added sparc64 files.
16288 (reg-sparc64.o, reg-sparc64.c): New.
16289 * configure.srv (sparc*-*-linux*): New configuration.
16290 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16291 syscall arguments for SPARC.
16292 (regsets_store_inferior_registers): Likewise.
16293 * linux-sparc-low.c: New file.
16294
66b6e1dd
DE
162952008-10-21 Doug Evans <dje@google.com>
16296
16297 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16298 (READLINE_DIR,READLINE_DEP): Delete.
16299 (INTERNAL_CFLAGS): Update.
16300 (LINTFLAGS): Update.
16301
9b710a42
PA
163022008-10-10 Pedro Alves <pedro@codesourcery.com>
16303
16304 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16305 whole argv from the last run, not just argv[0].
16306
5822d809
PA
163072008-09-08 Pedro Alves <pedro@codesourcery.com>
16308
16309 * regcache.c (new_register_cache): Return NULL if the register
16310 cache size isn't known yet.
16311 (free_register_cache): Avoid dereferencing a NULL regcache.
16312
74aac56f
DJ
163132008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16314
16315 * configure.srv: Merge MIPS and MIPS64.
16316
400b20f5
MR
163172008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16318
16319 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16320
677c5bb1
LM
163212008-08-18 Luis Machado <luisgpm@br.ibm.com>
16322
16323 * Makefile.in: Add required vsx dependencies.
16324
16325 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16326 Declare init_registers_powerpc_vsx32l.
16327 Declare init_registers_powerpc_vsx64l.
16328 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16329 (ppc_arch_setup): Check for VSX in hwcap.
16330 (ppc_fill_vsxregset): New function.
16331 (ppc_store_vsxregset): New function.
16332 Add new VSX entry in regset_info target_regsets.
16333
16334 * configure.srv: Add new VSX dependencies.
16335
a6f3e723
SL
163362008-08-12 Pedro Alves <pedro@codesourcery.com>
16337
16338 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16339 (remote_open): Set or clear transport_is_reliable.
16340 (putpkt_binary): Don't expect acks in noack mode.
16341 (getpkt): Don't send ack/nac in noack mode.
16342 * server.c (handle_general_set): Handle QStartNoAckMode.
16343 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16344 qSupported.
16345 (main): Reset noack_mode on every connection.
16346 * server.h (noack_mode): Declare.
16347
a417dc56
RW
163482008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16349
16350 * Makefile.in (GDBREPLAY_OBS): New variable.
16351 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16352
3221518c
UW
163532008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16354 Daniel Jacobowitz <dan@codesourcery.com>
16355
16356 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16357 (usr_store_inferior_registers): Likewise.
16358 (regsets_store_inferior_registers): Likewise.
16359
ec56be1b
PA
163602008-07-31 Rolf Jansen <rj@surtec.com>
16361 Pedro Alves <pedro@codesourcery.com>
16362
16363 * configure.ac: Check for memmem declaration.
16364 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16365 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16366 (disable_packet_qfThreadInfo): Unconditionally compile.
16367 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16368 * configure, config.in: Regenerate.
16369
2fe5e3ff
DE
163702008-07-28 Doug Kwan <dougkwan@google.com>
16371
16372 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16373 (linux_write_memory): Remove declaration of errno.
16374
836acd6d
UW
163752008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16376
16377 * linux-low.c (handle_extended_wait): Do not use "status"
16378 variable uninitialized.
16379
aeba519e
PA
163802008-07-07 Pedro Alves <pedro@codesourcery.com>
16381
16382 * server.c (handle_v_attach): Inhibit reporting dll changes.
16383
db42f210
PA
163842008-06-27 Pedro Alves <pedro@codesourcery.com>
16385
16386 * remote-utils.c (prepare_resume_reply): If requested, don't
16387 output "thread:TID" in the T stop reply.
16388
16389 * server.c (disable_packet_vCont, disable_packet_Tthread)
16390 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16391 (handle_query): If requested, disable support for qC, qfThreadInfo
16392 and qsThreadInfo.
16393 (handle_v_requests): If requested, disable support for vCont.
16394 (gdbserver_show_disableable): New.
16395 (main): Handle --disable-packet and --disable-packet=LIST.
16396
16397 * server.h (disable_packet_vCont, disable_packet_Tthread)
16398 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16399
8e4c5421
CD
164002008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16401
16402 * server.c (gdbserver_usage): Mention --version.
16403
6e23a804
DJ
164042008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16405
16406 * Makefile.in (gdbreplay.o): New rule.
16407
90aa6a40
JM
164082008-06-06 Joseph Myers <joseph@codesourcery.com>
16409
16410 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16411 message, not gdbserver.
16412
c16158bc 164132008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
16414 Nathan Sidwell <nathan@codesourcery.com>
16415 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16416
16417 * acinclude.m4: Include ../../config/acx.m4.
16418 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16419 * configure, config.in: Regenerate.
16420 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16421 * server.c (gdbserver_version): Print PKGVERSION.
16422 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16423 (main): Adjust gdbserver_usage calls.
16424 * gdbreplay.c (version, host_name): Add declarations.
16425 (gdbreplay_version, gdbreplay_usage): New.
16426 (main): Accept --version and --help options.
16427
aeb75bf5
DJ
164282008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16429
16430 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16431 (arm_breakpoint_at): Handle Thumb.
16432 (the_low_target): Add comment.
16433
76b233dd
UW
164342008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16435
16436 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16437
08388c79
DE
164382008-05-09 Doug Evans <dje@google.com>
16439
a3c83fae
DE
16440 * server.h (decode_search_memory_packet): Declare.
16441 * remote-utils.c (decode_search_memory_packet): New fn.
16442 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16443 (handle_search_memory): New fn.
16444 (handle_query): Process qSearch:memory packets.
16445
bb9c3d36
UW
164462008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16447
16448 * regcache.c (registers_length): Remove.
16449 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16450 full register packet.
16451 * regcache.h (registers_length): Remove prototype.
16452 * server.h (PBUFSIZ): Define to 16384.
16453
7284e1be
UW
164542008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16455
16456 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16457 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16458 powerpc-64l.o, and powerpc-altivec64l.o.
16459 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16460 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16461 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16462 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16463 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16464 to srv_xmlfiles.
16465
16466 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16467 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16468 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16469 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16470 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16471 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16472 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16473 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16474 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16475 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16476 (clean): Update.
16477
16478 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16479 (init_registers_powerpc_32l): ... this new prototype.
16480 (init_registers_powerpc_32): Remove, replace by ...
16481 (init_registers_powerpc_altivec32l): ... this new prototype.
16482 (init_registers_powerpc_e500): Remove, replace by ...
16483 (init_registers_powerpc_e500l): ... this new prototype.
16484 (init_registers_ppc64): Remove, replace by ...
16485 (init_registers_powerpc_64l): ... this new prototype.
16486 (init_registers_powerpc_64): Remove, replace by ...
16487 (init_registers_powerpc_altivec64l): ... this new prototype.
16488 (ppc_num_regs): Set to 73.
16489 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16490 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16491 (ppc_cannot_store_register): Handle orig_r3 and trap.
16492 (ppc_arch_setup): Update init_registers_... calls.
16493 (ppc_fill_gregset): Handle orig_r3 and trap.
16494
16495 * inferiors.c (clear_inferiors): Reset current_inferior.
16496
fdc59709
PB
164972008-04-23 Paolo Bonzini <bonzini@gnu.org>
16498
889bf7c5
PA
16499 * acinclude.m4: Add override.m4.
16500 * configure: Regenerate.
fdc59709 16501
c9b2f845
UW
165022008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16503
16504 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16505 initial call to init_register_ppc64.
16506
550512b8
UW
165072008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16508
43aaf8b6
PA
16509 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16510 single powerpc*-*-linux* case.
550512b8
UW
16511 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16512
b6430ec3
UW
165132008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16514
16515 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 16516 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
16517 from reg_xmlfiles.
16518 * linux-ppc-low.c: Include <elf.h>.
16519 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16520 (ppc_hwcap): New global variable.
16521 (ppc_regmap): Remove __SPE__ #ifdef sections.
16522 (ppc_regmap_e500): New global variable.
16523 (ppc_cannot_store_register): Update __SPE__ special case.
16524 (ppc_get_hwcap): New function.
16525 (ppc_arch_setup): Use it to determine whether inferior supports
16526 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16527 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16528 Do not access registers if target does not support AltiVec.
16529 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16530 Do not access registers if target does not support SPE.
16531 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16532
52fa2412
UW
165332008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * linux-low.c (disabled_regsets, num_regsets): New.
16536 (use_regsets_p): Delete.
16537 (linux_wait_for_process): Clear disabled_regsets.
16538 (regsets_fetch_inferior_registers): Check and set it.
16539 (regsets_store_inferior_registers): Likewise.
16540 (linux_fetch_registers, linux_store_registers): Do not use
16541 use_regsets_p.
16542 (initialize_low): Allocate disabled_regsets.
16543
e28b3332
DJ
165442008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16545
16546 * Makefile.in (LIBOBJS): New.
16547 (OBS): Use LIBOBJS.
16548 (memmem.o): New rule.
16549 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16550 * configure: Regenerated.
16551
4536995d
UW
165522008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16553
16554 * server.c (handle_query): Never return "unsupported" for
16555 qXfer:features:read queries.
16556
221c031f
UW
165572008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16558
16559 * server.c (get_features_xml): Fix inverted condition.
16560 (handle_query): Always support qXfer:feature:read.
16561
ccd213ac
DJ
165622008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16563
16564 * server.c (wrapper_argv): New.
16565 (start_inferior): Handle wrapper_argv. If set, expect an extra
16566 trap.
16567 (gdbserver_usage): Document --wrapper.
16568 (main): Parse --wrapper.
16569
6fe305f7
UW
165702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16571
16572 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16573 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16574 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16575 (ppc_set_pc): Likewise.
16576 (ppc_arch_setup): New function.
16577 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16578 of collect_register.
889bf7c5 16579 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16580
5b0a002e
UW
165812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16582
16583 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16584 instead of linux-ppc64-low.o.
16585 * linux-ppc64-low.c: Remove file.
16586 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16587 (linux-ppc64-low.o): Remove rule.
16588
16589 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16590 (init_registers_powerpc_64): Likewise.
16591 (ppc_regmap): Conditionally define depending on __powerpc64__.
16592 (ppc_cannot_store_register): Do not special-case "fpscr" when
16593 compiled on __powerpc64__.
16594 (ppc_collect_ptrace_register): New function.
16595 (ppc_supply_ptrace_register): New function.
16596 (ppc_breakpoint): Change type to "unsigned int".
16597 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16598 (the_low_target): Conditionally provide initializers for the
889bf7c5 16599 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16600 collect_ptrace_register and supply_ptrace_register members.
16601
9b4b61c8
UW
166022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16603
16604 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16605 * server.c (gdbserver_xmltarget): Define.
16606 (get_features_xml): Use it to replace "target.xml" and arch_string.
16607
16608 * configure.srv: Remove srv_xmltarget. Add XML files that were
16609 mentioned there to srv_xmlfiles instead. Remove conditional tests
16610 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16611 srv_xmlfiles and srv_regobj to include all possible choices.
16612 * configure.ac (srv_xmltarget): Remove.
16613 (srv_xmlfiles): Do not add "target.xml".
16614 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16615 checks for supplementary target information.
16616 * configure: Regenerate.
16617 * Makefile.in (XML_TARGET): Remove.
16618 (target.xml): Remove rule.
16619 (clean): Do not clean up target.xml.
16620 (.PRECIOUS): Do not mention target.xml.
16621
16622 * target.h (struct target_ops): Remove arch_string member.
16623 * linux-low.c (linux_arch_string): Remove.
16624 (linux_target_ops): Remove arch_string initializer.
16625 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16626 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16627 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16628 * spu-low.c (spu_arch_string): Remove.
16629 (spu_target_ops): Remove arch_string initializer.
16630 * win32-low.c (win32_arch_string): Remove.
16631 (win32_target_ops): Remove arch_string initializer.
16632 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16633 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16634 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16635
ee1a7ae4
UW
166362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16637
16638 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16639 by collect_ptrace_register and supply_ptrace_register hooks.
16640 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16641 instead of checking for the_low_target.left_pad_xfer.
16642 (usr_store_inferior_registers): Use collect_ptrace_register callback
16643 instead of checking for the_low_target.left_pad_xfer.
16644
16645 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16646 (s390_supply_ptrace_register): Likewise.
16647 (s390_fill_gregset): Call s390_collect_ptrace_register.
16648 (the_low_target): Update.
16649
16650 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16651 (ppc_supply_ptrace_register): Likewise.
16652 (the_low_target): Update.
16653
16654 * linux-i386-low.c (the_low_target): Update.
16655 * linux-x86-64-low.c (the_low_target): Update.
16656
d61ddec4
UW
166572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16658
16659 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16660 reg-s390.o and reg-s390x.o.
16661
16662 * linux-low.c (new_inferior): New global variable.
16663 (linux_create_inferior, linux_attach): Set it.
16664 (linux_wait_for_process): Call the_low_target.arch_setup after the
16665 target has stopped for the first time.
16666 (initialize_low): Do not call the_low_target.arch_setup.
16667
16668 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16669 (s390_set_pc): Likewise.
16670 (s390_arch_setup): New function.
16671 (the_low_target): Use s390_arch_setup as arch_setup routine.
16672
16673 * regcache.c (realloc_register_cache): New function.
16674 (set_register_cache): Call it for each existing regcache.
16675
d05b4ac3
UW
166762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16677
16678 * server.h (init_registers): Remove prototype.
16679
16680 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16681 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16682 instead of init_registers ().
16683 * linux-arm-low.c (init_registers_arm): Add prototype.
16684 (init_registers_arm_with_iwmmxt): Likewise.
16685 (the_low_target): Add initializer for arch_setup field.
16686 * linux-cris-low.c (init_registers_cris): Add prototype.
16687 (the_low_target): Add initializer for arch_setup field.
16688 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16689 (the_low_target): Add initializer for arch_setup field.
16690 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16691 (the_low_target): Add initializer for arch_setup field.
16692 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16693 (the_low_target): Add initializer for arch_setup field.
16694 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16695 (the_low_target): Add initializer for arch_setup field.
16696 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16697 (the_low_target): Add initializer for arch_setup field.
16698 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16699 (init_registers_mips64_linux): Likewise.
16700 (the_low_target): Add initializer for arch_setup field.
16701 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16702 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16703 (the_low_target): Add initializer for arch_setup field.
16704 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16705 (init_registers_powerpc_64): Likewise.
16706 (the_low_target): Add initializer for arch_setup field.
16707 * linux-s390-low.c (init_registers_s390): Add prototype.
16708 (init_registers_s390x): Likewise.
16709 (the_low_target): Add initializer for arch_setup field.
16710 * linux-sh-low.c (init_registers_sh): Add prototype.
16711 (the_low_target): Add initializer for arch_setup field.
16712 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16713 (the_low_target): Add initializer for arch_setup field.
16714 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16715 (the_low_target): Add initializer for arch_setup field.
16716
16717 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16718 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16719 instead of init_registers ().
16720 * win32-arm-low.c (init_registers_arm): Add prototype.
16721 (the_low_target): Add initializer for arch_setup field.
16722 * win32-i386-low.c (init_registers_i386): Add prototype.
16723 (the_low_target): Add initializer for arch_setup field.
16724
16725 * spu-low.c (init_registers_spu): Add prototype.
16726 (initialize_low): Call initialie_registers_spu () instead of
16727 initialize_registers ().
16728
fd96d250
PA
167292008-02-19 Pedro Alves <pedro@codesourcery.com>
16730
16731 * server.c (handle_v_requests): When handling the vRun and vAttach
16732 packets, if already debugging a process, don't kill it. Return an
16733 error instead.
16734
d41b6bb4
DJ
167352008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16736
16737 * server.c (handle_query): Correct length check.
16738
5ac588cf
PA
167392008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16740
16741 * win32-low.c (do_initial_child_stuff): Add process handle
16742 parameter. Set current_process_handle and current_process_id from the
16743 parameters. Clear globals.
16744 (win32_create_inferior): Don't set current_process_handle and
16745 current_process_id here. Instead pass them on the call to
16746 do_initial_child_stuff.
16747 (win32_attach): Likewise.
16748 (win32_clear_inferiors): New.
16749 (win32_kill): Don't close the current process handle or the
16750 current thread handle here. Instead call win32_clear_inferiors.
16751 (win32_detach): Don't open a new handle to the process. Call
16752 win32_clear_inferiors.
16753 (win32_join): Don't rely on current_process_handle; open a new
16754 handle using the process id.
16755 (win32_wait): Call win32_clear_inferiors when the inferior process
16756 has exited.
16757
ecd7ecbc
DJ
167582008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * server.c (monitor_show_help): Add "exit".
16761
1525d545
MG
167622008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16763
ecd7ecbc 16764 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16765 (clean): Add reg-xtensa.c.
16766 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16767 * configure.srv (xtensa*-*-linux*) New target.
16768 * linux-xtensa-low.c: New.
16769 * xtensa-xtregs.c: New.
1525d545 16770
59a016f0
PA
167712008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16772
16773 * hostio.c: Don't include errno.h.
16774 (errno_to_fileio_errno): Move to hostio-errno.
16775 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16776 error number outputting to the target->hostio_last_error callback.
16777 (hostio_packet_error): Use FILEIO_EINVAL directly.
16778 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16779 calls to hostio_error.
16780 * hostio-errno.c: New.
16781 * server.h (hostio_last_error_from_errno): Declare.
16782 * target.h (target_ops): Add hostio_last_error member.
16783 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16784 as hostio_last_error handler.
889bf7c5 16785 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16786 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16787 (wince_hostio_last_error): New functions.
16788 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16789 as hostio_last_error handler.
16790 (win32_target_ops) [!_WIN32_WCE]: Register
16791 hostio_last_error_from_errno as hostio_last_error handler.
16792 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16793 (hostio-errno.o): New rule.
16794 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16795 * configure.srv (srv_hostio_err_objs): New variable. Default to
16796 hostio-errno.o.
16797 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16798 * configure: Regenerate.
16799
2d717e4f
DJ
168002008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16801
16802 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16803 (linux_kill, linux_detach): Clean up the process list.
16804 * remote-utils.c (remote_open): Improve port number parsing.
16805 (putpkt_binary, input_interrupt): Only send interrupts if the target
16806 is running.
16807 * server.c (extended_protocol): Make static.
16808 (attached): Define earlier.
16809 (exit_requested, response_needed, program_argv): New variables.
16810 (target_running): New.
16811 (start_inferior): Clear attached here.
16812 (attach_inferior): Set attached here.
16813 (require_running): Define.
16814 (handle_query): Use require_running and target_running. Implement
16815 "monitor exit".
16816 (handle_v_attach, handle_v_run): New.
16817 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16818 (gdbserver_usage): Update.
16819 (main): Redo argument parsing. Handle --debug and --multi. Handle
16820 --attach along with other options or after the port. Save
16821 program_argv. Support no initial program. Resynchronize
16822 communication with GDB after an error. Handle "monitor exit".
16823 Use require_running and target_running. Always allow the extended
16824 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16825 restart in extended mode.
16826 * README: Refer to the GDB manual. Update --attach usage.
16827
7407e2de
AS
168282007-12-20 Andreas Schwab <schwab@suse.de>
16829
16830 * linux-low.c (STACK_SIZE): Define.
16831 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16832 (linux_test_for_tracefork): Likewise.
16833
b65d95c5
DJ
168342007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16835
16836 * linux-low.c (linux_wait_for_event): Update messages. Do not
16837 reinsert auto-delete breakpoints.
16838 * mem-break.c (struct breakpoint): Change return type of handler to
16839 int.
16840 (set_breakpoint_at): Update handler type.
16841 (reinsert_breakpoint_handler): Return 1 instead of calling
16842 delete_breakpoint.
16843 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16844 setting a new one.
16845 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16846 * mem-break.h (set_breakpoint_at): Update handler type.
16847 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16848 * win32-low.c (auto_delete_breakpoint): New.
16849 (get_child_debug_event): Use it.
16850
4e799345
DJ
168512007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16852
16853 * configure.ac: Check for pread and pwrite.
16854 * hostio.c (handle_pread): Fall back to lseek and read.
16855 (handle_pwrite): Fall back to lseek and write.
16856 * config.in, configure: Regenerated.
16857
27524b67
DJ
168582007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16859
16860 * server.c (myresume): Add own_buf argument.
16861 (main): Update calls.
16862
a20d5e98
DJ
168632007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16864
16865 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16866 * remote-utils.c (remote_open): Do not call disable_async_io.
16867 (block_async_io): Delete.
16868 (unblock_async_io): Make static.
16869 (initialize_async_io): New.
16870 * server.c (handle_v_cont): Handle async I/O here.
16871 (myresume): Likewise. Move other common resume tasks here...
16872 (main): ... from here. Call initialize_async_io. Disable async
16873 I/O before the main loop.
16874 * server.h (initialize_async_io): Declare.
16875 (block_async_io, unblock_async_io): Delete prototypes.
16876 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16877
b79d787e
DJ
168782007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16879
16880 * remote-utils.c (readchar): Allow binary data in received messages.
16881
d97903b2
PA
168822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16883
16884 * win32-low.c (attaching): New global.
16885 (win32_create_inferior): Clear the `attaching' global.
16886 (win32_attach): Set the `attaching' global.
16887 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16888 attaching. Only set a breakpoint at the entry point if not
16889 attaching.
16890
311de423
PA
168912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16892
16893 * server.c (main): Don't report dll events on the initial
16894 connection on attaches.
16895
6c2d16d2
PA
168962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16897
16898 * server.c (main): Relax numerical bases supported for the pid of
16899 the --attach command line argument.
16900
5ca906e6
PA
169012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16902
16903 * win32-low.c (win32_attach): Call OpenProcess before
16904 DebugActiveProcess, not after. Add last error output to error
16905 call.
16906
9c6c8194
PA
169072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16908
16909 * win32-low.c (win32_get_thread_context)
16910 (win32_set_thread_context): New functions.
16911 (thread_rec): Use win32_get_thread_context.
16912 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16913 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16914 field.
16915
4d5d1aaa
PA
169162007-12-03 Leo Zayas
16917 Pedro Alves <pedro_alves@portugalmail.pt>
16918
16919 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16920 global variables.
16921 (child_add_thread): Minor cleanup.
16922 (child_continue): Resume artificially suspended threads before
16923 calling ContinueDebugEvent.
16924 (suspend_one_thread): New.
16925 (fake_breakpoint_event): New.
16926 (get_child_debug_event): Change return type to int. Check here if
16927 gdb sent an interrupt request. If a soft interrupt was requested,
16928 fake a breakpoint event. Return 0 if there is no event to handle,
16929 and 1 otherwise.
16930 (win32_wait): Don't check here if gdb sent an interrupt request.
16931 Ensure there is a valid event to handle.
16932 (win32_request_interrupt): Add soft interruption method as last
16933 resort.
16934
c436e841
PA
169352007-12-03 Leo Zayas
16936 Pedro Alves <pedro_alves@portugalmail.pt>
16937
16938 * win32-low.h (win32_thread_info): Add descriptions to the
16939 structure members. Replace `suspend_count' counter by a
16940 `suspended' flag.
16941 * win32-low.c (thread_rec): Update condition of when to get the
16942 context from the inferior. Rely on ContextFlags being set if it
16943 has already been retrieved. Only suspend the inferior thread if
16944 we haven't already. Warn if that fails.
16945 (continue_one_thread): s/suspend_count/suspended/. Only call
16946 ResumeThread once. Warn if that fails.
16947
e7b5fa67
PA
169482007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16949
16950 * win32-low.c (win32_wait): Don't read from the inferior when it
16951 has already exited.
16952
a385171d
PA
169532007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16954
16955 * Makefile.in (win32_low_h): New variable.
16956 (win32-low.o): Add dependency on $(win32_low_h).
16957 (win32-arm-low.o, win32-i386-low.o): New rules.
16958
f80c84b3
DJ
169592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16960
16961 * hostio.c: Correct copyright year.
16962
a6b151f1
DJ
169632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16964
16965 * Makefile.in (OBS): Add hostio.o.
16966 (hostio.o): New rule.
16967 * server.h (handle_vFile): Declare.
16968 * hostio.c: New file.
16969 * server.c (handle_v_requests): Take packet_len and new_packet_len
16970 for binary packets. Call handle_vFile.
16971 (main): Update call to handle_v_requests.
16972
f9387fc3
DJ
169732007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16974
16975 * linux-low.c: Include <sched.h>.
16976
51c2684e
DJ
169772007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16978
16979 * linux-low.c (linux_tracefork_grandchild): New.
16980 (linux_tracefork_child): Use clone.
16981 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16982
75f83163
JB
169832007-10-31 Joel Brobecker <brobecker@adacore.com>
16984
16985 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16986
da5898ce
DJ
169872007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16988
16989 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16990
24a09b5f
DJ
169912007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16992
16993 * inferiors.c (change_inferior_id): Delete.
16994 (add_pid_to_list, pull_pid_from_list): New.
16995 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16996 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16997 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16998 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16999 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17000 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17001 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17002 (using_threads): Always set to 1.
17003 (handle_extended_wait): New.
17004 (add_process): Do not set TID.
17005 (linux_create_inferior): Set must_set_ptrace_flags.
17006 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17007 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17008 (linux_thread_alive): Rename TID argument to LWPID.
17009 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17010 (linux_wait_for_event): Do not use TID or check using_threads. Update
17011 call to dead_thread_notify. Call handle_extended_wait.
17012 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17013 (send_sigstop): Delete sigstop_sent.
17014 (wait_for_sigstop): Avoid TID.
17015 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17016 (linux_test_for_tracefork): New.
17017 (linux_lookup_signals): Use thread_db_active and
17018 linux_supports_tracefork_flag.
17019 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17020 * linux-low.h (get_process_thread): Avoid TID.
17021 (struct process_ifo): Move thread_known and tid to the end. Remove
17022 sigstop_sent.
17023 (linux_attach_lwp, thread_db_init): Update prototypes.
17024 * server.h (change_inferior_id): Delete prototype.
17025 (add_pid_to_list, pull_pid_from_list): New prototypes.
17026 * thread-db.c (thread_db_use_events): New.
17027 (find_first_thread): Rename to...
17028 (find_one_thread): ...this. Update callers and messages. Do not
17029 call fatal. Check thread_db_use_events. Do not call
17030 change_inferior_id or new_thread_notify.
17031 (maybe_attach_thread): Update. Do not call new_thread_notify.
17032 (thread_db_init): Set thread_db_use_events. Check use_events.
17033 * utils.c (fatal, warning): Correct message prefix.
17034
30ed0a8f
DJ
170352007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17036
17037 * Makefile.in (clean): Remove new files.
17038 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17039 (powerpc-64.o, powerpc-64.c): New rules.
17040 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17041 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17042 with SPE.
17043 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17044 SPE targets.
17045 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17046 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17047 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17048 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17049 (target_regsets): Add AltiVec and SPE register sets.
17050 * configure.ac: Check for AltiVec and SPE.
17051 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17052 (ppc_fill_vrregset, ppc_store_vrregset): New.
17053 (target_regsets): Add AltiVec register set.
17054 * configure: Regenerated.
17055
fd462a61
DJ
170562007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17057
17058 * linux-low.c (O_LARGEFILE): Define.
17059 (linux_read_memory): Use /proc/PID/mem.
17060 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17061 * configure, config.in: Regenerated.
17062
69f223ed
DJ
170632007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17064
17065 * linux-low.c (linux_wait_for_event): Do not pass signals while
17066 single-stepping.
17067
aec18585
PA
170682007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17069
17070 * win32-low.c (create_process): New.
17071 (win32_create_inferior): Use create_process instead of
17072 CreateProcess. If create_process failed retry appending an ".exe"
17073 suffix. Store the GetLastError result immediatelly after
17074 create_process calls and use it on the call to error.
17075
34d86ddd
PA
170762007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17077
17078 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17079
5a0e3bd0
JB
170802007-08-23 Joel Brobecker <brobecker@adacore.com>
17081
17082 * configure.ac: Switch license to GPLv3.
17083
f88c79e6
MS
170842007-08-01 Michael Snyder <msnyder@access-company.com>
17085
17086 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17087
6b3d9b83
PA
170882007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17089
17090 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17091 typedef.
17092 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17093 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17094 CloseToolhelp32Snapshot.
17095 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17096 CloseToolhelp32Snapshot.
17097
c588c53c
MS
170982007-07-27 Michael Snyder <michael.snyder@access-company.com>
17099
17100 * server.c (main): Check for inferior exit before main loop.
17101
aa0403d9
PA
171022007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17103
17104 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17105 instead of on tmp_desc.
17106
255e7678
DJ
171072007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17108 Daniel Jacobowitz <dan@codesourcery.com>
17109
17110 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17111 (add_thread): Minor cleanups.
17112 (clear_inferiors): Move lower in the file. Clear the DLL
17113 list.
17114 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17115 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17116 (xml_escape_text): New.
17117 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17118 for qSupported.
17119 (handle_v_cont): Report errors.
17120 (gdbserver_version): Update.
17121 (main): Correct size of own_buf. Do not report initial DLL events.
17122 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17123 (unloaded_dll, xml_escape_text): New.
17124 * win32-low.c (enum target_waitkind): Update comments.
17125 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17126 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17127 (win32_EnumProcessModules, win32_GetModuleInformation)
17128 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17129 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17130 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17131 (win32_Module32First, win32_Module32Next, load_toolhelp)
17132 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17133 (get_child_debug_event): Handle DLL events.
17134 (win32_wait): Likewise.
17135
0d37add9
DJ
171362007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17137
17138 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17139 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17140
45e2715e
PA
171412007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17142
17143 * win32-low.c (handle_output_debug_string): Ignore event if not
17144 waiting.
17145
c5674cf1
PA
171462007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17147
17148 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17149
2bbe3cc1
DJ
171502007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17151
17152 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17153
ae13219e
DJ
171542007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17155
17156 * inferiors.c (change_inferior_id): Add comment.
17157 * linux-low.c (check_removed_breakpoint): Add an early
17158 prototype. Improve debug output.
17159 (linux_attach): Doc update.
17160 (linux_detach_one_process, linux_detach): Clean up before releasing
17161 each process.
17162 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17163 * linux-low.h (struct process_info): Doc improvement.
17164 * mem-break.c (delete_all_breakpoints): New.
17165 * mem-break.h (delete_all_breakpoints): New prototype.
17166 * thread-db.c (find_first_thread): New.
17167 (thread_db_create_event): Call it instead of
17168 thread_db_find_new_threads. Clean up unused variables.
17169 (maybe_attach_thread): Remove first thread handling.
17170 (thread_db_find_new_threads): Use find_first_thread.
17171 (thread_db_get_tls_address): Likewise.
17172
4105de34
DJ
171732007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17174
17175 * thread-db.c (thread_db_find_new_threads): Add prototype.
17176 (thread_db_create_event): Check for the main thread before adding
17177 a new thread.
17178 (maybe_attach_thread): Only enable event reporting if TID == 0.
17179 (thread_db_get_tls_address): Check for new threads.
17180
2b876972
DJ
171812007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17182
17183 * linux-low.c (linux_create_inferior): Try execv before execvp.
17184 * spu-low.c (spu_create_inferior): Likewise.
17185
7a245884
DJ
171862007-06-13 Mike Frysinger <vapier@gentoo.org>
17187
17188 * linux-low.c (linux_create_inferior): Change execv to execvp.
17189 * spu-low.c (spu_create_inferior): Likewies.
17190
117ce543
DJ
171912007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17192
17193 * Makefile.in (clean): Clean new files instead of deleted ones.
17194 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17195 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17196 rules.
17197 * configure.srv: Specify XML files and new regformats for MIPS and
17198 MIPS64 GNU/Linux.
17199 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17200 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17201 an entry for the restart register.
17202 (mips_cannot_fetch_register, mips_cannot_store_register)
17203 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17204 register names to match the XML descriptions.
17205 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17206 restart register instead of $0.
17207
0e7f50da
UW
172082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17209 Markus Deuling <deuling@de.ibm.com>
17210
17211 * remote-utils.c (decode_xfer_write): New function.
17212 * server.h (decode_xfer_write): Add prototype.
17213 * server.c (handle_query): Add PACKET_LEN argument. Support
17214 qXfer:spu:read and qXfer:spu:write packets.
17215 (main): Pass packet_len to handle_query.
17216 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17217 * target.h (target_ops): Add qxfer_spu.
17218
374c1d38
UW
172192007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17220
17221 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17222 accessing non-seekable spufs files.
17223
bb63802a
UW
172242007-05-16 Markus Deuling <deuling@de.ibm.com>
17225
889bf7c5 17226 * server.c (handle_query): Add reply for qC packet.
bb63802a 17227
7390519e
PA
172282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17229 Leo Zayas <lerele@champenstudios@com>
17230
17231 * server.h (check_remote_input_interrupt_request): New function.
17232 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17233 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17234 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17235 (check_remote_input_interrupt_request): New function.
17236 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 17237 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
17238 winapi_GenerateConsoleCtrlEvent): New typedefs.
17239 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17240 to 250 ms.
17241 (win32_wait): Check for remote interrupt request
17242 with check_remote_input_interrupt_request.
17243 (win32_request_interrupt): New function.
17244 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17245
34b34921
PA
172462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17247
17248 * win32-low.c (debug_registers_changed,
17249 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17250 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17251 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17252 (thread_rec): Get context using the low target.
17253 (child_add_thread): Call thread_added on the low target,
17254 which does the same thing.
17255 (regptr): Delete.
17256 (do_initial_child_stuff): Remove debug registers references.
17257 Set context using the low target. Resume threads after
17258 setting the contexts.
17259 (child_continue): Remove dead variable. Remove debug
17260 registers references.
17261 (child_fetch_inferior_registers): Go through the low target.
17262 (do_child_store_inferior_registers): Remove.
17263 (child_store_inferior_registers): Go through the low target.
17264 (win32_resume): Remove debug registers references.
17265 Set context using the low target.
17266 (handle_exception): Change return type to void. Don't record
17267 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17268 first chance exception.
889bf7c5 17269 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
17270 goto loop. Always return after waiting for debug event.
17271 (win32_wait): Convert to switch statement. Handle spurious
17272 events.
17273
17274 * win32-i386-low.c (debug_registers_changed,
17275 debug_registers_used): New.
17276 (initial_stuff): Rename to ...
17277 (i386_initial_stuff): ... this. Clear debug registers
17278 state variables.
17279 (store_debug_registers): Delete.
17280 (i386_get_thread_context): New.
17281 (load_debug_registers): Delete.
17282 (i386_set_thread_context): New.
17283 (i386_thread_added): New.
17284 (single_step): Rename to ...
17285 (i386_single_step): ... this.
17286 (do_fetch_inferior_registers): Rename to ...
17287 (i386_fetch_inferior_register): ... this.
17288 (i386_store_inferior_register): New.
17289 (the_low_target): Adapt to new interface.
17290
17291 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17292 (arm_get_thread_context): New.
17293 (arm_set_thread_context): New.
17294 (regptr): New.
17295 (do_fetch_inferior_registers): Rename to ...
17296 (arm_fetch_inferior_register): ... this.
17297 (arm_store_inferior_register): New.
17298 (arm_wince_breakpoint): Reimplement as unsigned long.
17299 (arm_wince_breakpoint_len): Define.
17300 (the_low_target): Adapt to new interface.
17301
17302 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17303 load_debug_registers. Add get_thread_context, set_thread_context,
17304 thread_added and store_inferior_register. Rename
17305 fetch_inferior_registers to fetch_inferior_register.
17306 (regptr): Remove declaration.
17307
dd6953e1
PA
173082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17309
17310 * linux-low.c (linux_detach): Change return type to int. Return 0.
17311 * spu-low.c (spu_detach): Likewise.
17312
444d6139
PA
173132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17314
17315 * target.h (target_ops): Change return type of detach to int.
17316 Add join.
17317 (join_inferior): New.
17318 * server.c (main): Don't skip detach support on mingw32.
17319 If the inferior doesn't support detaching return error.
17320 Call join_inferior instead of using waitpid.
17321 * linux-low.c (linux_join): New.
17322 (linux_target_op): Add linux_join.
17323 * spu-low.c (spu_join): New.
17324 (spu_target_ops): Add spu_join.
17325 * win32-low.c (win32_detach): Adapt to new interface.
17326 Reopen current_process_handle before detaching. Issue a child
17327 resume before detaching.
17328 (win32_join): New.
17329 (win32_target_op): Add win32_join.
17330
1d5315fe
PA
173312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17332
17333 * win32-low.c (win32-attach): Fix return value.
17334 * target.h (target_ops): Describe ATTACH return values.
17335
bf914831
PA
173362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17337
17338 * win32-low.c (GETPROCADDRESS): Define.
17339 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17340 (winapi_DebugSetProcessKillOnExit): Likewise.
17341 (win32_create_inferior): Force usage of ansi CreateProcessA.
17342 (win32_attach): Use GETPROCADDRESS.
17343 (win32_detach): Likewise.
17344
f72f3e60
PA
173452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17346
17347 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17348
ed50f18f
PA
173492007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17350
17351 * win32-low.c: Commit leftover changes from 2007-03-29.
17352
0c2ead7e
DJ
173532007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17354
17355 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17356 fields short instead of int. Add explicit padding.
17357 (i387_cache_to_fsave): Remove unnecessary casts.
17358 (i387_fsave_to_cache): Doc fix.
17359 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17360
73725ff3
DJ
173612007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17362
17363 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17364 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17365
d99f33d8
PA
173662007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17367
17368 * configure.srv (arm*-*-mingw32ce*): Move near the other
17369 arm targets.
17370
68070c10
PA
173712007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17372
2482afc6 17373 * configure.ac: Add errno checking.
68070c10
PA
17374 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17375 sys/file.h and malloc.h.
17376 (AC_CHECK_DECLS): Add perror.
17377 (srv_mingwce): Handle.
2482afc6 17378 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
17379 win32-i386-low.o to srv_tgtobj.
17380 (i[34567]86-*-mingw*): Likewise.
17381 (arm*-*-mingw32ce*): Add case.
17382 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17383 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17384 [__MINGW32CE__] (strerror): New function.
17385 [__MINGW32CE__] (errno): Define to GetLastError.
17386 [__MINGW32CE__] (COUNTOF): New macro.
17387 (remote_open): Remove extra close call.
17388 * mem-break.c (delete_breakpoint_at): New function.
17389 * mem-break.h (delete_breakpoint_at): Declare.
17390 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17391 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17392 [USE_WIN32API] (read, write): Add char* casts.
17393 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17394 * server.h: Include wincecompat.h on Windows CE.
17395 [HAVE_ERRNO_H]: Check.
17396 (perror): Declare if not declared.
17397 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17398 (perror_with_name): Remove errno declaration.
17399 * wincecompat.h: New.
17400 * wincecompat.c: New.
17401 * win32-low.h: New.
17402 * win32-arm-low.c: New.
17403 * win32-i386-low.c: New.
17404 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17405 (OUTMSG2): Make it safe.
17406 (_T): New macro.
17407 (COUNTOF): New macro.
17408 (NUM_REGS): Get it from the low target.
17409 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17410 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17411 (thread_rec): Let low target handle debug registers.
17412 (child_add_thread): Likewise.
17413 (child_init_thread_list): Likewise.
17414 (continue_one_thread): Likewise.
17415 (regptr): New.
17416 (do_child_fetch_inferior_registers): Move to ...
17417 * win32-i386-low.c: ... here, and rename to ...
17418 (do_fetch_inferior_registers): ... this.
889bf7c5 17419 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17420 Go through the low target.
17421 (do_child_store_inferior_registers): Use regptr.
17422 (strwinerror): New function.
17423 (win32_create_inferior): Handle Windows CE.
17424 Use strwinerror instead of strerror on Windows error
17425 codes. Add program to the error output.
17426 Don't close the main thread handle on Windows CE.
17427 (win32_attach): Use coredll.dll on Windows CE.
17428 (win32_kill): Close current process and current
17429 thread handles.
17430 (win32_detach): Use coredll.dll on Windows CE.
17431 (win32_resume): Let low target handle debug registers, and
17432 step request.
17433 (handle_exception): Add/Remove initial breakpoint. Avoid
17434 non-existant WSTOPSIG on Windows CE.
17435 (win32_read_inferior_memory): Cast to remove warning.
17436 (win32_arch_string): Go through the low target.
17437 (initialize_low): Call set_breakpoint_data with the low
17438 target's breakpoint.
17439 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17440 FOP_REGNUM, mappings): Move to ...
17441 * win32-i386-low.c: ... here.
17442 * win32-low.c (win32_thread_info): Move to ...
17443 * win32-low.h: ... here.
17444 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17445 win32-arm-low.c and wincecompat.c.
17446 (all:): Add $EXEEXT.
17447 (install-only:): Likewise.
17448 (gdbserver:): Likewise.
17449 (gdbreplay:): Likewise.
17450 * config.in: Regenerate.
17451 * configure: Regenerate.
17452
41093d81
PA
174532007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17454
17455 * win32-low.c: Rename typedef thread_info to
17456 win32_thread_info throughout.
17457
544afa54
PA
174582007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17459
17460 * win32-i386-low.c: Rename to ...
17461 * win32-low.c: ... this.
17462 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17463 * Makefile.in: Likewise.
17464
bce7165d
PA
174652007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17466
17467 * remote-utils.c (monitor_output): Constify msg parameter.
17468 * server.h (monitor_output): Likewise.
17469 * win32-i386-low.c (handle_output_debug_string): New.
17470 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17471 handle_output_debug_string.
17472 (get_child_debug_event): Likewise.
17473
506c7aa0
DJ
174742007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17475
17476 * server.c (main): Correct strtoul check.
17477
42c81e2a
DJ
174782007-03-27 Jon Ringle <jon@ringle.org>
17479
17480 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17481
9453113a
DJ
174822007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17483
17484 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17485
64a69107
DJ
174862007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17487
17488 * terminal.h: Check HAVE_SGTTY_H.
17489
174902007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
17491
17492 * remote-utils.c (remote_open): Print out the assigned port number.
17493
c74d0ad8
DJ
174942007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17495
17496 * remote-utils.c (monitor_output): New function.
17497 * server.c (debug_threads): Define here.
17498 (monitor_show_help): New function.
17499 (handle_query): Handle qRcmd.
17500 (main): Do not handle 'd' packet.
17501 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17502 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17503 of debug_threads.
17504
de7c3b4a
PA
175052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17506
17507 * Makefile.in (EXEEXT): New.
17508 (clean): Use $(EXEEXT).
17509
ef57601b
PA
175102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17511
17512 * target.h (target_ops): Rename send_signal to request_interrupt,
17513 and remove enum target_signal parameter.
17514 * linux-low.c (linux_request_interrupt): Rename from
17515 linux_send_signal, and always send SIGINT.
17516 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17517 and always send SIGINT.
17518 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17519 of send_signal.
17520 (input_interrupt): Likewise.
17521
820f2bda
PA
175222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17523
17524 * server.c (get_features_xml): Check if target implemented
17525 arch_string.
17526 * win32-i386-low.c (win32_arch_string): New.
17527 (win32_target_ops): Add win32_arch_string as arch_string member.
17528
ab39bf24
UW
175292007-02-22 Markus Deuling <deuling@de.ibm.com>
17530
17531 * spu-low.c (spu_arch_string): New.
17532 (spu_target_ops): Add spu_arch_string.
17533
61ff6e04
DJ
175342007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17535
17536 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17537 * configure.ac: Do not check for terminal.h.
17538 * configure, config.in: Regenerated.
17539
fb1e4ffc
DJ
175402007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17541
17542 * Makefile.in (OBS): Add $(XML_BUILTIN).
17543 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17544 (clean): Update.
17545 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17546 (arm-with-iwmmxt.c): New.
17547 * config.in, configure: Regenerate.
17548 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17549 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17550 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17551 (arm*-*-linux*): Add iWMMXt and regset support.
17552 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17553 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17554 (arm_store_wmmxregset, target_regsets): New.
17555 * server.c (get_features_xml): Take annex argument. Check builtin
17556 XML documents.
17557 (handle_query): Handle multiple annexes.
17558
0f48aa01
DJ
175592007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17560
17561 * remote-utils.c [USE_WIN32API] (read, write): Define.
17562 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17563 write.
17564
23181151
DJ
175652007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17566
17567 * linux-i386-low.c (the_low_target): Set arch_string.
17568 * linux-x86-64-low.c (the_low_target): Likewise.
17569 * linux-low.c (linux_arch_string): New.
17570 (linux_target_ops): Add it.
17571 * linux-low.h (struct linux_target_ops): Add arch_string.
17572 * server.c (write_qxfer_response): Use const void * for DATA.
17573 (get_features_xml): New.
17574 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17575 * target.h (struct target_ops): Add arch_string method.
17576
9d606399
DJ
175772007-01-03 Denis Pilat <denis.pilat@st.com>
17578 Daniel Jacobowitz <dan@codesourcery.com>
17579
17580 * linux-low.c (linux_kill): Handle being called with no threads.
17581 * win32-i386-low.c (win32_kill): Likewise.
17582 (get_child_debug_event): Clear current_process_handle.
17583
175842006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17585 Daniel Jacobowitz <dan@codesourcery.com>
17586
17587 * remote-utils.c (remote_open): Check the type of specified
17588 serial port devices before opening them.
17589 * server.c (main): Kill the inferior if an error occurs during
17590 the first remote_open.
17591
a5e13d24
DJ
175922006-12-05 Markus Deuling <deuling@de.ibm.com>
17593
17594 * README: Update supported targets.
17595
186947f7
DJ
175962006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17597
17598 * Makefile.in (clean): Remove reg-mips64.c.
17599 (reg-mips64.c, reg-mips64.o): New rules.
17600 * configure.srv: Handle mips64. Include regset support for mips.
17601 * linux-mips-low.c (union mips_register): New.
17602 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17603 (mips_breakpoint, mips_breakpoint_at): Use int.
17604 (mips_collect_register, mips_supply_register)
17605 (mips_collect_register_32bit, mips_supply_register_32bit)
17606 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17607 (mips_store_fpregset, target_regsets): New.
17608 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17609
a13e2c95
UW
176102006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17611
17612 * configure.srv: Add target "spu*-*-*".
17613 * Makefile.in (clean): Remove reg-spu.c.
17614 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17615 * spu-low.c: New file.
17616
cb7283db
DJ
176172006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17618
17619 * configure.ac: Correct td_thr_tls_get_addr test.
17620 * configure: Regenerated.
17621
89be2091
DJ
176222006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17623
17624 * linux-low.c (linux_wait_for_event): Reformat. Use the
17625 pass_signals array.
17626 * remote-utils.c (decode_address_to_semicolon): New.
17627 * server.c (pass_signals, handle_general_set): New.
17628 (handle_query): Mention QPassSignals for qSupported.
17629 (main): Call handle_general_set.
17630 * server.h (pass_signals, decode_address_to_semicolon): New.
17631
000ef4f0
DJ
176322006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17633
17634 * server.c (handle_query): Correct error handling for read_auxv.
17635
b7149293
UW
176362005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17637
17638 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17639 and srv_linux_thread_db to yes.
17640 * linux-s390-low.c (s390_fill_gregset): New function.
17641 (target_regsets): Define data structure.
17642
dae5f5cf
DJ
176432006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17644
17645 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17646 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17647 * config.in, configure: Regenerated.
17648 * inferiors.c (gdb_id_to_thread): New function.
17649 (gdb_id_to_thread_id): Use it.
17650 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17651 * linux-low.h (struct process_info): Add th member.
17652 (thread_db_get_tls_address): New prototype.
17653 * remote-utils.c (decode_address): Make non-static.
17654 * server.c (handle_query): Handle qGetTLSAddr.
17655 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17656 * target.h (struct target_ops): Add get_tls_address.
17657 * thread-db.c (maybe_attach_thread): Save the thread handle.
17658 (thread_db_get_tls_address): New.
17659
32ca6d61
DJ
176602006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17661
17662 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17663 (linux_resume_one_process): Take a siginfo_t *. Update all
17664 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17665 (struct pending_signals): Add a siginfo_t.
17666 (linux_wait_for_process): Always set last_status.
17667 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17668 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17669 * linux-low.h (struct process_info): Add last_status.
17670
5ffff7c1
DJ
176712006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17672
17673 * remote-utils.c (try_rle): New function.
17674 (putpkt_binary): Use it.
17675
8695c747
DJ
176762006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17677
17678 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17679 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17680 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17681 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17682 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17683 point registers.
17684
290fadea
RS
176852006-08-08 Richard Sandiford <richard@codesourcery.com>
17686
17687 * server.c (terminal_fd): New variable.
17688 (old_foreground_pgrp): Likewise.
17689 (restore_old_foreground_pgrp): New function.
17690 (start_inferior): Record the terminal file descriptor in terminal_fd
17691 and its original foreground group in old_foreground_pgrp. Register
17692 restore_old_foreground_pgrp with atexit().
17693
9f2e1e63
DJ
176942006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17695
17696 * server.c (handle_query): Correct qPart to qXfer.
17697
b80864fb
DJ
176982006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17699
17700 * configure.ac: Check for more headers which are missing on
17701 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17702 * configure.srv: Add Cygwin and mingw32.
17703 * remote-utils.c: Don't include headers unconditionally which
17704 are missing on mingw32. Include <winsock.h> for mingw32.
17705 (remote_open): Adjust for mingw32 support. Flush
17706 standard error after writing to it.
17707 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17708 (unblock_async_io, enable_async_io, disable_async_io)
17709 (readchar, getpkt): Update for Winsock support.
17710 (prepare_resume_reply): Expect a protocol signal number.
17711 * server.c: Disable <sys/wait.h> on mingw32.
17712 (start_inferior): Adjust for mingw32 support. Flush
17713 standard error after writing to it.
17714 (attach_inferior): Likewise. Use protocol signal
17715 numbers.
17716 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17717 and names.
17718 * win32-i386-low.c: New file.
17719 * Makefile.in (XM_CLIBS): Set.
17720 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17721 (win32-i386-low.o): New dependency rule.
17722 * linux-low.c (linux_wait): Use target signal numbers.
17723 * target.h (struct target_ops): Doc fix.
17724 * server.h (target_signal_to_name): New prototype.
17725 * gdbreplay.c: Don't include headers unconditionally which
17726 are missing on mingw32. Include <winsock.h> for mingw32.
17727 (remote_close, remote_open): Adjust for Winsock support.
17728 * configure, config.in: Regenerated.
17729
0876f84a
DJ
177302006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17731
17732 * server.c (decode_xfer_read, write_qxfer_response): New.
17733 (handle_query): Take a packet length argument. Handle
17734 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17735 the qSupported response.
17736 (main): Update call to handle_query.
17737
01f9e8fa
DJ
177382006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17739
17740 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17741 (putpkt_binary): Renamed from putpkt and adjusted for binary
17742 data.
17743 (putpkt): New wrapper for putpkt_binary.
17744 (readchar): Don't mask off the high bit.
17745 (decode_X_packet): New function.
17746 * server.c (main): Call putpkt_binary if a handler sets the packet
17747 length. Save the length of the incoming packet. Handle 'X'.
17748 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17749
be2a5f71
DJ
177502006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17751
17752 * server.c (handle_query): Handle qSupported.
17753
ea025f5f
DJ
177542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17755
17756 * remote-utils.c (all_symbols_looked_up): New variable.
17757 (look_up_one_symbol): Check it.
17758 * server.h (look_up_one_symbol): New declaration.
17759 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17760
9308fc88
DJ
177612006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17762
17763 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17764 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17765 (PTRACE_GET_THREAD_AREA): Define.
17766 (ps_get_thread_area): New function.
17767
52fb6437
NS
177682006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17769
17770 * configure.srv (m68k*-*-uclinux*): New target.
17771 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17772 (linux_resume_one_process): Remove extraneous cast.
17773 (linux_read_offsets): New.
17774 (linux_target_op): Add linux_read_offsets on mmuless systems.
17775 * server.c (handle_query): Add qOffsets logic.
17776 * target.h (struct target_ops): Add read_offsets.
17777
21b0f40c
DJ
177782006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17779
17780 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17781 (PTRACE_GET_THREAD_AREA): Define.
17782 (ps_get_thread_area): New function.
17783 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17784 (linux-x86-64-low.o): Update.
17785
0050a760
DJ
177862006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17787
17788 * configure.ac: Remove checks for prfpregset_t.
17789 * gdb_proc_service.h: New file.
17790 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17791 new "gdb_proc_service.h".
17792 * proc-service.c: Likewise.
17793 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17794 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17795 * Makefile.in (gdb_proc_service_h): Updated.
17796 * configure, config.in: Regenerated.
17797
b92a518e
DJ
177982006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17799
17800 * remote-utils.c (prepare_resume_reply): Move declaration
17801 of gdb_id_from_wait to the top of the block.
17802
545587ee
DJ
178032006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17804
17805 * linux-low.c (regsets_store_inferior_registers): Read the regset
17806 from the target before filling it.
17807
9db87ebd
DJ
178082006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17809
17810 * server.c (attach_inferior): Return SIGTRAP for a successful
17811 attach.
17812
dd24457d
DJ
178132006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17814
17815 * Makefile.in (OBS): Add version.o.
17816 (STAGESTUFF): Delete.
17817 (version.o): Add dependencies.
17818 (version.c): Replace rule.
17819 (clean): Remove version.c.
17820 * server.c (gdbserver_version): New.
17821 (gdbserver_usage): Use printf.
17822 (main): Handle --version and --help.
17823 * server.h (version, host_name): Add declarations.
17824
6f0f660e
EZ
178252005-12-23 Eli Zaretskii <eliz@gnu.org>
17826
889bf7c5
PA
17827 * linux-arm-low.c:
17828 * linux-arm-low.c:
17829 * inferiors.c:
17830 * i387-fp.h:
17831 * i387-fp.c:
17832 * gdbreplay.c:
17833 * regcache.c:
17834 * proc-service.c:
17835 * mem-break.h:
17836 * mem-break.c:
17837 * linux-x86-64-low.c:
17838 * linux-sh-low.c:
17839 * linux-s390-low.c:
17840 * linux-ppc64-low.c:
17841 * linux-ppc-low.c:
17842 * linux-mips-low.c:
17843 * linux-m68k-low.c:
17844 * linux-m32r-low.c:
17845 * linux-low.h:
17846 * linux-low.c:
17847 * linux-ia64-low.c:
17848 * linux-i386-low.c:
17849 * linux-crisv32-low.c:
17850 * thread-db.c:
17851 * terminal.h:
17852 * target.h:
17853 * target.c:
17854 * server.h:
17855 * server.c:
17856 * remote-utils.c:
17857 * regcache.h:
17858 * utils.c:
17859 * Makefile.in:
17860 * configure.ac:
6f0f660e
EZ
17861 * gdbserver.1: Add (C) after Copyright. Update the FSF
17862 address.
17863
9d1fb177
DJ
178642005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17865
17866 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17867 (arm_breakpoint_at): Recognize both breakpoints.
17868 (the_low_target): Use the correct breakpoint instruction.
17869
011a70c2
DJ
178702005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17871
17872 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17873 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17874 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17875 (the_low_target): Update.
17876
7fb85e41
AS
178772005-10-25 Andreas Schwab <schwab@suse.de>
17878
17879 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17880
17881 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17882 (ia64_num_regs): Reduce to 462.
17883
3db0444b
DJ
178842005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17885
17886 * acinclude.m4: Correct quoting.
17887 * aclocal.m4: Regenerated.
17888
17889 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17890 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17891 (thread_db_init): Call thread_db_err_str.
17892 * configure.ac: Check for TD_VERSION.
17893 * config.in, configure: Regenerated.
17894
bee0189a
DJ
178952005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17896
17897 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17898
e9d25b98
DJ
178992005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17900
17901 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17902 is not available. Define HAVE_PTRACE_GETREGS if it is.
17903 * config.in, configure: Regenerated.
17904 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17905 * linux-i386-low.c, linux-m68k-low.c: Update to use
17906 HAVE_PTRACE_GETREGS.
17907 * linux-low.c (regsets_fetch_inferior_registers)
17908 (regsets_store_inferior_registers): Only return 0 if we processed
17909 GENERAL_REGS.
17910 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17911 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17912
a06660f7
DJ
179132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17914
17915 * inferiors.c (struct thread_info): Add gdb_id.
17916 (add_thread): Add gdb_id argument.
17917 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17918 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17919 calls to add_thread.
17920 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17921 * server.c (handle_query): Use thread_to_gdb_id.
17922 (handle_v_cont, main): Use gdb_id_to_thread_id.
17923 * server.h (add_thread): Update prototype.
17924 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17925 prototypes.
17926
5a1f5858
DJ
179272005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17928
17929 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17930 left-padded registers.
17931 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17932 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17933
e122f1f5
SE
179342005-07-01 Steve Ellcey <sje@cup.hp.com>
17935
17936 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17937 * configure: Regenerate.
17938 * config.in: Regenerate.
17939 * server.h (NEED_DECLARATION_STRERROR):
17940 Replace with !HAVE_DECL_STRERROR.
17941
d592fa2f
DJ
179422005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17943
17944 * linux-low.c (linux_wait, linux_send_signal): Don't test
17945 an unsigned long variable for > 0 if it could be MAX_ULONG.
17946 * server.c (myresume): Likewise.
17947 * target.c (set_desired_inferior): Likewise.
17948
ccbd4912
MK
179492005-06-13 Mark Kettenis <kettenis@gnu.org>
17950
17951 * configure.ac: Simplify and improve check for socklen_t.
17952 * configure, config.in: Regenerate.
17953
f450004a
DJ
179542005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17955
17956 * acconfig.h: Remove.
17957 * configure.ac: Add a test for socklen_t. Use three-argument
17958 AC_DEFINE throughout.
17959 * config.in: Regenerated using autoheader 2.59.
17960 * configure: Regenerated.
17961
17962 * gdbreplay.c (socklen_t): Provide a default.
17963 (remote_open): Use socklen_t.
17964 * remote-utils.c (socklen_t): Provide a default.
17965 (remote_open): Use socklen_t.
17966 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17967 unsigned char.
17968
17969 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17970 char for buffers.
17971 * linux-low.c (linux_read_memory, linux_write_memory)
17972 (linux_read_auxv): Likewise.
17973 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17974 (check_mem_write): Likewise.
17975 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17976 Likewise.
17977 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17978 (registers_from_string, register_data): Likewise.
17979 * server.c (handle_query, main): Likewise.
17980 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17981 (decode_M_packet): Likewise.
17982 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17983 * target.h (struct target_ops): Update read_memory, write_memory,
17984 and read_auxv.
17985 (read_inferior_memory, write_inferior_memory): Update.
17986 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17987 to unsigned char *.
17988 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17989 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17990 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17991 linux-s390-low.c, linux-sh-low.c: Update for changes in
17992 read_inferior_memory and the_low_target->breakpoint.
17993
eee84df1
DJ
179942005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17995
17996 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17997 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17998 * configure.srv: Add powerpc64-*-linux*.
17999 * linux-ppc64-low.c: New file.
18000
45b134e5
OF
180012005-05-23 Orjan Friberg <orjanf@axis.com>
18002
18003 * linux-cris-low.c: New file with support for CRIS.
18004 * linux-crisv32-low.c: Ditto for CRISv32.
18005 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18006 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 18007 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
18008 reg-crisv32.o, and reg-crisv32.c to make rules.
18009 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18010 recognized targets.
18011
48d93c75
UW
180122005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18013
18014 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18015 of sizeof (PTRACE_XFER_TYPE).
18016 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18017
e013ee27
OF
180182005-05-12 Orjan Friberg <orjanf@axis.com>
18019
889bf7c5 18020 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
18021 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18022 pointers for hardware watchpoint support.
18023 * linux-low.h (struct linux_target_ops): Ditto.
18024 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18025 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18026 to linux_target_ops.
18027 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18028 reply packet.
18029 * server.c (main): Recognize 'Z' and 'z' packets.
18030
b0ded00b
UW
180312005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18032
18033 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18034 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18035 (the_low_target): Add new members.
18036
8643e2ad
DJ
180372005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18038
18039 * proc-service.c (ps_lgetregs): Search all_processes instead of
18040 all_threads.
18041
fc620387
DJ
180422005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18043
18044 * server.c (start_inferior): Change return type to int.
18045 (attach_inferior): Change sigptr to int *.
18046 (handle_v_cont, handle_v_requests): Change signal to int *.
18047 (main): Change signal to int.
18048
180492005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
18050
18051 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18052 * configure.srv: Add m32r*-*-linux*.
18053 * linux-m32r-low.c: New file.
18054
e0e76420
DJ
180552005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18056
18057 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18058
a1928bad
DJ
180592005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18060
18061 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18062 Take unsigned long arguments for PIDs.
18063 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18064 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18065 (wait_for_sigstop, linux_resume_one_process)
18066 (regsets_fetch_inferior_registers, linux_send_signal)
18067 (linux_read_auxv): Likewise. Update the types of variables holding
18068 PIDs. Update format string specifiers.
18069 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18070 * remote-utils.c (prepare_resume_reply): Likewise.
18071 * server.c (cont_thread, general_thread, step_thread)
18072 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18073 unsigned long.
18074 (handle_query): Update format specifiers.
18075 (handle_v_cont, main): Use strtoul for thread IDs.
18076 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18077 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18078 (general_thread, step_thread, thread_from_wait)
18079 (old_thread_from_wait): Update.
18080 * target.h (struct thread_resume): Use unsigned long for THREAD.
18081 (struct target_ops): Use unsigned long for arguments to attach and
18082 thread_alive.
18083
dcdb98d2
DJ
180842005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18085
18086 * acinclude.m4: Include bfd/bfd.m4 directly.
18087 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18088 <agriffis@toolchain.org>.
18089 * aclocal.m4, configure: Regenerated.
18090
bec39cab
AC
180912005-01-07 Andrew Cagney <cagney@gnu.org>
18092
18093 * configure.ac: Rename configure.in, require autoconf 2.59.
18094 * configure: Re-generate.
18095
434c4c77
DJ
180962004-12-08 Daniel Jacobowitz <dan@debian.org>
18097
18098 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18099 LIBS when finished.
18100 * aclocal.m4: Regenerated.
18101 * configure: Regenerated.
18102
db1d3e1b
AS
181032004-11-21 Andreas Schwab <schwab@suse.de>
18104
18105 * linux-m68k-low.c (m68k_num_gregs): Define.
18106 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18107 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18108 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18109 (m68k_breakpoint_at): New. Add to the_low_target.
18110
18111 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18112 srv_linux_thread_db to yes.
18113
43360365
JB
181142004-10-20 Joel Brobecker <brobecker@gnat.com>
18115
18116 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18117 (ARCH_SET_FS): Likewise.
18118 (ARCH_GET_FS): Likewise.
18119 (ARCH_GET_GS): Likewise.
18120
fd500816
DJ
181212004-10-16 Daniel Jacobowitz <dan@debian.org>
18122
18123 * linux-i386-low.c (ps_get_thread_area): New.
18124 * linux-x86-64-low.c (ps_get_thread_area): New.
18125 * linux-low.c: Include <sys/syscall.h>.
18126 (linux_kill_one_process): Don't kill the first thread here.
18127 (linux_kill): Kill the first thread here.
18128 (kill_lwp): New function.
18129 (send_sigstop, linux_send_signal): Use it.
18130 * proc-service.c: Clean up #ifdefs.
18131 (fpregset_info): Delete.
18132 (ps_lgetregs): Update and enable implementation.
18133 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18134 implementations.
18135 * remote-utils.c (struct sym_cache, symbol_cache): New.
18136 (input_interrupt): Print a clearer message.
18137 (async_io_enabled): New variable.
18138 (enable_async_io, disable_async_io): Use it. Update comments.
18139 (look_up_one_symbol): Use the symbol cache.
18140 * thread-db.c (thread_db_look_up_symbols): New function.
18141 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18142
f6de3c42
DJ
181432004-10-16 Daniel Jacobowitz <dan@debian.org>
18144
18145 * configure.in: Test for -rdynamic.
18146 * configure: Regenerated.
18147 * Makefile (INTERNAL_LDFLAGS): New.
18148 (gdbserver, gdbreplay): Use it.
18149
2c0fc042
AC
181502004-09-02 Andrew Cagney <cagney@gnu.org>
18151
18152 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18153
075b3282
DJ
181542004-03-23 Daniel Jacobowitz <drow@mvista.com>
18155
18156 * linux-low.c (linux_wait): Clear all_processes list also.
18157
fa6a77dc
DJ
181582004-03-12 Daniel Jacobowitz <drow@mvista.com>
18159
18160 * linux-low.c: Include <errno.h>. Remove extern declaration of
18161 errno.
18162
6d782a97
DJ
181632004-03-12 Daniel Jacobowitz <drow@mvista.com>
18164
18165 * gdbreplay.c, server.h, utils.c: Update copyright years.
18166
3a7fb99b
DJ
181672004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18168
18169 * server.c (main): Print child status or termination signal from
18170 variable 'signal', not 'sig'.
18171
c3e735a6
DJ
181722004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18173
18174 * linux-low.c (linux_read_memory): Change return type to
18175 int. Check for and return error from ptrace().
18176 * target.c (read_inferior_memory): Change return type to int. Pass
18177 back return status from the_target->read_memory().
18178 * target.h (struct target_ops): Adapt *read_memory() prototype.
18179 Update comment.
18180 (read_inferior_memory): Adapt prototype.
18181 * server.c (main): Return an error packet if
18182 read_inferior_memory() returns an error.
18183
a59d1c82
DJ
181842004-03-04 Daniel Jacobowitz <drow@mvista.com>
18185
18186 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18187 Unify with other clean targets.
18188
dc3f8883
DJ
181892004-02-29 Daniel Jacobowitz <drow@mvista.com>
18190
18191 * server.c (handle_v_cont): Call set_desired_inferior.
18192
89a208da
DJ
181932004-02-29 Daniel Jacobowitz <drow@mvista.com>
18194
18195 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18196
62ea82f5
DJ
181972004-02-29 Daniel Jacobowitz <drow@mvista.com>
18198
18199 * linux-low.c (linux_wait): Unblock async I/O.
18200 (linux_resume): Block and enable async I/O.
18201 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18202 * server.h (block_async_io, unblock_async_io): Add prototypes.
18203
6910d122
DJ
182042004-02-29 Daniel Jacobowitz <drow@mvista.com>
18205
18206 * remote-utils.c (remote_open): Print a status notice after
18207 opening a TCP port.
18208 * server.c (attach_inferior): Print a status notice after
18209 attaching.
18210
182112004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
18212
18213 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18214
c89dc5d4
DJ
182152004-02-26 Daniel Jacobowitz <drow@mvista.com>
18216
18217 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18218 error packet.
18219 * server.c, target.h: Update copyright years.
18220
4b8dad4a
RM
182212004-02-25 Roland McGrath <roland@redhat.com>
18222
18223 * target.h (struct target_ops): New member `read_auxv'.
18224 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18225 * linux-low.c (linux_read_auxv): New function.
18226 (linux_target_ops): Initialize `read_auxv' member to that.
18227
d7446758
JB
182282004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18229
18230 Committed by Jim Blandy <jimb@redhat.com>.
18231
18232 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 18233 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
18234 instead of GPR_SIZE to distiguish s390 and s390x targets.
18235
5544ad89
DJ
182362004-01-31 Daniel Jacobowitz <drow@mvista.com>
18237
18238 * linux-low.c: Update copyright year.
18239 (check_removed_breakpoint): Clear pending_is_breakpoint.
18240 (linux_set_resume_request, linux_queue_one_thread)
18241 (resume_status_pending_p): New functions.
18242 (linux_continue_one_thread): Use process->resume.
18243 (linux_resume): Only resume threads if there are no pending events.
18244 * linux-low.h (struct process_info): Add resume request
18245 pointer.
18246
2a68b70e
DJ
182472004-01-30 Daniel Jacobowitz <drow@mvista.com>
18248
18249 * regcache.c (new_register_cache): Clear the allocated register
18250 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18251
64386c31
DJ
182522003-10-13 Daniel Jacobowitz <drow@mvista.com>
18253
18254 * linux-low.c (linux_resume): Take a struct thread_resume *
18255 argument.
18256 (linux_wait): Update call.
18257 (resume_ptr): New static variable.
18258 (linux_continue_one_thread): Renamed from
18259 linux_continue_one_process. Use resume_ptr.
18260 (linux_resume): Use linux_continue_one_thread.
18261 * server.c (handle_v_cont, handle_v_requests): New functions.
18262 (myresume): New function.
18263 (main): Handle 'v' case.
18264 * target.h (struct thread_resume): New type.
18265 (struct target_ops): Change argument of "resume" to struct
18266 thread_resume *.
18267 (myresume): Delete macro.
18268
c938e9b0
L
182692003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18270
18271 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18272 (uninstall): Support DESTDIR.
18273
7f313d07
BC
18274Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18275
18276 * configure.srv: Add xscale*linux copy of arm*linux entry.
18277
3b2fc2ea
DJ
182782003-07-24 Daniel Jacobowitz <drow@mvista.com>
18279
18280 * linux-arm-low.c (arm_reinsert_addr): New function.
18281 (the_low_target): Add arm_reinsert_addr.
18282
1c0a559e
MK
182832003-07-08 Mark Kettenis <kettenis@gnu.org>
18284
18285 * mem-break.c: Remove whitespace at end of file.
18286
43d5792c
DJ
182872003-06-28 Daniel Jacobowitz <drow@mvista.com>
18288
18289 * configure.in: Check whether we need to prototype strerror.
18290 * server.h: Optionally prototype strerror.
18291 * gdbreplay.c (perror_with_name): Use strerror.
18292 * linux-low.c (linux_attach_lwp): Use strerror.
18293 * utils.c (perror_with_name): Use strerror.
18294 * config.in, configure: Regenerated.
18295
c8a86edf
DJ
182962003-06-28 Daniel Jacobowitz <drow@mvista.com>
18297
18298 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18299 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18300
73d37363
DJ
183012003-06-20 Daniel Jacobowitz <drow@mvista.com>
18302
18303 * Makefile.in (SFILES): Update.
18304 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18305 low-sun3.c: Remove files.
18306
6ad8ae5c
DJ
183072003-06-17 Daniel Jacobowitz <drow@mvista.com>
18308
18309 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18310 (linux_detach_one_process, linux_detach): New functions.
18311 (linux_target_ops): Add linux_detach.
18312 * server.c (main): Handle 'D' packet.
18313 * target.h (struct target_ops): Add "detach" member.
18314 (detach_inferior): Define.
18315
1581182a
MK
183162003-06-13 Mark Kettenis <kettenis@gnu.org>
18317
18318 From Kelley Cook <kelleycook@wideopenwest.com>:
18319 * configure.srv: Accept i[34567]86 variants.
18320
e5379b03
DJ
183212003-06-05 Daniel Jacobowitz <drow@mvista.com>
18322
18323 * linux-low.c (linux_wait_for_event): Correct comment typos.
18324 (linux_resume_one_process): Call check_removed_breakpoint.
18325 (linux_send_signal): New function.
18326 (linux_target_ops): Add linux_send_signal.
18327 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18328 of kill.
18329 * target.h (struct target_ops): Add send_signal.
18330
2ff29de4
JB
183312003-05-29 Jim Blandy <jimb@redhat.com>
18332
18333 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18334 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18335 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18336 away part of the register's value.
18337
254787d4
DJ
183382003-03-26 Daniel Jacobowitz <drow@mvista.com>
18339
18340 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18341 (linux_wait_for_event, linux_init_signals): Likewise.
18342
94e10508
DJ
183432003-03-17 Daniel Jacobowitz <drow@mvista.com>
18344
18345 * configure.in: Check for stdlib.h.
18346 * configure: Regenerated.
18347 * config.in: Regenerated.
18348
4c0711e0
DJ
183492003-01-04 Andreas Schwab <schwab@suse.de>
18350
18351 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18352
ef66e766
AC
183532003-01-02 Andrew Cagney <ac131313@redhat.com>
18354
18355 * Makefile.in: Remove obsolete code.
18356
a1358604
DJ
183572002-11-20 Daniel Jacobowitz <drow@mvista.com>
18358
18359 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18360 defined(PT_FPR0_HI).
18361
23ce3b1c
DJ
183622002-11-17 Stuart Hughes <seh@zee2.com>
18363
18364 * linux-arm-low.c (arm_num_regs): Increase.
18365 (arm_regmap): Include status register.
18366
183672002-11-17 Daniel Jacobowitz <drow@mvista.com>
18368
18369 * linux-low.c (register_addr): Remove incorrect -1 check.
18370
a9fa9f7d
DJ
183712002-08-29 Daniel Jacobowitz <drow@mvista.com>
18372
18373 * linux-low.c (linux_create_inferior): Call setpgid. Return
18374 the new PID.
18375 (unstopped_p, linux_signal_pid): Remove.
18376 (linux_target_ops): Remove linux_signal_pid.
18377 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18378 global instead of target method.
18379 * target.h (struct target_ops): Remove signal_pid. Update comment
18380 for create_inferior.
18381 * server.c (signal_pid): New variable.
18382 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 18383 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
18384 (attach_inferior): Set signal_pid.
18385
17574093
DJ
183862002-08-23 Daniel Jacobowitz <drow@mvista.com>
18387
18388 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18389
183902002-08-20 Jim Blandy <jimb@redhat.com>
18391
18392 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18393 default for this.
18394
183952002-08-01 Andrew Cagney <cagney@redhat.com>
18396
18397 * Makefile.in: Make chill references obsolete.
18398
183992002-07-24 Kevin Buettner <kevinb@redhat.com>
18400
18401 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18402 * configure: Regenerate.
18403 * config.in: Regenerate.
18404
184052002-07-09 David O'Brien <obrien@FreeBSD.org>
18406
18407 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18408 (perror_with_name, remote_close, remote_open, expect, play): Static.
18409
184102002-07-04 Michal Ludvig <mludvig@suse.cz>
18411
4b8dad4a 18412 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
18413 byte offsets instead of an array of indexes.
18414 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18415
184162002-06-13 Daniel Jacobowitz <drow@mvista.com>
18417
18418 * regcache.c: Add comment.
18419
184202002-06-11 Daniel Jacobowitz <drow@mvista.com>
18421
18422 * thread-db.c: New file.
18423 * proc-service.c: New file.
18424 * acinclude.m4: New file.
18425 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18426 proc-service.o, and thread-db.o.
18427 (linux-low.o): Add USE_THREAD_DB.
18428 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18429 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18430 * aclocal.m4: Regenerated.
18431 * config.in: Regenerated.
18432 * configure: Regenerated.
18433 * configure.in: Check for proc_service.h, sys/procfs.h,
18434 thread_db.h, and linux/elf.h headrs.
18435 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18436 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18437 Check for -lthread_db and thread support.
18438 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18439 PowerPC, and SuperH.
18440 * i387-fp.c: Constify arguments.
18441 * i387-fp.h: Likewise.
18442 * inferiors.c: (struct thread_info): Renamed from
18443 `struct inferior_info'. Remove PID member. Use generic inferior
18444 list header. All uses updated.
18445 (inferiors, signal_pid): Removed.
18446 (all_threads): New variable.
18447 (get_thread): Define.
18448 (add_inferior_to_list): New function.
18449 (for_each_inferior): New function.
18450 (change_inferior_id): New function.
18451 (add_inferior): Removed.
18452 (remove_inferior): New function.
18453 (add_thread): New function.
18454 (free_one_thread): New function.
18455 (remove_thread): New function.
18456 (clear_inferiors): Use for_each_inferior and free_one_thread.
18457 (find_inferior): New function.
18458 (find_inferior_id): New function.
18459 (inferior_target_data): Update argument type.
18460 (set_inferior_target_data): Likewise.
18461 (inferior_regcache_data): Likewise.
18462 (set_inferior_regcache_data): Likewise.
18463 * linux-low.c (linux_bp_reinsert): Remove.
18464 (all_processes, stopping_threads, using_thrads)
18465 (struct pending_signals, debug_threads, pid_of): New.
18466 (inferior_pid): Replace with macro.
18467 (struct inferior_linux_data): Remove.
18468 (get_stop_pc, add_process): New functions.
18469 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18470 Use add_process and add_thread.
18471 (linux_attach_lwp): New function, based on old linux_attach. Use
18472 add_process and add_thread. Set stop_expected for new threads.
18473 (linux_attach): New function.
18474 (linux_kill_one_process): New function.
18475 (linux_kill): Kill all LWPs.
18476 (linux_thread_alive): Use find_inferior_id.
18477 (check_removed_breakpoints, status_pending_p): New functions.
18478 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18479 Update. Use WNOHANG. Wait for cloned processes also. Update process
18480 struct for the found process.
18481 (linux_wait_for_event): New function.
18482 (linux_wait): Use it. Support LWPs.
18483 (send_sigstop, wait_for_sigstop, stop_all_processes)
18484 (linux_resume_one_process, linux_continue_one_process): New functions.
18485 (linux_resume): Support LWPs.
18486 (REGISTER_RAW_SIZE): Remove.
18487 (fetch_register): Use register_size instead. Call supply_register.
18488 (usr_store_inferior_registers): Likewise. Call collect_register.
18489 Fix recursive case.
18490 (regsets_fetch_inferior_registers): Improve error message.
18491 (regsets_store_inferior_registers): Add debugging.
18492 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18493 (unstopped_p, linux_signal_pid): New functions.
18494 (linux_target_ops): Add linux_signal_pid.
18495 (linux_init_signals): New function.
18496 (initialize_low): Call it. Initialize using_threads.
18497 * regcache.c (inferior_regcache_data): Add valid
18498 flag.
18499 (get_regcache): Fetch registers lazily. Add fetch argument
18500 and update all callers.
18501 (regcache_invalidate_one, regcache_invalidate): New
18502 functions.
18503 (new_register_cache): Renamed from create_register_cache.
18504 Return the new regcache.
18505 (free_register_cache): Change argument to a void *.
18506 (registers_to_string, registers_from_string): Call get_regcache
18507 with fetch flag set.
18508 (register_data): Make static. Pass fetch flag to get_regcache.
18509 (supply_register): Call get_regcache with fetch flag clear.
18510 (collect_register): Call get_regcache with fetch flag set.
18511 (collect_register_as_string): New function.
18512 * regcache.h: Update.
18513 * remote-utils.c (putpkt): Flush after debug output and use
18514 stderr.
18515 Handle input interrupts while waiting for an ACK.
18516 (input_interrupt): Use signal_pid method.
18517 (getpkt): Flush after debug output and use stderr.
18518 (outreg): Use collect_register_as_string.
18519 (new_thread_notify, dead_thread_notify): New functions.
18520 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18521 and general_thread.
18522 (look_up_one_symbol): Flush after debug output.
18523 * server.c (step_thread, server_waiting): New variables.
18524 (start_inferior): Don't use signal_pid. Update call to mywait.
18525 (attach_inferior): Update call to mywait.
18526 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18527 (main): Don't fetch/store registers explicitly. Use
18528 set_desired_inferior. Support proposed ``Hs'' packet. Update
18529 calls to mywait.
18530 * server.h: Update.
18531 (struct inferior_list, struct_inferior_list_entry): New.
18532 * target.c (set_desired_inferior): New.
18533 (write_inferior_memory): Constify.
18534 (mywait): New function.
18535 * target.h: Update.
18536 (struct target_ops): New signal_pid method.
18537 (mywait): Removed macro, added prototype.
18538
18539 * linux-low.h (regset_func): Removed.
18540 (regset_fill_func, regset_store_func): New.
18541 (enum regset_type): New.
18542 (struct regset_info): Add type field. Use new operation types.
18543 (struct linux_target_ops): stop_pc renamed to get_pc.
18544 Add decr_pc_after_break and breakpoint_at.
18545 (get_process, get_thread_proess, get_process_thread)
18546 (strut process_info, all_processes, linux_attach_lwp)
18547 (thread_db_init): New.
18548
18549 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18550 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18551 (the_low_target): Add new members.
18552 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18553 (i386_store_fpxregset): Constify.
18554 (target_regsets): Add new kind identifier.
18555 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18556 (i386_set_pc): Add debugging.
18557 (i386_breakpoint_at): New function.
18558 (the_low_target): Add new members.
18559 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18560 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18561 (mips_breakpoint_at): New.
18562 (the_low_target): Add new members.
18563 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18564 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18565 (the_low_target): Add new members.
18566 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18567 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18568 (the_low_target): Add new members.
18569 * linux-x86-64-low.c (target_regsets): Add new kind
18570 identifier.
18571
185722002-05-15 Daniel Jacobowitz <drow@mvista.com>
18573
18574 From Martin Pool <mbp@samba.org>:
18575 * server.c (gdbserver_usage): New function.
18576 (main): Call it.
18577
185782002-05-14 Daniel Jacobowitz <drow@mvista.com>
18579
18580 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18581 stop_at -> stop_pc.
18582
185832002-05-04 Andrew Cagney <ac131313@redhat.com>
18584
18585 * Makefile.in: Remove obsolete code.
18586
185872002-04-24 Michal Ludvig <mludvig@suse.cz>
18588
18589 * linux-low.c (regsets_fetch_inferior_registers),
18590 (regsets_store_inferior_registers): Removed cast to int from
18591 ptrace() calls.
18592 * regcache.h: Added declaration of struct inferior_info.
18593
185942002-04-20 Daniel Jacobowitz <drow@mvista.com>
18595
18596 * inferiors.c (struct inferior_info): Add regcache_data.
18597 (add_inferior): Call create_register_cache.
18598 (clear_inferiors): Call free_register_cache.
18599 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18600 * regcache.c (struct inferior_regcache_data): New.
18601 (registers): Remove.
18602 (get_regcache): New function.
18603 (create_register_cache, free_register_cache): New functions.
18604 (set_register_cache): Don't initialize the register cache here.
18605 (registers_to_string, registers_from_string, register_data): Call
18606 get_regcache.
18607 * regcache.h: Add prototypes.
18608 * server.h: Likewise.
18609
186102002-04-20 Daniel Jacobowitz <drow@mvista.com>
18611
18612 * mem-break.c: New file.
18613 * mem-break.h: New file.
18614 * Makefile.in: Add mem-break.o rule; update server.h
18615 dependencies.
18616 * inferiors.c (struct inferior_info): Add target_data
18617 member.
18618 (clear_inferiors): Free target_data member if set.
18619 (inferior_target_data, set_inferior_target_data): New functions.
18620 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18621 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18622 * linux-low.c (linux_bp_reinsert): New variable.
18623 (struct inferior_linux_data): New.
18624 (linux_create_inferior): Use set_inferior_target_data.
18625 (linux_attach): Likewise. Call add_inferior.
18626 (linux_wait_for_one_inferior): New function.
18627 (linux_wait): Call it.
18628 (linux_write_memory): Add const.
18629 (initialize_low): Call set_breakpoint_data.
18630 * linux-low.h (struct linux_target_ops): Add breakpoint
18631 handling members.
18632 * server.c (attach_inferior): Remove extra add_inferior
18633 call.
18634 * server.h: Include mem-break.h. Update inferior.c
18635 prototypes.
18636 * target.c (read_inferior_memory)
18637 (write_inferior_memory): New functions.
18638 * target.h (read_inferior_memory)
18639 (write_inferior_memory): Change macros to prototypes.
18640 (struct target_ops): Update comments. Add const to write_memory
18641 definition.
18642
186432002-04-11 Daniel Jacobowitz <drow@mvista.com>
18644
18645 * linux-low.c (usr_store_inferior_registers): Support
18646 registers which are allowed to fail to store.
18647 * linux-low.h (linux_target_ops): Likewise.
18648 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18649 (ppc_cannot_store_register): FPSCR may not be storable.
18650
186512002-04-09 Daniel Jacobowitz <drow@mvista.com>
18652
18653 * server.h: Include <string.h> if HAVE_STRING_H.
18654 * ChangeLog: Correct paths in last ChangeLog entry.
18655
186562002-04-09 Daniel Jacobowitz <drow@mvista.com>
18657
18658 * linux-low.h: Remove obsolete prototypes.
18659 (struct linux_target_ops): New.
18660 (extern the_low_target): New.
18661 * linux-low.c (num_regs, regmap): Remove declarations.
18662 (register_addr): Use the_low_target explicitly.
18663 (fetch_register): Likewise.
18664 (usr_fetch_inferior_registers): Likewise.
18665 (usr_store_inferior_registers): Likewise.
18666 * linux-arm-low.c (num_regs): Remove.
18667 (arm_num_regs): Define.
18668 (arm_regmap): Renamed from regmap, made static.
18669 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18670 made static.
18671 (arm_cannot_store_register): Renamed from cannot_store_register,
18672 made static.
18673 (the_low_target): New.
18674 * linux-i386-low.c (num_regs): Remove.
18675 (i386_num_regs): Define.
18676 (i386_regmap): Renamed from regmap, made static.
18677 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18678 made static.
18679 (i386_cannot_store_register): Renamed from cannot_store_register,
18680 made static.
18681 (the_low_target): New.
18682 * linux-ia64-low.c (num_regs): Remove.
18683 (ia64_num_regs): Define.
18684 (ia64_regmap): Renamed from regmap, made static.
18685 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18686 made static.
18687 (ia64_cannot_store_register): Renamed from cannot_store_register,
18688 made static.
18689 (the_low_target): New.
18690 * linux-m68k-low.c (num_regs): Remove.
18691 (m68k_num_regs): Define.
18692 (m68k_regmap): Renamed from regmap, made static.
18693 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18694 made static.
18695 (m68k_cannot_store_register): Renamed from cannot_store_register,
18696 made static.
18697 (the_low_target): New.
18698 * linux-mips-low.c (num_regs): Remove.
18699 (mips_num_regs): Define.
18700 (mips_regmap): Renamed from regmap, made static.
18701 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18702 made static.
18703 (mips_cannot_store_register): Renamed from cannot_store_register,
18704 made static.
18705 (the_low_target): New.
18706 * linux-ppc-low.c (num_regs): Remove.
18707 (ppc_num_regs): Define.
18708 (ppc_regmap): Renamed from regmap, made static.
18709 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18710 made static.
18711 (ppc_cannot_store_register): Renamed from cannot_store_register,
18712 made static.
18713 (the_low_target): New.
18714 * linux-s390-low.c (num_regs): Remove.
18715 (s390_num_regs): Define.
18716 (s390_regmap): Renamed from regmap, made static.
18717 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18718 made static.
18719 (s390_cannot_store_register): Renamed from cannot_store_register,
18720 made static.
18721 (the_low_target): New.
18722 * linux-sh-low.c (num_regs): Remove.
18723 (sh_num_regs): Define.
18724 (sh_regmap): Renamed from regmap, made static.
18725 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18726 made static.
18727 (sh_cannot_store_register): Renamed from cannot_store_register,
18728 made static.
18729 (the_low_target): New.
18730 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18731 (the_low_target): New.
18732
187332002-04-09 Daniel Jacobowitz <drow@mvista.com>
18734
18735 * Makefile.in: Add stamp-h target.
18736 * configure.in: Create stamp-h.
18737 * configure: Regenerated.
18738
187392002-04-09 Daniel Jacobowitz <drow@mvista.com>
18740
18741 * inferiors.c: New file.
18742 * target.c: New file.
18743 * target.h: New file.
18744 * Makefile.in: Add target.o and inferiors.o. Update
18745 dependencies.
18746 * linux-low.c (inferior_pid): New static variable,
18747 moved from server.c.
18748 (linux_create_inferior): Renamed from create_inferior.
18749 Call add_inferior. Return 0 on success instead of a PID.
18750 (linux_attach): Renamed from myattach.
18751 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18752 (linux_thread_alive): Renamed from mythread_alive.
18753 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18754 child dies.
18755 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18756 (regsets_store_inferior_registers): Correct error message.
18757 Add missing ``return 0''.
18758 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18759 (linux_store_registers): Renamed from store_inferior_registers.
18760 (linux_read_memory): Renamed from read_inferior_memory.
18761 (linux_write_memory): Renamed from write_inferior_memory.
18762 (linux_target_ops): New structure.
18763 (initialize_low): Call set_target_ops ().
18764 * remote-utils.c (unhexify): New function.
18765 (hexify): New function.
18766 (input_interrupt): Send signals to ``signal_pid''.
18767 * server.c (inferior_pid): Remove.
18768 (start_inferior): Update create_inferior call.
18769 (attach_inferior): Call add_inferior.
18770 (handle_query): New function.
18771 (main): Call handle_query for `q' packets.
18772 * server.h: Include "target.h". Remove obsolete prototypes.
18773 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18774
187752002-04-09 Daniel Jacobowitz <drow@mvista.com>
18776
18777 * Makefile.in: Add WARN_CFLAGS. Update configury
18778 dependencies.
18779 * configure.in: Check for <string.h>
18780 * configure: Regenerate.
18781 * config.in: Regenerate.
18782 * gdbreplay.c: Include needed system headers.
18783 (remote_open): Remove strchr prototype.
18784 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18785 * regcache.c (supply_register): Change buf argument to const void *.
18786 (supply_register_by_name): Likewise.
18787 (collect_register): Change buf argument to void *.
18788 (collect_register_by_name): Likewise.
18789 * regcache.h: Add missing prototypes.
18790 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18791 * server.c (handle_query): New function.
18792 (attached): New static variable, moved out of main.
18793 (main): Quiet longjmp clobber warnings.
18794 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18795 * utils.c (error): Remove NORETURN.
18796 (fatal): Likewise.
This page took 3.041909 seconds and 4 git commands to generate.